Class ParseContextDeserializer
java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<ParseContext>
org.apache.tika.serialization.serdes.ParseContextDeserializer
- All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider
public class ParseContextDeserializer
extends com.fasterxml.jackson.databind.JsonDeserializer<ParseContext>
Deserializes ParseContext from JSON. Every entry is stored as a JSON config and resolved lazily
by
ParseContextUtils.resolveAll(ParseContext, ClassLoader); nothing is constructed
here. Example: {"basic-content-handler-factory":{"type":"XML"},"metadata-filters":[...]}-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer
com.fasterxml.jackson.databind.JsonDeserializer.None -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(com.fasterxml.jackson.core.JsonParser jsonParser, com.fasterxml.jackson.databind.DeserializationContext ctxt) static ParseContextreadParseContext(com.fasterxml.jackson.databind.JsonNode jsonNode) Deserializes a ParseContext from a JsonNode.static ParseContextreadParseContext(com.fasterxml.jackson.databind.JsonNode jsonNode, boolean restricted) AsreadParseContext(JsonNode), but whenrestrictedis true, refuses any reference to a context-key type that is blocked from untrusted wire input (seeComponentNameResolver.isWireBlocked(Class)).Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, deserializeWithType, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, logicalType, replaceDelegatee, supportsUpdate, unwrappingDeserializer
-
Constructor Details
-
ParseContextDeserializer
public ParseContextDeserializer() -
ParseContextDeserializer
public ParseContextDeserializer(boolean restricted)
-
-
Method Details
-
deserialize
public ParseContext deserialize(com.fasterxml.jackson.core.JsonParser jsonParser, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws IOException - Specified by:
deserializein classcom.fasterxml.jackson.databind.JsonDeserializer<ParseContext>- Throws:
IOException
-
readParseContext
public static ParseContext readParseContext(com.fasterxml.jackson.databind.JsonNode jsonNode) throws IOException Deserializes a ParseContext from a JsonNode. Every field is stored as a JSON config string for lazy resolution; nothing is constructed here. Throws if multiple entries resolve to the same context key (e.g. "bouncy-castle-digester" and "commons-digester" -> DigesterFactory).- Throws:
IOException
-
readParseContext
public static ParseContext readParseContext(com.fasterxml.jackson.databind.JsonNode jsonNode, boolean restricted) throws IOException AsreadParseContext(JsonNode), but whenrestrictedis true, refuses any reference to a context-key type that is blocked from untrusted wire input (seeComponentNameResolver.isWireBlocked(Class)).- Throws:
IOException
-