standup.joke
Interface InstantiationConstraint

All Superinterfaces:
JokeConstraint
All Known Implementing Classes:
InstantiationConstraintAmbiguity, InstantiationConstraintFamiliarityScore, InstantiationConstraintFLevel, InstantiationConstraintLexeme, InstantiationConstraintLexemeClause, InstantiationConstraintLexemeSchema, InstantiationConstraintLexicon, InstantiationConstraintLexiconAll, InstantiationConstraintLexiconAllClause, InstantiationConstraintLexiconAllSchema, InstantiationConstraintLexiconClause, InstantiationConstraintLexiconNone, InstantiationConstraintLexiconSchema, InstantiationConstraintNovelty, InstantiationConstraintPhoneticSimilarity

public interface InstantiationConstraint
extends JokeConstraint

An InstantiationConstraint represents a constraint on the keyword instantiations of a JokeStructure.

To constrain Schema instantiations, implement the handleSchema(SQLQuerySchema) method.

To constrain Clause instantiations, implement the getSQLConstraint(Clause, List) method.

Author:
Ruli Manurung

Method Summary
 String getSQLConstraint(Clause clause, List<SQLSelectElement> taqlsses)
          Returns an SQL code snippet that is to be appended to the WHERE clause of the SQL query when instantiating the given Clause.
 void handleSchema(SQLQuerySchema schemaSQLQuery)
          Modifies the given SQLQuerySchema to reflect this constraint.
 
Methods inherited from interface standup.joke.JokeConstraint
validate
 

Method Detail

handleSchema

void handleSchema(SQLQuerySchema schemaSQLQuery)
Modifies the given SQLQuerySchema to reflect this constraint.

Parameters:
schemaSQLQuery -

getSQLConstraint

String getSQLConstraint(Clause clause,
                        List<SQLSelectElement> taqlsses)
Returns an SQL code snippet that is to be appended to the WHERE clause of the SQL query when instantiating the given Clause.

Parameters:
clause - the Clause being instantiated.
Returns:
-- the String to be appended to the WHERE clause. As a contract, we require that it appear between parentheses, e.g. "(...)" for readability purposes.