Package org.apache.stanbol.ontologymanager.ontonet.api.io

Examples of org.apache.stanbol.ontologymanager.ontonet.api.io.GraphSource


        parser.parse(tcManager.createMGraph(uri), inputStream, SupportedFormat.RDF_XML, uri);
        uri = new UriRef(Locations.CHAR_MINOR.toString());
        inputStream = TestClerezzaInputSources.class.getResourceAsStream("/ontologies/minorcharacters.owl");
        parser.parse(tcManager.createMGraph(uri), inputStream, SupportedFormat.RDF_XML, uri);

        gis = new GraphSource(new UriRef(Locations.CHAR_ACTIVE.toString()));
        assertNotNull(gis);
        assertNotNull(gis.getRootOntology());
        Set<TripleCollection> imported = gis.getImports(false);
        // Number of stored graphs minus the importing one minus the reserved graph = imported graphs
        assertEquals(tcManager.listTripleCollections().size() - 2, imported.size());
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

    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 RootOntologyIRISource(IRI.create(TestClerezzaSpaces.class
                .getResource("/ontologies/maincharacters.owl")));
View Full Code Here

TOP

Related Classes of org.apache.stanbol.ontologymanager.ontonet.api.io.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.