Interface Node

All Superinterfaces:
ExposesProperties<Node>, ExposesRelationships<Relationship>, IdentifiableElement, Named, PatternElement, PropertyAccessor, PropertyContainer, Visitable
All Known Implementing Classes:
NodeBase

@API(status=STABLE, since="1.0") public interface Node extends PatternElement, PropertyContainer, ExposesProperties<Node>, ExposesRelationships<Relationship>
Since:
1.0
Author:
Michael J. Simons
  • Method Details

    • getLabels

      List<NodeLabel> getLabels()
      Returns the labels associated with this Node.
      Returns:
      the labels associated with this Node
    • named

      Node named(String newSymbolicName)
      Creates a copy of this node with a new symbolic name.
      Parameters:
      newSymbolicName - the new symbolic name.
      Returns:
      the new node.
    • named

      Node named(SymbolicName newSymbolicName)
      Creates a copy of this node with a new symbolic name.
      Parameters:
      newSymbolicName - the new symbolic name.
      Returns:
      the new node.
    • hasLabels

      Condition hasLabels(String... labelsToQuery)
      A condition that checks for the presence of labels on a node.
      Parameters:
      labelsToQuery - a list of labels to query
      Returns:
      a condition that checks whether this node has all the labels to query
    • hasLabels

      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a condition that checks for the presence of a label expression on a node.
      Parameters:
      labels - the labels to check
      Returns:
      a condition that checks whether this node has all the labels to query
      Since:
      2024.3.0
    • hasLabels

      Condition hasLabels(Labels labels)
      Returns a condition that checks for the presence of a label expression on a node.
      Parameters:
      labels - the labels to check
      Returns:
      a condition that checks whether this node has all the labels to query
      Since:
      2025.1.0
    • isEqualTo

      Condition isEqualTo(Node otherNode)
      Creates a new condition whether this node is equal to otherNode.
      Parameters:
      otherNode - the node to compare this node to.
      Returns:
      a condition.
    • isNotEqualTo

      Condition isNotEqualTo(Node otherNode)
      Creates a new condition whether this node is not equal to otherNode.
      Parameters:
      otherNode - the node to compare this node to.
      Returns:
      a condition.
    • isNull

      Condition isNull()
      Creates a new condition based on this node whether it is null.
      Returns:
      a condition.
    • isNotNull

      Condition isNotNull()
      Creates a new condition based on this node whether it is not null.
      Returns:
      a condition.
    • descending

      SortItem descending()
      Creates a new sort item of this node in descending order.
      Returns:
      a sort item.
    • ascending

      SortItem ascending()
      Creates a new sort item of this node in ascending order.
      Returns:
      a sort item.
    • as

      Creates an alias for this node.
      Parameters:
      alias - the alias to use.
      Returns:
      the aliased expression.
    • internalId

      @Deprecated(since="2022.6.0") FunctionInvocation internalId()
      Deprecated.
      Returns a new function invocation returning the internal id of this node.
      Returns:
      a new function invocation returning the internal id of this node
    • elementId

      default FunctionInvocation elementId()
      Returns a new function invocation returning the element id of this node.
      Returns:
      a new function invocation returning the element id of this node
      Since:
      2022.6.0
    • labels

      Returns a new function invocation returning the labels of this node.
      Returns:
      a new function invocation returning the labels of this node