Package com.hp.hpl.jena.eyeball.loaders

Examples of com.hp.hpl.jena.eyeball.loaders.FileLoader


    public TestFileLoader()
        { super( "TestFileLoader" ); }
   
    @Test public void testFileLoaderConstruction()
        {
        FileLoader fl = new FileLoader();
        assertSame( FileManager.get(), fl.getFileManager() );
        }
View Full Code Here


   
    @Test public void testFileLoaderConstructionWithFileManager()
        {
        Model m = modelWithStatements( "" );
        TestFileInsertion.FakeFileManager fm = new TestFileInsertion.FakeFileManager( "A", m );
        FileLoader fl = new FileLoader( fm );
        assertSame( fm, fl.getFileManager() );
        assertSame( m, fl.load( "A" ) );
        }
View Full Code Here

   
    @Test public void testFileLoaderRespectsJA()
        {
        Model af = modelWithStatements( "my:root rdf:type ja:MemoryModel; my:root ja:quotedContent a; a P b" );
        TestFileInsertion.FakeFileManager fm = new TestFileInsertion.FakeFileManager( "af.ttl", af );
        FileLoader fl = new FileLoader( fm );
        Model actual = fl.load( "ja:my:root@af.ttl" );
        assertNotNull( "must find the specified model", actual );
        assertIsoModels( modelWithStatements( "a P b" ), actual );
        }
View Full Code Here

   
    @Test public void testMissingJAFileThrowsException()
        {
        Model af = modelWithStatements( "" );
        TestFileInsertion.FakeFileManager fm = new TestFileInsertion.FakeFileManager( "af.ttl", af );
        FileLoader fl = new FileLoader( fm );
        try
            {
            fl.load( "ja:my:root@doesNotExist" );
            fail( "should throw NotFoundException" );
            }
        catch (NotFoundException e)
            {
            assertEquals( "doesNotExist", e.getMessage() );
View Full Code Here

   
    @Test public void testBadRootThrowsException()
        {
        Model af = modelWithStatements( "my:root rdf:type ja:MemoryModel" );
        TestFileInsertion.FakeFileManager fm = new TestFileInsertion.FakeFileManager( "af.ttl", af );
        FileLoader fl = new FileLoader( fm );
        try
            {
            fl.load( "ja:no:root@af.ttl" );
            fail( "should throw NotFoundException" );
            }
        catch (NoSpecificTypeException e)
            {
            assertTrue( e.getMessage().contains( "no:root" ) );
View Full Code Here

    }
 
    private OntLoader createLoader()
      {
      Loader db = new JDBCLoader();
      Loader base = new FileLoader();
      OntLoader loader = new OntLoader( new JDBCSensitiveLoader( db, base ) );
      return loader;
      }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.eyeball.loaders.FileLoader

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.