Package org.apache.tika.metadata.filter
Class ClearByAttachmentTypeMetadataFilter
java.lang.Object
org.apache.tika.metadata.filter.MetadataFilter
org.apache.tika.metadata.filter.MetadataFilterBase
org.apache.tika.metadata.filter.ClearByAttachmentTypeMetadataFilter
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable
This class clears the entire metadata object if the
attachment type matches one of the types. The idea is that you might not want
to store/transmit metadata for images or specific file types.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConfiguration class for JSON deserialization. -
Constructor Summary
ConstructorsConstructorDescriptionClearByAttachmentTypeMetadataFilter(JsonConfig jsonConfig) Constructor for JSON configuration.Constructor with explicit Config object. -
Method Summary
Methods inherited from class org.apache.tika.metadata.filter.MetadataFilterBase
doFilterMethods inherited from class org.apache.tika.metadata.filter.MetadataFilter
close, filter, filter
-
Constructor Details
-
ClearByAttachmentTypeMetadataFilter
public ClearByAttachmentTypeMetadataFilter() -
ClearByAttachmentTypeMetadataFilter
-
ClearByAttachmentTypeMetadataFilter
public ClearByAttachmentTypeMetadataFilter(ClearByAttachmentTypeMetadataFilter.Config config) throws TikaConfigException Constructor with explicit Config object.- Parameters:
config- the configuration- Throws:
TikaConfigException
-
ClearByAttachmentTypeMetadataFilter
Constructor for JSON configuration. Requires Jackson on the classpath.- Parameters:
jsonConfig- JSON configuration- Throws:
TikaConfigException
-
-
Method Details
-
filter
- Specified by:
filterin classMetadataFilterBase
-
setTypes
For types seeTikaCoreProperties.EmbeddedResourceType- Parameters:
types- attachment types that should be deleted.- Throws:
TikaConfigException
-
getTypes
-