Package org.apache.hivemind.util

Examples of org.apache.hivemind.util.FileResource


        File module = new File("./examples/src/descriptor/META-INF/panorama.startup.xml");
        if (!module.exists()) {
            module = new File("./src/descriptor/META-INF/panorama.startup.xml");
        }

        Resource r = new FileResource(module.getAbsolutePath());
        MessageFinder mf = new MessageFinderImpl(r);
        ThreadLocale tl = new ThreadLocaleImpl(Locale.getDefault());

        return new ModuleMessages(mf, tl);
    }
View Full Code Here


            return;
        }

        String path = file.getPath().replace('\\', '/');

        Resource r = new FileResource(path);

        enqueue(r, definition);
    }
View Full Code Here

    public Messages getMessages()
    {
        String projectRoot = System.getProperty("PROJECT_ROOT", ".");
        String path = projectRoot + "/examples/src/descriptor/META-INF/panorama.startup.xml";

        Resource r = new FileResource(path);
        MessageFinder mf = new MessageFinderImpl(r);
        ThreadLocale tl = new ThreadLocaleImpl(Locale.getDefault());

        return new ModuleMessages(mf, tl);
    }
View Full Code Here

        ClassResolver resolver = new DefaultClassResolver();

        // Register the examples.xml file, which (given its non-standard name)
        // is not visible.
        ModuleDescriptorProvider provider = new XmlModuleDescriptorProvider(resolver,
                new FileResource(path));
        return buildRegistry(provider);
    }
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

            return;
        }

        String path = file.getPath().replace('\\', '/');

        Resource r = new FileResource(path);

        enqueue(r);
    }
View Full Code Here

        builder.addModuleDescriptorProvider(new XmlModuleDescriptorProvider(resolver));

        // Register the examples.xml file, which (given its non-standard name)
        // is not visible.
        builder.addModuleDescriptorProvider(new XmlModuleDescriptorProvider(resolver,
                new FileResource(path)));

        return builder.constructRegistry(Locale.getDefault());
    }
View Full Code Here

    public Messages getMessages()
    {
        String projectRoot = System.getProperty("PROJECT_ROOT", ".");
        String path = projectRoot + "/examples/src/descriptor/META-INF/panorama.startup.xml";

        Resource r = new FileResource(path);
        MessageFinder mf = new MessageFinderImpl(r);
        ThreadLocale tl = new ThreadLocaleImpl(Locale.getDefault());

        return new ModuleMessages(mf, tl);
    }
View Full Code Here

        {
            enqueueJar(file);
            return;
        }

        Resource r = new FileResource(file.getPath());

        enqueue(r);
    }
View Full Code Here

    public Messages getMessages()
    {
        String projectRoot = System.getProperty("PROJECT_ROOT", "..");
        String path = projectRoot + "/examples/src/descriptor/META-INF/panorama.startup.xml";

        Resource r = new FileResource(path);

        return new MessagesImpl(r, Locale.getDefault());
    }
View Full Code Here

TOP

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

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.