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
    Constructor
    Description
     
    ParseContextDeserializer(boolean restricted)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    deserialize(com.fasterxml.jackson.core.JsonParser jsonParser, com.fasterxml.jackson.databind.DeserializationContext ctxt)
     
    readParseContext(com.fasterxml.jackson.databind.JsonNode jsonNode)
    Deserializes a ParseContext from a JsonNode.
    readParseContext(com.fasterxml.jackson.databind.JsonNode jsonNode, boolean restricted)
    As readParseContext(JsonNode), but when restricted is true, refuses any reference to a context-key type that is blocked from untrusted wire input (see ComponentNameResolver.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

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      deserialize in class com.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
      As readParseContext(JsonNode), but when restricted is true, refuses any reference to a context-key type that is blocked from untrusted wire input (see ComponentNameResolver.isWireBlocked(Class)).
      Throws:
      IOException