Package org.apache.cocoon.sax.component

Examples of org.apache.cocoon.sax.component.XMLGenerator$ByteArrayGenerator


        try {
            // a single ZipEntry in the ZipInputStream (see ReportJob)
            zis.getNextEntry();

            Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
            pipeline.addComponent(new XMLGenerator(zis));

            Map<String, Object> parameters = new HashMap<String, Object>();
            parameters.put("status", reportExec.getStatus());
            parameters.put("message", reportExec.getMessage());
            parameters.put("startDate", reportExec.getStartDate());
View Full Code Here


        try {
            // a single ZipEntry in the ZipInputStream (see ReportJob)
            zis.getNextEntry();

            Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
            pipeline.addComponent(new XMLGenerator(zis));

            Map<String, Object> parameters = new HashMap<String, Object>();
            parameters.put("status", reportExec.getStatus());
            parameters.put("message", reportExec.getMessage());
            parameters.put("startDate", reportExec.getStartDate());
View Full Code Here

        try {
            // a single ZipEntry in the ZipInputStream (see ReportJob)
            zis.getNextEntry();

            Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
            pipeline.addComponent(new XMLGenerator(zis));

            Map<String, Object> parameters = new HashMap<String, Object>();
            parameters.put("status", reportExec.getStatus());
            parameters.put("message", reportExec.getMessage());
            parameters.put("startDate", reportExec.getStartDate());
View Full Code Here

        try {
            // a single ZipEntry in the ZipInputStream (see ReportJob)
            zis.getNextEntry();

            Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();
            pipeline.addComponent(new XMLGenerator(zis));

            Map<String, Object> parameters = new HashMap<String, Object>();
            parameters.put("status", reportExec.getStatus());
            parameters.put("message", reportExec.getMessage());
            parameters.put("startDate", reportExec.getStartDate());
View Full Code Here

     */
    public static void transform(String xmlString, Map<String, Object> xsltParameters, Properties outputProperties,
            OutputStream outputStream, URL... xsltUrls) throws Exception {
        Pipeline<SAXPipelineComponent> pipeline = new NonCachingPipeline<SAXPipelineComponent>();

        pipeline.addComponent(new XMLGenerator(xmlString));
        for (URL xsltUrl : xsltUrls) {
            XSLTTransformer xsltTransformer = new XSLTTransformer(xsltUrl);
            xsltTransformer.setParameters(xsltParameters);
            pipeline.addComponent(xsltTransformer);
        }
View Full Code Here

     */
    @Test
    public void testSAXComponentInStAXPipeline() throws Exception {
        NonCachingPipeline<SAXPipelineComponent> pipeSAX = new NonCachingPipeline<SAXPipelineComponent>();
        ByteArrayOutputStream outputSAX = new ByteArrayOutputStream();
        pipeSAX.addComponent(new XMLGenerator(IOUtils.toString(CleaningTransformerTest.class.getResource(
                "/org/apache/cocoon/stax/converter/complex-stax-test-document.xml").openStream())));
        pipeSAX.addComponent(new CleaningTransformer());
        pipeSAX.addComponent(new org.apache.cocoon.sax.component.XMLSerializer());
        pipeSAX.setup(outputSAX);
        pipeSAX.execute();
View Full Code Here

     */
    public LinkedSAXPipelineComponentBuilder setByteArrayGenerator(byte[] bytes) {
        if (bytes == null) {
            throw new IllegalArgumentException("Parameter 'bytes' must be not null");
        }
        return this.setStarter(new XMLGenerator(bytes));
    }
View Full Code Here

            throw new IllegalArgumentException("Parameter 'bytes' must be not null");
        }
        if (encoding == null) {
            throw new IllegalArgumentException("Parameter 'encoding' must be not null");
        }
        return this.setStarter(new XMLGenerator(bytes, encoding));
    }
View Full Code Here

     */
    public LinkedSAXPipelineComponentBuilder setFileGenerator(File file) {
        if (file == null) {
            throw new IllegalArgumentException("Parameter 'file' must be not null");
        }
        return this.setStarter(new XMLGenerator(file));
    }
View Full Code Here

     */
    public LinkedSAXPipelineComponentBuilder setInputStreamGenerator(InputStream inputStream) {
        if (inputStream == null) {
            throw new IllegalArgumentException("Parameter 'inputStream' must be not null");
        }
        return this.setStarter(new XMLGenerator(inputStream));
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.sax.component.XMLGenerator$ByteArrayGenerator

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.