Class CurrentDateTransformerConfig

java.lang.Object
com.norconex.importer.handler.BaseLabelableConfig
com.norconex.importer.handler.BaseDocHandlerConfig
com.norconex.importer.handler.transformer.impl.CurrentDateTransformerConfig
All Implemented Interfaces:
Labelable

public class CurrentDateTransformerConfig extends BaseDocHandlerConfig

Adds the current computer UTC date to the specified field. If no field is provided, the date will be added to document.importedDate.

The default date format is EPOCH (the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC). A custom date format can be specified with the format attribute, as per the formatting options found on SimpleDateFormat.

Storing values in an existing field

If a target field with the same name already exists for a document, values will be added to the end of the existing value list. It is possible to change this default behavior by supplying a PropertySetter.

Can be used both as a pre-parse or post-parse handler.

It is possible to specify a locale used for formatting dates. The locale is the ISO two-letter language code, with an optional ISO country code, separated with an underscore (e.g., "fr" for French, "fr_CA" for Canadian French). When no locale is specified, the default is "en_US" (US English).

See Also: