Package org.apache.cocoon.components.pipeline

Examples of org.apache.cocoon.components.pipeline.EventPipeline


  }

  public StreamPipeline getStreamPipeline()
    throws Exception
  {
    EventPipeline eventPipeline
      = (EventPipeline)manager.lookup(EventPipeline.ROLE);
    eventPipeline.recompose(manager);

    StreamPipeline pipeline
      = (StreamPipeline)manager.lookup(StreamPipeline.ROLE);
    pipeline.setEventPipeline(eventPipeline);
    pipeline.recompose(manager);
View Full Code Here


    return pipeline;
  }

  public void releasePipeline(StreamPipeline pipeline)
  {
    EventPipeline eventPipeline = pipeline.getEventPipeline();
    manager.release((Component)eventPipeline);
    manager.release((Component)pipeline);
  }
View Full Code Here

    return pipeline;
  }

  public void releasePipeline(StreamPipeline pipeline)
  {
    EventPipeline eventPipeline = pipeline.getEventPipeline();
    manager.release((Component)eventPipeline);
    manager.release((Component)pipeline);
  }
View Full Code Here

  public Value generate(Value scm, Value senv, Value sargs)
    throws Exception
  {
    SchemeSitemap sitemap = schemeSitemap(scm);
    StreamPipeline pipeline = sitemap.getStreamPipeline();
    EventPipeline eventPipeline = pipeline.getEventPipeline();

    // Obtain the 'src' attribute
    Value ssrc = assq(sargs, Symbol.get("src"));
    if (ssrc.eq(FALSE))
      throw new RuntimeException("No 'src' attribute specified for 'generate'!");
    String src = string(pair(ssrc).cdr);

    // Obtain the 'type' attribute
    Value stype = assq(sargs, Symbol.get("type"));
    String type;
    if (!stype.eq(FALSE))
      type = string(pair(stype).cdr);
    else
      type = sitemap.getDefaultGeneratorType();

    // Obtain the parameters
    Value sparams = assq(sargs, Symbol.get("params"));
    Parameters params = getParameters(sparams);

//     System.out.println("generate type " + type + ", src " + src
//                        + " params " + params);
   
    eventPipeline.setGenerator(type, src, params);

    return new J2S.JavaObject(pipeline);
  }
View Full Code Here

  public Value read(Value scm, Value senv, Value sargs)
    throws Exception
  {
    SchemeSitemap sitemap = schemeSitemap(scm);
    StreamPipeline pipeline = sitemap.getStreamPipeline();
    EventPipeline eventPipeline = pipeline.getEventPipeline();

    // Obtain the 'src' attribute
    Value ssrc = assq(sargs, Symbol.get("src"));
    if (ssrc.eq(FALSE))
      throw new RuntimeException("No 'src' attribute specified for 'read'!");
View Full Code Here

  public Value transform(Value scm, Value senv, Value sargs, Value spipeline)
    throws Exception
  {
    SchemeSitemap sitemap = schemeSitemap(scm);
    StreamPipeline pipeline = streamPipeline(spipeline);
    EventPipeline eventPipeline = pipeline.getEventPipeline();

    // Obtain the 'src' attribute
    Value ssrc = assq(sargs, Symbol.get("src"));
    if (ssrc.eq(FALSE))
      throw new RuntimeException("No 'src' attribute specified for 'transform'!");
    String src = string(pair(ssrc).cdr);

    // Obtain the 'type' attribute
    Value stype = assq(sargs, Symbol.get("type"));
    String type;
    if (!stype.eq(FALSE))
      type = string(pair(stype).cdr);
    else
      type = sitemap.getDefaultTransformerType();

    // Obtain the parameters
    Value sparams = assq(sargs, Symbol.get("params"));
    Parameters params = getParameters(sparams);

//     System.out.println("transform type " + type + ", src " + src
//                        + " params " + params);
   
    eventPipeline.addTransformer(type, src, params);

    return spipeline;
  }
View Full Code Here

  }

  public StreamPipeline getStreamPipeline()
    throws Exception
  {
    EventPipeline eventPipeline
      = (EventPipeline)manager.lookup(EventPipeline.ROLE);
    eventPipeline.recompose(manager);

    StreamPipeline pipeline
      = (StreamPipeline)manager.lookup(StreamPipeline.ROLE);
    pipeline.setEventPipeline(eventPipeline);
    pipeline.recompose(manager);
View Full Code Here

        boolean infoEnabled = getLogger().isInfoEnabled();
       
        List mapStack = context.getMapStack();

        // Setup aggregator
        EventPipeline eventPipeline = context.getEventPipeline();
       
        eventPipeline.setGenerator("!content-aggregator!", null, Parameters.EMPTY_PARAMETERS);

        ContentAggregator aggregator = (ContentAggregator)eventPipeline.getGenerator();
        aggregator.setRootElement(this.element, this.nsURI, this.nsPrefix);
       
        // Get actual parts, potentially filtered by the view
        Part[] actualParts;
        String cocoonView = env.getView();
View Full Code Here

        boolean infoEnabled = getLogger().isInfoEnabled();

        Map objectModel = env.getObjectModel();

        // Setup aggregator
        EventPipeline eventPipeline = context.getEventPipeline();

        eventPipeline.setGenerator("<aggregator>", null, Parameters.EMPTY_PARAMETERS);

        ContentAggregator aggregator = (ContentAggregator)eventPipeline.getGenerator();
        aggregator.setRootElement(
            this.element.resolve(context, objectModel),
            this.nsURI.resolve(context, objectModel),
            this.nsPrefix.resolve(context, objectModel)
        );
View Full Code Here

TOP

Related Classes of org.apache.cocoon.components.pipeline.EventPipeline

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.