NiCE's data structure is a complex,
--Need picture here of the entire hierarchy of NiCE.
NiCEObject is the base class for all classes in NiCE that manipulate, contain, or represent data. NiCEObjects are uniquely identifiable by their identification numbers and are persistent. NiCEObject implements Java's Cloneable interface for creating deep copies and also provides a public copy operation to copy into an existing NiCEObject. NiCEObjects can be marshalled and unmarshalled to XML using the loadFromXML() and persistToXML() operations.
Operations are defined for most of the attributes and capabilities of the NiCEObject class, but some work in required by subclasses. Subclasses must override the clone() operation if they extend NiCEObject by adding attributes. They should provide a custom implementation of copy() that is specific to their own type to do a deep copy (i.e. copy(a:myType) instead of a copy(a:NiCEObject)) since NiCEObject.copy() only copies the attributes of NiCEObjects. They must also override the loadFromXML operation to copy the XML data properly from the XMLLoader (because NiCE uses JAXB to bind XML to NiCEObjects and its sublclasses).
--Taken from the javaDocs on NiCEObject.
--Need picture from UML diagrams
The Entry class is responsible for collecting and managing the values needed by the Item to perform a task. The Entry class is capable of checking bounds and validity.
The "readiness" of an Entry is used map dependencies between Entries and other Entries. An Entry may depend on a parent Entry and passing the correct key-value pair to the update() operation will mark the Entry as ready or not ready depending on the state of the parent. All Entries default to ready. The changed or modified state of the Entry is similar in that it distinguishes whether or not an Entry has been recently modified.
The Entry implements IUpdateable to update the state of the Entry based on key-value pairs. The base default implementation of update() will mark the Entry as "ready" (isReady() will return true) if the name of the Entry's parent is passed as the key and one of "ready," "yes," "y," "on," "true" or "enabled" is passed as the value (minus the commas of course). It will mark the Entry as not ready (isReady() will return false) if the value is "not ready," "no," "n," "off," "false" or "disabled" instead. Neither set of values are case sensitive ("Yes" will work as well as "yes"). It also resets the "changed" state of the Entry to false to reflect that review is required because of new information from the update. This operation should be overridden by subclasses to get tailored update behavior, but Entry.update should be called still (by using "super.update()") to handle updating because of parents and setting the changed state.</p>
Managing the readiness of the Entry with update in the base class allows NiCE to generically handle the almost trivial case of dependencies where one Entry needs to know about the state of another before revealing itself. The Entry can also be marked as "secret" to indicate that its contents should not be displayed openly. Entries should be marked secret in their setup() operation. There is no public operation to mark them as secret, although there is an isSecret() operation to determine whether or not an Entry is secret. Entry's may be "tagged" with values that act as secondary names or unique identifiers in systems outside of NiCE. This is particularly useful for creating files based on key-value pairs of Entry names and values, but the name of the Entry needs to be some condensed or modified form of the human readable name returned by getName().
Entry is a subclass of NiCEObject. It overrides NiCEObject.copy(), NiCEObject.clone() and NiCEObject.loadFromXML() as specified and required by the NiCEObject class.
List of Operations on Entry:
Operation Parameters Description
Entry
none
A constructor that will create an Entry with only a unique ID and a name. The constructor will call the setup function after setting the default values. The setup function can be overridden to tailor the properties of the Entry or otherwise overload the behavior of the Entry.
getAllowedValues
Returns: allowedValues[*]
This Entry returns the allowed values for the Entry and should only be used when the AllowedValueType is defined as Discrete, in which case the value must equal one of the allowed values. These allowed values types should not be used to check the submitted value because the Entry class will handle its own error checking upon the submission of a value in setValue().
getDefaultValue
Returns: String
This operation returns the default value of the Entry.
getValue
Returns: String
This operation returns the current value of the Entry or the default value if no other has been specified.
getValueType
Returns: AllowedValueType
This operation returns the type of value that is stored in the Entry. A response type of AllowedValueType.Discrete means that the answer must be one of the values from getAllowedValues(), a response of AllowedValueTypes.Continuous means that the value must exist within the range of the maximum and minimum of the values from getAllowedValues() and AllowedValueType.Undefined means that the response will not be checked. Please note that the Entry class will check the validity of the values submitted to it and the information returned from this method is purely for information purposes (deciding how to draw the client, etc.).
isReady
Returns: boolean
This operation returns true if the Entry should be addressed and false if the Entry is not ready to be addressed (waiting on a parent Entry, etc.).
A picture of Entry's Logical Architecture:
-- Taken from JavaDocs on Entry
The DataComponent class is a container for Entries and behaves as a Component from the UpdateableComposite package. The class is used contain a set of Entries that are related to each other in some way and to accept updates from dispatched from the Registry.
--Taken from JavaDocs on DataComponent
The Resource class represents persistent data resources used by NiCE and the other software packages with which it interacts. This includes files containing simulation input and output data, movies and plots, amongst others.
The OutputComponent is a specialization of Component that is used to manage output data on a Form. Output data represented by NiCEResources can be very easily added to OutputComponents by calling the addResource() operation and the whole list of managed NiCEResources can be retrieved with getResources().
Notifications are not provided on OutputComponents if their names, ids or descriptions change. These should not change in general because there is only a single output component for all of the output. It only provides notifications when NiCEResources are added.
--Taken from JavaDocs
The TableComponent class is a Component that contains a set of Entries that are related to each other within a single row of a table and it can contain many rows. Each row of the table contains a set of Entries that only make sense when they are considered as a set, such as "Hostname," "Operating System" and "Install Path" for a particular executable application or script. The structure of the Table is defined by its "Row Template" that contains a default Entry for each column. So, if we wanted a table with a column for "Hostname," "Operating System" and "Install Path" we would set the row template on the TableComponent with a set of three Entries, one for each property, that describes the default configuration. The row template is the canonical row configuration of the TableComponent. Once the template is set it can not be changed, although it can be retrieved for reference. Adding a row to the table creates a copy of the template and assumes the default values, which can be edited after retrieving the row. Rows may be deleted and if a row is deleted it will result in the entire table being re-ordered to keep the row numbers sequential.
--Taken from JavaDocs on TableComponent.
The Form class is a representation of the Item class and contains all of the Entries that must be addressed by the NEAMS User before the Item can perform its task or tasks. The Entries in a Form may change after it is submitted if the Item class needs more information. The NEAMS User only interacts with an Item through its Forms. The Form requires a list of Actions for which it can be used upon construction and, if no such list is provided, getActionList() will return null. Such usage is not uncommon because in some instances Forms are actually used by Actions themselves and not Items!
--Taken from JavaDocs on Form