Interface VertexProperty<V>

All Superinterfaces:
Element, Property<V>

public interface VertexProperty<V> extends Property<V>, Element
A VertexProperty is similar to a Property in that it denotes a key/value pair associated with an Vertex, however it is different in the sense that it also represents an entity that it is an Element that can have properties of its own.

A property is much like a Java8 Optional in that a property can be not present (i.e. empty). The key of a property is always a String and the value of a property is an arbitrary Java object. Each underlying graph engine will typically have constraints on what Java objects are allowed to be used as values.

Author:
Matthias Broecheler (me@matthiasb.com), Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)
  • Field Details

  • Method Details

    • element

      Vertex element()
      Gets the Vertex that owns this VertexProperty.
      Specified by:
      element in interface Property<V>
      Returns:
      The element associated with this property (i.e. Vertex, Edge, or VertexProperty).
    • graph

      default Graph graph()
      Get the graph that this element is within.
      Specified by:
      graph in interface Element
      Returns:
      the graph of this element
    • label

      default String label()
      Gets the label for the graph Element which helps categorize it.
      Specified by:
      label in interface Element
      Returns:
      The label of the element
    • labels

      default Set<String> labels()
      Returns a singleton set containing the property key, consistent with the single-label semantics of VertexProperty.
      Specified by:
      labels in interface Element
      Returns:
      a singleton Set containing this property's key
      Since:
      4.0.0
    • empty

      static <V> VertexProperty<V> empty()
      Constructs an empty VertexProperty.
      Type Parameters:
      V - The value class of the empty property
      Returns:
      A property that is not present
    • properties

      <U> Iterator<Property<U>> properties(String... propertyKeys)
      Get an Iterator of properties where the propertyKeys is meant to be a filter on the available keys. If no keys are provide then return all the properties.
      Specified by:
      properties in interface Element