## gate.jape
Class LeftHandSide

    java.lang.Object
      |
      +--gate.jape.LeftHandSide

All Implemented Interfaces:
  JapeConstants, Matcher, Serializable

public class LeftHandSide
extends Object
implements Matcher, JapeConstants, Serializable

The LHS of a CPSL rule. The pattern part. Has a ConstraintGroup and binding information that associates labels with ComplexPatternElements. Provides the Matcher interface.

See Also:
  Serialized Form

Fields inherited from interface gate.jape.JapeConstants
`APPELT_STYLE, BRILL_STYLE, DEFAULT_PRIORITY, FIRST_STYLE, INDENT_PADDING, KLEENE_PLUS, KLEENE_QUERY, KLEENE_STAR, MULTI_SPAN_BINDING, NO_BINDING, NO_KLEENE_OP, SINGLE_SPAN_BINDING`

Constructor Summary
`LeftHandSide(ConstraintGroup constraintGroup)` Construction from a ConstraintGroup

Method Summary
`void` `addBinding(String bindingName, ComplexPatternElement binding, HashSet bindingNameSet, boolean macroRef)` Add a binding record.
`void` `finish()` Finish: replace dynamic data structures with Java arrays; called after parsing.
`AnnotationSet` `getBoundAnnots(String bindingName)` Get annotations via a binding name.
`ConstraintGroup` `getConstraintGroup()` Get the constraint group
`boolean` `hasMatched()` Was the last match successful?
`boolean` `matches(Document doc, int position, MutableInteger newPosition)` Does the LHS match the document at this position?
`void` `reset()` Clear the matched annotations cached in pattern elements.
`String` `toString()` Create a string representation of the object.
`String` `toString(String pad)` Create a string representation of the object.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### LeftHandSide

    public LeftHandSide(ConstraintGroup constraintGroup)

  Construction from a ConstraintGroup

Method Detail

### addBinding

    public void addBinding(String bindingName,
                           ComplexPatternElement binding,
                           HashSet bindingNameSet,
                           boolean macroRef)
                    throws JapeException

  Add a binding record.

### finish

    public void finish()

  Finish: replace dynamic data structures with Java arrays; called after parsing.
  Specified by:
    `finish` in interface `Matcher`

### getBoundAnnots

    public AnnotationSet getBoundAnnots(String bindingName)

  Get annotations via a binding name.

### reset

    public void reset()

  Clear the matched annotations cached in pattern elements.
  Specified by:
    `reset` in interface `Matcher`

### hasMatched

    public boolean hasMatched()

  Was the last match successful?

### matches

    public boolean matches(Document doc,
                           int position,
                           MutableInteger newPosition)

  Does the LHS match the document at this position?
  Specified by:
    `matches` in interface `Matcher`

### toString

    public String toString()

  Create a string representation of the object.
  Overrides:
    `toString` in class `Object`

### toString

    public String toString(String pad)

  Create a string representation of the object.

### getConstraintGroup

    public ConstraintGroup getConstraintGroup()

  Get the constraint group