Examples of loadOntology()


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

    OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
   
    OWLOntology tbox = null, abox = null;
    try {
     
      tbox = manager.loadOntology(tboxURI);
      abox = manager.loadOntology(aboxURI);
     
      // Compute the number of direct individuals for each class
      for (OWLClass owlClass : v)
      {
View Full Code Here

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

   
    OWLOntology tbox = null, abox = null;
    try {
     
      tbox = manager.loadOntology(tboxURI);
      abox = manager.loadOntology(aboxURI);
     
      // Compute the number of direct individuals for each class
      for (OWLClass owlClass : v)
      {
        fillScores(owlClass, 1.0 * owlClass.getIndividuals(abox).size(), tbox, MAX_STEP);
View Full Code Here

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

    // Compute the ordered list of classes
    OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
   
    OWLOntology tbox = null;
    try {
      tbox = manager.loadOntology(tboxURI);
     
      // Compute the number of direct subclasses of each class
      for (OWLClass owlClass : this.classes){
        Set<OWLDescription> subClasses = owlClass.getSubClasses(tbox);
        this.sortedList.add(new OWLSubclass(owlClass,subClasses.size()));
View Full Code Here

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

    // Compute the ordered list of classes
    OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
    OWLOntology tbox = null;
   
    try {
      tbox = manager.loadOntology(tboxURI);
     
      // Compute the number of direct subclasses of each class
      for (OWLClass owlClass : this.classes){
        Set<OWLDescription> subClasses = owlClass.getSubClasses(tbox);
        this.sortedList.add(new OWLSubclass(owlClass,subClasses.size()));
View Full Code Here

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

        // Create a manager to work with
        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
        // Load the MGED ontology. There is a copy of the MGED ontology located
        // at the address pointed to by its ontology IRI (this is good practice
        // and is recommended in the OWL 2 spec).
        OWLOntology ontology = manager.loadOntology(mgedOntologyIri);
        // Print out the ontology IRI and its imported ontology IRIs
        printOntologyAndImports(manager, ontology);
        // We'll load the MGED ontology again, but this time, we'll get the
        // Protege ontology (that it imports) from the TONES repository. To tell
        // the ontology manager to do this we need to add an IRI mapper. We need
View Full Code Here

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

        manager.getIRIMappers().add(new SimpleIRIMapper(iri, IRI.create(file)));
        // Load the ontology as if we were loading it from the web (from its
        // ontology IRI)
        IRI pizzaOntologyIRI = IRI
                .create("http://owl.cs.manchester.ac.uk/co-ode-files/ontologies/pizza.owl");
        OWLOntology redirectedPizza = manager.loadOntology(pizzaOntologyIRI);
        IRI pizza = manager.getOntologyDocumentIRI(redirectedPizza);
        // Note that when imports are loaded an ontology manager will be
        // searched for mappings
    }
View Full Code Here

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

    @Test
    public void testRemoteIsParseable() throws OWLOntologyCreationException {
        OWLOntologyManager manager = getManager();
        IRI iri = IRI(str);
        OWLOntology ontology = manager.loadOntology(iri);
        assertEquals(1, ontology.getAxioms().size());
        assertEquals(ontology.getOntologyID().getOntologyIRI().get(), iri);
        assertNotNull(manager.getOntology(iri));
    }
View Full Code Here

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

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

    @Test
View Full Code Here

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

        }
        public void run(Reasoner hermit,Prefixes prefixes,StatusOutput status,PrintWriter output) {
            status.log(2,"Checking whether the loaded ontology entails the conclusion ontology");
            OWLOntologyManager m=OWLManager.createOWLOntologyManager();
            try {
                OWLOntology conclusions = m.loadOntology(conclusionIRI);
                EntailmentChecker checker=new EntailmentChecker(hermit, m.getOWLDataFactory());
                boolean isEntailed=checker.entails(conclusions.getLogicalAxioms());
                output.println(isEntailed);
            } catch (OWLOntologyCreationException e) {
                e.printStackTrace();
View Full Code Here

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

                status.log(2,"Processing "+ont.toString());
                status.log(2,String.valueOf(actions.size())+" actions");
                try {
                    long startTime=System.currentTimeMillis();
                    OWLOntologyManager ontologyManager=OWLManager.createOWLOntologyManager();
                    OWLOntology ontology=ontologyManager.loadOntology(ont);
                    long parseTime=System.currentTimeMillis()-startTime;
                    status.log(2,"Ontology parsed in "+String.valueOf(parseTime)+" msec.");
                    startTime=System.currentTimeMillis();
                    Reasoner hermit=new Reasoner(config,ontology);
                    long loadTime=System.currentTimeMillis()-startTime;
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.