Class RelationshipChain

    • Constructor Detail

      • RelationshipChain

        public RelationshipChain()
    • Method Detail

      • named

        public RelationshipChain named​(java.lang.String newSymbolicName)
        Replaces the last element of this chains with a copy of the relationship with the new symbolic name.
        Specified by:
        named in interface RelationshipPattern
        Parameters:
        newSymbolicName - The new symbolic name to use
        Returns:
        This chain
      • unbounded

        public RelationshipChain unbounded()
        Changes the length of the last element of this chain to an unbounded pattern.
        Returns:
        This chain
        Since:
        1.1.1
      • min

        public RelationshipChain min​(java.lang.Integer minimum)
        Changes the length of the last element of this chain to a new minimum length
        Parameters:
        minimum - the new minimum
        Returns:
        This chain
      • max

        public RelationshipChain max​(java.lang.Integer maximum)
        Changes the length of the last element of this chain to a new maximum length
        Parameters:
        maximum - the new maximum
        Returns:
        This chain
      • length

        public RelationshipChain length​(java.lang.Integer minimum,
                                        java.lang.Integer maximum)
        Changes the length of the last element of this chain
        Parameters:
        minimum - the new minimum
        maximum - the new maximum
        Returns:
        This chain
      • properties

        public RelationshipChain properties​(MapExpression newProperties)
        Adds properties to the last element of this chain.
        Parameters:
        newProperties - the new properties (can be null to remove exiting properties).
        Returns:
        This chain
      • properties

        public RelationshipChain properties​(java.lang.Object... keysAndValues)
        Adds properties to the last element of this chain.
        Parameters:
        keysAndValues - A list of key and values. Must be an even number, with alternating String and Expression.
        Returns:
        This chain
      • asCondition

        public Condition asCondition()
        Description copied from interface: RelationshipPattern
        Transform this pattern into a condition. All names of the patterns must be known upfront in the final statement, as PatternExpressions are not allowed to introduce new variables.
        Specified by:
        asCondition in interface RelationshipPattern
        Returns:
        A condition based on this pattern.
      • 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.