Package org.openbel.framework.core.df.cache

Examples of org.openbel.framework.core.df.cache.CacheableResourceService.resolveResource()


            final SystemConfiguration sysConfig = getSystemConfiguration();
            final String resourceIndexURL = sysConfig.getResourceIndexURL();
            File indexFile = new File(resourceIndexURL);
            if (!indexFile.exists() || !indexFile.canRead()) {
                // try the index as an online resource.
                ResolvedResource resolvedResource = c.resolveResource(
                        ResourceType.RESOURCE_INDEX, resourceIndexURL);
                indexFile = resolvedResource.getCacheResourceCopy();
            }

            final ResourceIndex ri = ResourceIndex.INSTANCE;
View Full Code Here


            if (hasItems(nsr)) {
                hvals = new LinkedHashMap<String, NamespaceHeader>(index
                        .getNamespaceResources().size());
                for (ResourceLocation rl : index.getNamespaceResources()) {
                    String loc = rl.getResourceLocation();
                    ResolvedResource nsResource = c.resolveResource(
                            ResourceType.NAMESPACES, loc);
                    NamespaceHeader header = p.parseNamespace(loc,
                            nsResource.getCacheResourceCopy());
                    hvals.put(loc, header);
                }
View Full Code Here

        // Load resource index from system configuration settings.
        final CacheableResourceService cache = new DefaultCacheableResourceService();
        String resourceIndexURL = getSystemConfiguration().getResourceIndexURL();
        try {
            final ResolvedResource resource = cache.resolveResource(
                    ResourceType.RESOURCE_INDEX, resourceIndexURL);
            ResourceIndex.INSTANCE.loadIndex(resource.getCacheResourceCopy());
        } catch (ResourceDownloadError e) {
            fail("failed to load resource index, download error");
        } catch (FileNotFoundException e) {
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.