|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.isr.yancees.GenericMessage
edu.uci.isr.yancees.GenericEvent
edu.uci.isr.yancees.YanceesEvent
Field Summary | |
static java.lang.String |
ATTRIBUTE
|
static java.lang.String |
BINARY_TYPE
|
static java.lang.String |
BOOLEAN_TYPE
|
static java.lang.String |
DOUBLE_TYPE
|
static java.lang.String |
EVENT
Tags used from the event to express siena constraints. |
static java.lang.String |
FLOAT_TYPE
|
static java.lang.String |
INT_TYPE
|
static java.lang.String |
LONG_TYPE
|
static java.lang.String |
NAME
|
static java.lang.String |
STRING_TYPE
|
static java.lang.String |
TYPE_ATTRIBUTE
|
static java.lang.String |
VALUE
|
static java.lang.String |
YANCEES_DATE_CREATED
|
static java.lang.String |
YANCEES_DATE_RECEIVED
|
static java.lang.String |
YANCEES_ID
|
static java.lang.String |
YANCEES_VERSION
|
static java.lang.String |
YANCEES_VERSION_TAG
|
Fields inherited from class edu.uci.isr.yancees.GenericMessage |
dateCreated, dateReceivedInServer, messageDOM, myId, textContent |
Constructor Summary | |
YanceesEvent()
This is the preferential constructor for this object. |
|
YanceesEvent(java.io.File file)
|
|
YanceesEvent(org.w3c.dom.Node n)
|
|
YanceesEvent(java.lang.String content)
|
Method Summary | |
void |
clearAll()
Removes every attribute from this YanceesEvent. |
boolean |
containsAttribute(java.lang.String name)
|
protected void |
extractAttributesFromText(java.lang.String text)
Parses the text content using SAX and replaces the current attributes by the attributes in the text. |
protected void |
finalize()
|
java.lang.Object |
get(java.lang.String attName)
|
java.util.Iterator |
getAttributeNamesIterator()
Returns an iterator for the set of attribute names of this SienaEvent body. |
boolean |
getBoolean(java.lang.String attName)
Gets a boolean attribute |
byte[] |
getByteArray(java.lang.String attName)
Gets a byte[] attribute |
org.w3c.dom.Node |
getDOM()
|
double |
getDouble(java.lang.String attName)
Gets a double attribute |
float |
getFloat(java.lang.String attName)
Gets a float attribute |
int |
getInt(java.lang.String attName)
Gets a int attribute |
long |
getLong(java.lang.String attName)
Gets a long attribute |
java.lang.String |
getString(java.lang.String attName)
Gets a string attribute |
java.lang.String |
getXMLTextContent()
|
int |
numberOfAttributes()
|
void |
put(java.lang.String attName,
boolean value)
|
void |
put(java.lang.String attName,
byte[] value)
|
void |
put(java.lang.String attName,
double value)
|
void |
put(java.lang.String attName,
float value)
|
void |
put(java.lang.String attName,
int value)
|
void |
put(java.lang.String attName,
long value)
|
void |
put(java.lang.String attName,
java.lang.String value)
|
void |
remove(java.lang.String attName)
|
void |
setDateCreated(java.util.Date newDate)
used to reconstruct the id when an event is re-created in the ohter side of the network |
void |
setDOM(org.w3c.dom.Node n)
Changes the content of the event by providing a new XML representation for it. |
void |
setID(long originalId)
used to reconstruct the id when an event is re-created in the ohter side of the network |
void |
setXMLTextContent(java.lang.String content)
Changes the content of this message. |
java.lang.String |
toString()
Prints the structure of the evetn using a free notation. |
Methods inherited from class edu.uci.isr.yancees.GenericMessage |
convertTextToMessageDOM, getDateCreated, getDateReceivedInServer, getId, setDateReceivedInServer, writeTextToTempFile |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.uci.isr.yancees.MessageInterface |
getDateCreated, getDateReceivedInServer, getId |
Field Detail |
public static final java.lang.String YANCEES_DATE_RECEIVED
public static final java.lang.String YANCEES_DATE_CREATED
public static final java.lang.String YANCEES_ID
public static final java.lang.String YANCEES_VERSION_TAG
public static final java.lang.String YANCEES_VERSION
public static final java.lang.String EVENT
public static final java.lang.String NAME
public static final java.lang.String VALUE
public static final java.lang.String ATTRIBUTE
public static final java.lang.String TYPE_ATTRIBUTE
public static final java.lang.String BINARY_TYPE
public static final java.lang.String BOOLEAN_TYPE
public static final java.lang.String DOUBLE_TYPE
public static final java.lang.String FLOAT_TYPE
public static final java.lang.String LONG_TYPE
public static final java.lang.String INT_TYPE
public static final java.lang.String STRING_TYPE
Constructor Detail |
public YanceesEvent(org.w3c.dom.Node n) throws ParsingException
n
- is the representation of the event as a DOM tree in memory
ParsingException
- is thrown in case the event is not according to
the expected format.public YanceesEvent(java.io.File file) throws java.io.IOException
file
- is the File object with the XML representation of an event
according to the standard format, supported by the adapter and the plug-ins.
The event here can be desribed in many formats, as well as the adapters and
plug-ins in the server know how to handle it.
java.io.IOException
public YanceesEvent(java.lang.String content)
content
- is the XML representation of the event in textual, string
in memory.public YanceesEvent()
Method Detail |
public void setDOM(org.w3c.dom.Node n) throws ParsingException
setDOM
in interface MessageInterface
setDOM
in class GenericMessage
ParsingException
public org.w3c.dom.Node getDOM()
getDOM
in interface MessageInterface
getDOM
in class GenericMessage
public java.lang.String getString(java.lang.String attName) throws WrongAttributeTypeException
attName
- is the name of the atribute to be retrieved
WrongAttributeTypeException
- if the attribute exists but the type is wrongpublic double getDouble(java.lang.String attName) throws WrongAttributeTypeException
attName
- is the name of the atribute to be retrieved
WrongAttributeTypeException
- if the attribute exists but the type is wrongpublic float getFloat(java.lang.String attName) throws WrongAttributeTypeException
attName
- is the name of the atribute to be retrieved
WrongAttributeTypeException
- if the attribute exists but the type is wrongpublic int getInt(java.lang.String attName) throws WrongAttributeTypeException
attName
- is the name of the atribute to be retrieved
WrongAttributeTypeException
- if the attribute exists but the type is wrongpublic long getLong(java.lang.String attName) throws WrongAttributeTypeException
attName
- is the name of the atribute to be retrieved
WrongAttributeTypeException
- if the attribute exists but the type is wrongpublic byte[] getByteArray(java.lang.String attName) throws WrongAttributeTypeException
attName
- is the name of the atribute to be retrieved
WrongAttributeTypeException
- if the attribute exists but the type is wrongpublic boolean getBoolean(java.lang.String attName) throws WrongAttributeTypeException
attName
- is the name of the atribute to be retrieved
WrongAttributeTypeException
- if the attribute exists but the type is wrongpublic void clearAll()
public int numberOfAttributes()
public java.lang.Object get(java.lang.String attName)
public void remove(java.lang.String attName)
public void put(java.lang.String attName, java.lang.String value)
public void put(java.lang.String attName, double value)
public void put(java.lang.String attName, float value)
public void put(java.lang.String attName, boolean value)
public void put(java.lang.String attName, byte[] value)
public void put(java.lang.String attName, int value)
public void put(java.lang.String attName, long value)
public java.util.Iterator getAttributeNamesIterator()
public boolean containsAttribute(java.lang.String name)
public java.lang.String toString()
toString
in class GenericMessage
public void setXMLTextContent(java.lang.String content)
setXMLTextContent
in interface MessageInterface
setXMLTextContent
in class GenericMessage
content
- is the new XML format contnet in the form of a Stringpublic java.lang.String getXMLTextContent()
getXMLTextContent
in interface MessageInterface
getXMLTextContent
in class GenericMessage
protected void extractAttributesFromText(java.lang.String text)
text
- is the XML text in memory to be parsed.public void setDateCreated(java.util.Date newDate)
newDate
- is the original creation date of the object.public void setID(long originalId)
originalId
- is the original id of this eventprotected void finalize() throws java.lang.Throwable
java.lang.Throwable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |