Examples of listGraphs()


Examples of com.hp.hpl.jena.graph.impl.FileGraphMaker.listGraphs()

    public void testForgetsClosedGraphs()
        {
        File scratch = FileUtils.getScratchDirectory( "jena-test-FileGraphMaker-forgets" );
        FileGraphMaker m = new FileGraphMaker( scratch.getPath(), true );
        m.createGraph( "example" ).close();
        assertEquals( new HashSet<String>(), m.listGraphs().toSet() );
        m.close();
        }
   
    public void testDoesntReusedClosedGraphs()
        {
View Full Code Here

Examples of com.hp.hpl.jena.graph.impl.SimpleGraphMaker.listGraphs()

        assertEquals( count0 + 1, subModel0.size() );

        // TODO this workaround to be removed
        SimpleGraphMaker sgm = (SimpleGraphMaker) ((ModelMakerImpl) spec.getImportModelMaker()).getGraphMaker();
        List<String> toGo = new ArrayList<String>();
        for (Iterator<String> i = sgm.listGraphs(); i.hasNext(); toGo.add( i.next() )) {/**/}
        for (Iterator<String> i = toGo.iterator(); i.hasNext(); sgm.removeGraph( i.next() )) {/**/}
        spec.getDocumentManager().clearCache();

        OntModel m1 = ModelFactory.createOntologyModel(spec, null);
        m1.read( "http://incubator.apache.org/jena/2011/10/testont/a" );
View Full Code Here

Examples of com.hp.hpl.jena.graph.impl.SimpleGraphMaker.listGraphs()

        assertEquals( count0 + 1, subModel0.size() );

        // TODO this workaround to be removed
        SimpleGraphMaker sgm = (SimpleGraphMaker) ((ModelMakerImpl) spec.getImportModelMaker()).getGraphMaker();
        List<String> toGo = new ArrayList<String>();
        for (Iterator<String> i = sgm.listGraphs(); i.hasNext(); toGo.add( i.next() )) {/**/}
        for (Iterator<String> i = toGo.iterator(); i.hasNext(); sgm.removeGraph( i.next() )) {/**/}
        spec.getDocumentManager().clearCache();

        OntModel m1 = ModelFactory.createOntologyModel(spec, null);
        m1.read( "http://incubator.apache.org/jena/2011/10/testont/a" );
View Full Code Here

Examples of com.hp.hpl.jena.graph.impl.SimpleGraphMaker.listGraphs()

        assertEquals( count0 + 1, subModel0.size() );

        // TODO this workaround to be removed
        SimpleGraphMaker sgm = (SimpleGraphMaker) ((ModelMakerImpl) spec.getImportModelMaker()).getGraphMaker();
        List<String> toGo = new ArrayList<>();
        for (Iterator<String> i = sgm.listGraphs(); i.hasNext(); toGo.add( i.next() )) {/**/}
        for (Iterator<String> i = toGo.iterator(); i.hasNext(); sgm.removeGraph( i.next() )) {/**/}
        spec.getDocumentManager().clearCache();

        OntModel m1 = ModelFactory.createOntologyModel(spec, null);
        m1.read( "http://incubator.apache.org/jena/2011/10/testont/a" );
View Full Code Here

Examples of com.hp.hpl.jena.graph.impl.SimpleGraphMaker.listGraphs()

        assertEquals( count0 + 1, subModel0.size() );

        // TODO this workaround to be removed
        SimpleGraphMaker sgm = (SimpleGraphMaker) ((ModelMakerImpl) spec.getImportModelMaker()).getGraphMaker();
        List<String> toGo = new ArrayList<String>();
        for (Iterator<String> i = sgm.listGraphs(); i.hasNext(); toGo.add( i.next() )) {/**/}
        for (Iterator<String> i = toGo.iterator(); i.hasNext(); sgm.removeGraph( i.next() )) {/**/}
        spec.getDocumentManager().clearCache();

        OntModel m1 = ModelFactory.createOntologyModel(spec, null);
        m1.read( "http://incubator.apache.org/jena/2011/10/testont/a" );
View Full Code Here

Examples of com.hp.hpl.jena.graph.impl.SimpleGraphMaker.listGraphs()

        assertEquals( count0 + 1, subModel0.size() );

        // TODO this workaround to be removed
        SimpleGraphMaker sgm = (SimpleGraphMaker) ((ModelMakerImpl) spec.getImportModelMaker()).getGraphMaker();
        List<String> toGo = new ArrayList<String>();
        for (Iterator<String> i = sgm.listGraphs(); i.hasNext(); toGo.add( i.next() )) {/**/}
        for (Iterator<String> i = toGo.iterator(); i.hasNext(); sgm.removeGraph( i.next() )) {/**/}
        spec.getDocumentManager().clearCache();

        OntModel m1 = ModelFactory.createOntologyModel(spec, null);
        m1.read( "http://incubator.apache.org/jena/2011/10/testont/a" );
View Full Code Here

Examples of org.apache.clerezza.rdf.core.access.TcProvider.listGraphs()

        TcProvider provider = getInstance();
        //No union graph in listMGraphs
        Set<UriRef> mgl = provider.listMGraphs();
        Assert.assertFalse("Mgraph list don't contain the read-only union-graph", mgl.contains(UNION_GRAPH_NAME));
        //Union graph in listGraphs
        Set<UriRef> gl = provider.listGraphs();
        Assert.assertTrue("Graph list contain the read-only union-graph", gl.contains(UNION_GRAPH_NAME));
    }
}
View Full Code Here

Examples of org.apache.clerezza.rdf.core.access.TcProvider.listGraphs()

      TcProvider provider = getInstance();
      //No union graph in listMGraphs
      Set<UriRef> mgl = provider.listMGraphs();
        Assert.assertFalse("Mgraph list don't contain the read-only union-graph", mgl.contains(UNION_GRAPH_NAME));
        //Union graph in listGraphs
        Set<UriRef> gl = provider.listGraphs();
        Assert.assertTrue("Graph list contain the read-only union-graph", gl.contains(UNION_GRAPH_NAME));
    }
}
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.