|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | CONST | FIELD | CONSTR | METHOD | DETAIL: CONST | FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--satin.aro.AROdatum
|
+--satin.aro.AROcompoundDatum
public class AROcompoundDatum
extends AROdatum
This class defines an element of incoming data which contains
other data elements. It is used to transmit arrays and structures,
and also forms the base class for an entire incoming response
to an ARO request.
The elements contained within an AROcompoundDatum
may be named or unnamed, but all the elements must be either
named or unnamed.
This rule does not recurse;
if an AROcompoundDatum is contained within another, its
contents may be either named or unnamed,
regardless of whether the element itself is named or unnamed.
By convention, the order of the data elements is not considered
significant if the data elements are named.
| Field Summary | |
static boolean |
debug
Enables debugging statements. |
| Fields inherited from class satin.aro.AROdatum |
gotten, name |
| Constructor Summary | |
protected |
AROcompoundDatum()
Constructs an empty compound datum. |
| Method Summary | |
protected boolean |
addDatum(AROdatum d)
Adds a datum. |
void |
addToOutput(AROoutgoingData d,
java.lang.String name)
Copies the incoming data (this object) into the given outgoing data. |
void |
dump(java.lang.String indent)
Dumps the contents of the object for debugging. |
boolean |
exists(int position,
java.lang.String paramName)
Returns whether a contained element, defined by name or position, exists. |
AROdatum |
findByName(java.lang.String name)
Returns the contained data element with the given name. |
protected char |
firstChar(java.lang.StringBuffer input)
Returns the first character of input. |
java.lang.String |
getAROtypeName()
Returns the ARO type name of the data element. |
boolean |
getBoolean(int position)
Returns the boolean value of the nth contained element. |
boolean |
getBoolean(int position,
java.lang.String paramName)
Returns the boolean value of a contained element. |
AROcompoundDatum |
getCompound()
Returns the value of a compound data element. |
AROcompoundDatum |
getCompound(int position)
Returns the compound value of the nth contained element. |
AROcompoundDatum |
getCompound(int position,
java.lang.String paramName)
Returns the compound value of a contained element. |
int |
getCount()
Returns the number of elements contained in this data element. |
AROdatum |
getDatum(int position,
java.lang.String paramName)
Returns a contained element by name or position. |
int |
getInteger(int position)
Returns the integer value of the nth contained element. |
int |
getInteger(int position,
java.lang.String paramName)
Returns the integer value of a contained element. |
java.lang.String |
getName(int position)
Returns the name of the nth contained data element. |
AROdatum |
getNth(int position)
Returns the nth contained data element. |
AROobjectID |
getObjectID(int position)
Returns the object value of the nth contained element. |
AROobjectID |
getObjectID(int position,
java.lang.String paramName)
Returns the object value of a contained element. |
double |
getReal(int position)
Returns the real (floating point) value of the nth contained element. |
double |
getReal(int position,
java.lang.String paramName)
Returns the real (floating point) value of a contained element. |
java.lang.String |
getString(int position)
Returns the string value of the nth contained element. |
java.lang.String |
getString(int position,
java.lang.String paramName)
Returns the string value of a contained element. |
protected java.lang.String |
parseAssignment(java.lang.StringBuffer input)
Parses a name followed by an equals sign. |
protected AROdatum |
parseDatum(java.lang.StringBuffer input)
Parses one datum, and returns the new object. |
protected java.lang.String |
parseName(java.lang.StringBuffer input)
Looks for a symbolic name; returns the name or null if it didn't find one. |
protected void |
removeAll()
Removes all contained elements. |
java.lang.String |
toString()
Converts the value of the data element to a string. |
protected void |
trimLeadingSpaces(java.lang.StringBuffer str)
Trims leading spaces from the given StringBuffer. |
| Methods inherited from class satin.aro.AROdatum |
addToOutput, dump, getBoolean, getInteger, getName, getObjectID, getReal, getString, wasGotten |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static boolean debug
| Constructor Detail |
protected AROcompoundDatum()
| Method Detail |
public AROcompoundDatum getCompound()
AROdatum
getCompound in class AROdatum
satin.aro.AROdatum
public java.lang.String getAROtypeName()
public int getCount()
X.getCount will return 3, not 6.
public AROdatum getNth(int position)
positionpublic AROdatum findByName(java.lang.String name)
namepublic java.lang.String getName(int position)
position
public AROdatum getDatum(int position,
java.lang.String paramName)
paramName
is not null or empty, the position arg is ignored.
If the element does not exist, an exception is thrown.
positionparamName
public boolean exists(int position,
java.lang.String paramName)
paramName
is not null or empty, the position arg is ignored.
positionparamNamepublic boolean getBoolean(int position)
positionpublic int getInteger(int position)
positionpublic double getReal(int position)
positionpublic java.lang.String getString(int position)
positionpublic AROobjectID getObjectID(int position)
positionpublic AROcompoundDatum getCompound(int position)
position
public boolean getBoolean(int position,
java.lang.String paramName)
paramName
is not null, then the element is identified by name.
Otherwise, the element is identified by position.
Fails an assertion if the contained element is not a boolean.
positionparamName
is not null.paramName
public int getInteger(int position,
java.lang.String paramName)
paramName
is not null, then the element is identified by name.
Otherwise, the element is identified by position.
Fails an assertion if the contained element is not an integer.
positionparamName
is not null.paramName
public double getReal(int position,
java.lang.String paramName)
paramName
is not null, then the element is identified by name.
Otherwise, the element is identified by position.
Fails an assertion if the contained element is not a real.
positionparamName
is not null.paramName
public java.lang.String getString(int position,
java.lang.String paramName)
paramName
is not null, then the element is identified by name.
Otherwise, the element is identified by position.
Fails an assertion if the contained element is not a string.
positionparamName
is not null.paramName
public AROobjectID getObjectID(int position,
java.lang.String paramName)
paramName
is not null, then the element is identified by name.
Otherwise, the element is identified by position.
Fails an assertion if the contained element is not an ARO object.
positionparamName
is not null.paramName
public AROcompoundDatum getCompound(int position,
java.lang.String paramName)
paramName
is not null, then the element is identified by name.
Otherwise, the element is identified by position.
Fails an assertion if the contained element is not compound.
positionparamName
is not null.paramNameprotected boolean addDatum(AROdatum d)
protected void removeAll()
protected char firstChar(java.lang.StringBuffer input)
input.protected void trimLeadingSpaces(java.lang.StringBuffer str)
protected java.lang.String parseName(java.lang.StringBuffer input)
protected java.lang.String parseAssignment(java.lang.StringBuffer input)
protected AROdatum parseDatum(java.lang.StringBuffer input)
public void addToOutput(AROoutgoingData d,
java.lang.String name)
AROdatum
addToOutput in class AROdatum
satin.aro.AROdatum
dnamepublic java.lang.String toString()
AROdatum
toString in class AROdatum
satin.aro.AROdatum
public void dump(java.lang.String indent)
AROdatum
dump in class AROdatum
satin.aro.AROdatum
indent| Revision History |
4/6/01 Ed Stauff - changes per initial code review.
4/5/01 Ed Stauff - made changes per review.
3/27/01 Ed Stauff - initial review.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | CONST | FIELD | CONSTR | METHOD | DETAIL: CONST | FIELD | CONSTR | METHOD | ||||||||
AROcompoundDatum.java (PRIVATE SOURCES)