Examples of StreamDocumentSource


Examples of org.semanticweb.owlapi.io.StreamDocumentSource

            OWLOntologyDocumentSource oConfSrc = null;

            try {
                log.debug("Try to load the configuration ontology from a local bundle relative path");
                InputStream is = this.getClass().getResourceAsStream(configPath);
                oConfSrc = new StreamDocumentSource(is);
            } catch (Exception e1) {
                try {
                    log.debug("Cannot load from a local bundle relative path", e1);
                    log.debug("Try to load the configuration ontology resolving the given IRI");
                    IRI iri = IRI.create(configPath);
View Full Code Here

Examples of org.semanticweb.owlapi.io.StreamDocumentSource

                if (iri.isAbsolute()) src = new IRIDocumentSource(iri);
                else {
                    // Relative IRI : use data file provider
                    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);
View Full Code Here

Examples of org.semanticweb.owlapi.io.StreamDocumentSource

    public OWLOntology loadOntologyFromOntologyDocument(File file) throws OWLOntologyCreationException {
        return loadOntologyFromOntologyDocument(new FileDocumentSource(file));
    }

    public OWLOntology loadOntologyFromOntologyDocument(InputStream inputStream) throws OWLOntologyCreationException {
        return loadOntologyFromOntologyDocument(new StreamDocumentSource(inputStream));
    }
View Full Code Here

Examples of org.semanticweb.owlapi.io.StreamDocumentSource

                if (iri.isAbsolute()) src = new IRIDocumentSource(iri);
                else {
                    // Relative IRI : use data file provider
                    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);
View Full Code Here

Examples of org.semanticweb.owlapi.io.StreamDocumentSource

            OWLOntologyDocumentSource oConfSrc = null;

            try {
                log.debug("Try to load the configuration ontology from a local bundle relative path");
                InputStream is = this.getClass().getResourceAsStream(configPath);
                oConfSrc = new StreamDocumentSource(is);
            } catch (Exception e1) {
                try {
                    log.debug("Cannot load from a local bundle relative path", e1);
                    log.debug("Try to load the configuration ontology resolving the given IRI");
                    IRI iri = IRI.create(configPath);
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.