Examples of loadResources()


Examples of org.apache.stanbol.entityhub.indexing.core.source.ResourceLoader.loadResources()

        assertEquals(new HashSet<String>(Arrays.asList(rootDir+"singleFileTest.txt")),
            loader.getResources(ResourceState.REGISTERED));
        assertTrue(loader.getResources(ResourceState.ERROR).isEmpty());
        assertTrue(loader.getResources(ResourceState.LOADED).isEmpty());
        assertTrue(loader.getResources(ResourceState.IGNORED).isEmpty());
        loader.loadResources();
        assertEquals(new HashSet<String>(Arrays.asList(rootDir+"singleFileTest.txt")),
            loader.getResources(ResourceState.LOADED));
        assertTrue(loader.getResources(ResourceState.REGISTERED).isEmpty());
        assertTrue(loader.getResources(ResourceState.IGNORED).isEmpty());
        assertTrue(loader.getResources(ResourceState.ERROR).isEmpty());
View Full Code Here

Examples of org.apache.stanbol.entityhub.indexing.core.source.ResourceLoader.loadResources()

        loader.addResource(new File(rootDir,"testFolder"));
        assertEquals(expectedFolderResources, loader.getResources(ResourceState.REGISTERED));
        assertTrue(loader.getResources(ResourceState.ERROR).isEmpty());
        assertTrue(loader.getResources(ResourceState.LOADED).isEmpty());
        assertTrue(loader.getResources(ResourceState.IGNORED).isEmpty());
        loader.loadResources();
        assertEquals(new HashSet<String>(Arrays.asList(
            folder+"archiveInFolder.zip", folder+"fileInFolder.txt",
            folder+"otherFileInFolder.txt",folder+"archiveWithIgnore.zip",
            folder+"archiveWithError.zip")),
            loader.getResources(ResourceState.LOADED));
View Full Code Here

Examples of org.apache.stanbol.entityhub.indexing.core.source.ResourceLoader.loadResources()

        assertEquals(expectedResources, loader.getResources(ResourceState.REGISTERED));
        assertTrue(loader.getResources(ResourceState.ERROR).isEmpty());
        assertTrue(loader.getResources(ResourceState.LOADED).isEmpty());
        assertTrue(loader.getResources(ResourceState.IGNORED).isEmpty());
        loader.loadResources();
        assertEquals(new HashSet<String>(Arrays.asList(
            folder+"archiveInFolder.zip",
            folder+"archiveWithIgnore.zip", //ignored files in archives are OK
            folder+"fileInFolder.txt",folder+"otherFileInFolder.txt")),
            loader.getResources(ResourceState.LOADED));
View Full Code Here

Examples of org.apache.stanbol.entityhub.indexing.core.source.ResourceLoader.loadResources()

    DummyResourceImporter importer = new DummyResourceImporter(
        Arrays.asList(folder + "errorFileInFolder.txt"));
    ResourceLoader loader = new ResourceLoader(importer, false, failOnError);
    loader.addResource(new File(folder, "errorFileInFolder.txt"));
    try {
      loader.loadResources();
    } catch (IllegalStateException ex) {
      failed = true;
    }
    return failed;
    }
View Full Code Here

Examples of org.apache.stanbol.entityhub.indexing.core.source.ResourceLoader.loadResources()

        assertEquals(new HashSet<String>(Arrays.asList(rootDir+"singleFileTest.txt")),
            loader.getResources(ResourceState.REGISTERED));
        assertTrue(loader.getResources(ResourceState.ERROR).isEmpty());
        assertTrue(loader.getResources(ResourceState.LOADED).isEmpty());
        assertTrue(loader.getResources(ResourceState.IGNORED).isEmpty());
        loader.loadResources();
        assertEquals(new HashSet<String>(Arrays.asList(rootDir+"singleFileTest.txt")),
            loader.getResources(ResourceState.LOADED));
        assertTrue(loader.getResources(ResourceState.REGISTERED).isEmpty());
        assertTrue(loader.getResources(ResourceState.IGNORED).isEmpty());
        assertTrue(loader.getResources(ResourceState.ERROR).isEmpty());
View Full Code Here

Examples of org.apache.stanbol.entityhub.indexing.core.source.ResourceLoader.loadResources()

        loader.addResource(new File(rootDir,"testFolder"));
        assertEquals(expectedFolderResources, loader.getResources(ResourceState.REGISTERED));
        assertTrue(loader.getResources(ResourceState.ERROR).isEmpty());
        assertTrue(loader.getResources(ResourceState.LOADED).isEmpty());
        assertTrue(loader.getResources(ResourceState.IGNORED).isEmpty());
        loader.loadResources();
        assertEquals(new HashSet<String>(Arrays.asList(
            folder+"archiveInFolder.zip", folder+"fileInFolder.txt",
            folder+"otherFileInFolder.txt",folder+"archiveWithIgnore.zip",
            folder+"archiveWithError.zip")),
            loader.getResources(ResourceState.LOADED));
View Full Code Here

Examples of org.apache.stanbol.entityhub.indexing.core.source.ResourceLoader.loadResources()

        assertEquals(expectedResources, loader.getResources(ResourceState.REGISTERED));
        assertTrue(loader.getResources(ResourceState.ERROR).isEmpty());
        assertTrue(loader.getResources(ResourceState.LOADED).isEmpty());
        assertTrue(loader.getResources(ResourceState.IGNORED).isEmpty());
        loader.loadResources();
        assertEquals(new HashSet<String>(Arrays.asList(
            folder+"archiveInFolder.zip",
            folder+"archiveWithIgnore.zip", //ignored files in archives are OK
            folder+"fileInFolder.txt",folder+"otherFileInFolder.txt")),
            loader.getResources(ResourceState.LOADED));
View Full Code Here

Examples of org.s3b.search.db.IndexBookResourceLoader.loadResources()

    md.open();
   
    result.addResults(getResourcesFromCache(queries));
       
    IndexResourceLoader<Person, TaxonomyEntry, KOSEntry, String, String> rl = new IndexBookResourceLoader();
    List<IndexResource<Person, TaxonomyEntry, KOSEntry, String, String>> list = rl.loadResources(queries, md);
    for(IndexResource<Person, TaxonomyEntry, KOSEntry, String, String> res : list){
      if(!resourceCache.containsKey(res.getURIAsString())){
        resourceCache.put(res.getURIAsString(),(IndexRdfResource) res);
      }
    }
View Full Code Here

Examples of org.xith3d.utility.resources.ResourceLoader.loadResources()

   
    ResourceLoader resourceLoader = new ResourceLoader( resourceLocator );
   
    resourceLoader.addRequest( new TextureResourceRequest( Textures.BACKGROUND_IMAGE.getFile(), Textures.BACKGROUND_IMAGE.toString() ) );
   
    setSingletonInstance( resourceLoader.loadResources() );
  }
}
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.