Package org.apache.tika.metadata.filter
Class FieldNameMappingFilter
java.lang.Object
org.apache.tika.metadata.filter.MetadataFilter
org.apache.tika.metadata.filter.MetadataFilterBase
org.apache.tika.metadata.filter.FieldNameMappingFilter
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConfiguration class for JSON deserialization. -
Constructor Summary
ConstructorsConstructorDescriptionFieldNameMappingFilter(JsonConfig jsonConfig) Constructor for JSON configuration.Constructor with explicit Config object. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidsetExcludeUnmapped(boolean excludeUnmapped) If this istrue(default), this means that only the fields that have a "from" value in the mapper will be passed through.voidsetMappings(Map<String, String> mappings) toString()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
-
FieldNameMappingFilter
public FieldNameMappingFilter() -
FieldNameMappingFilter
Constructor with explicit Config object.- Parameters:
config- the configuration
-
FieldNameMappingFilter
Constructor for JSON configuration. Requires Jackson on the classpath.- Parameters:
jsonConfig- JSON configuration
-
-
Method Details
-
filter
- Specified by:
filterin classMetadataFilterBase
-
setExcludeUnmapped
public void setExcludeUnmapped(boolean excludeUnmapped) If this istrue(default), this means that only the fields that have a "from" value in the mapper will be passed through. Otherwise, this will pass through all keys/values and mutate the keys that exist in the mappings.- Parameters:
excludeUnmapped-
-
setMappings
-
getMappins
-
toString
-