Search in sources :

Example 6 with LocatorFile

use of org.apache.jena.riot.system.stream.LocatorFile in project jena by apache.

the class TestLocators method locatorFile_02.

@Test
public void locatorFile_02() {
    LocatorFile loc = new LocatorFile(".");
    assertTrue(loc.exists("pom.xml"));
    assertTrue(loc.exists(testingDir + "data.ttl"));
    assertFalse(loc.exists("IDoNotExist"));
}
Also used : LocatorFile(org.apache.jena.riot.system.stream.LocatorFile) BaseTest(org.apache.jena.atlas.junit.BaseTest) Test(org.junit.Test)

Example 7 with LocatorFile

use of org.apache.jena.riot.system.stream.LocatorFile in project jena by apache.

the class TestStreamManager method beforeClass.

@BeforeClass
public static 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();
}
Also used : LocatorHTTP(org.apache.jena.riot.system.stream.LocatorHTTP) StreamManager(org.apache.jena.riot.system.stream.StreamManager) LocatorFile(org.apache.jena.riot.system.stream.LocatorFile) BeforeClass(org.junit.BeforeClass)

Aggregations

LocatorFile (org.apache.jena.riot.system.stream.LocatorFile)7 Test (org.junit.Test)6 BaseTest (org.apache.jena.atlas.junit.BaseTest)5 File (java.io.File)2 StreamManager (org.apache.jena.riot.system.stream.StreamManager)2 TypedInputStream (org.apache.jena.atlas.web.TypedInputStream)1 Graph (org.apache.jena.graph.Graph)1 LocatorHTTP (org.apache.jena.riot.system.stream.LocatorHTTP)1 BeforeClass (org.junit.BeforeClass)1