Class Relationship

    • Method Detail

      • getDetails

        @API(status=INTERNAL)
        public Relationship.Details getDetails()
        The details contains the types, properties and cardinality.
        Returns:
        A wrapper around the details of this relationship.
      • named

        public Relationship named​(java.lang.String newSymbolicName)
        Creates a copy of this relationship with a new symbolic name.
        Specified by:
        named in interface RelationshipPattern
        Parameters:
        newSymbolicName - the new symbolic name.
        Returns:
        The new relationship.
      • named

        public Relationship named​(SymbolicName newSymbolicName)
        Creates a copy of this relationship with a new symbolic name.
        Parameters:
        newSymbolicName - the new symbolic name.
        Returns:
        The new relationship.
      • unbounded

        public Relationship unbounded()
        Creates a new relationship with an unbound length minimum length
        Returns:
        the new relationship
        Since:
        1.1.1
      • min

        public Relationship min​(java.lang.Integer minimum)
        Creates a new relationship with a new minimum length
        Parameters:
        minimum - the new minimum
        Returns:
        the new relationship
      • max

        public Relationship max​(java.lang.Integer maximum)
        Creates a new relationship with a new maximum length
        Parameters:
        maximum - the new maximum
        Returns:
        the new relationship
      • length

        public Relationship length​(java.lang.Integer minimum,
                                   java.lang.Integer maximum)
        Creates a new relationship with a new length
        Parameters:
        minimum - the new minimum
        maximum - the new maximum
        Returns:
        the new relationship
      • withProperties

        public Relationship 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<Relationship>
        Parameters:
        newProperties - the new properties (can be null to remove exiting properties).
        Returns:
        The new property container.
      • withProperties

        public Relationship 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<Relationship>
        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:
        An optional symbolic name.
      • 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.