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

        public Property property​(java.lang.String name)
        Description copied from interface: PropertyContainer
        Creates a new Property associated with this property container. This property can be used as a lookup in other expressions. It does not add a value to the property.

        Note: The property container does not track property creation and there is no possibility to enumerate all properties that have been created for this property container.

        Specified by:
        property in interface PropertyContainer
        Parameters:
        name - property name, must not be null or empty.
        Returns:
        a new Property associated with this Relationship.
      • project

        public MapProjection project​(java.util.List<java.lang.Object> entries)
        A list will never be a valid entry for a map projection, so this convenient method prevents trying to create one from a list of objects. It will delegate to project(Object...) with the content of the list.
        Parameters:
        entries - A list of entries for the projection
        Returns:
        A map projection.
      • project

        public MapProjection project​(java.lang.Object... entries)
        Creates a map projection based on this node. The node needs a symbolic name for this to work.

        Entries of type String in entries followed by an Expression will be treated as map keys pointing to the expression in the projection, String entries alone will be treated as property lookups on the node.

        Parameters:
        entries - A list of entries for the projection
        Returns:
        A map projection.
      • getSymbolicName

        public java.util.Optional<SymbolicName> getSymbolicName()
        Specified by:
        getSymbolicName in interface Named
        Returns:
        The optional symbolic name 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
      • isNotEqualTo

        public Condition isNotEqualTo​(Node otherNode)
      • descending

        public SortItem descending()
      • ascending

        public SortItem ascending()