|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lwes.db.EventTemplateDB
public class EventTemplateDB
Provides type checking for the event system. Also provides a place for globally accessible information.
| Constructor Summary | |
|---|---|
EventTemplateDB()
This is the EventTemplateDB constructor. |
|
| Method Summary | |
|---|---|
boolean |
addEvent(java.lang.String anEventName)
Add an Event to the EventTemplateDB |
boolean |
addEventAttribute(java.lang.String anEventName,
java.lang.String anAttributeName,
java.lang.String anAttributeType)
Add an attribute to an Event in the EventTemplateDB |
boolean |
checkForAttribute(java.lang.String anEventName,
java.lang.String anAttributeName)
Checks to see if an attribute anAttributeName exists for the event anEventName |
boolean |
checkForEvent(java.lang.String anEventName)
Checks to see if an Event exists in the EventTemplateDB |
boolean |
checkForType(java.lang.String aTypeName)
Returns true if the type given by aTypeName is a valid type in the DB. |
boolean |
checkTypeForAttribute(java.lang.String anEventName,
java.lang.String anAttributeName,
java.lang.Object anAttributeValue)
Checks to see if the type of an attribute is proper. |
boolean |
checkTypeForAttribute(java.lang.String anEventName,
java.lang.String anAttributeName,
java.lang.String anAttributeType)
Checks to see if the type of an attribute is proper. |
BaseType |
getBaseTypeForObjectAttribute(java.lang.String eventName,
java.lang.String attributeName,
java.lang.Object attributeValue)
Given an Object which is the attribute value of the attribute attributeName of event eventName, return the internal representation (i.e. |
java.util.Map<java.lang.String,BaseType> |
getBaseTypesForEvent(java.lang.String eventName)
Returns the base types for this event |
java.io.File |
getESFFile()
Gets the ESF file, in case you want to look at it |
java.io.InputStream |
getESFInputStream()
Ges the ESF InputStream |
java.util.Enumeration<java.lang.String> |
getEventNames()
Returns an enumeration of all defined events |
boolean |
initialize()
Initializes the EventTemplateDB, assumes that setESFFile() has been called. |
java.lang.Object |
parseAttribute(java.lang.String anEventName,
java.lang.String anAttributeName,
java.lang.String stringAttributeValue)
Parses the string representation of an event attribute into the appropriate objectt. |
void |
setESFFile(java.io.File anEsfFile)
Sets the Event Specification file for this system |
void |
setESFInputStream(java.io.InputStream esfInputStream)
Sets the Event Specification file as an InputStream |
java.lang.String |
toHtmlString()
Returns a HTML rendering of the EventTemplateDB |
java.lang.String |
toString()
Returns a rather long string Representation of the EventTemplateDB |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EventTemplateDB()
| Method Detail |
|---|
public void setESFFile(java.io.File anEsfFile)
anEsfFile - the ESF file for this system.public java.io.File getESFFile()
public void setESFInputStream(java.io.InputStream esfInputStream)
esfInputStream - the InputStream representing an ESF filepublic java.io.InputStream getESFInputStream()
public boolean initialize()
public boolean addEvent(java.lang.String anEventName)
anEventName - the name of the Event to add
public boolean addEventAttribute(java.lang.String anEventName,
java.lang.String anAttributeName,
java.lang.String anAttributeType)
anEventName - the name of the event to add this attribute toanAttributeName - the name of the attribute to addanAttributeType - the type of the attribute, should be the name of the type
given in the ESF Specification.
public java.util.Enumeration<java.lang.String> getEventNames()
public boolean checkForType(java.lang.String aTypeName)
aTypeName - a type name according to the ESF Specification
public boolean checkForEvent(java.lang.String anEventName)
anEventName - the name of the event to check the existence of
public boolean checkForAttribute(java.lang.String anEventName,
java.lang.String anAttributeName)
anEventName - the name of an EventanAttributeName - the name of an attribute of Event to check
public boolean checkTypeForAttribute(java.lang.String anEventName,
java.lang.String anAttributeName,
java.lang.Object anAttributeValue)
anEventName - the name of an Event.anAttributeName - the name of the attribute whose type is being checkedanAttributeValue - the Object containing the possible value of the attribute.
public boolean checkTypeForAttribute(java.lang.String anEventName,
java.lang.String anAttributeName,
java.lang.String anAttributeType)
anEventName - the name of an Event.anAttributeName - the name of the attribute whose type is being checkedanAttributeType - the String containing the possible type value of the
attribute.
public BaseType getBaseTypeForObjectAttribute(java.lang.String eventName,
java.lang.String attributeName,
java.lang.Object attributeValue)
eventName - the name of an Event.attributeName - the name of an attribute of eventNameattributeValue - the value of the attribute
public java.util.Map<java.lang.String,BaseType> getBaseTypesForEvent(java.lang.String eventName)
eventName -
public java.lang.Object parseAttribute(java.lang.String anEventName,
java.lang.String anAttributeName,
java.lang.String stringAttributeValue)
anEventName - the name of an Event.anAttributeName - the name of the attribute we are parsingstringAttributeValue - a string representation of the value of the attribute given by
anAttributeName.
public java.lang.String toHtmlString()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||