Interface Graph.Features.ElementFeatures
-
- All Superinterfaces:
Graph.Features.FeatureSet
- All Known Subinterfaces:
Graph.Features.EdgeFeatures,Graph.Features.VertexFeatures
- Enclosing interface:
- Graph.Features
public static interface Graph.Features.ElementFeatures extends Graph.Features.FeatureSet
Features that are related toElementobjects. This is a base interface.
-
-
Field Summary
Fields Modifier and Type Field Description static StringFEATURE_ADD_PROPERTYstatic StringFEATURE_ANY_IDSstatic StringFEATURE_CUSTOM_IDSstatic StringFEATURE_NULL_PROPERTY_VALUESstatic StringFEATURE_NUMERIC_IDSstatic StringFEATURE_REMOVE_PROPERTYstatic StringFEATURE_STRING_IDSstatic StringFEATURE_USER_SUPPLIED_IDSstatic StringFEATURE_UUID_IDS
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default booleansupportsAddProperty()Determines if anElementallows properties to be added.default booleansupportsAnyIds()Determines if anElementany Java object is a suitable identifier.default booleansupportsCustomIds()Determines if anElementhas a specific custom object as their internal representation.default booleansupportsNullPropertyValues()Determines if anElementallows properties withnullproperty values.default booleansupportsNumericIds()Determines if anElementhas numeric identifiers as their internal representation.default booleansupportsRemoveProperty()Determines if anElementallows properties to be removed.default booleansupportsStringIds()Determines if anElementhas string identifiers as their internal representation.default booleansupportsUserSuppliedIds()Determines if anElementcan have a user defined identifier.default booleansupportsUuidIds()Determines if anElementhas UUID identifiers as their internal representation.default booleanwillAllowId(Object id)Determines if an identifier will be accepted by theGraph.
-
-
-
Field Detail
-
FEATURE_USER_SUPPLIED_IDS
static final String FEATURE_USER_SUPPLIED_IDS
- See Also:
- Constant Field Values
-
FEATURE_NUMERIC_IDS
static final String FEATURE_NUMERIC_IDS
- See Also:
- Constant Field Values
-
FEATURE_STRING_IDS
static final String FEATURE_STRING_IDS
- See Also:
- Constant Field Values
-
FEATURE_UUID_IDS
static final String FEATURE_UUID_IDS
- See Also:
- Constant Field Values
-
FEATURE_CUSTOM_IDS
static final String FEATURE_CUSTOM_IDS
- See Also:
- Constant Field Values
-
FEATURE_ANY_IDS
static final String FEATURE_ANY_IDS
- See Also:
- Constant Field Values
-
FEATURE_ADD_PROPERTY
static final String FEATURE_ADD_PROPERTY
- See Also:
- Constant Field Values
-
FEATURE_REMOVE_PROPERTY
static final String FEATURE_REMOVE_PROPERTY
- See Also:
- Constant Field Values
-
FEATURE_NULL_PROPERTY_VALUES
static final String FEATURE_NULL_PROPERTY_VALUES
- See Also:
- Constant Field Values
-
-
Method Detail
-
supportsNullPropertyValues
default boolean supportsNullPropertyValues()
Determines if anElementallows properties withnullproperty values. In the event that this value isfalse, the underlying graph must treatnullas an indication to remove the property.
-
supportsAddProperty
default boolean supportsAddProperty()
Determines if anElementallows properties to be added. This feature is set independently from supporting "data types" and refers to support of calls toElement.property(String, Object).
-
supportsRemoveProperty
default boolean supportsRemoveProperty()
Determines if anElementallows properties to be removed.
-
supportsUserSuppliedIds
default boolean supportsUserSuppliedIds()
Determines if anElementcan have a user defined identifier. Implementations that do not support this feature will be expected to auto-generate unique identifiers. In other words, if theGraphallowsgraph.addVertex(id,x)to work and thus set the identifier of the newly addedVertexto the value ofxthen this feature should return true. In this case,xis assumed to be an identifier data type that theGraphwill accept.
-
supportsNumericIds
default boolean supportsNumericIds()
Determines if anElementhas numeric identifiers as their internal representation. In other words, if the value returned fromElement.id()is a numeric value then this method should be returntrue. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite.
-
supportsStringIds
default boolean supportsStringIds()
Determines if anElementhas string identifiers as their internal representation. In other words, if the value returned fromElement.id()is a string value then this method should be returntrue. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite.
-
supportsUuidIds
default boolean supportsUuidIds()
Determines if anElementhas UUID identifiers as their internal representation. In other words, if the value returned fromElement.id()is aUUIDvalue then this method should be returntrue. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite.
-
supportsCustomIds
default boolean supportsCustomIds()
Determines if anElementhas a specific custom object as their internal representation. In other words, if the value returned fromElement.id()is a type defined by the graph implementations, such as OrientDB'sRid, then this method should be returntrue. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite.
-
supportsAnyIds
default boolean supportsAnyIds()
Determines if anElementany Java object is a suitable identifier. TinkerGraph is a good example of aGraphthat can support this feature, as it can use anyObjectas a value for the identifier. Note that this feature is most generally used for determining the appropriate tests to execute in the Gremlin Test Suite. This setting should only returntrueifsupportsUserSuppliedIds()istrue.
-
willAllowId
default boolean willAllowId(Object id)
Determines if an identifier will be accepted by theGraph. This check is different than what identifier internally supports as defined in methods likesupportsNumericIds(). Those refer to internal representation of the identifier. AGraphmay accept an identifier that is not of those types and internally transform it to a native representation. Note that this method only applies ifsupportsUserSuppliedIds()istrue. Those that returnfalsefor that method can immediately return false for this one as it allows no ids of any type (it generates them all). The default implementation will immediately returnfalseifsupportsUserSuppliedIds()isfalse. If custom identifiers are supported then it will throw an exception. Those that returntrueforsupportsCustomIds()should override this method. IfsupportsAnyIds()istruethen the identifier will immediately be allowed. Finally, if any of the other types are supported, they will be typed checked against the class of the supplied identifier.
-
-