Examples of ClassPathResource


Examples of com.volantis.xml.pipeline.sax.drivers.webservice.ClasspathResource

        while ((input = br.readLine()) != null) {
            expectedResult.append(input);           
        }       
       
        // Create the URIResource
        ClasspathResource resource = new ClasspathResource(filePath);
       
        // Get the InputSource from the URIResource.
        InputSource source = resource.provideInputSource(contextMock);

        is = source.getByteStream();
        isr = new InputStreamReader(is);
        br = new BufferedReader(isr);
View Full Code Here

Examples of httl.spi.loaders.resources.ClasspathResource

  public List<String> doList(String directory, String suffix) throws IOException {
    return UrlUtils.listUrl(Thread.currentThread().getContextClassLoader().getResource(cleanPath(directory)), suffix);
  }
 
  protected Resource doLoad(String name, Locale locale, String encoding, String path) throws IOException {
    return new ClasspathResource(getEngine(), name, locale, encoding, cleanPath(path));
  }
View Full Code Here

Examples of org.apache.hivemind.util.ClasspathResource

    public void testResourceTranslator() throws Exception
    {
        RegistryBuilder builder = new RegistryBuilder();

        Resource moduleResource =
            new ClasspathResource(_resolver, "/hivemind/test/config/ResourceTranslator.xml");

        builder.processModules(_resolver);
        builder.processModule(_resolver, moduleResource);

        Registry r = (Registry) builder.constructRegistry(Locale.FRENCH);

        List l = r.getConfiguration("hivemind.test.config.ResourceTranslator");

        interceptLogging();

        assertEquals(4, l.size());

        ResourceHolder h = (ResourceHolder) l.get(0);

        assertEquals(moduleResource.getRelativeResource("Empty.xml"), h.getResource());

        h = (ResourceHolder) l.get(1);

        assertEquals(
            moduleResource.getRelativeResource("Localized_fr.properties"),
            h.getResource());

        h = (ResourceHolder) l.get(2);
        assertNull(h.getResource());
View Full Code Here

Examples of org.apache.tapestry.ioc.internal.util.ClasspathResource

        String path = packageName.replace('.', '/') + "/" + file;

        ClassLoader loader = getClass().getClassLoader();

        return new ClasspathResource(loader, path);
    }
View Full Code Here

Examples of org.apache.tapestry5.ioc.internal.util.ClasspathResource

        ComponentModel model = mockComponentModel();
        ComponentModel parent = mockComponentModel();

        train_getComponentClassName(model, "org.apache.tapestry5.internal.services.SubclassComponent");

        train_getBaseResource(model, new ClasspathResource(
                "org/apache/tapestry5/internal/services/SubclassComponent.class"));

        train_getParentModel(model, parent);

        train_getComponentClassName(parent, SIMPLE_COMPONENT_CLASS_NAME);
View Full Code Here

Examples of org.apache.tapestry5.ioc.internal.util.ClasspathResource

        ComponentModel model = mockComponentModel();
        ComponentModel parent = mockComponentModel();

        train_getComponentClassName(model, "org.apache.tapestry5.internal.services.SubclassComponent");

        train_getBaseResource(model, new ClasspathResource(
                "org/apache/tapestry5/internal/services/SubclassComponent.class"));

        train_getParentModel(model, parent);

        train_getComponentClassName(parent, SIMPLE_COMPONENT_CLASS_NAME);
View Full Code Here

Examples of org.apache.xmlgraphics.util.ClasspathResource

        } catch (IOException e) {
            LogUtil.handleException(log, e, strict);
        }

        // classpath font finding
        ClasspathResource resource = ClasspathResource.getInstance();
        for (int i = 0; i < FONT_MIMETYPES.length; i++) {
            fontAdder.add(resource.listResourcesOfMimeType(FONT_MIMETYPES[i]), fontInfoList);
        }
    }
View Full Code Here

Examples of org.auto.io.ClassPathResource

        .addDefinitionMappings(propertiesXmlDefinitionParser
            .parser(properties));
    delegatingResolver.setXmlDefinitionManager(xmlDefinitionManager);
    documentLoader.setEntityResolver(delegatingResolver);

    ClassPathResource resource = new ClassPathResource(
        "org//auto//dataSync-ywgy.sync.xml");
    Document document = documentLoader.loadDocument(resource
        .getInputStream());
    Element element = document.getDocumentElement();

    System.out.println(element.getNamespaceURI());
View Full Code Here

Examples of org.constretto.model.ClassPathResource

*/
public class PropertiesStoreTest extends AbstractConfigurationStoreTest {

    @Override
    protected ConfigurationStore getStore() {
        Resource props = new ClassPathResource("test.properties");
        return new PropertiesStore().addResource(props);
    }
View Full Code Here

Examples of org.drools.core.io.impl.ClassPathResource

    }


    void testTraitActualTypeCodeWithEntities( String trig, VirtualPropertyMode mode ) {
        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
        kbuilder.add( new ClassPathResource( "org/drools/compiler/factmodel/traits/testComplexDonShed.drl" ), ResourceType.DRL );
        if ( kbuilder.hasErrors() ) {
            fail( kbuilder.getErrors().toString() );
        }
        KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
        TraitFactory.setMode( mode, kbase );
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.