Package org.apache.jena.riot.system.stream

Examples of org.apache.jena.riot.system.stream.LocatorFile


    @BeforeClass static public void beforeClass()
    {
        streamMgrStd = StreamManager.get() ;
        streamMgrDir = new StreamManager() ;
        // Not current directory.
        streamMgrDir.addLocator(new LocatorFile(directory)) ;
        streamMgrDir.addLocator(new LocatorHTTP()) ;
       
        streamMgrHere = new StreamManager() ;
        // Not current directory.
        streamMgrHere.addLocator(new LocatorFile()) ;
        streamMgrHere.addLocator(new LocatorHTTP()) ;
       
        streamMgrNull = new StreamManager() ;
    }
View Full Code Here


{
    public static final String testingDir = "testing/RIOT/Files/" ;
   
    @Test public void locatorFile_01()
    {
        LocatorFile loc = new LocatorFile() ;
        assertTrue(loc.exists("pom.xml")) ;
        assertTrue(loc.exists(testingDir+"data.ttl")) ;
        assertFalse(loc.exists("IDoNotExist")) ;
    }
View Full Code Here

        assertFalse(loc.exists("IDoNotExist")) ;
    }
   
    @Test public void locatorFile_02()
    {
        LocatorFile loc = new LocatorFile(".") ;
        assertTrue(loc.exists("pom.xml")) ;
        assertTrue(loc.exists(testingDir+"data.ttl")) ;
        assertFalse(loc.exists("IDoNotExist")) ;
    }
View Full Code Here

    }

    @Test public void locatorFile_03()
    {
        String dir = new File(".").getAbsolutePath() ;
        LocatorFile loc = new LocatorFile(dir) ;
        assertTrue(loc.exists("pom.xml")) ;
        assertFalse(loc.exists("IDoNotExist")) ;
    }
View Full Code Here

    }
   
    @Test public void locatorFile_04()
    {
        String dir = new File("src").getAbsolutePath() ;
        LocatorFile loc = new LocatorFile(dir) ;
       
        assertFalse(loc.exists("pom.xml")) ;
        assertTrue(loc.exists("main")) ;
        assertFalse(loc.exists(testingDir+"data.ttl")) ;
        assertTrue(loc.exists("../pom.xml")) ;
        assertFalse(loc.exists("/../"+testingDir+"data.ttl")) ;
    }
View Full Code Here

        assertFalse(loc.exists("/../"+testingDir+"data.ttl")) ;
    }
   
    @Test public void locatorFile_05()
    {
        LocatorFile loc = new LocatorFile() ;
        TypedInputStream ts = loc.open(testingDir+"data.ttl") ;
        assertTrue("Not equal: "+WebContent.contentTypeTurtle+" != "+ts.getMediaType(),
                   WebContent.contentTypeTurtle.equalsIgnoreCase(ts.getContentType())) ;
    }
View Full Code Here

TOP

Related Classes of org.apache.jena.riot.system.stream.LocatorFile

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.