Package org.semanticweb.owlapi.model

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


        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) {
            try {
                src = "./src/main/resources/RuleOntology/OffLineKReSOntologyRules.owl";
                assertEquals(owlmodel, owlmanager.loadOntologyFromOntologyDocument(new File(src)));
            } catch (OWLOntologyCreationException ex) {
View Full Code Here


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

        // Refactor
        return refactorer.ontologyRefactoring(inputOntology, actualRecipe);
    }
View Full Code Here

            src = "./src/main/resources/RuleOntology/TestKReSOntologyRules.owl";
            assertEquals(owlmodel, owlmanager.loadOntologyFromOntologyDocument(new File(src)));
        } catch (Exception e) {
            try {
                src = "./src/main/resources/RuleOntology/OffLineKReSOntologyRules.owl";
                assertEquals(owlmodel, owlmanager.loadOntologyFromOntologyDocument(new File(src)));
            } catch (OWLOntologyCreationException ex) {
                fail("OWLOntologyCreationException caught when loading from " + src);
            }
        }
    }
View Full Code Here

        IRI recipeIRI = IRI.create(recipe);

        OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
        OWLOntology inputOntology;
        try {
            inputOntology = manager.loadOntologyFromOntologyDocument(input);

            OWLOntology outputOntology;
            try {
                outputOntology = refactorer.ontologyRefactoring(inputOntology, recipeIRI);
            } catch (RefactoringException e) {
View Full Code Here

            if (oConfSrc == null) {
                log.warn("No ONM configuration file found at path " + configPath
                         + ". Starting with blank scope set.");
            } else {
                try {
                    oConf = tempMgr.loadOntologyFromOntologyDocument(oConfSrc);
                } catch (OWLOntologyCreationException e) {
                    log.error("Cannot create the configuration ontology", 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.