edu.uci.isr.yancees.server.dispatcher.siena
Class AttValue

java.lang.Object
  extended byedu.uci.isr.yancees.server.dispatcher.siena.AttValue
All Implemented Interfaces:
java.io.Serializable

public class AttValue
extends java.lang.Object
implements java.io.Serializable

Value of an attribute in an event. An AttValue is a container for a typed vaule of an attribute in a Event. An AttValue can be of type String, byte[], int, long, double, and boolean.

See Also:
Serialized Form

Field Summary
static java.lang.String BINARY_TYPE
           
static int BOOL
          boolean type.
static java.lang.String BOOLEAN_TYPE
           
static int BYTEARRAY
          string of bytes
static int DOUBLE
          double type.
static java.lang.String DOUBLE_TYPE
           
static int FLOAT
          float type.
static java.lang.String FLOAT_TYPE
           
static int INT
          integer type.
static java.lang.String INT_TYPE
           
static int LONG
          integer type.
static java.lang.String LONG_TYPE
           
static int NULL
          null type, the default type of an attribute
static int STRING
          string of bytes an alias to BYTEARRAY provided only for backward compatibility
static java.lang.String STRING_TYPE
           
 
Constructor Summary
AttValue()
           
AttValue(AttValue x)
           
AttValue(boolean b)
           
AttValue(byte[] s)
           
AttValue(double d)
           
AttValue(float f)
           
AttValue(int i)
           
AttValue(long i)
           
AttValue(java.lang.String s)
           
AttValue(java.lang.String val, java.lang.String type)
          Initializes the attribute/value object with its string value and its type the string value is converted to the internal representation according to the type provided.
 
Method Summary
 boolean booleanValue()
           
 byte[] byteArrayValue()
           
 double doubleValue()
           
 float floatValue()
           
 java.lang.String getAttributeType()
           
 int getType()
           
 int hashCode()
           
 void init(boolean b)
           
 void init(byte[] s)
           
 void init(double d)
           
 void init(float f)
           
 void init(int i)
           
 void init(long i)
           
 void init(java.lang.String s)
           
 int intValue()
           
 boolean isEqualTo(AttValue x)
           
 long longValue()
           
 java.lang.String stringValue()
           
 java.lang.String toString()
           
 java.lang.String toXML()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

STRING_TYPE

public static final java.lang.String STRING_TYPE
See Also:
Constant Field Values

INT_TYPE

public static final java.lang.String INT_TYPE
See Also:
Constant Field Values

LONG_TYPE

public static final java.lang.String LONG_TYPE
See Also:
Constant Field Values

FLOAT_TYPE

public static final java.lang.String FLOAT_TYPE
See Also:
Constant Field Values

DOUBLE_TYPE

public static final java.lang.String DOUBLE_TYPE
See Also:
Constant Field Values

BOOLEAN_TYPE

public static final java.lang.String BOOLEAN_TYPE
See Also:
Constant Field Values

BINARY_TYPE

public static final java.lang.String BINARY_TYPE
See Also:
Constant Field Values

NULL

public static final int NULL
null type, the default type of an attribute

See Also:
Constant Field Values

BYTEARRAY

public static final int BYTEARRAY
string of bytes

See Also:
Constant Field Values

STRING

public static final int STRING
string of bytes an alias to BYTEARRAY provided only for backward compatibility

See Also:
Constant Field Values

LONG

public static final int LONG
integer type. corresponds to the Java long type.

See Also:
Constant Field Values

INT

public static final int INT
integer type. corresponds to the Java int type.

See Also:
Constant Field Values

DOUBLE

public static final int DOUBLE
double type. corresponds to the Java double type.

See Also:
Constant Field Values

FLOAT

public static final int FLOAT
float type. corresponds to the Java float type.

See Also:
Constant Field Values

BOOL

public static final int BOOL
boolean type. corresponds to the Java boolean type.

See Also:
Constant Field Values
Constructor Detail

AttValue

public AttValue()

AttValue

public AttValue(AttValue x)

AttValue

public AttValue(java.lang.String val,
                java.lang.String type)
Initializes the attribute/value object with its string value and its type the string value is converted to the internal representation according to the type provided.

Parameters:
val - the value of the attribute as a String
type - the type of the attribute

AttValue

public AttValue(java.lang.String s)

AttValue

public AttValue(byte[] s)

AttValue

public AttValue(long i)

AttValue

public AttValue(int i)

AttValue

public AttValue(boolean b)

AttValue

public AttValue(double d)

AttValue

public AttValue(float f)
Method Detail

init

public void init(java.lang.String s)

init

public void init(byte[] s)

init

public void init(long i)

init

public void init(int i)

init

public void init(boolean b)

init

public void init(double d)

init

public void init(float f)

getType

public int getType()

intValue

public int intValue()

longValue

public long longValue()

doubleValue

public double doubleValue()

floatValue

public float floatValue()

booleanValue

public boolean booleanValue()

stringValue

public java.lang.String stringValue()

byteArrayValue

public byte[] byteArrayValue()

isEqualTo

public boolean isEqualTo(AttValue x)

getAttributeType

public java.lang.String getAttributeType()
Returns:
a string with the XML Schema type of the current attribute

toString

public java.lang.String toString()

toXML

public java.lang.String toXML()

hashCode

public int hashCode()