Package org.semanticweb.owlapi.io

Examples of org.semanticweb.owlapi.io.FileDocumentSource


    }

    @Override
    public OWLOntology loadOntologyFromOntologyDocument(File file)
            throws OWLOntologyCreationException {
        return loadOntologyFromOntologyDocument(new FileDocumentSource(file));
    }
View Full Code Here


                    oConfSrc = new IRIDocumentSource(iri);
                } catch (Exception e) {
                    try {
                        log.debug("Cannot load from the web", e1);
                        log.debug("Try to load the configuration ontology as full local file path");
                        oConfSrc = new FileDocumentSource(new File(configPath));
                    } catch (Exception e2) {
                        log.error("Cannot load the configuration ontology from parameter value: "
                                  + configPath, e2);
                    }
                }
View Full Code Here

    public static synchronized OWLOntologyDocumentSource getOntologyInputSource(URI uri) throws ODPRegistryCacheException,
                                                                                        URIUnresolvableException {
        if (getUnresolvedURIs().contains(uri)) throw new URIUnresolvableException();
        if (uris.containsKey(uri)) {
            File f = uris.get(uri);
            FileDocumentSource fds = new FileDocumentSource(f);
            return fds;
        } else {
            try {
                retrieveRemoteResource(uri);
                return getOntologyInputSource(uri);
View Full Code Here


            try {
                OWLOntologyLoaderConfiguration config = new OWLOntologyLoaderConfiguration();
                config = config.setMissingImportHandlingStrategy(MissingImportHandlingStrategy.SILENT);
                FileDocumentSource documentSource = new FileDocumentSource(rootOntologyDocument);
                logger.info(projectId, "Loading root ontology imports closure.");
                OWLOntology rootOntology = manager.loadOntologyFromOntologyDocument(documentSource, config);
                importsCacheManager.cacheImports(rootOntology);
                return rootOntology;
View Full Code Here

            this.baseDirectory = baseDirectory;
        }

        @Override
        public Collection<OWLOntologyDocumentSource> getDocumentSources() {
            return Lists.<OWLOntologyDocumentSource>newArrayList(new FileDocumentSource(rootOntologyDocument));
        }
View Full Code Here

            this.ontologyDocument = ontologyDocument;
        }

        @Override
        public Collection<OWLOntologyDocumentSource> getDocumentSources() {
            return Lists.<OWLOntologyDocumentSource>newArrayList(new FileDocumentSource(ontologyDocument));
        }
View Full Code Here

    public OWLOntology loadOntologyFromOntologyDocument(OWLOntologyDocumentSource documentSource, OWLOntologyLoaderConfiguration config) throws OWLOntologyCreationException {
        return loadOntology(null, documentSource, config);
    }

    public OWLOntology loadOntologyFromOntologyDocument(File file) throws OWLOntologyCreationException {
        return loadOntologyFromOntologyDocument(new FileDocumentSource(file));
    }
View Full Code Here

                    oConfSrc = new IRIDocumentSource(iri);
                } catch (Exception e) {
                    try {
                        log.debug("Cannot load from the web", e1);
                        log.debug("Try to load the configuration ontology as full local file path");
                        oConfSrc = new FileDocumentSource(new File(configPath));
                    } catch (Exception e2) {
                        log.error("Cannot load the configuration ontology from parameter value: "
                                  + configPath, e2);
                    }
                }
View Full Code Here

    public static synchronized OWLOntologyDocumentSource getOntologyInputSource(URI uri) throws ODPRegistryCacheException,
                                                                                        URIUnresolvableException {
        if (getUnresolvedURIs().contains(uri)) throw new URIUnresolvableException();
        if (uris.containsKey(uri)) {
            File f = uris.get(uri);
            FileDocumentSource fds = new FileDocumentSource(f);
            return fds;
        } else {
            try {
                retrieveRemoteResource(uri);
                return getOntologyInputSource(uri);
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.io.FileDocumentSource

Copyright © 2018 www.massapicom. 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.