Examples of removeOntology()


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

      for (OWLClass owlClass : this.classes){
        Set<OWLDescription> subClasses = owlClass.getSubClasses(tbox);
        this.sortedList.add(new OWLSubclass(owlClass,subClasses.size()));
      }
     
      manager.removeOntology(tboxURI);
    } catch (OWLOntologyCreationException e) {
      e.printStackTrace();
      // Provide a default order
      for (OWLClass owlClass : this.classes){
        this.sortedList.add(new OWLSubclass(owlClass,0));
View Full Code Here

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

        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
        OWLOntology o2 = m.loadOntologyFromOntologyDocument(documentSource);
        assertNotNull(o2);
View Full Code Here

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

        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);
    }

    @Test
    public void testIRIMapper() throws Exception {
        OWLOntologyManager m = OWLManager.createOWLOntologyManager();
View Full Code Here

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

            if (f != null) {
                setOntologyFormat(toReturn, f);
            }
        }
        if (settings == OntologyCopy.MOVE) {
            m.removeOntology(toCopy);
            // at this point toReturn and toCopy are the same object
            // change the manager on the ontology
            toReturn.setOWLOntologyManager(this);
        }
        return toReturn;
View Full Code Here

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

                                        consumer.getOntology(), anno));
                            }
                            for (OWLAxiom ax : importedOntology.getAxioms()) {
                                consumer.addAxiom(ax);
                            }
                            man.removeOntology(importedOntology);
                        }
                    }
                }
                consumer.importsClosureChanged();
            }
View Full Code Here

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

    public void shouldLoad() throws Exception {
        // Get hold of an ontology manager
        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
        OWLOntology pizzaOntology = loadPizza(manager);
        // Remove the ontology so that we can load a local copy.
        manager.removeOntology(pizzaOntology);
        OWLOntology localPizza = loadPizza(manager);
        // We can always obtain the location where an ontology was loaded from;
        // for this test, though, since the ontology was loaded from a string,
        // this does not return a file
        IRI documentIRI = manager.getOntologyDocumentIRI(localPizza);
View Full Code Here

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

        // We can always obtain the location where an ontology was loaded from;
        // for this test, though, since the ontology was loaded from a string,
        // this does not return a file
        IRI documentIRI = manager.getOntologyDocumentIRI(localPizza);
        // Remove the ontology again so we can reload it later
        manager.removeOntology(pizzaOntology);
        // In cases where a local copy of one of more ontologies is used, an
        // ontology IRI mapper can be used to provide a redirection mechanism.
        // This means that ontologies can be loaded as if they were located on
        // the web. In this example, we simply redirect the loading from
        // http://owl.cs.manchester.ac.uk/co-ode-files/ontologies/pizza.owl to
View Full Code Here

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

        // the format that the ontology was loaded in).
        File f = folder.newFile("owlapiexample_example1.xml");
        IRI documentIRI2 = IRI.create(f);
        manager.saveOntology(ontology, new OWLXMLDocumentFormat(), documentIRI2);
        // Remove the ontology from the manager
        manager.removeOntology(ontology);
    }

    @Test
    public void shouldAddAxiom() throws Exception {
        // Create the manager that we will use to load ontologies.
View Full Code Here

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

        System.out.println("Saving: " + outputDocumentIRI);
        manager.saveOntology(ontology, outputDocumentIRI);
        System.out.println("Ontology Saved...");
        System.out.println("Document IRI : " + outputDocumentIRI);
        /* Remove the ontology from the manager */
        manager.removeOntology(ontology);
        System.out.println("Done");
    }
}
View Full Code Here

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

        /* Save using a different format */
        System.out.println("Storing     : " + outputDocumentIRI);
        manager.saveOntology(ontology, new OWLTutorialSyntaxOntologyFormat(),
                outputDocumentIRI);
        /* Remove the ontology from the manager */
        manager.removeOntology(ontology);
        System.out.println("Done");
    }
}
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.