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

Examples of org.openbel.framework.core.df.cache.ResolvedResource


        String ncLocation = ncResource.getResourceLocation();
        File ncFile = null;
        final ResourceType ncType = fromLocation(ncLocation);
        try {
            ResolvedResource resolvedResource = cache.resolveResource(
                    ncType, ncLocation);
            ncFile = resolvedResource.getCacheResourceCopy();
        } catch (ResourceDownloadError e) {
            return failNamedComplexes(pn, bldr, ncLocation,
                    e.getUserFacingMessage());
        }
View Full Code Here


        // TODO Timing for cache resolving.
        String gsloc = gsResource.getResourceLocation();
        File gsFile = null;
        final ResourceType gsType = fromLocation(gsloc);
        try {
            ResolvedResource resolvedResource = cache.resolveResource(gsType,
                    gsloc);
            gsFile = resolvedResource.getCacheResourceCopy();
        } catch (ResourceDownloadError e) {
            return failGeneScaffolding(pn, bldr, gsloc,
                    e.getUserFacingMessage());
        }
View Full Code Here

        final String rloc = resource.getResourceLocation();
        final ResourceType type = fromLocation(rloc);

        File res = null;
        try {
            final ResolvedResource rsv = cache.resolveResource(type, rloc);
            res = rsv.getCacheResourceCopy();
        } catch (ResourceDownloadError e) {
            e.printStackTrace();
            return null;
        }
View Full Code Here

        File indexFile = new File(indexLocation);
        if (!indexFile.exists() || !indexFile.canRead()) {
            // try the index as an online resource.
            try {
                ResolvedResource resolvedResource = cacheService
                        .resolveResource(ResourceType.RESOURCE_INDEX,
                                indexLocation);
                indexFile = resolvedResource.getCacheResourceCopy();
            } catch (Exception e) {
                reportable.error("Index could not be read");
                bail(GENERAL_FAILURE);
            }
        }
View Full Code Here

        super.start();

        // load the resource index for phase II use.
        String resIdxURL = syscfg.getResourceIndexURL();
        try {
            final ResolvedResource resolvedResource = cache.resolveResource(
                    ResourceType.RESOURCE_INDEX, resIdxURL);
            ResourceIndex.INSTANCE.loadIndex(resolvedResource
                    .getCacheResourceCopy());
        } catch (ResourceDownloadError e) {
            stageError(e.getUserFacingMessage());
            ResourceIndex.INSTANCE.loadIndex();
        } catch (FileNotFoundException e) {
View Full Code Here

        if (hasItems(resourceIndex.getEquivalenceResources())) {
            for (Equivalence eqResource : resourceIndex
                    .getEquivalenceResources()) {
                String eqLocation = eqResource.getResourceLocation();
                try {
                    ResolvedResource resolved = cache.resolveResource(
                            ResourceType.EQUIVALENCES,
                            eqLocation);

                    DataFileIndex equivalenceIndex = equivalenceIndexerService
                            .indexEquivalence(eqLocation,
                                    resolved.getCacheResourceCopy());

                    equivalenceDataIndexSet.add(new EquivalenceDataIndex(
                            eqResource.getNamespaceResourceLocation()
                                    .getResourceLocation(), equivalenceIndex));
                } catch (ResourceDownloadError e) {
View Full Code Here

TOP

Related Classes of org.openbel.framework.core.df.cache.ResolvedResource

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.