Class UntypedTypeResolver

java.lang.Object
com.syncleus.ferma.typeresolvers.UntypedTypeResolver
All Implemented Interfaces:
TypeResolver

public class UntypedTypeResolver
extends Object
implements TypeResolver
This type resolver simply returns the type requested by the client.
  • Constructor Summary

    Constructors 
    Constructor Description
    UntypedTypeResolver()  
  • Method Summary

    Modifier and Type Method Description
    void deinit​(org.apache.tinkerpop.gremlin.structure.Element element)
    Called to remove the type resolution properties from an element
    <P extends org.apache.tinkerpop.gremlin.structure.Element,​ T extends org.apache.tinkerpop.gremlin.structure.Element>
    org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<P,​T>
    hasNotType​(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<P,​T> traverser, Class<?> type)
    Filters out the objects on the traversal that are not satisfying a requested type.
    <P extends org.apache.tinkerpop.gremlin.structure.Element,​ T extends org.apache.tinkerpop.gremlin.structure.Element>
    org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<P,​T>
    hasType​(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<P,​T> traverser, Class<?> type)
    Filters the objects on the traversal that satisfy a requested type.
    void init​(org.apache.tinkerpop.gremlin.structure.Element element, Class<?> kind)
    Called to initialize an element with type resolution properties.
    Class<?> resolve​(org.apache.tinkerpop.gremlin.structure.Element element)
    Resolve the type of frame that a an element should be.
    <T> Class<? extends T> resolve​(org.apache.tinkerpop.gremlin.structure.Element element, Class<T> kind)
    Resolve the type of frame that a an element should be.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • resolve

      public <T> Class<? extends T> resolve​(org.apache.tinkerpop.gremlin.structure.Element element, Class<T> kind)
      Description copied from interface: TypeResolver
      Resolve the type of frame that a an element should be.
      Specified by:
      resolve in interface TypeResolver
      Type Parameters:
      T - The type used to frame the element.
      Parameters:
      element - The element that is being framed.
      kind - The kind of frame that is being requested by the client code.
      Returns:
      The kind of frame
    • resolve

      public Class<?> resolve​(org.apache.tinkerpop.gremlin.structure.Element element)
      Description copied from interface: TypeResolver
      Resolve the type of frame that a an element should be.
      Specified by:
      resolve in interface TypeResolver
      Parameters:
      element - The element that is being framed.
      Returns:
      The kind of frame, null if no type resolution properties exist.
    • init

      public void init​(org.apache.tinkerpop.gremlin.structure.Element element, Class<?> kind)
      Description copied from interface: TypeResolver
      Called to initialize an element with type resolution properties.
      Specified by:
      init in interface TypeResolver
      Parameters:
      element - The element that was created.
      kind - The kind of frame that was resolved.
    • deinit

      public void deinit​(org.apache.tinkerpop.gremlin.structure.Element element)
      Description copied from interface: TypeResolver
      Called to remove the type resolution properties from an element
      Specified by:
      deinit in interface TypeResolver
      Parameters:
      element - The element to remove the property from.
    • hasType

      public <P extends org.apache.tinkerpop.gremlin.structure.Element,​ T extends org.apache.tinkerpop.gremlin.structure.Element> org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<P,​T> hasType​(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<P,​T> traverser, Class<?> type)
      Description copied from interface: TypeResolver
      Filters the objects on the traversal that satisfy a requested type.
      Specified by:
      hasType in interface TypeResolver
      Type Parameters:
      P - Previous type in the graph traversal
      T - Current type in the graph traversal
      Parameters:
      traverser - A traversal pointing to the current set of vertex to be filtered
      type - The type to filter by.
      Returns:
      The traversal stream filtered by the desired type.
    • hasNotType

      public <P extends org.apache.tinkerpop.gremlin.structure.Element,​ T extends org.apache.tinkerpop.gremlin.structure.Element> org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<P,​T> hasNotType​(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<P,​T> traverser, Class<?> type)
      Description copied from interface: TypeResolver
      Filters out the objects on the traversal that are not satisfying a requested type.
      Specified by:
      hasNotType in interface TypeResolver
      Type Parameters:
      P - Previous type in the graph traversal
      T - Current type in the graph traversal
      Parameters:
      traverser - A traversal pointing to the current set of vertex to be filtered
      type - The type to filter by.
      Returns:
      The traversal stream filtered by the desired type.