Examples of loadOntologyFromOntologyDocument()


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

        String location = "/ontologies/naming/versionedonly.owl";

        InputStream in = getClass().getResourceAsStream(location);
        in.mark(Integer.MAX_VALUE);
        OWLOntologyManager onMgr = OWLManager.createOWLOntologyManager();
        OWLOntology o1 = onMgr.loadOntologyFromOntologyDocument(in);
        // Ensure that the OWL API erases the version IRI.
        assertTrue(o1.isAnonymous());
        assertNull(o1.getOntologyID().getVersionIRI());
        in.reset();
        // in = getClass().getResourceAsStream(location); // use if stream cannot be reset
View Full Code Here

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

        IRI url = IRI.create(getClass().getResource(location));

        OWLOntologyID expected = new OWLOntologyID(url);

        OWLOntologyManager onMgr = OWLManager.createOWLOntologyManager();
        OWLOntology o1 = onMgr.loadOntologyFromOntologyDocument(url);
        // Ensure that the OWL API erases the version IRI.
        assertTrue(o1.isAnonymous());
        assertNull(o1.getOntologyID().getVersionIRI());

        // The public key must be non-anonymous nonetheless.
View Full Code Here

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

        if (ruleList == null) return null;
        Recipe actualRecipe = new RecipeImpl(null, null, ruleList);

        // Parse the input ontology
        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
        OWLOntology inputOntology = manager.loadOntologyFromOntologyDocument(input);

        TripleCollection tripleCollection = refactorer.graphRefactoring(
            OWLAPIToClerezzaConverter.owlOntologyToClerezzaMGraph(inputOntology), actualRecipe);
        // Refactor
        return OWLAPIToClerezzaConverter.clerezzaGraphToOWLOntology(tripleCollection);
View Full Code Here

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

          UriRef recipeID = new UriRef(recipe);
         
            rcp = ruleStore.getRecipe(recipeID);

            OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
            OWLOntology inputOntology = manager.loadOntologyFromOntologyDocument(input);
            TripleCollection tripleCollection = refactorer.graphRefactoring(
                OWLAPIToClerezzaConverter.owlOntologyToClerezzaMGraph(inputOntology), rcp);
            OWLOntology outputOntology = OWLAPIToClerezzaConverter
                    .clerezzaGraphToOWLOntology(tripleCollection);
            rb = Response.ok(outputOntology);
View Full Code Here

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

                    log.debug("Found relative IRI {} . Will try to retrieve from data file providers.", iri);
                    Map<String,String> info = new HashMap<String,String>();
                    if (dataFileProvider != null && dataFileProvider.isAvailable(null, loc, info)) src = new StreamDocumentSource(
                            dataFileProvider.getInputStream(null, loc, info));
                }
                if (src != null) o = mgr.loadOntologyFromOntologyDocument(src, conf);
                if (o != null) regOnts.add(o);
                else log.warn("Failed to obtain OWL ontology from resource {}", loc);
            } catch (OWLOntologyAlreadyExistsException e) {
                log.info("Skipping cached ontology {}.", e.getOntologyID());
                continue;
View Full Code Here

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

                jenamodel.write(out, format);

                OWLOntologyManager owlmanager = OWLManager.createOWLOntologyManager();

                OWLOntology owlmodel = owlmanager.loadOntologyFromOntologyDocument(new ByteArrayInputStream(
                        out.toByteArray()));

                availablemain = true;
                notifyAll();
                return owlmodel;
View Full Code Here

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

                jenamodel.write(out, format);

                OWLOntologyManager owlmanager = OWLManager.createOWLOntologyManager();

                owlmanager.loadOntologyFromOntologyDocument(new ByteArrayInputStream(out.toByteArray()));

                OWLOntologyMerger merger = new OWLOntologyMerger(owlmanager);

                OWLOntology ontology = merger.createMergedOntology(owlmanager, ontologyIRI);
View Full Code Here

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

      // Create our ontology manager and data factory in the usual way.
      OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
      OWLDataFactory factory = manager.getOWLDataFactory();
     
      // Load a copy of the wine ontology.  We'll load the ontology from the web.
      OWLOntology ont = manager.loadOntologyFromOntologyDocument( IRI.create( PHYSICAL_URI ) );
     
      ReasonerConfiguration reasonerConfig = new ReasonerConfigurationImp();
      reasonerConfig.loadRemoteReasonerConfiguration(new File("reasoner.xml"));

      OWLReasonerFactory reasonerFactory = new HeraklesReasonerFactory( reasonerConfig, "de.fzi.herakles.strategy.impl.BasicLoadStrategy", "de.fzi.herakles.strategy.impl.BasicPStrategy" );
View Full Code Here

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

    OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
    OWLDataFactory factory2 = manager.getOWLDataFactory();
   
    URL url = new URL("http://127.0.0.1:8080");//Configure the server end-point
   
    org.semanticweb.owlapi.model.OWLOntology ont = manager.loadOntologyFromOntologyDocument(IRI.create( PHYSICAL_IRI ));
    OWLlinkHTTPXMLReasonerFactory factory = new OWLlinkHTTPXMLReasonerFactory();
   
    OWLlinkReasonerConfiguration reasonerConfiguration = new OWLlinkReasonerConfiguration(url);
   
    OWLReasoner reasoner = factory.createReasoner(ont, reasonerConfiguration);
View Full Code Here

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

      // Create our ontology manager and data factory in the usual way.
      OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
      OWLDataFactory factory = manager.getOWLDataFactory();
     
      // Load a copy of the wine ontology.  We'll load the ontology from the web.
      OWLOntology ont = manager.loadOntologyFromOntologyDocument( IRI.create( PHYSICAL_URI ) );
     
      ReasonerConfiguration reasonerConfig = new ReasonerConfigurationImp();
      reasonerConfig.loadRemoteReasonerConfiguration(new File("reasoner.xml"));

      OWLReasonerFactory reasonerFactory = new HeraklesReasonerFactory( reasonerConfig, "de.fzi.herakles.strategy.impl.BasicLoadStrategy", "de.fzi.herakles.strategy.impl.BasicPStrategy" );
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.