Package hydra.pg.mapping
Class Schema<S,T,V>
- java.lang.Object
-
- hydra.pg.mapping.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 Summary
Fields Modifier and Type Field Description AnnotationSchemaannotationsstatic NameANNOTATIONSName of thehydra.pg.mapping.Schema.annotationsfield.static NameDEFAULT_EDGE_IDName of thehydra.pg.mapping.Schema.defaultEdgeIdfield.static NameDEFAULT_VERTEX_IDName of thehydra.pg.mapping.Schema.defaultVertexIdfield.VdefaultEdgeIdVdefaultVertexIdstatic NameEDGE_ID_TYPESName of thehydra.pg.mapping.Schema.edgeIdTypesfield.static NameEDGE_IDSName of thehydra.pg.mapping.Schema.edgeIdsfield.Coder<Term,V>edgeIdsCoder<Type,T>edgeIdTypesstatic NamePROPERTY_TYPESName of thehydra.pg.mapping.Schema.propertyTypesfield.static NamePROPERTY_VALUESName of thehydra.pg.mapping.Schema.propertyValuesfield.Coder<Type,T>propertyTypesCoder<Term,V>propertyValuesstatic NameTYPE_Name of thehydra.pg.mapping.Schematype.static NameVERTEX_ID_TYPESName of thehydra.pg.mapping.Schema.vertexIdTypesfield.static NameVERTEX_IDSName of thehydra.pg.mapping.Schema.vertexIdsfield.Coder<Term,V>vertexIdsCoder<Type,T>vertexIdTypes
-
Constructor Summary
Constructors Constructor Description Schema(Coder<Type,T> vertexIdTypes, Coder<Term,V> vertexIds, Coder<Type,T> edgeIdTypes, Coder<Term,V> edgeIds, Coder<Type,T> propertyTypes, Coder<Term,V> propertyValues, AnnotationSchema annotations, V defaultVertexId, V defaultEdgeId)Constructs an immutableSchema.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Schema other)booleanequals(java.lang.Object other)inthashCode()SchemawithAnnotations(AnnotationSchema annotations)Returns a copy of thisSchemawithannotationsreplaced.SchemawithDefaultEdgeId(V defaultEdgeId)Returns a copy of thisSchemawithdefaultEdgeIdreplaced.SchemawithDefaultVertexId(V defaultVertexId)Returns a copy of thisSchemawithdefaultVertexIdreplaced.SchemawithEdgeIds(Coder<Term,V> edgeIds)Returns a copy of thisSchemawithedgeIdsreplaced.SchemawithEdgeIdTypes(Coder<Type,T> edgeIdTypes)Returns a copy of thisSchemawithedgeIdTypesreplaced.SchemawithPropertyTypes(Coder<Type,T> propertyTypes)Returns a copy of thisSchemawithpropertyTypesreplaced.SchemawithPropertyValues(Coder<Term,V> propertyValues)Returns a copy of thisSchemawithpropertyValuesreplaced.SchemawithVertexIds(Coder<Term,V> vertexIds)Returns a copy of thisSchemawithvertexIdsreplaced.SchemawithVertexIdTypes(Coder<Type,T> vertexIdTypes)Returns a copy of thisSchemawithvertexIdTypesreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.pg.mapping.Schematype.
-
VERTEX_ID_TYPES
public static final Name VERTEX_ID_TYPES
Name of thehydra.pg.mapping.Schema.vertexIdTypesfield.
-
VERTEX_IDS
public static final Name VERTEX_IDS
Name of thehydra.pg.mapping.Schema.vertexIdsfield.
-
EDGE_ID_TYPES
public static final Name EDGE_ID_TYPES
Name of thehydra.pg.mapping.Schema.edgeIdTypesfield.
-
EDGE_IDS
public static final Name EDGE_IDS
Name of thehydra.pg.mapping.Schema.edgeIdsfield.
-
PROPERTY_TYPES
public static final Name PROPERTY_TYPES
Name of thehydra.pg.mapping.Schema.propertyTypesfield.
-
PROPERTY_VALUES
public static final Name PROPERTY_VALUES
Name of thehydra.pg.mapping.Schema.propertyValuesfield.
-
ANNOTATIONS
public static final Name ANNOTATIONS
Name of thehydra.pg.mapping.Schema.annotationsfield.
-
DEFAULT_VERTEX_ID
public static final Name DEFAULT_VERTEX_ID
Name of thehydra.pg.mapping.Schema.defaultVertexIdfield.
-
DEFAULT_EDGE_ID
public static final Name DEFAULT_EDGE_ID
Name of thehydra.pg.mapping.Schema.defaultEdgeIdfield.
-
annotations
public final AnnotationSchema annotations
-
defaultVertexId
public final V defaultVertexId
-
defaultEdgeId
public final V defaultEdgeId
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(Schema other)
- Specified by:
compareToin interfacejava.lang.Comparable<S>
-
withVertexIdTypes
public Schema withVertexIdTypes(Coder<Type,T> vertexIdTypes)
Returns a copy of thisSchemawithvertexIdTypesreplaced.
-
withVertexIds
public Schema withVertexIds(Coder<Term,V> vertexIds)
Returns a copy of thisSchemawithvertexIdsreplaced.
-
withEdgeIdTypes
public Schema withEdgeIdTypes(Coder<Type,T> edgeIdTypes)
Returns a copy of thisSchemawithedgeIdTypesreplaced.
-
withEdgeIds
public Schema withEdgeIds(Coder<Term,V> edgeIds)
Returns a copy of thisSchemawithedgeIdsreplaced.
-
withPropertyTypes
public Schema withPropertyTypes(Coder<Type,T> propertyTypes)
Returns a copy of thisSchemawithpropertyTypesreplaced.
-
withPropertyValues
public Schema withPropertyValues(Coder<Term,V> propertyValues)
Returns a copy of thisSchemawithpropertyValuesreplaced.
-
withAnnotations
public Schema withAnnotations(AnnotationSchema annotations)
Returns a copy of thisSchemawithannotationsreplaced.
-
withDefaultVertexId
public Schema withDefaultVertexId(V defaultVertexId)
Returns a copy of thisSchemawithdefaultVertexIdreplaced.
-
-