ABLE 2.3.0 07/13/2005 14:21:00

com.ibm.able.data
Class AbleIncludeVariable

java.lang.Object
  extended bycom.ibm.able.data.AbleLhs
      extended bycom.ibm.able.data.AbleVariable
          extended bycom.ibm.able.data.AbleIncludeVariable
All Implemented Interfaces:
AbleRd, AbleWr, java.io.Serializable

public class AbleIncludeVariable
extends AbleVariable
implements java.io.Serializable

This class is not a true variable; it is merely a place holder in a ruleset's variable list so that a proper ARL include "fileSpec"; statement can be generated in the proper place in a generated ARL stream.

All get and set methods throw exceptions. Other mandatory methods are no-ops.

Note that the "variable" has no value and that the name of the variable contains the fileSpec.

Since:
ABLE 2.2.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.able.data.AbleVariable
myBoundFlag, myChgSupport, myComment, myContext, myDataType, myGlobalFlag, myId, myName, myPrompt, myReferences, myStaticFlag, myTemplateFlag, myValueInitial
 
Constructor Summary
AbleIncludeVariable(java.lang.String theName, boolean theStaticFlag, boolean theGlobalFlag)
          Create a new "include" variable.
 
Method Summary
 java.lang.String arlDclString()
          Return a formal ARL "declaration" string that describes this data object.
 java.lang.String armlDclString()
          Return a formal ARML "declaration" string that describes this data object.
 boolean getBooleanValue()
          Retrieve the value of this data object as a boolean value.
 java.lang.Class getDataTypeClass()
          Retrieve the actual class of this object's underlying data type.
 java.lang.String getDataTypeClassName()
          Retrieve the name of the class of this object's underlying data type.
 java.lang.String getDataTypeName()
          Retrieve the data type name.
 AbleFuzzySet getFuzzyValue()
          Retrieve the value of this data object as a fuzzy value.
 java.lang.Object getGenericValue()
          Retrieve the value of this data object as an Object.
 java.lang.Class getLiteralClass()
          Retrieve the class of this variable's related AbleLiteral data type.
 double getNumericValue()
          Retrieve the value of this data object as a numeric value.
 java.lang.String getStringValue()
          Retrieve the value of this data object as a string value.
 AbleLiteral getValue()
          Retrieve the value of this data object as a literal.
 java.lang.String getValueString()
          Retrieve the variable's current value as a string.
 void init()
          Init the variable to its initial state.
 void reset()
          Reset the variable to its intial state.
 void setBooleanValue(boolean theNewValue)
          Set the value of this data object from a boolean value.
 void setFuzzyValue(AbleFuzzySet theNewValue)
          Set the value of this data object from a fuzzy value.
 void setGenericValue(java.lang.Object theNewValue)
          Set the value of this data object from an object.
 void setNumericValue(double theNewValue)
          Set the value of this data object from a numeric value.
 void setStringValue(java.lang.String theNewValue)
          Set the value of this data object from a string value.
 void setValue(AbleLiteral theNewValue)
          Set the value of this data object from a literal object.
 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 traceString(int theTraceStringFlavor)
          Retrieve a string describing (the contents of) the object.
 java.lang.String xmlDclString()
          Return a formal XML "declaration" string that describes this data object.
 
Methods inherited from class com.ibm.able.data.AbleVariable
arlCRdString, arlInitializerString, armlCRdString, armlInitializerString, getArlComment, getChgSupport, getComment, getContext, getDataType, getDataTypeAsString, getId, getName, getPrompt, getPromptString, getReferences, getReferent, getReferents, getTemplateString, isBound, isConstant, isGlobal, isLocal, isStatic, isTemplate, notStatic, setChgSupport, setComment, setContext, setId, setInitialValue, setPrompt, setReferences, setStatic, setTemplate, xmlCRdString, xmlCWrString, xmlInitializerString
 
Methods inherited from class com.ibm.able.data.AbleLhs
asgnEq, asgnIs, asgnIs, bitwiseAND, bitwiseNOT, bitwiseOR, bitwiseShiftLeft, bitwiseShiftRight, bitwiseShiftRightZeroFill, bitwiseXOR, cmpEq, cmpGt, cmpGtEq, cmpIs, cmpLt, cmpLtEq, cmpNeq, compDivide, compMinus, compModulo, compMultiply, compPlus, compUnaryMinus, logicalAND, logicalNOT, logicalOR
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbleIncludeVariable

