|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjess.Deftemplate
Class used to represent Jess deftemplates.
(C) 2003 E.J. Friedman-Hill and the Sandia Corporation
$Id: Deftemplate.java,v 1.4 2003/03/24 15:49:04 ejfried Exp $
| 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()
The template for a special fact used internally by Jess. |
java.lang.String |
getDocstring()
Get the docstring of this deftemplate |
static Deftemplate |
getInitialTemplate()
The template for "initial-fact". |
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()
The template for a special fact used internally by Jess. |
Deftemplate |
getParent()
Return the parent of this deftemplate. |
static Deftemplate |
getRootTemplate()
All deftemplates ultimately extend this root template. |
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 through getNSlots()-1) of the named slot, or -1 if there is no such slot. |
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 getRootTemplate()
public static Deftemplate getInitialTemplate()
public static Deftemplate getClearTemplate()
public static Deftemplate getNullTemplate()
public boolean equals(java.lang.Object o)
public int hashCode()
public 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 slot
JessException - If something goes wrong
public int getSlotDataType(int index)
throws JessException
index - The zero-based index of the slot (0, 1, 2
... getNSlots()-1)
JessException
public Value getSlotDefault(int index)
throws JessException
index - The zero-based index of the slot (0, 1, 2
... getNSlots()-1)
JessException
public int getSlotType(int index)
throws JessException
index - The zero-based index of the slot (0, 1, 2
... getNSlots()-1)
JessException
public int getSlotIndex(java.lang.String slotname)
throws JessException
slotname - The name of the slot
JessException
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()
public 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
JessException
|
© 2001 E.J. Friedman-Hill and Sandia Corporation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||