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 toElement
objects. This is a base interface.
-
-
Field Summary
Fields Modifier and Type Field Description static String
FEATURE_ADD_PROPERTY
static String
FEATURE_ANY_IDS
static String
FEATURE_CUSTOM_IDS
static String
FEATURE_NULL_PROPERTY_VALUES
static String
FEATURE_NUMERIC_IDS
static String
FEATURE_REMOVE_PROPERTY
static String
FEATURE_STRING_IDS
static String
FEATURE_USER_SUPPLIED_IDS
static String
FEATURE_UUID_IDS
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
supportsAddProperty()
Determines if anElement
allows properties to be added.default boolean
supportsAnyIds()
Determines if anElement
any Java object is a suitable identifier.default boolean
supportsCustomIds()
Determines if anElement
has a specific custom object as their internal representation.default boolean
supportsNullPropertyValues()
Determines if anElement
allows properties withnull
property values.default boolean
supportsNumericIds()
Determines if anElement
has numeric identifiers as their internal representation.default boolean
supportsRemoveProperty()
Determines if anElement
allows properties to be removed.default boolean
supportsStringIds()
Determines if anElement
has string identifiers as their internal representation.default boolean
supportsUserSuppliedIds()
Determines if anElement
can have a user defined identifier.default boolean
supportsUuidIds()
Determines if anElement
has UUID identifiers as their internal representation.default boolean
willAllowId(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 anElement
allows properties withnull
property values. In the event that this value isfalse
, the underlying graph must treatnull
as an indication to remove the property.
-
supportsAddProperty
default boolean supportsAddProperty()
Determines if anElement
allows 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 anElement
allows properties to be removed.
-
supportsUserSuppliedIds
default boolean supportsUserSuppliedIds()
Determines if anElement
can have a user defined identifier. Implementations that do not support this feature will be expected to auto-generate unique identifiers. In other words, if theGraph
allowsgraph.addVertex(id,x)
to work and thus set the identifier of the newly addedVertex
to the value ofx
then this feature should return true. In this case,x
is assumed to be an identifier data type that theGraph
will accept.
-
supportsNumericIds
default boolean supportsNumericIds()
Determines if anElement
has 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 anElement
has 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 anElement
has UUID identifiers as their internal representation. In other words, if the value returned fromElement.id()
is aUUID
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.
-
supportsCustomIds
default boolean supportsCustomIds()
Determines if anElement
has 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 anElement
any Java object is a suitable identifier. TinkerGraph is a good example of aGraph
that can support this feature, as it can use anyObject
as 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 returntrue
ifsupportsUserSuppliedIds()
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. AGraph
may 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 returnfalse
for 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 returnfalse
ifsupportsUserSuppliedIds()
isfalse
. If custom identifiers are supported then it will throw an exception. Those that returntrue
forsupportsCustomIds()
should override this method. IfsupportsAnyIds()
istrue
then 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.
-
-