Class Schema<S,​T,​V>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Schema<S,​T,​V>>

    public class Schema<S,​T,​V>
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Comparable<Schema<S,​T,​V>>
    A set of mappings which translates between Hydra terms and annotations, and application-specific property graph types
    See Also:
    Serialized Form
    • Field Detail

      • TYPE_

        public static final Name TYPE_
        Name of the hydra.pg.mapping.Schema type.
      • VERTEX_ID_TYPES

        public static final Name VERTEX_ID_TYPES
        Name of the hydra.pg.mapping.Schema.vertexIdTypes field.
      • VERTEX_IDS

        public static final Name VERTEX_IDS
        Name of the hydra.pg.mapping.Schema.vertexIds field.
      • EDGE_ID_TYPES

        public static final Name EDGE_ID_TYPES
        Name of the hydra.pg.mapping.Schema.edgeIdTypes field.
      • EDGE_IDS

        public static final Name EDGE_IDS
        Name of the hydra.pg.mapping.Schema.edgeIds field.
      • PROPERTY_TYPES

        public static final Name PROPERTY_TYPES
        Name of the hydra.pg.mapping.Schema.propertyTypes field.
      • PROPERTY_VALUES

        public static final Name PROPERTY_VALUES
        Name of the hydra.pg.mapping.Schema.propertyValues field.
      • ANNOTATIONS

        public static final Name ANNOTATIONS
        Name of the hydra.pg.mapping.Schema.annotations field.
      • DEFAULT_VERTEX_ID

        public static final Name DEFAULT_VERTEX_ID
        Name of the hydra.pg.mapping.Schema.defaultVertexId field.
      • DEFAULT_EDGE_ID

        public static final Name DEFAULT_EDGE_ID
        Name of the hydra.pg.mapping.Schema.defaultEdgeId field.
      • vertexIdTypes

        public final Coder<Type,​T> vertexIdTypes
      • vertexIds

        public final Coder<Term,​V> vertexIds
      • edgeIdTypes

        public final Coder<Type,​T> edgeIdTypes
      • propertyTypes

        public final Coder<Type,​T> propertyTypes
      • propertyValues

        public final Coder<Term,​V> propertyValues
      • defaultVertexId

        public final V defaultVertexId
      • defaultEdgeId

        public final V defaultEdgeId
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo​(Schema other)
        Specified by:
        compareTo in interface java.lang.Comparable<S>
      • withVertexIdTypes

        public Schema withVertexIdTypes​(Coder<Type,​T> vertexIdTypes)
        Returns a copy of this Schema with vertexIdTypes replaced.
      • withVertexIds

        public Schema withVertexIds​(Coder<Term,​V> vertexIds)
        Returns a copy of this Schema with vertexIds replaced.
      • withEdgeIdTypes

        public Schema withEdgeIdTypes​(Coder<Type,​T> edgeIdTypes)
        Returns a copy of this Schema with edgeIdTypes replaced.
      • withEdgeIds

        public Schema withEdgeIds​(Coder<Term,​V> edgeIds)
        Returns a copy of this Schema with edgeIds replaced.
      • withPropertyTypes

        public Schema withPropertyTypes​(Coder<Type,​T> propertyTypes)
        Returns a copy of this Schema with propertyTypes replaced.
      • withPropertyValues

        public Schema withPropertyValues​(Coder<Term,​V> propertyValues)
        Returns a copy of this Schema with propertyValues replaced.
      • withAnnotations

        public Schema withAnnotations​(AnnotationSchema annotations)
        Returns a copy of this Schema with annotations replaced.
      • withDefaultVertexId

        public Schema withDefaultVertexId​(V defaultVertexId)
        Returns a copy of this Schema with defaultVertexId replaced.
      • withDefaultEdgeId

        public Schema withDefaultEdgeId​(V defaultEdgeId)
        Returns a copy of this Schema with defaultEdgeId replaced.