Class ParseContextUtils
Uses friendly-name format for configuration:
"parse-context": {
"timeout-limits": {
"progressTimeoutMillis": 60000
},
"pdf-parser": {
"extractInlineImages": true
}
}
Components that implement SelfConfiguring are skipped
during resolution - they read their own config from jsonConfigs at runtime.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidresolveAll(ParseContext context, ClassLoader classLoader) Resolves all JSON configs from ParseContext and adds them to the resolved cache.
-
Constructor Details
-
ParseContextUtils
public ParseContextUtils()
-
-
Method Details
-
resolveAll
public static void resolveAll(ParseContext context, ClassLoader classLoader) throws TikaConfigException Resolves all JSON configs from ParseContext and adds them to the resolved cache.Iterates through all entries in jsonConfigs, looks up the friendly name in ComponentNameResolver (which searches all registered component registries), deserializes the JSON, and caches the instance in resolvedConfigs.
Components that implement
SelfConfiguringare skipped - they read their own config at runtime viaConfigDeserializer.The ParseContext key is determined by the contextKey from the .idx file, which is auto-detected by the annotation processor from the service interface, or explicitly specified via
@TikaComponent(contextKey=...). Falls back to the component class if no contextKey is available.- Parameters:
context- the ParseContext to populateclassLoader- the ClassLoader to use for loading component classes- Throws:
TikaConfigException
-