Class DetectRecordBreakCandidates
TreeNodes that represent one record per instance. A node becomes a
record break when it repeats at least as often as its most frequent element child (so children
do not repeat within one instance) and it or its element children carry values; every wildcard
node is also forced to be a record break.
Attribute children are ignored when scoring their parent: an attribute's values count as the data of the element that owns it, not as evidence that the element's parent is a record container. A generated-on attribute at the document root, for example, no longer makes the root the record break — the walk descends to the value-carrying elements instead. Elements whose only data is their own attributes (common in attribute-styled feeds) are still detected as records.
A wrapper-like single-instance node — no values of its own and at most one value-bearing element child — is not accepted as the record break while a structured element repeats beneath it: the repeating details are the records, not the enclosing document. Context fields hanging off such wrappers (a lone header next to the repeating details) stay plain fields rather than becoming single-row records, so their values ride with the detail records. Repeating leaf values (multi-value fields such as repeated tags) do not trigger this descent, and nodes that carry several fields of their own keep deeper repeating structures (sub-lists) as part of their record.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.northconcepts.datapipeline.foundations.pipeline.tree.detect.TreeTransformer
merge, mergeChildren
-
Constructor Details
-
DetectRecordBreakCandidates
public DetectRecordBreakCandidates()
-
-
Method Details
-
transform
Description copied from class:TreeTransformerRuns this pass over the loaded tree, updating its nodes in place.- Specified by:
transformin classTreeTransformer
-