|
|||||||||
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)
Constructor. |
|
Deftemplate(java.lang.String name,
java.lang.String docstring,
Deftemplate dt)
Constructor. |
Method Summary | |
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. |
void |
forgetParent()
Sever the link with this deftemplate's parent. |
boolean |
getBackwardChaining()
Get the backchaining reactivity of this deftemplate. |
java.lang.String |
getDocstring()
Get the docstring of this deftemplate |
java.lang.String |
getName()
Get the name of this deftemplate |
int |
getNSlots()
Return the number of slots in this deftemplate |
Deftemplate |
getParent()
return the parent of this deftemplate. |
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. |
java.lang.String |
toString()
Turn this deftemplate into a String |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public Deftemplate(java.lang.String name, java.lang.String docstring)
name
- The deftemplate namedocstring
- The deftemplate's documentation stringpublic Deftemplate(java.lang.String name, java.lang.String docstring, Deftemplate dt) throws JessException
name
- The deftemplate namedocstring
- The deftemplate's documentation stringdt
- The 'parent' of this deftemplateMethod Detail |
public Deftemplate getParent()
public void forgetParent()
public final java.lang.String getName()
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.public void addMultiSlot(java.lang.String name, Value value) throws JessException
name
- Name of the slotvalue
- default value for the slotpublic 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 slotpublic java.lang.String getSlotName(int index) throws JessException
index
- The zero-based index of the slot (0, 1, 2 ... getNSlots()-1)public int getNSlots()
public java.lang.String toString()
|
© 1997 E.J. Friedman-Hill and Sandia Corporation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |