Package org.apache.tika.metadata.filter
Class ClearByAttachmentTypeMetadataFilter
- java.lang.Object
-
- org.apache.tika.config.ConfigBase
-
- org.apache.tika.metadata.filter.MetadataFilter
-
- org.apache.tika.metadata.filter.ClearByAttachmentTypeMetadataFilter
-
- All Implemented Interfaces:
Serializable
public class ClearByAttachmentTypeMetadataFilter extends MetadataFilter
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClearByAttachmentTypeMetadataFilter()
ClearByAttachmentTypeMetadataFilter(Set<String> types)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
filter(Metadata metadata)
void
setTypes(List<String> types)
For types seeTikaCoreProperties.EmbeddedResourceType
-
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
-
setTypes
@Field public void setTypes(List<String> types) throws TikaConfigException
For types seeTikaCoreProperties.EmbeddedResourceType
- Parameters:
types
- attachment types that should be deleted.- Throws:
TikaConfigException
-
-