Package org.apache.hivemind.util

Examples of org.apache.hivemind.util.URLResource


{

    private Element parse(String file) throws Exception
    {
        URL fileURL = getClass().getResource(file);
        Resource r = new URLResource(fileURL);

        ElementAssembler a = new ElementAssembler();

        return a.parse(r);
    }
View Full Code Here


    {
        URL url = ExampleUtils.class.getResource(file);

        if (url == null) throw new NullPointerException("No resource named '" + file + "'.");

        return new URLResource(url);
    }
View Full Code Here

   
    private void enqueueJar(File jarFile, RegistryDefinition definition) throws IOException
    {
        URL jarRootURL = new URL("jar:" + jarFile.toURL() + "!/" + HivemoduleProvider.HIVE_MODULE_XML);

        Resource jarResource = new URLResource(jarRootURL);
        enqueue(jarResource, definition);
    }
View Full Code Here

        URL url = getClass().getResource(file);

        if (url == null)
            throw new NullPointerException("No resource named '" + file + "'.");

        return new URLResource(url);
    }
View Full Code Here

        while (foundResources.hasMoreElements())
        {
            URL descriptorURL = (URL) foundResources.nextElement();

            readModule(new URLResource(descriptorURL));
        }
    }
View Full Code Here

        URL url = ExampleUtils.class.getResource(file);

        if (url == null)
            throw new NullPointerException("No resource named '" + file + "'.");

        return new URLResource(url);
    }
View Full Code Here

        while (e.hasMoreElements())
        {
            URL descriptorURL = (URL) e.nextElement();

            processManifestFile(resolver, new URLResource(descriptorURL));
        }

    }
View Full Code Here

        URL url = getClass().getResource(file);

        if (url == null)
            throw new NullPointerException("No resource named '" + file + "'.");

        return new URLResource(url);
    }
View Full Code Here

    {
        XmlResourceProcessor processor = new XmlResourceProcessor(getClassResolver(),
                new DefaultErrorHandler());

        Resource[] missingResources = new Resource[]
        { new FileResource("foo"), new URLResource(new URL("file://MissingFile")) };
        Class[] exceptionTypes = new Class[]
        { NullPointerException.class, UnknownHostException.class };

        for (int i = 0; i < missingResources.length; i++)
        {
View Full Code Here

        while (e.hasMoreElements())
        {
            URL descriptorURL = (URL) e.nextElement();

            descriptors.add(new URLResource(descriptorURL));
        }

        return descriptors;
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.util.URLResource

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.