public AbleIncludeVariable(java.lang.String theName,
                           boolean theStaticFlag,
                           boolean theGlobalFlag)
Create a new "include" variable.

Parameters:
theName - The name of this variable is actually a FileSpec, pointing to the file that contains additional variable declarations.
theStaticFlag - Is meaningless for this variable, and the specified value is ignored.
theGlobalFlag - Use true if this variable is to be considered global; use false if the variable is to be considered local.
Method Detail

getBooleanValue

public boolean getBooleanValue()
                        throws AbleDataException
Retrieve the value of this data object as a boolean value.

Specified by:
getBooleanValue in interface AbleRd
Specified by:
getBooleanValue in class AbleLhs
Returns:
A boolean, if the value of this object can be represented as a boolean value. If the current value is 0.0, false is returned; any other numeric value returns true.
Throws:
AbleDataException - If the value of this object cannot be represented as a boolean value.

getFuzzyValue

public AbleFuzzySet getFuzzyValue()
                           throws AbleDataException
Retrieve the value of this data object as a fuzzy value.

Specified by:
getFuzzyValue in interface AbleRd
Specified by:
getFuzzyValue in class AbleLhs
Returns:
A fuzzy set, if the value of this object can be represented as a fuzzy value. This method always throws an exception.
Throws:
AbleDataException - If the value of this object cannot be represented as a fuzzy value.

getGenericValue

public java.lang.Object getGenericValue()
                                 throws AbleDataException
Retrieve the value of this data object as an Object.

Specified by:
getGenericValue in interface AbleRd
Specified by:
getGenericValue in class AbleLhs
Returns:
A Double object.
Throws:
AbleDataException - If the value of this object cannot be represented as an Object.

getNumericValue

public double getNumericValue()
                       throws AbleDataException
Retrieve the value of this data object as a numeric value.

Specified by:
getNumericValue in interface AbleRd
Specified by:
getNumericValue in class AbleLhs
Returns:
A double, if the value of this object can be represented as a numeric value.
Throws:
AbleDataException - If the value of this object cannot be represented as a numeric value.

getStringValue

public java.lang.String getStringValue()
                                throws AbleDataException
Retrieve the value of this data object as a string value.

Specified by:
getStringValue in interface AbleRd
Specified by:
getStringValue in class AbleLhs
Returns:
A String, if the value of this object can be represented as a string value.
Throws:
AbleDataException - If the value of this object cannot be represented as a string value.

getValue

public AbleLiteral getValue()
                     throws AbleDataException
Retrieve the value of this data object as a literal.

Specified by:
getValue in interface AbleRd
Specified by:
getValue in class AbleLhs
Returns:
null always.
Throws:
AbleDataException - If the value of this object cannot be represented as a literal.

setBooleanValue

public void setBooleanValue(boolean theNewValue)
                     throws AbleDataException
Set the value of this data object from a boolean value.

Specified by:
setBooleanValue in interface AbleWr
Specified by:
setBooleanValue in class AbleLhs
Parameters:
theNewValue - A boolean value. If the new value is true the variable is set to 1.0, but only if that value is within the universe of discourse; if the new value is false the variable is set to 0.0, but only if that value is within the universe of discourse.

Throws:
AbleDataException - If the value of this object cannot be represented as a boolean value.

setFuzzyValue

public void setFuzzyValue(AbleFuzzySet theNewValue)
                   throws AbleDataException
Set the value of this data object from a fuzzy value. This method always throws an exception.

Specified by:
setFuzzyValue in interface AbleWr
Specified by:
setFuzzyValue in class AbleLhs
Parameters:
theNewValue - A fuzzy set.

Throws:
AbleDataException - If the value of this object cannot be represented as a fuzzy value.

setGenericValue

public void setGenericValue(java.lang.Object theNewValue)
                     throws AbleDataException
Set the value of this data object from an object.

Specified by:
setGenericValue in interface AbleWr
Specified by:
setGenericValue in class AbleLhs
Parameters:
theNewValue - Any type of Object.

Throws:
AbleDataException - If the value of this object cannot be derived from the specified Object.

setNumericValue

public void setNumericValue(double theNewValue)
                     throws AbleDataException
Set the value of this data object from a numeric value.

Specified by:
setNumericValue in interface AbleWr
Specified by:
setNumericValue in class AbleLhs
Parameters:
theNewValue - Any number. If the number is not within the universe of discourse for this variable, an exception is thrown.

