Interface Graph.Features.VertexFeatures

All Superinterfaces:
Graph.Features.ElementFeatures, Graph.Features.FeatureSet
All Known Implementing Classes:
AbstractTinkerGraph.TinkerGraphVertexFeatures, EmptyGraph.EmptyGraphFeatures.EmptyGraphVertexFeatures
Enclosing interface:
Graph.Features

public static interface Graph.Features.VertexFeatures extends Graph.Features.ElementFeatures
Features that are related to Vertex operations.
  • Field Details

  • Method Details

    • getCardinality

      default VertexProperty.Cardinality getCardinality(String key)
      Gets the VertexProperty.Cardinality for a key. By default, this method will return VertexProperty.Cardinality.list. Implementations that employ a schema can consult it to determine the VertexProperty.Cardinality. Those that do no have a schema can return their default VertexProperty.Cardinality for 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 the Graph implementation for any schema related queries.

    • supportsAddVertices

      default boolean supportsAddVertices()
      Determines if a Vertex can be added to the Graph.
    • supportsRemoveVertices

      default boolean supportsRemoveVertices()
      Determines if a Vertex can be removed from the Graph.
    • supportsMultiProperties

      default boolean supportsMultiProperties()
      Determines if a Vertex can support multiple properties with the same key.
    • supportsDuplicateMultiProperties

      default boolean supportsDuplicateMultiProperties()
      Determines if a Vertex can support non-unique values on the same key. For this value to be true, then supportsMetaProperties() must also return true. By default this method, just returns what supportsMultiProperties() returns.
    • supportsMetaProperties

      default boolean supportsMetaProperties()
      Determines if a Vertex can support properties on vertex properties. It is assumed that a graph will support all the same data types for meta-properties that are supported for regular properties.
    • supportsUpsert

      default boolean supportsUpsert()
      Determines if the Graph implementation uses upsert functionality as opposed to insert functionality for Graph.addVertex(String). This feature gives graph providers some flexibility as to how graph mutations are treated. For graph providers, testing of this feature (as far as TinkerPop is concerned) only covers graphs that can support user supplied identifiers as there is no other way for TinkerPop to know what aspect of a vertex is unique to appropriately apply assertions. Graph providers, especially those who support schema features, may have other methods for uniquely identifying a vertex and should therefore resort to their own body of tests to validate this feature.
    • properties

      Gets features related to "properties" on a Vertex.
    • getLabelCardinality

      default LabelCardinality getLabelCardinality()
      Gets the LabelCardinality for vertices in this graph. Defines how many labels a vertex can have and whether labels are mutable.
      Returns:
      the label cardinality for vertices, defaulting to LabelCardinality.ONE
      Since:
      4.0.0
    • getDefaultLabel

      default String getDefaultLabel()
      Gets the default label returned for vertices with no explicit labels when the cardinality requires at least one label (LabelCardinality.ONE or LabelCardinality.ONE_OR_MORE).
      Returns:
      the default vertex label, typically Vertex.DEFAULT_LABEL
      Since:
      4.0.0