|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.isr.yancees.server.dispatcher.siena.SienaEvent
An event An event is structured as a set of named and typed bodyAttributes. Attribute names are strings.
A valid attribute name must begin with a letter
('a'
-'z'
,
'A'
-'Z'
) or an underscore character
('_'
), and may contain only letters, underscores,
digits ('0'
-'9'
), the dot character
('.'
), the forward slash character
('/'
), and the dollar sign
('$'
). Attribute names must be unique within a
SienaEvent
.
Example:
SienaEvent alert = new SienaEvent();
alert.putAttribute("threat", "virus");
alert.putAttribute("name", "melissa");
alert.putAttribute("total_infected", 25);
alert.putAttribute("os/name", "win32");
alert.putAttribute("os/version", "98");
Field Summary | |
static java.lang.String |
ATTRIBUTE
|
static java.lang.String |
EVENT
Tags used from the event to express siena constraints. |
static java.lang.String |
NAME
|
static java.lang.String |
TYPE_ATTRIBUTE
|
static java.lang.String |
VALUE
|
Constructor Summary | |
SienaEvent()
constructs an empty SienaEvent. |
|
SienaEvent(EventInterface evt)
initialized the current object using the generic event provided. |
|
SienaEvent(org.w3c.dom.Node n)
initialized the current object using the generic event represented in the form of a DOM tree. |
|
SienaEvent(SienaEvent n)
creates a deep copy of a given SienaEvent. |
Method Summary | |
void |
clearAll()
Removes every attribute from this SienaEvent. |
AttValue |
getAttribute(java.lang.String name)
returns the value of an attribute or null if
that attribute does not exist in this SienaEvent. |
java.util.Iterator |
getAttributeNamesIterator()
Returns an iterator for the set of attribute names of this SienaEvent body. |
int |
getAttributesSize()
returns the number of eventAttributes in this SienaEvent. |
AttValue[] |
getAttributeValues()
|
java.util.Date |
getDateCreated()
|
java.util.Date |
getDateReceivedInServer()
|
org.w3c.dom.Node |
getDOM()
|
long |
getId()
|
java.lang.String |
getXMLTextContent()
|
void |
putAttribute(java.lang.String name,
AttValue value)
set the value of an attribute. |
void |
putAttribute(java.lang.String name,
boolean value)
set the value of an attribute. |
void |
putAttribute(java.lang.String name,
byte[] value)
sets the value of an attribute. |
void |
putAttribute(java.lang.String name,
double value)
set the value of an attribute. |
void |
putAttribute(java.lang.String name,
long value)
set the value of an attribute. |
void |
putAttribute(java.lang.String name,
java.lang.String value)
set the value of an attribute. |
void |
setDOM(org.w3c.dom.Node n)
Changes current event node, parsing it. |
void |
setXMLTextContent(java.lang.String content)
Changes the content of this message. |
int |
size()
returns the number of eventAttributes in this SienaEvent. |
java.lang.String |
toString()
Prints the structure of the evetn using a free notation. |
java.lang.String |
toXML()
Prints the XML hierarchy that represents the current event. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
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
Constructor Detail |
public SienaEvent()
public SienaEvent(EventInterface evt)
evt
- is an object of type Event which will be narrowed and parsed
according to the SienaEvent representation.public SienaEvent(org.w3c.dom.Node n) throws ParsingException
public SienaEvent(SienaEvent n)
Method Detail |
public long getId()
getId
in interface MessageInterface
public void setDOM(org.w3c.dom.Node n) throws ParsingException
setDOM
in interface MessageInterface
n
-
EventParsingException
ParsingException
public org.w3c.dom.Node getDOM()
getDOM
in interface MessageInterface
public AttValue[] getAttributeValues()
public void putAttribute(java.lang.String name, java.lang.String value)
name
- attribute name.value
- String value.public void putAttribute(java.lang.String name, byte[] value)
name
- attribute name.value
- byte array value.public void putAttribute(java.lang.String name, long value)
name
- attribute name.value
- integer value.public void putAttribute(java.lang.String name, double value)
name
- attribute name.value
- double value.public void putAttribute(java.lang.String name, boolean value)
name
- attribute name.value
- boolean value.public void putAttribute(java.lang.String name, AttValue value)
name
- attribute name.value
- value.public AttValue getAttribute(java.lang.String name)
null
if
that attribute does not exist in this SienaEvent.
name
- attribute name.public int getAttributesSize()
public int size()
public void clearAll()
public java.util.Iterator getAttributeNamesIterator()
public java.lang.String toString()
public java.lang.String toXML()
public void setXMLTextContent(java.lang.String content)
setXMLTextContent
in interface MessageInterface
content
- is the new XML format contnet in the form of a Stringpublic java.lang.String getXMLTextContent()
getXMLTextContent
in interface MessageInterface
public java.util.Date getDateCreated()
getDateCreated
in interface MessageInterface
public java.util.Date getDateReceivedInServer()
getDateReceivedInServer
in interface MessageInterface
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |