java.lang.Object
se.liu.ida.hefquin.engine.wrappers.lpg.query.impl.match.EdgeMatchClause
All Implemented Interfaces:
CypherExpression, MatchClause

public class EdgeMatchClause extends Object implements MatchClause
Represents a directed path match statement. Conditions on the labels of the nodes or edges, as well as over property values of nodes or edges are managed through the WHERE clause. For example MATCH (x)-[e]->(y)
  • Field Details

    • sourceNode

      protected final CypherVar sourceNode
    • targetNode

      protected final CypherVar targetNode
    • edge

      protected final CypherVar edge
  • Constructor Details

  • Method Details

    • getSourceNode

      public CypherVar getSourceNode()
    • getTargetNode

      public CypherVar getTargetNode()
    • getEdge

      public CypherVar getEdge()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isRedundantWith

      public boolean isRedundantWith(MatchClause match)
      Description copied from interface: MatchClause
      Checks if two match statements are redundant. This can happen if they are exactly the same pattern, or if one is a node pattern and the other a path pattern that contains it. For instance, MATCH (x) is redundant with MATCH (x)-[y]->(z), MATCH (x), and MATCH (v)-[w]->(x). Note that this is not symmetric.
      Specified by:
      isRedundantWith in interface MatchClause
      Parameters:
      match - the other match clause to test
      Returns:
      true if the clauses are redundant, i.e., if both patterns share nodes
    • getVars

      public Set<CypherVar> getVars()
      Description copied from interface: MatchClause
      Obtains the set of variables defined in the pattern
      Specified by:
      getVars in interface CypherExpression
      Specified by:
      getVars in interface MatchClause
      Returns:
      a set of CypherVar with the variables defined in the pattern For example, the object that represents the pattern MATCH (x)-[e]->(y) returns the set {x, e, y}.
    • visit

      public void visit(CypherExpressionVisitor visitor)
      Description copied from interface: CypherExpression
      accepts a CypherExpressionVisitor and propagates the visit recursively when required.
      Specified by:
      visit in interface CypherExpression