com.ibm.dse.base
Class DataElement

java.lang.Object
  |
  +--com.ibm.dse.base.DataElement
Direct Known Subclasses:
ConverterDefinition, DataCollection, DataField

public abstract class DataElement
extends java.lang.Object
implements Externalizable, TypedData

The DataElement class is the abstract base class for Data.

See Also:
Serialized Form

Field Summary
protected  java.lang.String description
           
protected  java.lang.String name
           
protected  ElementState state
           
 
Constructor Summary
DataElement()
           
 
Method Summary
abstract  java.lang.Object clone()
          This method must be implemented by the subclasses
 Externalizer externalizer()
          Returns the externalizer instance of this class.
 java.lang.String getDescription()
          Returns the value of description.
 PropertyDescription getDescriptor()
          Returns the PropertyDescriptor for this business object.
 DataElement getElementAt(java.lang.String aName)
          Throws an exception.
 ErrorInfo getErrorInfo()
          Returns the errorInfo attribute
static Externalizer getExternalizer()
          Gets the externalizer.
 Key getKey()
          Returns a Key object which can be used to identify this business object.
 java.lang.String getName()
          Gets the name property (java.lang.String) value.
 ElementState getState()
          Gets the state attribute.
 java.lang.String getTagName()
          Gets a tag name.
abstract  java.lang.Object getValue()
          Returns the value of the data element.
abstract  Vector nestedElements()
          Returns all the DataElements included in a collection at any level.
abstract  void nestedElements(java.util.Hashtable theTable)
          Returns all the DataElements included in this collection at any level.
abstract  Vector nestedFields()
          Returns all the DataFields at any level included in a collection.
 void readExternal()
          Initializes a DataElement with its external value.
 void readExternal(java.io.ObjectInput s)
          Invokes the object creation from an ObjectInput.
static java.lang.Object readObject(java.lang.String name)
          Instantiates a DataElement named name from the definition file.
 DataElement removeElementAt(java.lang.String aName)
          Throws an exception.
 void removeExternal()
          This method removes the tags for this object from the definition file where it is externalized.
 void setDescription(java.lang.String aDescription)
          Sets the value of description.
 void setDescriptor(PropertyDescription descriptor)
          Sets the PropertyDescriptor for this business object to that passed.
 void setErrorInfo(ErrorInfo anErrorInfo)
          Sets the errorInfo attribute
static void setExternalizer(Externalizer anExternalizer)
          Sets the externalizer.
 void setName(java.lang.String aName)
          Sets the name property (java.lang.String) value.
 void setState(ElementState aState)
          Sets the state attribute.
abstract  void setValue(java.lang.Object aValue)
          Throws an exception.
 Vector toStrings()
          Returns a visual representation of this data element.
 Vector toTags()
          Returns a Vector with the DataElement represented as a Tag
abstract  java.lang.Object validate(java.lang.Object toValidate)
          This method must be implemented by the subclasses
 void writeExternal()
          Writes this instance converted in tags to a file.
 void writeExternal(java.io.ObjectOutput s)
          Provides concrete serialization handling for DataElement.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

description

protected java.lang.String description

state

protected ElementState state
Constructor Detail

DataElement

public DataElement()
Method Detail

clone

public abstract java.lang.Object clone()
                                throws java.lang.CloneNotSupportedException
This method must be implemented by the subclasses
Overrides:
clone in class java.lang.Object
Returns:
java.lang.Object

externalizer

public Externalizer externalizer()
                          throws java.io.IOException
Returns the externalizer instance of this class.
Specified by:
externalizer in interface Externalizable
Returns:
com.ibm.dse.base.Externalizer

getDescription

public java.lang.String getDescription()
Returns the value of description.
Returns:
java.lang.String

getDescriptor

public PropertyDescription getDescriptor()
Returns the PropertyDescriptor for this business object.
Specified by:
getDescriptor in interface TypedData
Returns:
PropertyDescription

getElementAt

public DataElement getElementAt(java.lang.String aName)
                         throws DSEObjectNotFoundException
Throws an exception. Implemented in order to provide polymorphism.
Parameters:
aName - java.lang.String

getErrorInfo

public ErrorInfo getErrorInfo()
Returns the errorInfo attribute
Returns:
com.ibm.dse.base.ErrorInfo

getExternalizer

public static Externalizer getExternalizer()
                                    throws java.io.IOException
Gets the externalizer.
Returns:
com.ibm.dse.base.Externalizer

getKey

public Key getKey()
           throws DSETypeException
