|
ABLE, Version 1.1b | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.data.AbleLhs | +--com.ibm.able.data.AbleVariable
This class defines the base Able data variable object.
Field Summary | |
protected java.beans.PropertyChangeSupport |
myChgSupport
A set of listeners interested in property changes performed by this variable. |
protected java.lang.Object |
myContext
The context in which this variable is used. |
protected int |
myDataType
An AbleData.<DataType> constant that specifies this particular variable's data type. |
protected int |
myId
The unique Id of this particular variable. |
protected java.lang.String |
myName
The unique name of this particular variable. |
protected AbleReferences |
myReferences
A set of references to this variable. |
Constructor Summary | |
protected |
AbleVariable(int theDataType,
java.lang.Object theContext,
java.beans.PropertyChangeSupport theChgSupport,
int theId,
java.lang.String theName)
Create a new variable of the specified type. |
protected |
AbleVariable(int theDataType,
java.lang.String theName)
Create a new variable of the specified type. |
Method Summary | |
static java.lang.String |
Copyright()
Determine the copyright of this class. |
java.lang.Object |
getChgSupport()
Retrieve a reference to the property change support object that this variable uses to notify listeners of changes to this variable's current value. |
java.lang.Object |
getContext()
Retrieve a reference to the context in which this variable resides. |
int |
getDataType()
Retrieve the data type of this data object. |
java.lang.String |
getDataTypeAsString()
Retrieve the data type of this variable as a human-readable debug string. |
int |
getId()
Retrieve the unique Id of this variable. |
java.lang.String |
getName()
Retrieve the unique name of this variable. |
AbleReferences |
getReferences()
Retrieve the set of objects that refer to this variable. |
int |
getReferent()
Retrieve the Id of the variable to which this data object refers, if any. |
abstract java.lang.String |
getValueString()
Retrieve the variable's current value as a string. |
abstract void |
reset()
Reset the variable to its intial state. |
java.lang.String |
rlCRdString()
Return a formal rule language "clause read" string that describes this data object. |
abstract java.lang.String |
rlDclString()
Return a formal rule language "declaration" string that describes this data object. |
void |
setChgSupport(java.beans.PropertyChangeSupport theChgSupport)
Set a reference to the property change support object that this variable uses to notify listeners of changes to this variable's current value. |
void |
setContext(java.lang.Object theContext)
Set a reference to the context in which this variable resides. |
void |
setId(int theId)
Set the unique Id of this variable. |
void |
setReferences(AbleReferences theReferences)
Set the set of objects that refer to this variable. |
abstract void |
setValueString(java.lang.String theNewValue)
Set the variable's current value from a string. |
java.lang.String |
toString()
Retrieve a string describing (the contents of) the object. |
java.lang.String |
xmlCRdString()
Return a formal XML "clause read" string that describes this data object. |
abstract java.lang.String |
xmlCWrString()
Return a formal XML "clause write" string that describes this data object. |
abstract java.lang.String |
xmlDclString()
Return a formal XML "declaration" string that describes this data object. |
Methods inherited from class com.ibm.able.data.AbleLhs |
asgnEq,
asgnIs,
asgnIs,
cmpEq,
cmpGt,
cmpGtEq,
cmpIs,
cmpLt,
cmpLtEq,
cmpNeq,
getBooleanValue,
getFuzzyValue,
getGenericValue,
getNumericValue,
getStringValue,
getValue,
setBooleanValue,
setFuzzyValue,
setGenericValue,
setNumericValue,
setStringValue,
setValue |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected int myDataType
This field is initialized to AbleData.DataTypeUnknown.
protected int myId
Note that, in some situations, variables may not need any Id at all so it may not matter whether the Id is unique or even exists. However, in other situations, such as when variables are used in rules manipulated by an inference engine, the Id must be guaranteed to be unique. Currently, it is up to the creator of any variable to set the Id appropriately, but this may change in the future.
This field is initialized to 0 (zero).
protected java.lang.String myName
Note that in some situations, variables may not need any name at all so it may not matter whether the name is unique or even exists. However, in other situations, such as when variables are used in rules manipulated by an inference engine, the name must be guaranteed to be unique. Therefore, it is up to the creator of any variable to set the name appropriately.
It is strongly suggested that a name be provided for each and every variable, as the name will appear in various Able windows.
This field is initialized to the empty string ("").
protected java.lang.Object myContext
In some cases, a context is not needed and may be null. In other cases, such as when a variable is used in rules manipulated by an inference engine, the context must be provided. Currently, it is up to the creator of any variable to set the context appropriately.
This field is initialized to null.
protected AbleReferences myReferences
This object allows a variable to keep track of other objects that reference it. Whenever a variable updates its "raw" value, the variable will call this object's updateReferences() method so that those other objects may perform special processing.
Note that in some situations a variable may not give a hoot about what other objects reference it. In this case, this set of references may be null or the empty set. It is up to the creator of any variable to set the references appropriately.
This field is initialized to null.
protected java.beans.PropertyChangeSupport myChgSupport
This object allows a variable to keep track of other objects that are interested in the variable's property changes. Whenever a variable updates its "raw" value, the variable will call this object's firePropertyChange() method so that those other objects may perform special processing.
Note that in some situations nothing may care about property changes. In this case, this set of listeners may be null. It is up to the creator of any variable to set the change support appropriately.
This field is initialized to null.
Constructor Detail |
protected AbleVariable(int theDataType, java.lang.Object theContext, java.beans.PropertyChangeSupport theChgSupport, int theId, java.lang.String theName)
theDataType
- An AbleData.<DataType> constant.
theContext
- The context in which this variable resides. May be
an Able ruleset, for example, or null if the
variable is not part of any context.
theChgSupport
- For throwing property change events.
This may be null.
theId
- The unique Id of the variable.
theName
- The unique name of the variable.
protected AbleVariable(int theDataType, java.lang.String theName)
theDataType
- An AbleData.<DataType> constant.
theName
- The unique name of the variable.
Method Detail |
public int getReferent()
public int getDataType()
public java.lang.String rlCRdString()
public java.lang.String xmlCRdString()
public abstract java.lang.String rlDclString()
public abstract java.lang.String xmlDclString()
public abstract java.lang.String xmlCWrString()
public abstract void setValueString(java.lang.String theNewValue) throws AbleDataException
public abstract java.lang.String getValueString()
public abstract void reset()
public java.lang.String getDataTypeAsString()
public void setId(int theId)
theId
- An integer, which is the unique Id of this variable.public int getId()
public java.lang.String getName()
public void setContext(java.lang.Object theContext)
theContext
- A reference to an Object, or null.public java.lang.Object getContext()
public void setChgSupport(java.beans.PropertyChangeSupport theChgSupport)
theChgSupport
- A reference to a PropertyChangeSupport object, or
null.public java.lang.Object getChgSupport()
public void setReferences(AbleReferences theReferences)
theReferences
- A set of Objects that refer to this variable.
The set may be the empty set, or null.
public AbleReferences getReferences()
public java.lang.String toString()
public static java.lang.String Copyright()
|
ABLE, Version 1.1b | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |