public interface IVizObject
VizObject is the base class for all common, shared data structures in Viz geometry and mesh bundles. ICEObjects are uniquely identifiable by their identification numbers and are persistent. VizObject implements clone() for creating deep copies and also provides a public copy operation to copy into an existing VizObject. VizObjects can be marshaled and unmarshaled to XML using the loadFromXML() and persistToXML().
Operations are defined for most of the attributes and capabilities of the VizObject class, but some work is required by subclasses. Subclasses must override clone() if they extend VizObject by adding attributes or the deep copy will fail. 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 copy(a:VizObject)) since VizObject.copy() will only copy the attributes of VizObjects. They must also override the loadFromXML() operation to copy the XML data properly from the XMLLoader (because Viz uses JAXB to bind XML to VizObjects and its subclasses).
VizObjects implement IVizUpdateable. The base class manages registering, unregistering and notifications. Subclasses are expected to override update().
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
This operation returns a clone of the ICEObject using a deep copy.
|
void |
copy(VizObject entity)
This operation copies the contents of an ICEObject into the current
object using a deep copy.
|
boolean |
equals(java.lang.Object otherObject)
(non-Javadoc)
|
java.lang.String |
getDescription()
(non-Javadoc)
|
int |
getId()
(non-Javadoc)
|
java.lang.String |
getName()
(non-Javadoc)
|
int |
hashCode()
(non-Javadoc)
|
void |
register(IVizUpdateableListener listener)
(non-Javadoc)
|
void |
setDescription(java.lang.String description)
(non-Javadoc)
|
void |
setId(int id)
(non-Javadoc)
|
void |
setName(java.lang.String name)
(non-Javadoc)
|
void |
unregister(IVizUpdateableListener listener)
(non-Javadoc)
|
void |
update(java.lang.String updatedKey,
java.lang.String newValue)
(non-Javadoc)
|
void setId(int id)
Identifiable#setId(int id)
int getId()
Identifiable#getId()
void setName(java.lang.String name)
Identifiable#setName(String name)
java.lang.String getName()
Identifiable#getName()
void setDescription(java.lang.String description)
Identifiable#setDescription(String description)
java.lang.String getDescription()
Identifiable#getDescription()
void copy(VizObject entity)
entity
- The Identifiable entity from which the values should be
copied.java.lang.Object clone()
This operation returns a clone of the ICEObject using a deep copy.
The new clone.
boolean equals(java.lang.Object otherObject)
equals
in class java.lang.Object
Identifiable#equals(Object otherObject)
int hashCode()
hashCode
in class java.lang.Object
Identifiable#hashCode()
void update(java.lang.String updatedKey, java.lang.String newValue)
IUpdateable#update(String updatedKey, String newValue)
void register(IVizUpdateableListener listener)
IUpdateable#register(IUpdateableListener listener)
void unregister(IVizUpdateableListener listener)
IUpdateable#unregister(IUpdateableListener listener)