Package org.semanticweb.owl.model

Examples of org.semanticweb.owl.model.OWLOntologyManager.saveOntology()


          tboxMgr.applyChange(axiomToAdd);
          //logger.info("To Tbox: "+axiom.getClass()+" "+axiom.toString());
        }
      }
      tboxMgr.saveOntology(tbox);
      aboxMgr.saveOntology(abox);
     
      /* Remove all class axioms from the Abox that where added by the OWLManager */
      //abox = aboxMgr.getOntology(abox.getURI());
     
     
View Full Code Here


          AddAxiom axiomToAdd = new AddAxiom(tbox,axiom);
          tboxMgr.applyChange(axiomToAdd);       
        }
      }
      tboxMgr.saveOntology(tbox);
      aboxMgr.saveOntology(abox);
    }catch(OWLOntologyCreationException e){logger.error(e);}
     catch(OWLOntologyChangeException e){logger.error(e);}
     catch(OWLOntologyStorageException e){logger.error(e);}
  }
View Full Code Here

          System.out.println((i+1)+"- new axiom: "+newAxiom.toString());
        }       
        manager.applyChanges(toAdd);
        OutputStreamWriter sw = new FileWriter(new File(outputFile));
        OWLOntologyOutputTarget target = new WriterOutputTarget(sw);
        manager.saveOntology(ontology, target);
        return true;
      } catch (OWLOntologyChangeException e) {
        e.printStackTrace();
        return false;
      } catch (IOException e) {
View Full Code Here

        physicalURI);
    manager.addURIMapper(mapper);

    try
    {
      manager.saveOntology(ontology, new RDFXMLOntologyFormat(),
          physicalURI);
    } catch (UnknownOWLOntologyException e)
    {
    } catch (OWLOntologyStorageException e)
    {
View Full Code Here

          /*
           * System.out.println(newAboxPhysicalURI.toString() + ", " +
           * newAboxURI);
           */

          manager.saveOntology(modifiedAboxOntology,
              newAboxPhysicalURI);
          aboxPhysicalURI = newAboxPhysicalURI;
        }

        reasoner.unloadOntologies(Collections
View Full Code Here

    } catch( SAXException e ) {
      throw new RuntimeException( e );
    }

    try {
      manager.saveOntology( ontology, new StreamOutputTarget( out ) );
    } catch( UnknownOWLOntologyException e ) {
      throw new RuntimeException( e );
    } catch( OWLOntologyStorageException e ) {
      throw new IOException( e.getMessage() );
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.