Examples of loadOntologyFromOntologyDocument()


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

        IRI documentIRI = IRI.create(inputOntology);
        IRI classIRI = IRI.create(classToClose);
        IRI outputDocumentIRI = IRI.create(outputOntology);
        /* Load an ontology */
        System.out.println("Loading: " + documentIRI);
        OWLOntology ontology = manager
                .loadOntologyFromOntologyDocument(documentIRI);
        System.out.println("Ontology Loaded...");
        System.out.println("Logical URI : " + documentIRI);
        System.out.println("Document IRI: " + ontology.getOntologyID());
        System.out.println("Format      : "
View Full Code Here

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

        /* Get an Ontology Manager */
        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
        IRI inputDocumentIRI = IRI.create(inputOntology);
        IRI outputDocumentIRI = IRI.create(outputOntology);
        /* Load an ontology from a document IRI */
        OWLOntology ontology = manager
                .loadOntologyFromOntologyDocument(inputDocumentIRI);
        /* Report information about the ontology */
        System.out.println("Ontology Loaded...");
        System.out.println("Document IRI: " + inputDocumentIRI);
        System.out.println("Logical IRI : " + ontology.getOntologyID());
View Full Code Here

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

    }

    @Test
    public void testManualImports() throws OWLOntologyCreationException {
        OWLOntologyManager manager = getManager();
        manager.loadOntologyFromOntologyDocument(new File(RESOURCES, superpath));
        assertNotNull(manager.getOntology(IRI(str)));
    }

    private static OWLOntologyManager getManager() {
        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
View Full Code Here

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

    }

    @Test
    public void testEquivalentLoading() throws OWLOntologyCreationException {
        OWLOntologyManager managerStart = getManager();
        OWLOntology manualImport = managerStart
                .loadOntologyFromOntologyDocument(new File(RESOURCES, superpath));
        OWLOntologyManager managerTest = getManager();
        OWLOntology iriImport = managerTest.loadOntology(IRI(str));
        assertEquals(manualImport.getAxioms(), iriImport.getAxioms());
        assertEquals(manualImport.getOntologyID(), iriImport.getOntologyID());
View Full Code Here

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

    @Test
    public void testImports() throws OWLOntologyCreationException {
        OWLOntologyManager manager = getManager();
        String subpath = "/imports/thesubont.omn";
        manager.loadOntologyFromOntologyDocument(new File(RESOURCES, subpath));
    }
}
View Full Code Here

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

            ren.setShortFormProvider(sfp);
            ToStringRenderer.getInstance().setRenderer(ren);

            OWLOntologyManager man = OWLManager.createOWLOntologyManager();
//            OWLOntology ont = man.loadOntologyFromOntologyDocument(URI.create("http://www.co-ode.org/ontologies/pizza/pizza.owl"));
            OWLOntology ont = man.loadOntologyFromOntologyDocument(IRI.create("http://owl.cs.manchester.ac.uk/repository/download?ontology=http://protege.cim3.net/file/pub/ontologies/tambis/tambis-full.owl&format=RDF/XML"));
            System.out.println("Loaded ontology");
            check(ont, new OWL2Profile());
            check(ont, new OWL2DLProfile());
            check(ont, new OWL2ELProfile());
            check(ont, new OWL2QLProfile());
View Full Code Here

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

      IRI iri2 = null;
      // Get hold of an ontology manager
      OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
      if (peOutputURI.equals(peInputURI)) {
        iri1 = IRI.create(peOutput);
        ontology1 = manager.loadOntologyFromOntologyDocument(iri1);
        LOG.debug("Loaded ontology: " + ontology1);
        if (!ontology1.containsClassInSignature(iri1)) {
          throw new ActivityUserException(
              new ActivityInferenceException(
                  "ActivityInferenceException",
View Full Code Here

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

   * @throws Exception
   */
  public static OOntology loadOntology(File file) throws IOntologyException {
    OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
    try{
      return new OOntology(manager.loadOntologyFromOntologyDocument(file));
    } catch (OWLOntologyCreationException e) {
      throw new IOntologyException("Unable to create ontology "+file,e);
    }
  }
 
View Full Code Here

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

   * @throws Exception
   */
  public static OOntology loadOntology(URL file) throws IOntologyException {
    OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
    try {
      return new OOntology(manager.loadOntologyFromOntologyDocument(IRI.create(file)));
    } catch (OWLOntologyCreationException e) {
      throw new IOntologyException("Unable to create ontology "+file,e);
    } catch (URISyntaxException e) {
      throw new IOntologyException("Unable to create ontology "+file,e);
    }
View Full Code Here

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

   * @throws Exception
   */
  public static OOntology loadOntology(File file) throws IOntologyException {
    OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
    try{
      return new OOntology(manager.loadOntologyFromOntologyDocument(file));
    } catch (OWLOntologyCreationException e) {
      throw new IOntologyException("Unable to create ontology "+file,e);
    }
  }
 
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.