Package org.cip4.jdflib.elementwalker
Class BaseWalker
java.lang.Object
org.cip4.jdflib.elementwalker.BaseWalker
- All Implemented Interfaces:
Comparable<BaseWalker>,IWalker
- Direct Known Subclasses:
AttributeReplacer.WalkDefault,CapabilitiesCreator.WalkElement,EnsureElementUri.WalkElement,EnsureNSUri.WalkElement,IDFinder.WalkResource,IDFinder.WalkSet,IDRemover.WalkIgnore,IDRemover.WalkResource,LinkRefFinder.WalkRef,RemoveCompare.WalkElement,RemoveEmpty.WalkElement,RemovePrivate.WalkElement,ResourceIDFinder.WalkStop,SizeWalker.WalkElement,UnLinkFinder.WalkRef,UnLinkFinder.WalkRes,URLExtractor.WalkElement,URLMapper.WalkElement,WalkAnyElement,WalkElement,WalkXElement,XJDFSchemaCreator.WalkElement,XJDFSchemaWalker.WalkElement,XMLCompareWalker.WalkAll,XPathWalker.WalkAll
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(BaseWalker arg0) note the reverse order - high depth means up in list so that abstract classes get checked latervoidfinalizeWalk(KElement e, KElement trackElem) hook for guaranteed postwalk finalizationintgetDepth()retur the list of elements that will always be procesed by this walkerbooleanthis is the check whether or not to use this walker for a given element should be overwrittenvoidprepareWalk(KElement e, KElement trackElem) hook for guaranteed prewalk initializationtoString()the mother routine for walking....
-
Field Details
-
depth
protected int depth -
log
protected final org.apache.commons.logging.Log log
-
-
Constructor Details
-
BaseWalker
public BaseWalker()- Parameters:
factory-
-
BaseWalker
- Parameters:
factory-
-
-
Method Details
-
walk
the mother routine for walking....- Specified by:
walkin interfaceIWalker- Parameters:
e- the element to walktrackElem- a parallel element to e that may additionally be modified during the walk- Returns:
- !=null if this element remains after walking,
null if it was deleted and therefore the walker should skip this and all its descendants
the element may either be trackElem or a converted element to continue with as trackElem - See Also:
-
prepareWalk
hook for guaranteed prewalk initialization- Specified by:
prepareWalkin interfaceIWalker- Parameters:
e-trackElem-
-
finalizeWalk
hook for guaranteed postwalk finalization- Specified by:
finalizeWalkin interfaceIWalker- Parameters:
e-trackElem-
-
matches
this is the check whether or not to use this walker for a given element should be overwritten- Parameters:
e- the element to check- Returns:
- true if matches - must be true for base
-
getDepth
public int getDepth()- Returns:
- the class hierarchy depth
-
getElementNames
retur the list of elements that will always be procesed by this walker- Returns:
-
compareTo
note the reverse order - high depth means up in list so that abstract classes get checked later- Specified by:
compareToin interfaceComparable<BaseWalker>- Parameters:
arg0- the other Basewalker- Returns:
- int
- See Also:
-
toString
-