Class TreeTransformer
java.lang.Object
com.northconcepts.datapipeline.foundations.pipeline.tree.detect.TreeTransformer
- Direct Known Subclasses:
CollapseSiblingPatterns,DetectFieldCandidates,DetectRecordBreakCandidates,MakeFieldNamesUnique,OptimizeTreeStructure
A single pass in a
TreeDetectionStrategy that analyzes or restructures a Tree
after it has been loaded from an XML or JSON document.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidFolds the source node into the target (adding its instance count, combining the record-break, field and cascade flags and merging its children), then removes the source from its parent.protected voidmergeChildren(TreeNode sourceParent, TreeNode targetParent) Merges each child of the source into the target's child of the same name, or moves it under the target and rewrites the XPath expressions in its subtree to the target's path.abstract voidRuns this pass over the loaded tree, updating its nodes in place.
-
Constructor Details
-
TreeTransformer
public TreeTransformer()
-
-
Method Details
-
transform
Runs this pass over the loaded tree, updating its nodes in place. -
merge
Folds the source node into the target (adding its instance count, combining the record-break, field and cascade flags and merging its children), then removes the source from its parent. -
mergeChildren
Merges each child of the source into the target's child of the same name, or moves it under the target and rewrites the XPath expressions in its subtree to the target's path.
-