com.infoengine.object
Class IeDatum

java.lang.Object
  extended bycom.infoengine.object.IeDatum
All Implemented Interfaces:
Cloneable, Externalizable, Serializable

public class IeDatum
extends Object
implements Externalizable, Cloneable

See Also:
Serialized Form

Field Summary
private static String _serialVersion
           
private  AttributeIdentifier identifier
           
private  Object rawObject
           
private  String rawObjectType
           
private  State state
           
 
Constructor Summary
IeDatum()
          default no arg constructor to be used for de-serialization
IeDatum(byte[] array)
          Constructs a new datum with a byte array as its value.
IeDatum(Date date)
          Constructs a new datum with a Date as its value.
IeDatum(Number number)
          Constructs a new datum with a Number as its value.
IeDatum(Object object)
          Constructs a new datum with an Object as its value.
IeDatum(String string)
          Constructs a new datum with a String as its value.
 
Method Summary
 AttributeIdentifier getIdentifier()
          Returns the attribute identifier associated with this datum.
 AttributeIdentifier getIdentifier(TypeInstanceIdentifier typeInstanceId, AttributeTypeIdentifier attrTypeId, int ordinal)
          Returns the attribute identifier associated with this datum.
 String getNodeName()
          Returns the node name of this datum.
 String getNodeValue()
          Returns the node value of this datum.
 State getState()
          Returns the state of this datum.
 boolean hasChildNodes()
          Determines whether this datum has any child nodes.
static IeDatum newIeDatum(AttributeIdentifier identifier, Object object)
          Factory method that accepts an object and constructs an instance with an appropriate type and a specific attribute identifier value.
static IeDatum newIeDatum(Object object)
          Factory method that accepts an object and constructs an instance with an appropriate type.
 Object rawValueOf()
          Returns the raw value of this datum.
 String rawValueType()
          Returns the type of the raw value of this datum.
 void readExternal(ObjectInput in)
           
 void setIdentifier(AttributeIdentifier identifier)
          Sets the attribute identifier associated with this datum.
 void setNodeValue(String nodeValue)
          Sets the node value of this datum.
 void setState(State state)
          Sets the state of this datum.
 void setValue(Object value)
          Sets the raw value of this datum.
 String toString()
          Returns the String representation of the value associated with this datum.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

identifier

private AttributeIdentifier identifier

rawObject

private Object rawObject

rawObjectType

private String rawObjectType

state

private State state

_serialVersion

private static final String _serialVersion
See Also:
Constant Field Values
Constructor Detail

IeDatum

public IeDatum()
default no arg constructor to be used for de-serialization


IeDatum

public IeDatum(byte[] array)
Constructs a new datum with a byte array as its value. Use a factory method instead of calling this constructor directly.

Parameters:
array - The byte array.

IeDatum

public IeDatum(Date date)
Constructs a new datum with a Date as its value. Use a factory method instead of calling this constructor directly.


IeDatum

public IeDatum(Number number)
Constructs a new datum with a Number as its value. This accommodates BigDecimal, BigInteger, Byte, Double, Integer, Short, Long, and Float. Use a factory method instead of calling this constructor directly.


IeDatum

public IeDatum(String string)
Constructs a new datum with a String as its value. Use a factory method instead of calling this constructor directly.


IeDatum

public IeDatum(Object object)
Constructs a new datum with an Object as its value. Use a factory method instead of calling this constructor directly.

Parameters:
object - The Object value.
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

newIeDatum

public static IeDatum newIeDatum(Object object)
Factory method that accepts an object and constructs an instance with an appropriate type.

Parameters:
object - The Object value.

newIeDatum

public static IeDatum newIeDatum(AttributeIdentifier identifier,
                                 Object object)
Factory method that accepts an object and constructs an instance with an appropriate type and a specific attribute identifier value.

Parameters:
identifier - The identifier to associate with the value.
object - The Object value.

toString

public String toString()
Returns the String representation of the value associated with this datum.

Returns:
The String representation of this datum.

rawValueOf

public Object rawValueOf()
Returns the raw value of this datum.

Returns:
The raw value of this datum.

setValue

public void setValue(Object value)
Sets the raw value of this datum.

Parameters:
value - The new value.

rawValueType

public String rawValueType()
Returns the type of the raw value of this datum.

Returns:
The type of the raw value of this datum.

getIdentifier

public AttributeIdentifier getIdentifier()
Returns the attribute identifier associated with this datum.

Returns:
The attribute identifier, or null if no identifier is currently associated.

getIdentifier

public AttributeIdentifier getIdentifier(TypeInstanceIdentifier typeInstanceId,
                                         AttributeTypeIdentifier attrTypeId,
                                         int ordinal)
Returns the attribute identifier associated with this datum. If the datum does not have an attribute identifier, one is created for it and returned.

Parameters:
typeInstanceId - The type identifier identifier of the type instance that contains this datum.
attrTypeId - The attribute type identifier the attribute that contains this datum.
ordinal - The ordinal of this datum within the attribute that contains it.
Returns:
The attribute identifier.

setIdentifier

public void setIdentifier(AttributeIdentifier identifier)
Sets the attribute identifier associated with this datum.

Parameters:
identifier - The new identifier.

getState

public State getState()
Returns the state of this datum.

Returns:
The current state.

setState

public void setState(State state)
Sets the state of this datum.

Parameters:
state - The new state.

getNodeName

public String getNodeName()
Returns the node name of this datum.

Returns:
The node name of this datum.

getNodeValue

public String getNodeValue()
Returns the node value of this datum.

Returns:
The node value of this datum.

setNodeValue

public void setNodeValue(String nodeValue)
Sets the node value of this datum.

Parameters:
nodeValue - The value to be set.

hasChildNodes

public boolean hasChildNodes()
Determines whether this datum has any child nodes.

Returns:
true if this datum has any child nodes.