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)
    • Method Detail

      • 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
      • 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