standup.joke
Class InstantiationConstraintLexiconAllSchema

java.lang.Object
  extended by standup.joke.InstantiationConstraintLexicon
      extended by standup.joke.InstantiationConstraintLexiconAll
          extended by standup.joke.InstantiationConstraintLexiconAllSchema
All Implemented Interfaces:
InstantiationConstraint, JokeConstraint

public class InstantiationConstraintLexiconAllSchema
extends InstantiationConstraintLexiconAll

An InstantiationConstraint that constrains a joke to use only Lexemes from a given LexemeSet as answer instantiations.

Author:
Ruli Manurung

Field Summary
 
Fields inherited from class standup.joke.InstantiationConstraintLexicon
lexicon, lxsTable
 
Constructor Summary
InstantiationConstraintLexiconAllSchema(LexemeSet lexs)
           
 
Method Summary
 String getSQLConstraint(Clause s)
           
 String toString()
           
 boolean validate(JokeStructure j)
          Returns true if the given JokeStructure satisfies this constraint, and false if not.
 
Methods inherited from class standup.joke.InstantiationConstraintLexiconAll
getSQLConstraint, handleSchema
 
Methods inherited from class standup.joke.InstantiationConstraintLexicon
finalize
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstantiationConstraintLexiconAllSchema

public InstantiationConstraintLexiconAllSchema(LexemeSet lexs)
Method Detail

getSQLConstraint

public String getSQLConstraint(Clause s)

validate

public boolean validate(JokeStructure j)
Description copied from interface: JokeConstraint
Returns true if the given JokeStructure satisfies this constraint, and false if not.

Specified by:
validate in interface JokeConstraint
Overrides:
validate in class InstantiationConstraintLexiconAll
Parameters:
j - the JokeStructure being validated
Returns:
-- true if j satisfies this constraint, false otherwise.

toString

public String toString()
Overrides:
toString in class InstantiationConstraintLexiconAll