edu.uci.isr.yancees.server.dispatcher.switcher
Class SwitcherSubscription

java.lang.Object
  extended byedu.uci.isr.yancees.server.dispatcher.switcher.SwitcherSubscription
All Implemented Interfaces:
MessageInterface, java.io.Serializable, SubscriptionInterface

public class SwitcherSubscription
extends java.lang.Object
implements SubscriptionInterface

This class implements a siena subscription parser. It parses and converts an XML subscription in the Siena format to the native siena subscription. Hence, this subscription represents the main functionality of the core event dispatcher component, on top of which all other subscription extensions are build. In other words, the subscription is an adapter around a DOM node that is able to map the specific sienaSubscriptio.xsd elements to filters in Siena internal representation. Hence, it works as a container and a translator of the subscription subtrees that are understood by siena.

See Also:
Serialized Form

Field Summary
static java.lang.String REQUIRE
           
static java.lang.String SUBSCRIPTION
          Tags imported from the switcherSubscriptin.xsd
 
Constructor Summary
SwitcherSubscription(org.w3c.dom.Node node)
          Initializes this object with a DOM tree to be parsed we assume here that the subscription is provided according to sienaSubscription.xsd and the node provided here corresponds to the tag.
 
Method Summary
 java.util.Date getDateCreated()
           
 java.util.Date getDateReceivedInServer()
           
 org.w3c.dom.Node getDOM()
           
 long getId()
           
 java.lang.String[] getRequireFields()
           
 java.lang.String getXMLTextContent()
           
 void setDOM(org.w3c.dom.Node node)
          Changes the current subscription DOM tree
 void setXMLTextContent(java.lang.String content)
          Changes the content of this message.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SUBSCRIPTION

public static final java.lang.String SUBSCRIPTION
Tags imported from the switcherSubscriptin.xsd

See Also:
Constant Field Values

REQUIRE

public static final java.lang.String REQUIRE
See Also:
Constant Field Values
Constructor Detail

SwitcherSubscription

public SwitcherSubscription(org.w3c.dom.Node node)
                     throws ParsingException
Initializes this object with a DOM tree to be parsed we assume here that the subscription is provided according to sienaSubscription.xsd and the node provided here corresponds to the tag.

Method Detail

getId

public long getId()
Specified by:
getId in interface MessageInterface

setDOM

public void setDOM(org.w3c.dom.Node node)
            throws ParsingException
Changes the current subscription DOM tree

Specified by:
setDOM in interface MessageInterface
Throws:
ParsingException

getDOM

public org.w3c.dom.Node getDOM()
Specified by:
getDOM in interface MessageInterface
Returns:
the current DOM tree representing this subscription

getRequireFields

public java.lang.String[] getRequireFields()

toString

public java.lang.String toString()

setXMLTextContent

public void setXMLTextContent(java.lang.String content)
Changes the content of this message. Replaces it with the XML content provided in the String provided

Specified by:
setXMLTextContent in interface MessageInterface
Parameters:
content - is the new XML format contnet in the form of a String

getXMLTextContent

public java.lang.String getXMLTextContent()
Specified by:
getXMLTextContent in interface MessageInterface
Returns:
the content of this message in the text form, as a string.

getDateCreated

public java.util.Date getDateCreated()
Specified by:
getDateCreated in interface MessageInterface
Returns:
the date the object was first created

getDateReceivedInServer

public java.util.Date getDateReceivedInServer()
Specified by:
getDateReceivedInServer in interface MessageInterface
Returns:
the date this object arrived in the server