Class AbstractTinkerGraph.TinkerGraphVertexFeatures
java.lang.Object
org.apache.tinkerpop.gremlin.tinkergraph.structure.AbstractTinkerGraph.TinkerGraphVertexFeatures
- All Implemented Interfaces:
Graph.Features.ElementFeatures,Graph.Features.FeatureSet,Graph.Features.VertexFeatures
- Enclosing class:
- AbstractTinkerGraph
public class AbstractTinkerGraph.TinkerGraphVertexFeatures
extends Object
implements Graph.Features.VertexFeatures
-
Field Summary
Fields inherited from interface org.apache.tinkerpop.gremlin.structure.Graph.Features.ElementFeatures
FEATURE_ADD_PROPERTY, FEATURE_ANY_IDS, FEATURE_CUSTOM_IDS, FEATURE_NULL_PROPERTY_VALUES, FEATURE_NUMERIC_IDS, FEATURE_REMOVE_PROPERTY, FEATURE_STRING_IDS, FEATURE_USER_SUPPLIED_IDS, FEATURE_UUID_IDSFields inherited from interface org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexFeatures
FEATURE_ADD_VERTICES, FEATURE_DUPLICATE_MULTI_PROPERTIES, FEATURE_META_PROPERTIES, FEATURE_MULTI_PROPERTIES, FEATURE_REMOVE_VERTICES, FEATURE_UPSERT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCardinality(String key) Gets theVertexProperty.Cardinalityfor a key.Gets the default label returned for vertices with no explicit labels when the cardinality requires at least one label (LabelCardinality.ONEorLabelCardinality.ONE_OR_MORE).Gets theLabelCardinalityfor vertices in this graph.Gets features related to "properties" on aVertex.booleanDetermines if anElementhas a specific custom object as their internal representation.booleanDetermines if anElementallows properties withnullproperty values.booleanwillAllowId(Object id) Determines if an identifier will be accepted by theGraph.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.tinkerpop.gremlin.structure.Graph.Features.ElementFeatures
supportsAddProperty, supportsAnyIds, supportsNumericIds, supportsRemoveProperty, supportsStringIds, supportsUserSuppliedIds, supportsUuidIdsMethods inherited from interface org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexFeatures
supportsAddVertices, supportsDuplicateMultiProperties, supportsMetaProperties, supportsMultiProperties, supportsRemoveVertices, supportsUpsert
-
Constructor Details
-
TinkerGraphVertexFeatures
protected TinkerGraphVertexFeatures()
-
-
Method Details
-
supportsNullPropertyValues
public boolean supportsNullPropertyValues()Description copied from interface:Graph.Features.ElementFeaturesDetermines if anElementallows properties withnullproperty values. In the event that this value isfalse, the underlying graph must treatnullas an indication to remove the property.- Specified by:
supportsNullPropertyValuesin interfaceGraph.Features.ElementFeatures
-
properties
Description copied from interface:Graph.Features.VertexFeaturesGets features related to "properties" on aVertex.- Specified by:
propertiesin interfaceGraph.Features.VertexFeatures
-
supportsCustomIds
public boolean supportsCustomIds()Description copied from interface:Graph.Features.ElementFeaturesDetermines 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.- Specified by:
supportsCustomIdsin interfaceGraph.Features.ElementFeatures
-
willAllowId
Description copied from interface:Graph.Features.ElementFeaturesDetermines if an identifier will be accepted by theGraph. This check is different than what identifier internally supports as defined in methods likeGraph.Features.ElementFeatures.supportsNumericIds(). 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 ifGraph.Features.ElementFeatures.supportsUserSuppliedIds()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 returnfalseifGraph.Features.ElementFeatures.supportsUserSuppliedIds()isfalse. If custom identifiers are supported then it will throw an exception. Those that returntrueforGraph.Features.ElementFeatures.supportsCustomIds()should override this method. IfGraph.Features.ElementFeatures.supportsAnyIds()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.- Specified by:
willAllowIdin interfaceGraph.Features.ElementFeatures
-
getCardinality
Description copied from interface:Graph.Features.VertexFeaturesGets theVertexProperty.Cardinalityfor a key. By default, this method will returnVertexProperty.Cardinality.list. Implementations that employ a schema can consult it to determine theVertexProperty.Cardinality. Those that do no have a schema can return their defaultVertexProperty.Cardinalityfor every key. Note that this method is primarily used by TinkerPop for internal usage and may not be suitable to reliably determine the cardinality of a key. For some implementation it may offer little more than a hint on the actual cardinality. Generally speaking it is likely best to drop down to the API of theGraphimplementation for any schema related queries.- Specified by:
getCardinalityin interfaceGraph.Features.VertexFeatures
-
getLabelCardinality
Description copied from interface:Graph.Features.VertexFeaturesGets theLabelCardinalityfor vertices in this graph. Defines how many labels a vertex can have and whether labels are mutable.- Specified by:
getLabelCardinalityin interfaceGraph.Features.VertexFeatures- Returns:
- the label cardinality for vertices, defaulting to
LabelCardinality.ONE
-
getDefaultLabel
Description copied from interface:Graph.Features.VertexFeaturesGets the default label returned for vertices with no explicit labels when the cardinality requires at least one label (LabelCardinality.ONEorLabelCardinality.ONE_OR_MORE).- Specified by:
getDefaultLabelin interfaceGraph.Features.VertexFeatures- Returns:
- the default vertex label, typically
Vertex.DEFAULT_LABEL
-