Package org.apache.cocoon.pipeline

Examples of org.apache.cocoon.pipeline.SetupException


            DOMStreamer streamer = new DOMStreamer(XMLGenerator.this.getSAXConsumer());
            try {
                streamer.stream(this.node);
            } catch (SAXException e) {
                throw new SetupException("Can't stream DOM node + " + this.node);
            }
        }
View Full Code Here


        public SAXBufferGenerator(SAXBuffer saxBuffer) {
            super();

            if (saxBuffer == null) {
                throw new SetupException("A SAXBuffer has to be passed.");
            }

            this.saxBuffer = saxBuffer;
        }
View Full Code Here

        private String xmlString;

        public StringGenerator(String xmlString) {
            super();
            if (xmlString == null) {
                throw new SetupException("An XML string has to be passed.");
            }

            this.xmlString = xmlString;
        }
View Full Code Here

         *
         * @see org.apache.cocoon.pipeline.component.CachingPipelineComponent#constructCacheKey()
         */
        public CacheKey constructCacheKey() {
            if (this.source == null) {
                throw new SetupException(this.getClass().getSimpleName() + " has no source.");
            }

            URLConnection connection = null;
            try {
                connection = this.source.openConnection();
View Full Code Here

                append = Boolean.parseBoolean(String.valueOf(appendString));
            }
            try {
                this.logWriter = new FileWriter(logFile, append);
            } catch (IOException e) {
                throw new SetupException("Impossible to open log file '"
                        + logFile
                        + "' (append="
                        + append
                        + ")", e);
            }
View Full Code Here

            this.init(System.out);
        } else {
            try {
                this.init(new FileOutputStream(logFile));
            } catch (FileNotFoundException e) {
                throw new SetupException(
                        "Impossible to create an XML log file '"
                        + logFile
                        + "'", e);
            }
        }
View Full Code Here

            OutputStream os;
            try {
                os = new FileOutputStream(logFile);
                this.init(os);
            } catch (FileNotFoundException e) {
                throw new SetupException("Impossible to open XML log file '"
                        + logFile
                        + "'", e);
            }
        }
    }
View Full Code Here

        this.id = (String) configuration.get("id");
        this.profilingData = this.dataHolder.get(this.id);

        if (this.profilingData == null) {
            throw new SetupException(String.format("Profiling information for id '%s' not found", this.id));
        }
    }
View Full Code Here

            this.saxParser.setProperty(ELEMS_URI, "lower");
            this.saxParser.setFeature(OVERRIDE_NAMESPACES_URI, true);
            this.saxParser.setFeature(INSERT_NAMESPACES_URI, true);
            this.saxParser.setProperty(NAMESPACES_URI, XHTML_URL);
        } catch (SAXNotRecognizedException e) {
            throw new SetupException("Impossible to set property to HTML Parser", e);
        } catch (SAXNotSupportedException e) {
            throw new SetupException("Property not supported by the HTML Parser", e);
        }
    }
View Full Code Here

     *
     * @see org.apache.cocoon.pipeline.component.Producer#setConsumer(org.apache.cocoon.pipeline.component.Consumer)
     */
    public void setConsumer(Consumer consumer) {
        if (!(consumer instanceof SAXConsumer)) {
            throw new SetupException("SAXProducer requires an SAXConsumer.");
        }

        XMLFilterImplEx filter = new XMLFilterImplEx();
        filter.setContentHandler((SAXConsumer) consumer);
        filter.setLexicalHandler((SAXConsumer) consumer);
View Full Code Here

TOP

Related Classes of org.apache.cocoon.pipeline.SetupException

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.