Package org.objectweb.celtix.configuration.impl

Examples of org.objectweb.celtix.configuration.impl.ConfigurationMetadataBuilder


    void generateBean(String path) {
        System.out.println("Generating bean from resource : " + path);
        InputSource src = null;
        src = new InputSource(new File(path).toURI().toString());
       
        ConfigurationMetadataBuilder builder = new ConfigurationMetadataBuilder(false);
        builder.setValidation(true);
        ConfigurationMetadata model = null;

        try {
            model = builder.build(src);
        } catch (IOException ex) {
            throw new ConfigurationException(new Message("FAILED_TO_GENERATE_BEAN_EXC", LOG), ex);
        }
       
        String className = SpringUtils.getBeanClassName(model.getNamespaceURI());
View Full Code Here


   
    public Configuration build(Configuration top, String id) {
        ConfigurationBuilder cb = null;
        cb = ConfigurationBuilderFactory.getBuilder(null);
       
        ConfigurationMetadataBuilder builder = new ConfigurationMetadataBuilder(true);
        InputStream is = DefaultResourceManager.instance()
            .getResourceAsStream("org/objectweb/celtix/bus/configuration/resources/leaf.xml");
        ConfigurationMetadata model = null;
        try {
            model = builder.build(is);
        } catch (IOException ex) {
            // ignore
        }
        cb.addModel(model);
        return cb.buildConfiguration(model.getNamespaceURI(), id, top);
View Full Code Here

   
    public Configuration build(String id) {
        ConfigurationBuilder cb = null;
        cb = ConfigurationBuilderFactory.getBuilder(null);
       
        ConfigurationMetadataBuilder builder = new ConfigurationMetadataBuilder(true);
        InputStream is = DefaultResourceManager.instance()
            .getResourceAsStream("org/objectweb/celtix/bus/configuration/resources/top.xml");
        ConfigurationMetadata model = null;
        try {
            model = builder.build(is);
        } catch (IOException ex) {
            // ignore
        }
        cb.addModel(model);
        return cb.buildConfiguration(model.getNamespaceURI(), id);
View Full Code Here

        return buildMetadata(filename, true);
    }
   
    private ConfigurationMetadata buildMetadata(String filename, boolean doValidate) {
        InputStream is = getClass().getResourceAsStream("resources/" + filename);
        ConfigurationMetadataBuilder builder = new ConfigurationMetadataBuilder(true);
        builder.setValidation(doValidate);
        try {
            return builder.build(is);
        } catch (IOException ex) {
            return null;
        }
    }
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.configuration.impl.ConfigurationMetadataBuilder

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.