Class NestedSmooksVisitor
- java.lang.Object
-
- org.smooks.engine.resource.visitor.smooks.NestedSmooksVisitor
-
- All Implemented Interfaces:
org.smooks.api.delivery.ContentHandler,org.smooks.api.delivery.ordering.Producer,org.smooks.api.lifecycle.PreExecutionLifecycle,org.smooks.api.resource.visitor.sax.ng.AfterVisitor,org.smooks.api.resource.visitor.sax.ng.BeforeVisitor,org.smooks.api.resource.visitor.sax.ng.SaxNgVisitor,org.smooks.api.resource.visitor.Visitor
public class NestedSmooksVisitor extends Object implements org.smooks.api.resource.visitor.sax.ng.BeforeVisitor, org.smooks.api.resource.visitor.sax.ng.AfterVisitor, org.smooks.api.delivery.ordering.Producer, org.smooks.api.lifecycle.PreExecutionLifecycle
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNestedSmooksVisitor.Action
-
Field Summary
Fields Modifier and Type Field Description protected NestedSmooksVisitor.Actionactionprotected Optional<NestedSmooksVisitor.Action>actionOptionalprotected org.smooks.api.ApplicationContextapplicationContextprotected org.smooks.api.bean.repository.BeanIdbindBeanIdprotected Optional<String>bindIdOptionalprotected static org.smooks.api.TypedKey<DocumentBuilder>CACHED_DOCUMENT_BUILDER_TYPED_KEYprotected DomSerializerdomSerializerprotected IntegermaxNodeDepthprotected static org.smooks.api.TypedKey<org.smooks.api.ExecutionContext>NESTED_EXECUTION_CONTEXT_MEMENTO_TYPED_KEYprotected SmooksnestedSmooksprotected Optional<String>outputStreamResourceOptionalprotected org.smooks.api.resource.config.ResourceConfigresourceConfigprotected org.smooks.api.resource.config.ResourceConfigSeqresourceConfigSeqprotected BooleanrewriteEntitiesprotected static org.smooks.api.TypedKey<Node>SOURCE_BRIDGE_TYPED_KEY
-
Constructor Summary
Constructors Constructor Description NestedSmooksVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappend(org.smooks.api.delivery.fragment.Fragment<Node> visitedNodeFragment, Element rootElement, NestedSmooksVisitor.Action action, org.smooks.api.ExecutionContext executionContext)protected NodedeAttach(Node node, org.smooks.api.ExecutionContext executionContext)protected voidfilterSource(org.smooks.api.delivery.fragment.Fragment<Node> visitedNodeFragment, org.smooks.api.delivery.fragment.Fragment<Node> rootNodeFragment, Writer writer, org.smooks.api.ExecutionContext executionContext, String visit)intgetMaxNodeDepth()SmooksgetNestedSmooks()Optional<String>getOutputStreamResourceOptional()Set<String>getProducts()protected voidinitRegistry()voidonPreExecution(org.smooks.api.ExecutionContext executionContext)voidpostConstruct()voidpreDestroy()protected voidprependAfter(org.smooks.api.delivery.fragment.Fragment<Node> visitedNodeFragment, Element rootElement, org.smooks.api.ExecutionContext executionContext)protected WriterprependBefore(org.smooks.api.delivery.fragment.Fragment<Node> visitedNodeFragment, NestedSmooksVisitor.Action action, Element rootElement, org.smooks.api.ExecutionContext executionContext)protected voidreplaceAfter(org.smooks.api.delivery.fragment.Fragment<Node> visitedNodeFragment, Node rootNode, org.smooks.api.ExecutionContext executionContext)protected WriterreplaceBefore(org.smooks.api.delivery.fragment.Fragment<Node> visitedNodeFragment, Node rootNode, org.smooks.api.ExecutionContext executionContext)voidsetAction(Optional<NestedSmooksVisitor.Action> actionOptional)voidsetApplicationContext(org.smooks.api.ApplicationContext applicationContext)voidsetBindIdOptional(Optional<String> bindIdOptional)voidsetMaxNodeDepth(Integer maxNodeDepth)voidsetNestedSmooks(Smooks nestedSmooks)voidsetOutputStreamResourceOptional(Optional<String> outputStreamResourceOptional)voidsetResourceConfig(org.smooks.api.resource.config.ResourceConfig resourceConfig)voidsetResourceConfigSeq(org.smooks.api.resource.config.ResourceConfigSeq resourceConfigSeq)voidvisitAfter(Element element, org.smooks.api.ExecutionContext executionContext)voidvisitBefore(Element element, org.smooks.api.ExecutionContext executionContext)
-
-
-
Field Detail
-
SOURCE_BRIDGE_TYPED_KEY
protected static final org.smooks.api.TypedKey<Node> SOURCE_BRIDGE_TYPED_KEY
-
CACHED_DOCUMENT_BUILDER_TYPED_KEY
protected static final org.smooks.api.TypedKey<DocumentBuilder> CACHED_DOCUMENT_BUILDER_TYPED_KEY
-
NESTED_EXECUTION_CONTEXT_MEMENTO_TYPED_KEY
protected static final org.smooks.api.TypedKey<org.smooks.api.ExecutionContext> NESTED_EXECUTION_CONTEXT_MEMENTO_TYPED_KEY
-
bindBeanId
protected org.smooks.api.bean.repository.BeanId bindBeanId
-
action
protected NestedSmooksVisitor.Action action
-
actionOptional
@Inject @Named("action") protected Optional<NestedSmooksVisitor.Action> actionOptional
-
outputStreamResourceOptional
@Inject @Named("outputStreamResource") protected Optional<String> outputStreamResourceOptional
-
resourceConfig
@Inject protected org.smooks.api.resource.config.ResourceConfig resourceConfig
-
maxNodeDepth
@Inject protected Integer maxNodeDepth
-
applicationContext
@Inject protected org.smooks.api.ApplicationContext applicationContext
-
rewriteEntities
@Inject @Named("entities.rewrite") protected Boolean rewriteEntities
-
resourceConfigSeq
protected org.smooks.api.resource.config.ResourceConfigSeq resourceConfigSeq
-
nestedSmooks
protected Smooks nestedSmooks
-
domSerializer
protected DomSerializer domSerializer
-
-
Method Detail
-
postConstruct
@PostConstruct public void postConstruct() throws SAXException, IOException, URISyntaxException, ClassNotFoundException
-
initRegistry
protected void initRegistry()
-
onPreExecution
public void onPreExecution(org.smooks.api.ExecutionContext executionContext)
- Specified by:
onPreExecutionin interfaceorg.smooks.api.lifecycle.PreExecutionLifecycle
-
visitBefore
public void visitBefore(Element element, org.smooks.api.ExecutionContext executionContext)
- Specified by:
visitBeforein interfaceorg.smooks.api.resource.visitor.sax.ng.BeforeVisitor
-
visitAfter
public void visitAfter(Element element, org.smooks.api.ExecutionContext executionContext)
- Specified by:
visitAfterin interfaceorg.smooks.api.resource.visitor.sax.ng.AfterVisitor
-
replaceBefore
protected Writer replaceBefore(org.smooks.api.delivery.fragment.Fragment<Node> visitedNodeFragment, Node rootNode, org.smooks.api.ExecutionContext executionContext)
-
replaceAfter
protected void replaceAfter(org.smooks.api.delivery.fragment.Fragment<Node> visitedNodeFragment, Node rootNode, org.smooks.api.ExecutionContext executionContext)
-
prependBefore
protected Writer prependBefore(org.smooks.api.delivery.fragment.Fragment<Node> visitedNodeFragment, NestedSmooksVisitor.Action action, Element rootElement, org.smooks.api.ExecutionContext executionContext)
-
prependAfter
protected void prependAfter(org.smooks.api.delivery.fragment.Fragment<Node> visitedNodeFragment, Element rootElement, org.smooks.api.ExecutionContext executionContext)
-
append
protected void append(org.smooks.api.delivery.fragment.Fragment<Node> visitedNodeFragment, Element rootElement, NestedSmooksVisitor.Action action, org.smooks.api.ExecutionContext executionContext)
-
filterSource
protected void filterSource(org.smooks.api.delivery.fragment.Fragment<Node> visitedNodeFragment, org.smooks.api.delivery.fragment.Fragment<Node> rootNodeFragment, Writer writer, org.smooks.api.ExecutionContext executionContext, String visit)
-
getMaxNodeDepth
public int getMaxNodeDepth()
-
getProducts
public Set<String> getProducts()
- Specified by:
getProductsin interfaceorg.smooks.api.delivery.ordering.Producer
-
setMaxNodeDepth
public void setMaxNodeDepth(Integer maxNodeDepth)
-
getNestedSmooks
public Smooks getNestedSmooks()
-
setNestedSmooks
public void setNestedSmooks(Smooks nestedSmooks)
-
setResourceConfig
public void setResourceConfig(org.smooks.api.resource.config.ResourceConfig resourceConfig)
-
setApplicationContext
public void setApplicationContext(org.smooks.api.ApplicationContext applicationContext)
-
setResourceConfigSeq
public void setResourceConfigSeq(org.smooks.api.resource.config.ResourceConfigSeq resourceConfigSeq)
-
setAction
public void setAction(Optional<NestedSmooksVisitor.Action> actionOptional)
-
setOutputStreamResourceOptional
public void setOutputStreamResourceOptional(Optional<String> outputStreamResourceOptional)
-
preDestroy
@PreDestroy public void preDestroy()
-
-