public class NamedObjId extends StringAttribute implements ChangeListener
NamedObj.ContainedObjectsIteratorSettable.Visibility| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKSEXPERT, FULL, NONE, NOT_EDITABLE| Constructor and Description |
|---|
NamedObjId()
Constructor
|
NamedObjId(NamedObj container,
java.lang.String name)
Constructor
|
NamedObjId(Workspace workspace)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(ChangeListener listener)
Add a change listener, if the container is null the listener
is not added.
|
void |
addValueListener(ValueListener listener)
add a valueListener
|
static void |
assignIdTo(NamedObj no)
Generate a new KeplerLSID and assign it to this NamedObj.
|
static void |
assignIdTo(NamedObj no,
KeplerLSID lsid)
Assign the given KeplerLSID to this NamedObj.
|
static void |
assignIdTo(NamedObj no,
KeplerLSID lsid,
boolean updateReferrals)
Assign the given KeplerLSID to this NamedObj.
|
void |
changeExecuted(ChangeRequest change)
React to a change request has been successfully executed.
|
void |
changeFailed(ChangeRequest change,
java.lang.Exception exception)
React to a change request has resulted in an exception.
|
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace.
|
boolean |
equals(java.lang.Object obj)
Description of the Method
|
java.lang.String |
getDefaultExpression()
returns the default expression which is null
|
KeplerLSID |
getId() |
static NamedObjId |
getIdAttributeFor(NamedObj no)
Return the NamedObjId associated with the given NamedObj or null if no
associated NamedObjId.
|
static KeplerLSID |
getIdFor(NamedObj no)
Return the LSID for the given NamedObj.
|
static NamedObjIdReferralList |
getIDListAttributeFor(NamedObj no)
Return the KeplerIDListAttribute associated with the given NamedObj or
null if no KeplerIDListAttribute exists.
|
NamedObjId |
getParentId() |
Settable.Visibility |
getVisibility()
NamedObjIds should be invisible to the user
|
static boolean |
idMatches(KeplerLSID lsid,
NamedObj no,
boolean matchRevision)
Check the given NamedObj to see if it matches the search ID.
|
static void |
incrementLSIDOnWorkflowChange(boolean listen)
Set if workflow changes should increment LSIDs.
|
void |
removeValueListener(ValueListener listener)
remove the indicated listener
|
void |
requestNamedObjIdChange() |
void |
setContainer(NamedObj container)
Override setContainer method to handle adding and removing the listener
based on whether or not there is a container.
|
void |
setExpression(KeplerLSID lsid)
Helper method for setting the expression directly with a KeplerLSID
object.
|
void |
setExpression(java.lang.String expression)
set the value of this id.
|
void |
setParentId(NamedObjId parent) |
void |
setVisibility(Settable.Visibility visibility)
this method does not change the visibility.
|
void |
updateRevision()
The updateRevision() method is used to retrieve the next available
revision from the LSIDGenerator and updates the revision accordingly.
|
java.util.Collection |
validate()
validate the expression.
|
_propagateValue, exportMoML, getExpressiongetValueAsString_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspacefinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDisplayNamedescription, getContainer, getFullName, getName, getName, setNamepublic static final java.lang.String NAME
public NamedObjId()
public NamedObjId(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container - Description of the Parametername - Description of the ParameterIllegalActionException - Description of the ExceptionNameDuplicationException - Description of the Exceptionpublic NamedObjId(Workspace workspace)
workspace - Description of the Parameterpublic NamedObjId getParentId()
public void setParentId(NamedObjId parent)
public static void assignIdTo(NamedObj no) throws java.lang.Exception
no - the NamedObj.java.lang.Exceptionpublic static void assignIdTo(NamedObj no, KeplerLSID lsid) throws java.lang.Exception
no - lsid - java.lang.Exceptionpublic static void assignIdTo(NamedObj no, KeplerLSID lsid, boolean updateReferrals) throws java.lang.Exception
no - the NamedObjlsid - the new LSID to assign.updateReferrals - if true, update the referrals list.java.lang.Exceptionpublic java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone in class StringAttributeworkspace - The workspace for the new object.java.lang.CloneNotSupportedException - If any of the attributes
cannot be cloned.NamedObj.exportMoML(Writer, int, String),
NamedObj.setDeferringChangeRequests(boolean)public java.lang.String getDefaultExpression()
getDefaultExpression in interface SettablegetDefaultExpression in class AbstractSettableAttributeAbstractSettableAttribute.setExpression(String),
Instantiablepublic KeplerLSID getId()
public static KeplerLSID getIdFor(NamedObj no)
no - public static NamedObjIdReferralList getIDListAttributeFor(NamedObj no) throws IllegalActionException, NameDuplicationException
no - * @throws NameDuplicationExceptionIllegalActionExceptionNameDuplicationExceptionpublic static NamedObjId getIdAttributeFor(NamedObj no)
no - public void setExpression(java.lang.String expression) throws IllegalActionException
setExpression in interface SettablesetExpression in class StringAttributeexpression - The new expression valueIllegalActionException - If the change is not acceptable
to the container.requestNamedObjIdChange()public void setExpression(KeplerLSID lsid) throws IllegalActionException
lsid - IllegalActionExceptionpublic void addValueListener(ValueListener listener)
addValueListener in interface SettableaddValueListener in class StringAttributelistener - The feature to be added to the ValueListener attributeStringAttribute.removeValueListener(ValueListener)public Settable.Visibility getVisibility()
getVisibility in interface SettablegetVisibility in class StringAttributeStringAttribute.setVisibility(Settable.Visibility)public void setVisibility(Settable.Visibility visibility)
setVisibility in interface SettablesetVisibility in class StringAttributevisibility - The new visibility valueStringAttribute.getVisibility()public void removeValueListener(ValueListener listener)
removeValueListener in interface SettableremoveValueListener in class StringAttributelistener - Description of the ParameterStringAttribute.addValueListener(ValueListener)public static boolean idMatches(KeplerLSID lsid, NamedObj no, boolean matchRevision)
no - java.lang.Exceptionpublic void changeExecuted(ChangeRequest change)
ChangeListenerchangeExecuted in interface ChangeListenerchange - The change that has been executed, or null if
the change was not done via a ChangeRequest.public void updateRevision() throws java.lang.Exception
java.lang.Exceptionpublic void requestNamedObjIdChange()
public void changeFailed(ChangeRequest change, java.lang.Exception exception)
ChangeListenerchangeFailed in interface ChangeListenerchange - The change that was attempted or null if
the change was not done via a ChangeRequest.exception - The exception that resulted.public java.util.Collection validate()
validate in interface Settablevalidate in class StringAttributepublic void setContainer(NamedObj container) throws IllegalActionException, NameDuplicationException
setContainer in class Attributecontainer - The container to attach this attribute to..IllegalActionException - If this attribute is not of the
expected class for the container, or it has no name,
or the attribute and container are not in the same workspace, or
the proposed container would result in recursive containment.NameDuplicationException - If the container already has
an attribute with the name of this attribute.Attribute.getContainer()public void addChangeListener(ChangeListener listener)
addChangeListener in interface ChangeableaddChangeListener in class NamedObjlistener - The listener to add.NamedObj.removeChangeListener(ChangeListener),
NamedObj.requestChange(ChangeRequest),
Changeablepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - Description of the Parameterpublic static void incrementLSIDOnWorkflowChange(boolean listen)