Class Node

    • Method Detail

      • named

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

        public 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.
      • withProperties

        public Node withProperties​(MapExpression newProperties)
        Description copied from interface: ExposesProperties
        Creates a a copy of this property container with additional properties. Creates a property container without properties when no properties are passed to this method.
        Specified by:
        withProperties in interface ExposesProperties<Node>
        Parameters:
        newProperties - the new properties (can be null to remove exiting properties).
        Returns:
        The new property container.
      • withProperties

        public Node withProperties​(java.lang.Object... keysAndValues)
        Description copied from interface: ExposesProperties
        Creates a a copy of this property container with additional properties. Creates a property container without properties when no properties are passed to this method.
        Specified by:
        withProperties in interface ExposesProperties<Node>
        Parameters:
        keysAndValues - A list of key and values. Must be an even number, with alternating String and Expression.
        Returns:
        The new property container.
      • getSymbolicName

        public java.util.Optional<SymbolicName> getSymbolicName()
        Specified by:
        getSymbolicName in interface Named
        Returns:
        The optional symbolic name of this node.
      • internalId

        public FunctionInvocation internalId()
        Returns:
        A new function invocation returning the internal id of this node.
      • labels

        public FunctionInvocation labels()
        Returns:
        A new function invocation returning the labels of this node.
      • relationshipTo

        public Relationship relationshipTo​(Node other,
                                           java.lang.String... types)
        Description copied from interface: ExposesRelationships
        Starts building an outgoing relationship to the other node.
        Specified by:
        relationshipTo in interface ExposesRelationships<Relationship>
        Parameters:
        other - The other end of the outgoing relationship
        types - The types to match
        Returns:
        An ongoing relationship definition, that can be used to specify the type
      • relationshipFrom

        public Relationship relationshipFrom​(Node other,
                                             java.lang.String... types)
        Description copied from interface: ExposesRelationships
        Starts building an incoming relationship starting at the other node.
        Specified by:
        relationshipFrom in interface ExposesRelationships<Relationship>
        Parameters:
        other - The source of the incoming relationship
        types - The types to match
        Returns:
        An ongoing relationship definition, that can be used to specify the type
      • relationshipBetween

        public Relationship relationshipBetween​(Node other,
                                                java.lang.String... types)
        Description copied from interface: ExposesRelationships
        Starts building an undirected relationship between this node and the other.
        Specified by:
        relationshipBetween in interface ExposesRelationships<Relationship>
        Parameters:
        other - The other end of the relationship
        types - The types to match
        Returns:
        An ongoing relationship definition, that can be used to specify the type
      • hasLabels

        public Condition hasLabels​(java.lang.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 of the labels to query
      • accept

        public void accept​(Visitor visitor)
        Description copied from interface: Visitable
        Accept a Visitor visiting this Visitable and its nested Visitables if applicable.
        Specified by:
        accept in interface Visitable
        Parameters:
        visitor - the visitor to notify, must not be null.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isEqualTo

        public 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

        public 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

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

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

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

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

        public AliasedExpression as​(java.lang.String alias)
        Creates an alias for this node.
        Parameters:
        alias - The alias to use.
        Returns:
        The aliased expression.