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

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


        }
    }

    private void rebuildNamespace(String resourceLocation)
            throws IOException, ResourceDownloadError, IndexingFailure {
        CachedResource cachedResource = lookupService.findInCache(
                ResourceType.NAMESPACES, resourceLocation);

        // if cached resource exists, remove cached namespace folder
        // to force resolving and indexing of namespace
        if (cachedResource != null) {
            File resourceDirectory = cachedResource.getLocalFile()
                    .getParentFile();
            deleteDirectory(resourceDirectory);
        }

        // compile namespace
View Full Code Here


            throw new AnnotationDefinitionResolutionException(resourceLocation,
                    e.getMessage());
        }
        File annotationCacheCopy = resolveResource.getCacheResourceCopy();

        CachedResource cacheResource = cacheLookupService.findInCache(
                ANNOTATIONS, resourceLocation);

        AnnotationHeaderProcessor annotationHeaderProcessor =
                new AnnotationHeaderProcessor();

        AnnotationHeader annotationHeader;
        try {
            annotationHeader =
                    annotationHeaderProcessor
                            .processAnnotationHeader(resourceLocation,
                                    annotationCacheCopy,
                                    cacheResource
                                            .getLocalFile());
        } catch (IndexingFailure e) {
            throw new AnnotationDefinitionResolutionException(resourceLocation,
                    e.getMessage());
        }
View Full Code Here

            throw new InvalidArgument("resourceLocation", resourceLocation);
        }

        synchronized (resourceLocation) {
            // find the resource in the cache
            CachedResource cachedResource = cacheLookupService
                    .findInCache(NAMESPACES, resourceLocation);

            if (cachedResource == null) {
                return false;
            }

            String indexPath = asPath(
                    cachedResource.getLocalFile().getAbsolutePath(),
                    NS_INDEX_FILE_NAME);

            JDBMNamespaceLookup il = new JDBMNamespaceLookup(indexPath);
            try {
                il.open();
View Full Code Here

TOP

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

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.