Examples of ResourceLocation


Examples of org.apache.xbean.classloader.ResourceLocation

    public InputStream getInputStreamForResource(int location, String path) throws IOException
    {
        if (location < 0 || location >= resourceLocations.size()) throw new IOException("Resource location index is out of bounds");

        ResourceLocation resourceLocation = resourceLocations.get(location);
        ResourceHandle handle = resourceLocation.getResourceHandle(path);

        if (handle == null) throw new IOException("Path does not correspond to a resource");

        return handle.getInputStream();
    }
View Full Code Here

Examples of org.nutz.resource.impl.ResourceLocation

                Enumeration<URL> enu = ClassTools.getClassLoader().getResources(src);
                if (enu != null && enu.hasMoreElements()) {
                    while (enu.hasMoreElements()) {
                        try {
                            URL url = enu.nextElement();
                            ResourceLocation loc = makeResourceLocation(url);
                            if (url.toString().contains("jar!"))
                                loc.scan(src, pattern, list);
                            else
                                loc.scan("", pattern, list);
                        }
                        catch (Throwable e) {
                            if (log.isTraceEnabled())
                                log.trace("", e);
                        }
View Full Code Here

Examples of org.openbel.framework.common.index.ResourceLocation

        final StringBuilder bldr = new StringBuilder();

        // Load the pfam resource from the resource index.
        Index resourceIndex = ResourceIndex.INSTANCE.getIndex();
        ResourceLocation pfResource = resourceIndex.getProteinFamilyResource();

        if (pfResource == null || pfResource.getResourceLocation() == null) {
            getPhaseConfiguration().setInjectProteinFamilies(false);
            stageError("Resource location for protein family is not set in " +
                    "resource index, disabling protein family expansion.");
            markEndStage(bldr);
            return pn;
        }

        if (!withProteinFamilyInjection()) {
            bldr.append(PF_INJECTION_DISABLED);
            markEndStage(bldr);
            stageOutput(bldr.toString());
            return pn;
        }

        String pfLocation = pfResource.getResourceLocation();
        File pfamResource = null;
        final ResourceType pfamType = fromLocation(pfLocation);
        try {
            ResolvedResource resolvedResource =
                    cache.resolveResource(pfamType, pfLocation);
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.