edu.uci.isr.yancees.server.dispatcher.elvin
Class ElvinSubscription

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

public class ElvinSubscription
extends java.lang.Object
implements SubscriptionInterface

See Also:
Serialized Form

Field Summary
static java.lang.String FILTER
           
static java.lang.String NAME
          Tags used from the event to express siena constraints.
static java.lang.String[] OPERATOR_STRINGS
           
static java.lang.String[] OPERATORS
          string representation of all supported OPERATORS as described in the sienaSubscription.xsd.
static java.lang.String SUBSCRIPTION
           
static java.lang.String TYPE_ATTRIBUTE
           
static java.lang.String VALUE
           
 
Constructor Summary
ElvinSubscription(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()
           
 short getOperatorType(java.lang.String strop)
           
 java.lang.String[] getPattern()
           
 Subscription getSubscription()
           
 java.lang.String getSubscriptionString()
           
 java.lang.String getXMLTextContent()
           
 boolean isValidElvinOperator(java.lang.String strop)
          Compares the provided operator as a String, to the valid OPERATORS suported by this subscription and as described in sienaSubscripion.xds
 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

OPERATORS

public static final java.lang.String[] OPERATORS
string representation of all supported OPERATORS as described in the sienaSubscription.xsd. This array is used to validate these know OPERATORS


OPERATOR_STRINGS

public static final java.lang.String[] OPERATOR_STRINGS

NAME

public static final java.lang.String NAME
Tags used from the event to express siena constraints. these tags are imported from the sienaEvent.xsd schema and used in the sienaSubscriptin.xsd

See Also:
Constant Field Values

VALUE

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

SUBSCRIPTION

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

TYPE_ATTRIBUTE

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

FILTER

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

ElvinSubscription

public ElvinSubscription(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

getSubscriptionString

public java.lang.String getSubscriptionString()

getSubscription

public Subscription getSubscription()
Returns:
an elvin Subscription object representing the set of Filter siena objects. This is computed by the parsing of the DOM tree of this subscripton.

getPattern

public java.lang.String[] getPattern()

getOperatorType

public short getOperatorType(java.lang.String strop)
Returns:
the index of the operator which equals its type. the operator is a valid siena subsciptoin language one.

isValidElvinOperator

public boolean isValidElvinOperator(java.lang.String strop)
Compares the provided operator as a String, to the valid OPERATORS suported by this subscription and as described in sienaSubscripion.xds

Returns:
true if valid operator, false if not.

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