Examples of saveOntology()


Examples of org.apache.stanbol.cmsadapter.core.helper.TcManagerClient.saveOntology()

        this.ontologyResourceHelper = new OntologyResourceHelper(this);
    }

    private void storeOntology() {
        TcManagerClient tcManagerClient = new TcManagerClient(tcManager);
        tcManagerClient.saveOntology(ontModel, ontologyURI);
    }

    protected void bindProcessor(Processor processor) {
        synchronized (processors) {
            processors.add(processor);
View Full Code Here

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

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

          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

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

          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

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

        physicalURI);
    manager.addURIMapper(mapper);

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

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

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

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

        reasoner.unloadOntologies(Collections
View Full Code Here

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

    public void testWriteReadConvertedOWL() throws Exception {
        OBODoc oboDoc = parseOBOFile("namespace-id-rule.obo");
        OWLOntology owlOntology = convert(oboDoc);
        OWLOntologyManager manager = owlOntology.getOWLOntologyManager();
        StringDocumentTarget documentTarget = new StringDocumentTarget();
        manager.saveOntology(owlOntology, new OWLXMLDocumentFormat(),
                documentTarget);
        String owlString = documentTarget.toString();
        OWLOntologyDocumentSource documentSource = new StringDocumentSource(
                owlString);
        OWLOntology reloadedOwl = OWLManager.createOWLOntologyManager()
View Full Code Here

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

        OWLOntologyManager m = create();
        OWLOntology o = loadPizzaOntology(m);
        assertNotNull(o);
        // save an ontology to a document target which holds all data in memory
        StringDocumentTarget target = new StringDocumentTarget();
        m.saveOntology(o, target);
        // remove the ontology from the manager, so it can be loaded again
        m.removeOntology(o);
        // create a document source from a string
        StringDocumentSource documentSource = new StringDocumentSource(target);
        // load the ontology from a document source
View Full Code Here

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

        // Output will be deleted on exit; to keep temporary file replace
        // previous line with the following
        // File output = File.createTempFile("saved_pizza", ".owl");
        IRI documentIRI2 = IRI.create(output);
        // save in OWL/XML format
        m.saveOntology(o, new OWLXMLDocumentFormat(), documentIRI2);
        // save in RDF/XML
        m.saveOntology(o, documentIRI2);
        // print out the ontology
        StringDocumentTarget target = new StringDocumentTarget();
        m.saveOntology(o, target);
View Full Code Here

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

        // File output = File.createTempFile("saved_pizza", ".owl");
        IRI documentIRI2 = IRI.create(output);
        // save in OWL/XML format
        m.saveOntology(o, new OWLXMLDocumentFormat(), documentIRI2);
        // save in RDF/XML
        m.saveOntology(o, documentIRI2);
        // print out the ontology
        StringDocumentTarget target = new StringDocumentTarget();
        m.saveOntology(o, target);
        // Remove the ontology from the manager
        m.removeOntology(o);
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.