Package com.volantis.xml.pipeline.sax.recorder

Examples of com.volantis.xml.pipeline.sax.recorder.PipelineRecorder


        transition(TemplateSchema.VALUE_START);

        XMLPipelineContext context = getPipelineContext();
        XMLPipelineFactory factory = context.getPipelineFactory();
        PipelineRecorder recorder = factory.createPipelineRecorder();
        recorder.startRecording(getPipeline());
        char[] chars = value.toCharArray();
        recorder.getRecordingHandler().characters(chars, 0, chars.length);
        PipelineRecording recording = recorder.stopRecording();

        TValue tValue = new DirectValue(
                recording, Complexity.SIMPLE, EvaluationMode.IMMEDIATE,
                dependencyContext.extractDependency());
View Full Code Here


            // Get a new event recorder to be populated with the required
            // events. This is needed because we only want to preprocess
            // the events once, on first use of this value, in DEFERRED mode,
            // thereafter simply replaying these preprocessed events
            XMLPipelineFactory factory = context.getPipelineFactory();
            PipelineRecorder processedEventRecorder =
                    factory.createPipelineRecorder();
            processedEventRecorder.startRecording(target);

            // The following process collects the preprocessed events
            // without permitting the events to be replayed to the rest
            // of the pipeline. This allows the preprocessing to be
            // performed before checking the complexity of the SAX
            // events
            XMLProcess process = processedEventRecorder.getRecordingProcess();

            // Make sure that the pipeline will direct all preprocessed
            // SAX events to the new event recorder
            target.addHeadProcess(process);

            // This will cause the original event recorder to send the
            // original SAX events to the target pipeline which will
            // then preprocess them (we assume) and send them to the
            // event collection process
            try {
                PipelinePlayer player = recording.createPlayer();
                player.play(target.getPipelineProcess());
                recording = processedEventRecorder.stopRecording();
            } finally {
                // Must always remove the collection process so that the
                // pipeline isn't messed up
                target.removeHeadProcess();
            }
View Full Code Here

                // process will automatically come out of pass through mode
                // once it sees the matching end element event.
                dynamicProcess.passThroughElementContents();

                XMLPipelineFactory factory = context.getPipelineFactory();
                final PipelineRecorder recorder =
                        factory.createPipelineRecorder();
                recorder.startRecording(dynamicProcess.getPipeline());

                final XMLProcess process = recorder.getRecordingProcess();

                dynamicProcess.addProcess(process);

                // Create an action to wrap the iterator and remove the
                // recording process once the body has been evaluated.
                action = new EndElementAction() {
                    public void doAction(DynamicProcess dynamicProcess)
                            throws SAXException {

                        // Remove the process from the head.
                        dynamicProcess.removeProcess(process);

                        // Create an iterator to perform the actual iteration once the
                        // body has been recorded.
                        PipelineRecording recording = recorder.stopRecording();
                        final ForEachIterator iterator = new ForEachIterator(
                                recording, variableExpandedName, sequence);

                        // Perform the iteration.
                        iterator.iterate(dynamicProcess);
View Full Code Here

        }
        // if the cache scope is secure then we need to be process any
        // pipeline markup in the XDIME.
        PipelineRecording recording = null;
        if (cacheScope == RenderedPageCacheScope.SAFE) {
            PipelineRecorder recorder = XMLPipelineFactory.getDefaultInstance()
                    .createPipelineRecorder();
            recorder.startRecording();
            strippedXDIME = processPipelineMarkupInXDIME(
                        strippedXDIME,
                        marinerRequestContext,
                        recorder);
            recording = recorder.stopRecording();
        }

        // get hold of the cache entry object. If the page has not
        // been cached this method will add an empty cache entry.
        RenderedPageWrapper result =
View Full Code Here

TOP

Related Classes of com.volantis.xml.pipeline.sax.recorder.PipelineRecorder

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.