java.lang.Object
com.northconcepts.datapipeline.foundations.pipeline.tree.detect.SiblingSetPattern

public final class SiblingSetPattern extends Object
An immutable naming pattern derived from a set of sibling names — a fixed prefix and suffix around a dynamic middle segment (for example item-* derived from item-1, item-2, item-3). The pattern informs display and field naming only; collapsed nodes always emit the XPath wildcard in their expressions.
  • Constructor Details

    • SiblingSetPattern

      public SiblingSetPattern(String prefix, String suffix, NodeNameRule segmentRule)
      Creates a pattern whose middle segment must satisfy the required segmentRule; null affixes are treated as empty.
  • Method Details

    • getPrefix

      public String getPrefix()
    • getSuffix

      public String getSuffix()
    • getSegmentRule

      public NodeNameRule getSegmentRule()
      Returns the rule that the middle segment of a matching name must satisfy.
    • matches

      public boolean matches(String name)
      Indicates if the supplied name fits this pattern: it carries the prefix and suffix around a non-empty middle segment that the segment rule classifies as dynamic.
    • getDisplayName

      public String getDisplayName()
      Returns the pattern for display purposes (for example item-*). Never used in XPath expressions.
    • getFieldNameHint

      public String getFieldNameHint()
      Returns the affix stripped of leading/trailing separators as a candidate field name (for example item), or null when both affixes are empty after trimming.
    • toString

      public String toString()
      Overrides:
      toString in class Object