Package org.apache.stanbol.ontologymanager.sources.clerezza

Examples of org.apache.stanbol.ontologymanager.sources.clerezza.GraphSource


    private static OfflineConfiguration offline;

    private static OntologyInputSource<TripleCollection> getLocalSource(String resourcePath) {
        InputStream is = TestOntologySpaces.class.getResourceAsStream(resourcePath);
        return new GraphSource(parser.parse(is, SupportedFormat.RDF_XML));
    }
View Full Code Here


        offline = new OfflineConfigurationImpl(new Hashtable<String,Object>());
        ScopeRegistry reg = new ScopeRegistryImpl();

        // This one is created from scratch
        MGraph ont2 = ClerezzaOWLUtils.createOntology(baseIri2.toString());
        minorSrc = new GraphSource(ont2.getGraph());
        dropSrc = getLocalSource("/ontologies/droppedcharacters.owl");
        nonexSrc = getLocalSource("/ontologies/nonexistentcharacters.owl");
        inMemorySrc = new ParentPathInputSource(new File(TestClerezzaSpaces.class.getResource(
            "/ontologies/maincharacters.owl").toURI()));
View Full Code Here

             *
             * There is no chance that (2) could be null, as it was previously controlled by the JobManager
             * through the canEnhance() method and the computeEnhancement is always called iff the former
             * returns true.
             */
            session.addOntology(new GraphSource(signaturesGraph));
            session.addOntology(new GraphSource(metadataGraph));
        } catch (UnmodifiableOntologyCollectorException e1) {
            throw new EngineException("Cannot add enhancement graph to OntoNet session for refactoring", e1);
        }

        try {
View Full Code Here

            } catch (OWLOntologyCreationException e) {
                throw new RuntimeException(e);
            }
            else if (ref instanceof UriRef) {
                log.debug("Deferring addition to stored Clerezza graph {} (if available).", ref);
                key = addOntology(new GraphSource((UriRef) ref));
            } else if (ref instanceof OWLOntologyID) {
                OWLOntologyID idref = (OWLOntologyID) ref;
                log.debug("Deferring addition to stored ontology with public key {} (if available).", ref);
                if (!ontologyProvider.hasOntology(idref)) throw new MissingOntologyException(this, idref);
                key = idref;
View Full Code Here

                if (coreSrc != null) {
                    if (coreSrc instanceof SetInputSource) {
                        for (Object o : ((SetInputSource<?>) coreSrc).getOntologies()) {
                            OntologyInputSource<?> src = null;
                            if (o instanceof OWLOntology) src = new RootOntologySource((OWLOntology) o);
                            else if (o instanceof TripleCollection) src = new GraphSource(
                                    (TripleCollection) o);
                            if (src != null) expanded.add(src);
                        }
                    } else expanded.add(coreSrc); // Must be denoting a single ontology
                }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.ontologymanager.sources.clerezza.GraphSource

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.