Enum Class ParseMode
- All Implemented Interfaces:
Serializable,Comparable<ParseMode>,Constable
This can be set as a default in PipesConfig (loaded from tika-config.json) or overridden per-file via ParseContext.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConcatenates content from all embedded files into a single document.Concatenates content and emits only the raw content string, with no metadata and no JSON wrapper.Performs digest (if configured) and content type detection only.Each embedded file gets its own metadata object in a list.Extracts embedded document bytes and emits them, with full RMETA metadata. -
Method Summary
Modifier and TypeMethodDescriptionstatic ParseModeParses a string to a ParseMode enum value.static ParseModeReturns the enum constant of this class with the specified name.static ParseMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RMETA
Each embedded file gets its own metadata object in a list.This is equivalent to the -J option in tika-app and the /rmeta endpoint in tika-server. The result is a list of metadata objects, one for each document (container + all embedded documents).
-
CONCATENATE
Concatenates content from all embedded files into a single document.This is equivalent to the legacy tika-app behavior and the /tika endpoint in tika-server. The result is a single metadata object with concatenated content from all documents.
-
NO_PARSE
Performs digest (if configured) and content type detection only.No parsing occurs - embedded documents are not extracted and no content is returned. Use this mode when you only need file identification (mime type, hash) without text extraction.
-
CONTENT_ONLY
Concatenates content and emits only the raw content string, with no metadata and no JSON wrapper.This mode parses like CONCATENATE (producing a single metadata object with merged content from all embedded documents), but at emit time, emitters write only the value of
tk:contentas a raw string instead of serializing the full metadata list as JSON.This is useful when you want plain text, markdown, or HTML output files without any metadata overhead.
-
UNPACK
Extracts embedded document bytes and emits them, with full RMETA metadata.This mode parses like RMETA (returning a metadata object per document) AND automatically extracts and emits embedded document bytes. An emitter is required for the byte extraction.
With PASSBACK_ALL emit strategy, embedded bytes are still emitted during parsing, but metadata is passed back to the client instead of being emitted. This is useful when you want bytes written to storage but need metadata returned for further processing (e.g., indexing to a database).
This mode simplifies byte extraction by handling all the internal setup (UnpackExtractor, EmittingUnpackHandler) automatically. Users just need to specify the emitter in UnpackConfig or FetchEmitTuple.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
parse
Parses a string to a ParseMode enum value.- Parameters:
modeString- the string to parse (case-insensitive)- Returns:
- the corresponding ParseMode
- Throws:
IllegalArgumentException- if the string doesn't match any mode
-