Package org.apache.tika.metadata.filter
Class DateNormalizingMetadataFilter
java.lang.Object
org.apache.tika.config.ConfigBase
org.apache.tika.metadata.filter.MetadataFilter
org.apache.tika.metadata.filter.DateNormalizingMetadataFilter
- All Implemented Interfaces:
Serializable
Some dates in some file formats do not have a timezone.
Tika correctly stores these without a timezone, e.g. 'yyyy-MM-dd'T'HH:mm:ss'
This can be a problem if end points expect a 'Z' timezone.
This filter makes the assumption that dates without timezones are UTC
and always modifies the date to: "yyyy-MM-dd'T'HH:mm:ss'Z'"
Users can specify an alternate defaultTimeZone with
setDefaultTimeZone(String)
to apply
if the file format does not specify a timezone.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.tika.metadata.filter.MetadataFilter
load
Methods inherited from class org.apache.tika.config.ConfigBase
buildComposite, buildComposite, buildSingle, buildSingle, configure, handleSettings
-
Constructor Details
-
DateNormalizingMetadataFilter
public DateNormalizingMetadataFilter()
-
-
Method Details
-
filter
- Specified by:
filter
in classMetadataFilter
- Throws:
TikaException
-
setDefaultTimeZone
-