Package org.semanticweb.owlapi.model

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


        OWLOntologyManager man = OWLManager.createOWLOntologyManager();
       
        // loading the root ontology
        OWLOntology root = null;
        try {
            root = man.loadOntologyFromOntologyDocument(new File(
                    "C:\\dev\\ontologies\\AMT\\amt3v.owl\\amt3v.owl"));
        } catch (OWLOntologyCreationException e) {
            e.printStackTrace();
            return;
        }
View Full Code Here


        OWLOntologyManager man = OWLManager.createOWLOntologyManager();
       
        // loading the root ontology
        OWLOntology root = null;
        try {
            root = man.loadOntologyFromOntologyDocument(new File(
                    "C:\\dev\\ontologies\\owl\\snomed_20130131_stated.owl"));
        } catch (OWLOntologyCreationException e) {
            e.printStackTrace();
            return;
        }
View Full Code Here

        try {
            long start = System.currentTimeMillis();
            System.out.println("Loading OWL ontology");
            OWLOntologyManager mgr = OWLManager.createOWLOntologyManager();
            OWLOntology ont = mgr.loadOntologyFromOntologyDocument(iri);
            SnorocketOWLReasoner c = new SnorocketOWLReasoner(ont, null, false);
            System.out.println("Took " + (System.currentTimeMillis() - start)
                    + "ms");

            start = System.currentTimeMillis();
View Full Code Here

      /*
     * Load the test and results ontology from local files before
     * reading the test cases, otherwise import of them is likely to
     * fail.
     */
    manager.loadOntologyFromOntologyDocument( OWLWGTestCase.class.getResourceAsStream(TEST_ONTOLOGY_PHYSICAL_IRI) );
    manager.loadOntologyFromOntologyDocument( OWLWGTestCase.class.getResourceAsStream(RESULTS_ONTOLOGY_PHYSICAL_IRI) );

    OWLOntology casesOntology = manager.loadOntologyFromOntologyDocument( OWLWGTestCase.class.getResourceAsStream(OWLWG_TEST_CASES_IRI) );
   
    try {
View Full Code Here

     * Load the test and results ontology from local files before
     * reading the test cases, otherwise import of them is likely to
     * fail.
     */
    manager.loadOntologyFromOntologyDocument( OWLWGTestCase.class.getResourceAsStream(TEST_ONTOLOGY_PHYSICAL_IRI) );
    manager.loadOntologyFromOntologyDocument( OWLWGTestCase.class.getResourceAsStream(RESULTS_ONTOLOGY_PHYSICAL_IRI) );

    OWLOntology casesOntology = manager.loadOntologyFromOntologyDocument( OWLWGTestCase.class.getResourceAsStream(OWLWG_TEST_CASES_IRI) );
   
    try {
        TestCollection<OWLOntology> cases = new TestCollection<OWLOntology>( factory, casesOntology, filter );
View Full Code Here

     * fail.
     */
    manager.loadOntologyFromOntologyDocument( OWLWGTestCase.class.getResourceAsStream(TEST_ONTOLOGY_PHYSICAL_IRI) );
    manager.loadOntologyFromOntologyDocument( OWLWGTestCase.class.getResourceAsStream(RESULTS_ONTOLOGY_PHYSICAL_IRI) );

    OWLOntology casesOntology = manager.loadOntologyFromOntologyDocument( OWLWGTestCase.class.getResourceAsStream(OWLWG_TEST_CASES_IRI) );
   
    try {
        TestCollection<OWLOntology> cases = new TestCollection<OWLOntology>( factory, casesOntology, filter );
       
        List<Object[]> testParams = new ArrayList<Object[]>( cases.size() );
View Full Code Here

            "/META-INF/test/").toURI()), false);

        OWLOntologyManager mgr = OWLManager.createOWLOntologyManager();
        mgr.addIRIMapper(map1);

        final OWLOntology recipeModel = mgr.loadOntologyFromOntologyDocument(recipeStream);

        mgr = OWLManager.createOWLOntologyManager();
        mgr.addIRIMapper(map1);

        ontology = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(ontologyStream);
View Full Code Here

                // default RuleConf dir exists
                if ((new File(filedir)).exists()) {
                    this.ruleOntologyLocation = filedir;
                    try {
                        owlmodel = // OWLManager.createOWLOntologyManager()
                        mgr.loadOntologyFromOntologyDocument(new File(ruleOntologyLocation));
                    } catch (OWLOntologyCreationException e) {
                        log.error("Cannot create the ontology " + filedir.toString(), e);
                    } catch (Exception e) {
                        log.error("1 Rule Store: no rule ontology available.", e);
                    }
View Full Code Here

                }

                ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());

                try {
                    ontologyManager.loadOntologyFromOntologyDocument(in);
                } catch (OWLOntologyCreationException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
View Full Code Here

                    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

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.