|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jess.Deftemplate
Class used to parse, print and represent deftemplates.
(C) 1998 E.J. Friedman-Hill and the Sandia Corporation
| Constructor Summary | |
Deftemplate(java.lang.String name,
java.lang.String docstring,
Deftemplate dt,
Rete engine)
Create a deftemplate 'derived from' another one. |
|
Deftemplate(java.lang.String name,
java.lang.String docstring,
Rete engine)
Create a template. |
|
| Method Summary | |
java.lang.Object |
accept(Visitor v)
|
void |
addMultiSlot(java.lang.String name,
Value value)
Create a new multislot in this deftemplate. |
void |
addSlot(java.lang.String name,
Value value,
java.lang.String typename)
Create a new slot in this deftemplate. |
void |
doBackwardChaining()
Make this deftemplate backwards-chaining reactive. |
boolean |
equals(java.lang.Object o)
|
void |
forgetParent()
Sever the link with this deftemplate's parent. |
Deftemplate |
getBackchainingTemplate(Rete engine)
|
java.lang.String |
getBackchainingTemplateName()
|
boolean |
getBackwardChaining()
Get the backchaining reactivity of this deftemplate. |
java.lang.String |
getBaseName()
Get the name of this deftemplate unqualified by the module name |
static Deftemplate |
getClearTemplate()
|
java.lang.String |
getDocstring()
Get the docstring of this deftemplate |
static Deftemplate |
getInitialTemplate()
|
java.lang.String |
getModule()
|
java.lang.String |
getName()
Get the name of this deftemplate qualified by the module name |
java.lang.String |
getNameWithoutBackchainingPrefix()
|
int |
getNSlots()
Return the number of slots in this deftemplate |
static Deftemplate |
getNullTemplate()
|
Deftemplate |
getParent()
Return the parent of this deftemplate. |
static Deftemplate |
getParentTemplate()
|
int |
getSlotDataType(int index)
Returns the slot data type (one of the constants in jess.RU) for the slot given by the zero-based index. |
Value |
getSlotDefault(int index)
Returns the default value of a slot given by the zero-based index. |
int |
getSlotIndex(java.lang.String slotname)
Return the index (0, 1, 2 ... |
java.lang.String |
getSlotName(int index)
Return the name of a given slot in this deftemplate |
int |
getSlotType(int index)
Returns the slot type (RU.SLOT or RU.MULTISLOT) of the slot in this deftemplate given by the zero-based index. |
int |
hashCode()
|
boolean |
isBackwardChainingTrigger()
|
java.lang.String |
toString()
Turn this deftemplate into a String |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Deftemplate(java.lang.String name,
java.lang.String docstring,
Rete engine)
throws JessException
name - The deftemplate namedocstring - The deftemplate's documentation string
public Deftemplate(java.lang.String name,
java.lang.String docstring,
Deftemplate dt,
Rete engine)
throws JessException
name - The deftemplate namedocstring - The deftemplate's documentation stringdt - The 'parent' of this deftemplate| Method Detail |
public static Deftemplate getParentTemplate()
public static Deftemplate getInitialTemplate()
public static Deftemplate getClearTemplate()
public static Deftemplate getNullTemplate()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic Deftemplate getParent()
public void forgetParent()
public final java.lang.String getName()
getName in interface Modularpublic final java.lang.String getBaseName()
public final java.lang.String getDocstring()
public final void doBackwardChaining()
public final boolean getBackwardChaining()
public void addSlot(java.lang.String name,
Value value,
java.lang.String typename)
throws JessException
name - Name of the slotvalue - default value for the slottypename - Type of the slot: INTEGER, FLOAT, ANY, etc.JessException - If something goes wrong
public void addMultiSlot(java.lang.String name,
Value value)
throws JessException
name - Name of the slotvalue - default value for the slotJessException - If something goes wrong
public int getSlotDataType(int index)
throws JessException
index - The zero-based index of the slot (0, 1, 2
... getNSlots()-1)
public Value getSlotDefault(int index)
throws JessException
index - The zero-based index of the slot (0, 1, 2
... getNSlots()-1)
public int getSlotType(int index)
throws JessException
index - The zero-based index of the slot (0, 1, 2
... getNSlots()-1)
public int getSlotIndex(java.lang.String slotname)
throws JessException
slotname - The name of the slot
public java.lang.String getSlotName(int index)
throws JessException
index - The zero-based index of the slot (0, 1, 2
... getNSlots()-1)JessException - If something is horribly wrongpublic int getNSlots()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object accept(Visitor v)
accept in interface Visitablepublic java.lang.String getModule()
getModule in interface Modularpublic boolean isBackwardChainingTrigger()
public java.lang.String getBackchainingTemplateName()
public java.lang.String getNameWithoutBackchainingPrefix()
public Deftemplate getBackchainingTemplate(Rete engine)
throws JessException
|
© 1997 E.J. Friedman-Hill and Sandia Corporation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||