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

public class NodeMatchClause extends Object implements MatchClause
Represents a node match clause For example, MATCH (x)
  • Field Details

  • Constructor Details

    • NodeMatchClause

      public NodeMatchClause(CypherVar node)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString 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
    • equals

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

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

      public CypherVar getNode()