Class DateTimeNodeNameRule
java.lang.Object
com.northconcepts.datapipeline.foundations.pipeline.tree.detect.DateTimeNodeNameRule
- All Implemented Interfaces:
NodeNameRule
Classifies date/timestamp names (for example
2024-01-15 map keys) as dynamic using a
DateTimePatternDetector. Opt-in — not part of the standard rule set; enable it with
TreeDetectionStrategy.enableDateTimeNodeNames().
Classification runs once per parse event, so results are memoized in a bounded, access-ordered
cache and names longer than maximumNameLength are rejected
without parsing.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the detector used to recognize date/time names.intReturns the longest name this rule will attempt to parse as a date/timestamp (default 40).booleanisDynamicName(String nodeName) Returns true if the name is dynamic data, such as an identifier or date, rather than a fixed structural name.setDateTimePatternDetector(DateTimePatternDetector dateTimePatternDetector) Sets the detector used to recognize date/time names (null restores the default) and clears the cached results.setMaximumNameLength(int maximumNameLength) Sets the longest name this rule will attempt to parse as a date/timestamp (default 40) and clears the cached results.
-
Field Details
-
DEFAULT_MAXIMUM_NAME_LENGTH
public static final int DEFAULT_MAXIMUM_NAME_LENGTH- See Also:
-
-
Constructor Details
-
DateTimeNodeNameRule
public DateTimeNodeNameRule()
-
-
Method Details
-
isDynamicName
Description copied from interface:NodeNameRuleReturns true if the name is dynamic data, such as an identifier or date, rather than a fixed structural name.- Specified by:
isDynamicNamein interfaceNodeNameRule
-
getDateTimePatternDetector
Returns the detector used to recognize date/time names. -
setDateTimePatternDetector
public DateTimeNodeNameRule setDateTimePatternDetector(DateTimePatternDetector dateTimePatternDetector) Sets the detector used to recognize date/time names (null restores the default) and clears the cached results. -
getMaximumNameLength
public int getMaximumNameLength()Returns the longest name this rule will attempt to parse as a date/timestamp (default 40). -
setMaximumNameLength
Sets the longest name this rule will attempt to parse as a date/timestamp (default 40) and clears the cached results.
-