Returns a Key object which can be used to identify this business object. For business objects which are not Typed, of simple Type, or simply do not support unique Keys a Key with a value of zero is returned.
Specified by:
getKey in interface TypedData
Returns:
Key
Throws:
DSETypeExceotion - if key can not be build from this business object.

getName

public java.lang.String getName()
Gets the name property (java.lang.String) value.
Specified by:
getName in interface Externalizable
Returns:
The name property value.
See Also:
setName(java.lang.String)

getState

public ElementState getState()
Gets the state attribute.
Returns:
com.ibm.dse.base.types.ElementState

getTagName

public java.lang.String getTagName()
Gets a tag name.
Returns:
java.lang.String

getValue

public abstract java.lang.Object getValue()
Returns the value of the data element. It is an abstract method.
Returns:
java.lang.Object

nestedElements

public abstract Vector nestedElements()
Returns all the DataElements included in a collection at any level.
Returns:
com.ibm.dse.base.Vector

nestedElements

public abstract void nestedElements(java.util.Hashtable theTable)
Returns all the DataElements included in this collection at any level.
Returns:
java.util.Hashtable

nestedFields

public abstract Vector nestedFields()
Returns all the DataFields at any level included in a collection.
Returns:
com.ibm.dse.base.Vector

readExternal

public void readExternal()
                  throws java.io.IOException
Initializes a DataElement with its external value. This instance requires an id (name). The externalizer and its tagInputStream are initialized.
Specified by:
readExternal in interface Externalizable
Tags copied from interface: Externalizable
Throws:
java.io.IOException -  

readExternal

public void readExternal(java.io.ObjectInput s)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Invokes the object creation from an ObjectInput.
Parameters:
s - java.io.ObjectInput
Throws:
java.io.IOException -  
java.lang.ClassNotFoundException -  

readObject

public static java.lang.Object readObject(java.lang.String name)
                                   throws java.io.IOException
Instantiates a DataElement named name from the definition file.
Returns:
java.lang.Object

removeElementAt

public DataElement removeElementAt(java.lang.String aName)
                            throws DSEObjectNotFoundException
Throws an exception. Implemented in order to provide polymorphism
Parameters:
aName - java.lang.String
Returns:
com.ibm.dse.base.DataElement

removeExternal

public void removeExternal()
                    throws java.io.IOException
This method removes the tags for this object from the definition file where it is externalized.
Specified by:
removeExternal in interface Externalizable

setDescription

public void setDescription(java.lang.String aDescription)
Sets the value of description.
Parameters:
aDescription - java.lang.String

setDescriptor

public void setDescriptor(PropertyDescription descriptor)
Sets the PropertyDescriptor for this business object to that passed.
Specified by:
setDescriptor in interface TypedData
Parameters:
descriptor - PropertyDescription

setErrorInfo

public void setErrorInfo(ErrorInfo anErrorInfo)
Sets the errorInfo attribute
Returns:
com.ibm.dse.base.ErrorInfo

setExternalizer

public static void setExternalizer(Externalizer anExternalizer)
Sets the externalizer.
Parameters:
anExternalizer - com.ibm.dse.base.Externalizer

setName

public void setName(java.lang.String aName)
Sets the name property (java.lang.String) value.
Specified by:
setName in interface Externalizable
Parameters:
name - The new value for the property.
See Also:
getName()

setState

public void setState(ElementState aState)
Sets the state attribute.
Parameters:
aState - com.ibm.dse.base.types.ElementState

setValue

public abstract void setValue(java.lang.Object aValue)
                       throws DSEInvalidArgumentException
Throws an exception. This method is implemented in order to maintain polymorphism.
Parameters:
aValue - java.lang.Object

toStrings

public Vector toStrings()
Returns a visual representation of this data element.
Specified by:
toStrings in interface Externalizable
Returns:
Vector

toTags

public Vector toTags()
              throws java.io.IOException
Returns a Vector with the DataElement represented as a Tag
Specified by:
toTags in interface Externalizable
Returns:
com.ibm.dse.base.Vector

validate

public abstract java.lang.Object validate(java.lang.Object toValidate)
                                   throws DSETypeException
This method must be implemented by the subclasses
Returns:
java.lang.Object
Throws:
DSETypeException -  

writeExternal

public void writeExternal()
                   throws java.io.IOException
Writes this instance converted in tags to a file.
Specified by:
writeExternal in interface Externalizable

writeExternal

public void writeExternal(java.io.ObjectOutput s)
                   throws java.io.IOException
Provides concrete serialization handling for DataElement.
Parameters:
s - java.io.ObjectOutput
Throws:
java.io.IOException -