|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object standup.joke.Clause
public class Clause
An output specification function clause. See Chapter 5 (Surface Generation) of the STANDUP backend technical specification document for details. The actual Clause instances themselves should be created by XMLReaders, which reads in details of the OSF clauses from an XML file.
Field Summary | |
---|---|
private Precondition |
outSpec
|
private List<Precondition> |
preconditions
|
private static String |
sqlPreconditionTablePrefix
|
private Precondition |
tempSpec
|
private UnifiableListVar |
tempSpecArgumentQueryableLexemes
|
Constructor Summary | |
---|---|
Clause(Element clauseElement)
Constructor for instantiating a Clause specified in an XML
Element . |
|
Clause(Precondition outSpec,
Precondition tempSpec,
List<Precondition> preconditions,
UnifiableListVar tempSpecArgumentQueryableLexemes)
Default constructor providing instances for all fields. |
Method Summary | |
---|---|
private static UnifiableListVar |
doTAQLVariables(Element e)
|
Bindings |
getBindings(UnifiableList outSpecLex,
UnifiableList tempSpecLex)
Returns a Bindings that results from the unification of both the
output specifier and the template specifier instantiations. |
List<List<Keyword>> |
getClauseInstantiations(UnifiableList input,
InstantiationConstraint[] constraints)
This method takes a Clause, a list of JOKEGRAPHNODES!!! that instantiate the input arguments of the Clause, and an array of InstantiationConstraint objects that further constrain the clause instantiations, and sends a query to the SQL server to retrieve all valid clause instantiations. |
static List<List<Keyword>> |
getClauseInstantiationsCombined(List<Clause> clauses,
UnifiableList input,
InstantiationConstraint[] constraints)
|
private List<Precondition> |
getDuplicateFunctorPreconditions(String functor,
List<Precondition> precondCopy,
Hashtable<Precondition,String> dupeFunctorNames)
|
private String |
getFieldByIndex(int index)
This method returns the SQL field name for a precondition argument. |
String |
getInstantiationQuery(UnifiableList inputs,
InstantiationConstraint[] constraints)
Returns an SQL query string that returns all valid instantiations for this Clause , where it has been bound to Schema
instantiations specified by inputs . |
Precondition |
getOutSpec()
|
List<Precondition> |
getPreconditions()
|
UnifiableListVar |
getQueryableTempSpecVars()
|
Precondition |
getTempSpec()
|
UnifiableCompound |
instantiateOutSpec(Bindings b)
|
UnifiableCompound |
instantiateTempSpec(Bindings b)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final String sqlPreconditionTablePrefix
private final Precondition outSpec
private final Precondition tempSpec
private final List<Precondition> preconditions
private final UnifiableListVar tempSpecArgumentQueryableLexemes
Constructor Detail |
---|
public Clause(Element clauseElement)
Clause
specified in an XML
Element
.
clauseElement
- public Clause(Precondition outSpec, Precondition tempSpec, List<Precondition> preconditions, UnifiableListVar tempSpecArgumentQueryableLexemes)
outSpec
- tempSpec
- preconditions
- tempSpecArgumentQueryableLexemes
- Method Detail |
---|
public UnifiableListVar getQueryableTempSpecVars()
public List<Precondition> getPreconditions()
public String toString()
toString
in class Object
public Bindings getBindings(UnifiableList outSpecLex, UnifiableList tempSpecLex)
Bindings
that results from the unification of both the
output specifier and the template specifier instantiations.
outSpecLex
- tempSpecLex
-
public Precondition getOutSpec()
public Precondition getTempSpec()
public UnifiableCompound instantiateOutSpec(Bindings b)
public UnifiableCompound instantiateTempSpec(Bindings b)
private List<Precondition> getDuplicateFunctorPreconditions(String functor, List<Precondition> precondCopy, Hashtable<Precondition,String> dupeFunctorNames)
private static UnifiableListVar doTAQLVariables(Element e)
public String getInstantiationQuery(UnifiableList inputs, InstantiationConstraint[] constraints)
Clause
, where it has been bound to Schema
instantiations specified by inputs
. Additionally, the
instantiations must satisfy the given InstantiationConstraint
s.
inputs
- input values arising from Schema
instantiationconstraints
- additional constraints on the Clause
instantiations
private String getFieldByIndex(int index)
public List<List<Keyword>> getClauseInstantiations(UnifiableList input, InstantiationConstraint[] constraints)
public static List<List<Keyword>> getClauseInstantiationsCombined(List<Clause> clauses, UnifiableList input, InstantiationConstraint[] constraints)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |