Package com.hp.hpl.jena.graph.impl

Examples of com.hp.hpl.jena.graph.impl.FileGraphMaker


        @param root the name of the directory in which the backing files are held
        @return a ModelMaker linked to the files in the root
    */
    public static ModelMaker createFileModelMaker( String root )
        { return new ModelMakerImpl( new FileGraphMaker( root ) ); }
View Full Code Here


        @param style the desired reification style
        @return a ModelMaker linked to the files in the root
    */
    @Deprecated
    public static ModelMaker createFileModelMaker( String root, ReificationStyle style )
        { return new ModelMakerImpl( new FileGraphMaker( root ) ); }
View Full Code Here

        @param root the name of the directory in which the backing files are held
        @return a ModelMaker linked to the files in the root
    */
    public static ModelMaker createFileModelMaker( String root )
        { return new ModelMakerImpl( new FileGraphMaker( root ) ); }
View Full Code Here

        @param root the name of the directory in which the backing files are held
        @param style the desired reification style
        @return a ModelMaker linked to the files in the root
    */
    public static ModelMaker createFileModelMaker( String root, ReificationStyle style )
        { return new ModelMakerImpl( new FileGraphMaker( root, style ) ); }
View Full Code Here

        { return new TestSuite( TestFileGraphMaker.class ); }

    @Override
    public GraphMaker getGraphMaker()
        { String scratch = FileUtils.getScratchDirectory( "jena-test-FileGraphMaker" ).getPath();
        return new FileGraphMaker( scratch, true ); }
View Full Code Here

    public void testDetectsExistingFiles()
        {
        File scratch = FileUtils.getScratchDirectory( "jena-test-FileGraphMaker-already" );
        Graph content = graphWith( "something hasProperty someValue" );
        FileGraphMaker A = new FileGraphMaker( scratch.getPath(), true );
        FileGraphMaker B = new FileGraphMaker( scratch.getPath(), true );
        FileGraph gA = (FileGraph) A.createGraph( "already", true );
        GraphUtil.addInto( gA, content );
        gA.close();
        FileGraph gB = (FileGraph) B.openGraph( "already", false );
        assertIsomorphic( content, gB );
        gB.close();
        gB.delete();
        gA.delete();
        }
View Full Code Here

        }
   
    public void testDeletesFilesOfClosedMaker()
        {
        File scratch = FileUtils.getScratchDirectory( "jena-test-FileGraphMaker-forgets" );
        FileGraphMaker A = new FileGraphMaker( scratch.getPath(), true );
        A.createGraph( "empty" ).close();
        assertTrue( "file 'empty' should exist in '" + scratch + "'", new File( scratch, "empty" ) .exists() );
        A.close();
        assertFalse( "file 'empty' should no longer exist in '" + scratch + "'", new File( scratch, "empty" ) .exists() );
        }
View Full Code Here

        }
   
    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();
        }
View Full Code Here

        }
   
    public void testDoesntReusedClosedGraphs()
        {
        File scratch = FileUtils.getScratchDirectory( "jena-test-FileGraphMaker-noReuse" );
        FileGraphMaker m = new FileGraphMaker( scratch.getPath(), true );
        Graph m1 = m.createGraph( "hello" );
        m1.close();
        Graph m2 = m.createGraph( "hello" );
        assertNotSame( m1, m2 );
        m2.add( triple( "this graph isOpen" ) );
        m.close();
        }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.graph.impl.FileGraphMaker

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.