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
public class DateNormalizingMetadataFilter extends MetadataFilter
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 withsetDefaultTimeZone(String)
to apply if the file format does not specify a timezone.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DateNormalizingMetadataFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
filter(Metadata metadata)
void
setDefaultTimeZone(String timeZoneId)
-
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
-
-
-
-
Method Detail
-
filter
public void filter(Metadata metadata) throws TikaException
- Specified by:
filter
in classMetadataFilter
- Throws:
TikaException
-
-