edu.washington.cs.knowitall.rule.constraint
Class StringConstraint

java.lang.Object
  extended by edu.washington.cs.knowitall.rule.constraint.Constraint
      extended by edu.washington.cs.knowitall.rule.constraint.CaptureConstraint
          extended by edu.washington.cs.knowitall.rule.constraint.AbstractRegexConstraint
              extended by edu.washington.cs.knowitall.rule.constraint.StringConstraint

public class StringConstraint
extends AbstractRegexConstraint

Constrains based on the existence of a token.

Author:
schmmd

Field Summary
 
Fields inherited from class edu.washington.cs.knowitall.rule.constraint.AbstractRegexConstraint
pattern, terms
 
Fields inherited from class edu.washington.cs.knowitall.rule.constraint.Constraint
part
 
Constructor Summary
StringConstraint(org.jdom.Element e)
           
StringConstraint(ExtractionPart part, List<String> terms)
           
StringConstraint(ExtractionPart part, String term)
           
 
Method Summary
 boolean equals(Object other)
          Force subclasses to avoid pointer-based comparison.
protected  int flags()
           
 String pattern()
           
 String string()
           
protected  String transform(String string)
           
 
Methods inherited from class edu.washington.cs.knowitall.rule.constraint.AbstractRegexConstraint
check, generalize, getString, hashCode, size, toString, toXmlElement, value
 
Methods inherited from class edu.washington.cs.knowitall.rule.constraint.CaptureConstraint
value
 
Methods inherited from class edu.washington.cs.knowitall.rule.constraint.Constraint
check, create, create, create, fromXmlElement, getConstraintClass, simplify, subsumes, toString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringConstraint

public StringConstraint(org.jdom.Element e)

StringConstraint

public StringConstraint(ExtractionPart part,
                        String term)

StringConstraint

public StringConstraint(ExtractionPart part,
                        List<String> terms)
Method Detail

equals

public boolean equals(Object other)
Description copied from class: Constraint
Force subclasses to avoid pointer-based comparison.

Overrides:
equals in class AbstractRegexConstraint

transform

protected String transform(String string)
Specified by:
transform in class AbstractRegexConstraint

string

public String string()

flags

protected int flags()
Overrides:
flags in class AbstractRegexConstraint

pattern

public String pattern()


Copyright © 2011 University of Washington CSE. All Rights Reserved.