public interface ScienceObjectModel extends ReplaceablePropertyChangeListener
This code was originally developed by NASA, Goddard Space Flight Center, Code 588 for the Scientist's Expert Assistant (SEA) project for Next Generation Space Telescope (NGST).
Modifier and Type | Field and Description |
---|---|
static String |
NAME_PROPERTY
Property name affiliated with the Name property of a ScienceObjectModel.
|
static String |
PENDING_PROPERTY
Property names used by subclasses to indicate a change in a subclass'
Validity status.
|
static String |
VALID_PROPERTY
Deprecated.
- not being used
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(ReplaceablePropertyChangeListener listener)
Adds a listener to receive PropertyChangeNotifications and Replacement events.
|
void |
clearAllListeners()
Removes all listeners.
|
Object |
clone()
Define a clone() without throwing an exception.
|
void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
Covering method to fire a property change notification to listeners.
|
Exception |
getException()
For validity purposes, a ScienceObjectNode will be "valid" if
it has no exceptions assigned to it.
|
String |
getLabel()
Returns a Label property - may be same as Name or same as toString() or
provide a different implementation
|
String |
getName()
Returns the Name property, should NOT return a null
|
ScienceObjectNodeModel |
getParent()
Returns the parent, if any.
|
boolean |
isHolding()
Return the internal "held" state of the object.
|
boolean |
isTracing()
Returns true if this object should have its property change events traced.
|
boolean |
isValid()
Returns a boolean indicating whether the internal state of the
object is in a valid state and its information scientifically sound.
|
void |
removePropertyChangeListener(ReplaceablePropertyChangeListener listener)
Removes a listener for receiving PropertyChangeNotifications and Replacement events.
|
void |
setException(Exception e)
Sets an exception on the object, presumably making it "invalid"
|
void |
setHolding(boolean hold)
Sets the hold state for an object.
|
void |
setName(String name)
Sets the Name property
|
void |
setParent(ScienceObjectNodeModel model)
Sets the parent of this object.
|
void |
setTracing(boolean trace)
Sets the tracing level for this object.
|
replaceObject
propertyChange
static final String NAME_PROPERTY
static final String VALID_PROPERTY
static final String PENDING_PROPERTY
ScienceObjectNodeModel getParent()
void setParent(ScienceObjectNodeModel model)
Object clone()
boolean isHolding()
Internally, when holding is set to true a ScienceObjectModel should not perform the update process, but should track whether or not updates are needed.
See AbstractScienceObjectNode for an implementation example.
void setHolding(boolean hold)
boolean isTracing()
void setTracing(boolean trace)
isTracing()
void addPropertyChangeListener(ReplaceablePropertyChangeListener listener)
void removePropertyChangeListener(ReplaceablePropertyChangeListener listener)
void clearAllListeners()
void firePropertyChange(String propertyName, Object oldValue, Object newValue)
String getName()
void setName(String name)
String getLabel()
Exception getException()
void setException(Exception e)
boolean isValid()
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.