Package org.semanticweb.owlapi.model

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


                log.info((arg0.isSuccessful() ? "Loaded" : "Failed")
                         + (arg0.isImported() ? " imported " : " ") + "ontology " + arg0.getDocumentIRI());
            }
        });

        mgr.addIRIMapper(new PhonyIRIMapper(null));

        File f = new File(url.toURI());
        OntologyInputSource<OWLOntology,?> src = new ParentPathInputSource(f, mgr);
        // OntologyInputSource<OWLOntology> src = new RootOntologyIRISource(IRI.create(f), mgr);
View Full Code Here


     */
    protected OWLOntology toOWLOntology(UriRef graphName, boolean forceMerge) throws OWLOntologyCreationException {

        OWLOntologyManager mgr = OWLManager.createOWLOntologyManager();
        // Never try to import
        mgr.addIRIMapper(new PhonyIRIMapper(Collections.<IRI> emptySet()));

        Set<UriRef> loaded = new HashSet<UriRef>();

        TripleCollection graph = store.getTriples(graphName);

View Full Code Here

                        IRI.create("http://ontologydesignpatterns.org/ont/iks/kres/rmi.owl"), IRI.create(u));
                mapper2 = new SimpleIRIMapper(
                        IRI.create("http://ontologydesignpatterns.org/ont/iks/kres/rmi_config.owl"),
                        IRI.create(getClass().getResource("/META-INF/conf/rmi_config.owl")));
                // mapper = new AutoIRIMapper(new File(u.toURI()), true);
                mgr.addIRIMapper(mapper1);
                mgr.addIRIMapper(mapper2);
            } catch (URISyntaxException e) {
                log.error("Failed to add default IRI mapping for resource directory.", e);
            }
View Full Code Here

                mapper2 = new SimpleIRIMapper(
                        IRI.create("http://ontologydesignpatterns.org/ont/iks/kres/rmi_config.owl"),
                        IRI.create(getClass().getResource("/META-INF/conf/rmi_config.owl")));
                // mapper = new AutoIRIMapper(new File(u.toURI()), true);
                mgr.addIRIMapper(mapper1);
                mgr.addIRIMapper(mapper2);
            } catch (URISyntaxException e) {
                log.error("Failed to add default IRI mapping for resource directory.", e);
            }

            // Rule ontology location not set
View Full Code Here

    public void testKReSRuleStore() throws Exception {
        OWLOntology owlmodel = store.getOntology();
        log.debug("Path for default store config is " + blankStore.getFilePath());
        assertNotNull(owlmodel);
        OWLOntologyManager owlmanager = OWLManager.createOWLOntologyManager();
        owlmanager.addIRIMapper(new AutoIRIMapper(new File("./src/main/resources/RuleOntology/"), false));
        String src = "";
        try {
            src = "./src/main/resources/RuleOntology/TestKReSOntologyRules.owl";
            assertEquals(owlmodel, owlmanager.loadOntologyFromOntologyDocument(new File(src)));
        } catch (Exception 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.