Package org.apache.avalon.framework.configuration

Examples of org.apache.avalon.framework.configuration.NamespacedSAXConfigurationHandler


    public ProcessingNode build(Source source) throws Exception {

        try {
            // Build a namespace-aware configuration object
            NamespacedSAXConfigurationHandler handler = new NamespacedSAXConfigurationHandler();
            source.toSAX(handler);
            Configuration treeConfig = handler.getConfiguration();

            return build(treeConfig);

        } catch(Exception e) {
            getLogger().error("Failed to load " + this.languageName + " from " +
View Full Code Here


    private Configuration loadConfiguration(Source source) throws ConfigurationException {
        Configuration configuration = null;
        SAXParser parser = null;
        try {
            parser = (SAXParser) m_manager.lookup(SAXParser.ROLE);
            NamespacedSAXConfigurationHandler handler =
                new NamespacedSAXConfigurationHandler();
            parser.parse(new InputSource(source.getInputStream()),handler);
            configuration = handler.getConfiguration();
        }
        catch (IOException e) {
            throw new ConfigurationException("Unable to build LocationMap.",e);
        }
        catch (SAXException e) {
View Full Code Here

    private Configuration loadConfiguration(Source source) throws ConfigurationException {
        Configuration configuration = null;
        SAXParser parser = null;
        try {
            parser = (SAXParser) m_manager.lookup(SAXParser.ROLE);
            NamespacedSAXConfigurationHandler handler =
                new NamespacedSAXConfigurationHandler();
            parser.parse(new InputSource(source.getInputStream()),handler);
            configuration = handler.getConfiguration();
        }
        catch (IOException e) {
            throw new ConfigurationException("Unable to build LocationMap.",e);
        }
        catch (SAXException e) {
View Full Code Here

    public ProcessingNode build(Source source)
    throws Exception {

        try {
            // Build a namespace-aware configuration object
            NamespacedSAXConfigurationHandler handler = new NamespacedSAXConfigurationHandler();
            SourceUtil.toSAX( source, handler );
            Configuration treeConfig = handler.getConfiguration();

            return build(treeConfig);
        } catch (ProcessingException e) {
            throw e;
        } catch(Exception e) {
View Full Code Here

                this.getLogger().debug("Validating sitemap " + sitemapSource.getURI());
            }
            final Validator validator = this.sitemapSchema.newValidator();
            validator.validate(new StreamSource(sitemapSource.getInputStream()));
        }
        NamespacedSAXConfigurationHandler handler = new NamespacedSAXConfigurationHandler();
        AnnotationsFilter annotationsFilter = new AnnotationsFilter(handler);
        SourceUtil.toSAX(this.manager, sitemapSource, null, annotationsFilter);
        return handler.getConfiguration();       
    }
View Full Code Here

    private Configuration loadConfiguration(Source source) throws ConfigurationException {
        Configuration configuration = null;
        SAXParser parser = null;
        try {
            parser = (SAXParser) m_manager.lookup(SAXParser.ROLE);
            NamespacedSAXConfigurationHandler handler =
                new NamespacedSAXConfigurationHandler();
            parser.parse(new InputSource(source.getInputStream()),handler);
            configuration = handler.getConfiguration();
        }
        catch (IOException e) {
            throw new ConfigurationException("Unable to build LocationMap.",e);
        }
        catch (SAXException e) {
View Full Code Here

       
        // Read the tree definition file as a Configuration
        getLogger().debug("Building " + this.language + " from " + source.getSystemId());
       
        // Build a namespace-aware configuration object
        SAXConfigurationHandler handler = new NamespacedSAXConfigurationHandler();
        source.toSAX(handler);
        Configuration treeConfig = handler.getConfiguration();
       
        TreeBuilder treeBuilder = (TreeBuilder)this.treeBuilderClass.newInstance();
        LifecycleHelper.setupComponent(treeBuilder,
            getLogger(),
            this.context,
View Full Code Here

    private Configuration loadConfiguration(Source source) throws ConfigurationException {
        Configuration configuration = null;
        SAXParser parser = null;
        try {
            parser = (SAXParser) m_manager.lookup(SAXParser.ROLE);
            NamespacedSAXConfigurationHandler handler =
                new NamespacedSAXConfigurationHandler();
            parser.parse(new InputSource(source.getInputStream()),handler);
            configuration = handler.getConfiguration();
        }
        catch (IOException e) {
            throw new ConfigurationException("Unable to build LocationMap.",e);
        }
        catch (SAXException e) {
View Full Code Here

    throws Exception {

        try {
            // Build a namespace-aware configuration object
            Settings settings = SettingsHelper.getSettings(this.context);
            NamespacedSAXConfigurationHandler handler =
                    new PropertyAwareNamespacedSAXConfigurationHandler(settings, getLogger());
            AnnotationsFilter annotationsFilter = new AnnotationsFilter(handler);
            SourceUtil.toSAX( source, annotationsFilter );
            Configuration treeConfig = handler.getConfiguration();

            return build(treeConfig);
        } catch (ProcessingException e) {
            throw e;
        } catch(Exception e) {
View Full Code Here

    public ProcessingNode build(Source source)
    throws Exception {

        try {
            // Build a namespace-aware configuration object
            NamespacedSAXConfigurationHandler handler = new NamespacedSAXConfigurationHandler();
            SourceUtil.toSAX( source, handler );
            Configuration treeConfig = handler.getConfiguration();

            return build(treeConfig);
        } catch (ProcessingException e) {
            throw e;
        } catch(Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.avalon.framework.configuration.NamespacedSAXConfigurationHandler

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.