Package org.apache.tika.parser.multiple
Enum AbstractMultipleParser.MetadataPolicy
- java.lang.Object
-
- java.lang.Enum<AbstractMultipleParser.MetadataPolicy>
-
- org.apache.tika.parser.multiple.AbstractMultipleParser.MetadataPolicy
-
- All Implemented Interfaces:
Serializable
,Comparable<AbstractMultipleParser.MetadataPolicy>
- Enclosing class:
- AbstractMultipleParser
public static enum AbstractMultipleParser.MetadataPolicy extends Enum<AbstractMultipleParser.MetadataPolicy>
The various strategies for handling metadata emitted by multiple parsers. Note that not all will be supported by all subclasses.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DISCARD_ALL
Before moving onto another parser, throw away all previously seen metadataFIRST_WINS
The first parser to output a given key wins, merge in non-clashing other keysKEEP_ALL
Where multiple parsers output a given key, store all their different (unique) valuesLAST_WINS
The last parser to output a given key wins, overriding previous parser values for a clashing key.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AbstractMultipleParser.MetadataPolicy
valueOf(String name)
Returns the enum constant of this type with the specified name.static AbstractMultipleParser.MetadataPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DISCARD_ALL
public static final AbstractMultipleParser.MetadataPolicy DISCARD_ALL
Before moving onto another parser, throw away all previously seen metadata
-
FIRST_WINS
public static final AbstractMultipleParser.MetadataPolicy FIRST_WINS
The first parser to output a given key wins, merge in non-clashing other keys
-
LAST_WINS
public static final AbstractMultipleParser.MetadataPolicy LAST_WINS
The last parser to output a given key wins, overriding previous parser values for a clashing key.
-
KEEP_ALL
public static final AbstractMultipleParser.MetadataPolicy KEEP_ALL
Where multiple parsers output a given key, store all their different (unique) values
-
-
Method Detail
-
values
public static AbstractMultipleParser.MetadataPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AbstractMultipleParser.MetadataPolicy c : AbstractMultipleParser.MetadataPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AbstractMultipleParser.MetadataPolicy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-