org.apache.tinkerpop.gremlin.structure.io.graphson

## Class GraphSONTypeIdResolver

- java.lang.Object
- - org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTypeIdResolver

- All Implemented Interfaces:
    org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver

      public class GraphSONTypeIdResolver
      extends Object
      implements org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver

  Provides quick lookup for Type deserialization extracted from the JSON payload. As well as the Java Object to types compatible for the version 2.0 of GraphSON.
  Author:
    Kevin Gallardo (https://kgdo.me)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GraphSONTypeIdResolver()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `GraphSONTypeIdResolver` | `addCustomType(String name, Class clasz)`
    `String` | `getDescForKnownTypeIds()`
    `Map<String,org.apache.tinkerpop.shaded.jackson.databind.JavaType>` | `getIdToType()`
    `org.apache.tinkerpop.shaded.jackson.annotation.JsonTypeInfo.Id` | `getMechanism()`
    `Map<Class,String>` | `getTypeToId()`
    `String` | `idFromBaseType()`
    `String` | `idFromValue(Object o)`
    `String` | `idFromValueAndType(Object o, Class<?> aClass)`
    `void` | `init(org.apache.tinkerpop.shaded.jackson.databind.JavaType javaType)`
    `org.apache.tinkerpop.shaded.jackson.databind.JavaType` | `typeFromId(org.apache.tinkerpop.shaded.jackson.databind.DatabindContext databindContext, String s)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GraphSONTypeIdResolver

          public GraphSONTypeIdResolver()

  - ### Method Detail

    - #### addCustomType

          public GraphSONTypeIdResolver addCustomType(String name,
                                                      Class clasz)

    - #### getIdToType

          public final Map<String,org.apache.tinkerpop.shaded.jackson.databind.JavaType> getIdToType()

    - #### getTypeToId

          public final Map<Class,String> getTypeToId()

    - #### init

          public void init(org.apache.tinkerpop.shaded.jackson.databind.JavaType javaType)

      Specified by:
        `init` in interface `org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver`

    - #### idFromValue

          public String idFromValue(Object o)

      Specified by:
        `idFromValue` in interface `org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver`

    - #### idFromValueAndType

          public String idFromValueAndType(Object o,
                                           Class<?> aClass)

      Specified by:
        `idFromValueAndType` in interface `org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver`

    - #### idFromBaseType

          public String idFromBaseType()

      Specified by:
        `idFromBaseType` in interface `org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver`

    - #### typeFromId

          public org.apache.tinkerpop.shaded.jackson.databind.JavaType typeFromId(org.apache.tinkerpop.shaded.jackson.databind.DatabindContext databindContext,
                                                                                  String s)

      Specified by:
        `typeFromId` in interface `org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver`

    - #### getDescForKnownTypeIds

          public String getDescForKnownTypeIds()

      Specified by:
        `getDescForKnownTypeIds` in interface `org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver`

    - #### getMechanism

          public org.apache.tinkerpop.shaded.jackson.annotation.JsonTypeInfo.Id getMechanism()

      Specified by:
        `getMechanism` in interface `org.apache.tinkerpop.shaded.jackson.databind.jsontype.TypeIdResolver`

Copyright © 2013–2022 Apache Software Foundation. All rights reserved.