@ThreadSafe public abstract class AbstractDOMTraversalStage extends BaseStage<Element>
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractDOMTraversalStage.TraversalContext
Context for a particular traversal.
|
| Constructor and Description |
|---|
AbstractDOMTraversalStage() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addError(Item<Element> item,
Element element,
String error)
Add an
ErrorStatus to the given item, in respect of the given Element. |
protected Element |
ancestorEntity(Element element)
Returns the
Element representing the EntityDescriptor which is the
closest-containing ancestor of the given element. |
protected abstract boolean |
applicable(Element element)
Indicates whether the visitor should be applied to a particular
Element. |
protected void |
doExecute(Collection<Item<Element>> itemCollection)
Performs the stage processing on the given Item collection.
|
private void |
traverse(Element element,
AbstractDOMTraversalStage.TraversalContext context)
Depth-first traversal of the DOM tree rooted in an element, applying the
visitor when appropriate.
|
protected abstract void |
visit(Element element,
AbstractDOMTraversalStage.TraversalContext context)
Visit a particular
Element. |
execute, getCollectionPredicate, setCollectionPredicatesetIddoInitialize, getIddestroy, doDestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdestroy, isDestroyedprotected abstract boolean applicable(@Nonnull Element element)
Element.protected abstract void visit(@Nonnull Element element, @Nonnull AbstractDOMTraversalStage.TraversalContext context) throws StageProcessingException
Element.element - the Element to visitcontext - the traversal contextStageProcessingException - if errors occur during processingprivate void traverse(@Nonnull Element element, @Nonnull AbstractDOMTraversalStage.TraversalContext context) throws StageProcessingException
element - Element to start fromcontext - context for the traversalStageProcessingException - if errors occur during processingprotected void doExecute(Collection<Item<Element>> itemCollection) throws StageProcessingException
BaseStageThe stage is guaranteed to be have been initialized and not destroyed when this is invoked.
doExecute in class BaseStage<Element>itemCollection - collection to be processedStageProcessingException - thrown if there is an unrecoverable problem when processing the stageprotected Element ancestorEntity(@Nonnull Element element)
Element representing the EntityDescriptor which is the
closest-containing ancestor of the given element.Copyright © 1999–2016. All rights reserved.