Throws:
AbleDataException - If the value of this object cannot be represented as a numeric value.

setStringValue

public void setStringValue(java.lang.String theNewValue)
                    throws AbleDataException
Set the value of this data object from a string value.

Specified by:
setStringValue in interface AbleWr
Specified by:
setStringValue in class AbleLhs
Parameters:
theNewValue - The variable is set to the value of the string, but only if the string can be parsed to a double and that number is within the universe of discourse for this variable. Otherwise an exception is thrown.

Throws:
AbleDataException - If the value of this object cannot be represented as a string value.

setValue

public void setValue(AbleLiteral theNewValue)
              throws AbleDataException
Set the value of this data object from a literal object.

This method is a no-op.

Specified by:
setValue in interface AbleWr
Specified by:
setValue in class AbleLhs
Parameters:
theNewValue - An Able literal of any type. An attempt is made to convert the literal to an appropriate type before assigning it to this "writable" object. The resulting number must be within the universe of discourse for this variable.

Throws:
AbleDataException - If the value of this object cannot be determined from the literal object.

arlDclString

public java.lang.String arlDclString()
Return a formal ARL "declaration" string that describes this data object.

Specified by:
arlDclString in interface AbleWr
Specified by:
arlDclString in class AbleVariable
Returns:
A String describing the data object in formal rule language.

xmlDclString

public java.lang.String xmlDclString()
Return a formal XML "declaration" string that describes this data object.

Specified by:
xmlDclString in interface AbleWr
Specified by:
xmlDclString in class AbleVariable
Returns:
A String describing the data object in XML.

armlDclString

public java.lang.String armlDclString()
Return a formal ARML "declaration" string that describes this data object.

Specified by:
armlDclString in class AbleVariable
Returns:
A String describing the data object in ARML.

setValueString

public void setValueString(java.lang.String theNewValue)
                    throws AbleDataException
Set the variable's current value from a string.

Note: This method is provided for the use of a rule language parser.

This method is a no-op.

Specified by:
setValueString in class AbleVariable
Parameters:
theNewValue - is completely ignored.
Throws:
AbleDataException

getValueString

public java.lang.String getValueString()
Retrieve the variable's current value as a string.

Note: This method is provided for the use of a rule language parser.

This method is a no-op.

Specified by:
getValueString in class AbleVariable
Returns:
null always.

init

public void init()
          throws AbleDataException
Init the variable to its initial state.

This method is a no-op.

Specified by:
init in class AbleVariable
Throws:
AbleDataException

reset

public void reset()
           throws AbleDataException
Reset the variable to its intial state.

This method is a no-op.

Specified by:
reset in class AbleVariable
Throws:
AbleDataException

getLiteralClass

public java.lang.Class getLiteralClass()
Retrieve the class of this variable's related AbleLiteral data type.

Specified by:
getLiteralClass in class AbleVariable
Returns:
null.class.

getDataTypeName

public java.lang.String getDataTypeName()
Retrieve the data type name. This is the name used in the ABLE Ruleset; in this case, "Include".

Specified by:
getDataTypeName in class AbleVariable

getDataTypeClass

public java.lang.Class getDataTypeClass()
Description copied from class: AbleLhs
Retrieve the actual class of this object's underlying data type.

Specified by:
getDataTypeClass in interface AbleRd
Specified by:
getDataTypeClass in class AbleLhs
Returns:
The class of the underlying data type.

getDataTypeClassName

public java.lang.String getDataTypeClassName()
Description copied from class: AbleLhs
Retrieve the name of the class of this object's underlying data type.

Specified by:
getDataTypeClassName in interface AbleRd
Specified by:
getDataTypeClassName in class AbleLhs
Returns:
A String that is the name of the class of the underlying data type.

toString

public java.lang.String toString()
Retrieve a string describing (the contents of) the object.

Overrides:
toString in class AbleVariable
Returns:
A String containing the current contents of the object.

traceString

public java.lang.String traceString(int theTraceStringFlavor)
Retrieve a string describing (the contents of) the object.

Specified by:
traceString in interface AbleRd
Specified by:
traceString in class AbleVariable
Parameters:
theTraceStringFlavor - An Able.TraceStringFlavor value.

Returns:
A String containing the current contents of the object.

ABLE 2.3.0 07/13/2005 14:21:00

(C) Copyright IBM Corporation 1999, 2005