1 16 package org.apache.cocoon.components.treeprocessor.sitemap; 17 18 import org.apache.avalon.framework.configuration.Configuration; 19 import org.apache.avalon.framework.thread.ThreadSafe; 20 import org.apache.cocoon.components.treeprocessor.AbstractProcessingNodeBuilder; 21 import org.apache.cocoon.components.treeprocessor.ProcessingNode; 22 import org.apache.cocoon.components.treeprocessor.variables.VariableResolverFactory; 23 import org.apache.cocoon.reading.Reader; 24 25 30 31 public class ReadNodeBuilder extends AbstractProcessingNodeBuilder implements ThreadSafe { 32 33 public ProcessingNode buildNode(Configuration config) throws Exception { 34 35 String type = this.treeBuilder.getTypeForStatement(config, Reader.ROLE + "Selector"); 36 37 ReadNode node = new ReadNode( 38 type, 39 VariableResolverFactory.getResolver(config.getAttribute("src", null), this.manager), 40 VariableResolverFactory.getResolver(config.getAttribute("mime-type", null), this.manager), 41 config.getAttributeAsInteger("status-code", -1) 42 ); 43 44 return this.treeBuilder.setupNode(node, config); 45 } 46 } 47 | Popular Tags |