Package org.saidone.processors
Class NormalizeMetadataProcessor
java.lang.Object
org.saidone.component.BaseComponent
org.saidone.processors.AbstractNodeProcessor
org.saidone.processors.NormalizeMetadataProcessor
- All Implemented Interfaces:
NodeProcessor,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
Metadata normalization processor.
This processor reads the configured list of operations for each source property and applies them in order, allowing each operation to consume the output from the previous one.
Supported operations
trim: remove leading and trailing blanks from string values.collapse-whitespace: replace any run of whitespace with a single space.case: apply a case mode withvalue=start|lower|upper.regex: replace text withpatternand optionalreplace.copy-to: copy the current value to another property named invalue.delete: set the source property tonull.parse-date-to: parse a textual date and assign the resultingDatevalue to the target property named invalue.
Date parsing details
Date parsing first attemptsInstant.parse(CharSequence) (ISO-8601), then falls back to
yyyy-MM-dd HH:mm:ss.SSS, yyyy-MM-dd HH:mm:ss.SS, and
yyyy-MM-dd HH:mm:ss.S interpreted in the JVM system default timezone.-
Field Summary
Fields inherited from class org.saidone.processors.AbstractNodeProcessor
nodesApi, readOnly -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprocessNode(String nodeId, ProcessorConfig config) Loads a node, applies normalization operations in configuration order, and updates the node with the transformed properties.Methods inherited from class org.saidone.processors.AbstractNodeProcessor
getNode, getNode, getNode, processMethods inherited from class org.saidone.component.BaseComponent
setApplicationContext, shutDown, start, stop
-
Constructor Details
-
NormalizeMetadataProcessor
public NormalizeMetadataProcessor()
-
-
Method Details
-
processNode
Loads a node, applies normalization operations in configuration order, and updates the node with the transformed properties.- Parameters:
nodeId- target node identifier.config- processor configuration containing normalization operations per property.
-