Package org.apache.tika.metadata.filter
Class CompositeMetadataFilter
java.lang.Object
org.apache.tika.metadata.filter.MetadataFilter
org.apache.tika.metadata.filter.CompositeMetadataFilter
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable
- Direct Known Subclasses:
DefaultMetadataFilter
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases any resources held by this filter (e.g.protected voiddoFilter(List<Metadata> metadataList, ParseContext parseContext) Applies the filter in place.voidsetFilters(List<MetadataFilter> filters) toString()Methods inherited from class org.apache.tika.metadata.filter.MetadataFilter
filter, filter
-
Constructor Details
-
CompositeMetadataFilter
public CompositeMetadataFilter() -
CompositeMetadataFilter
-
-
Method Details
-
setFilters
-
getFilters
-
doFilter
protected void doFilter(List<Metadata> metadataList, ParseContext parseContext) throws TikaException Description copied from class:MetadataFilterApplies the filter in place. A filter that needs to write a reserved Tika-native (tk:) key by name (rather than via itsProperty) should callMetadata.addTrusted(java.lang.String, java.lang.String)/Metadata.setTrusted(java.lang.String, java.lang.String)explicitly at that write.- Specified by:
doFilterin classMetadataFilter- Parameters:
metadataList- the list to filter (must be mutable)parseContext- per-request context- Throws:
TikaException- if filtering fails
-
close
Description copied from class:MetadataFilterReleases any resources held by this filter (e.g. HTTP connection pools, thread pools). The default implementation is a no-op; filters that hold long-lived resources should override this.Callers that control the filter lifecycle (e.g.
PipesServer, try-with-resources blocks) should call this when the filter is no longer needed.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classMetadataFilter- Throws:
IOException
-
toString
-