ptolemy.data.properties
Class AnnotationAttribute

java.lang.Object
  extended by ptolemy.kernel.util.NamedObj
      extended by ptolemy.kernel.util.Attribute
          extended by ptolemy.kernel.util.AbstractSettableAttribute
              extended by ptolemy.kernel.util.StringAttribute
                  extended by ptolemy.data.properties.AnnotationAttribute
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable, Settable

public class AnnotationAttribute
extends StringAttribute

An annotation attribute that specifies property constraints in the model. The name of the attribute is prefixed by the use case or solver's name.

Since:
Ptolemy II 7.1
Version:
$Id: AnnotationAttribute.java 54842 2009-07-08 16:43:15Z mankit $
Author:
Man-Kit Leung
See Also:
Serialized Form
Accepted Rating:
Red (mankit)
Proposed Rating:
Red (mankit)

Nested Class Summary
 
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
 
Nested classes/interfaces inherited from interface ptolemy.kernel.util.Settable
Settable.Visibility
 
Field Summary
 
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
 
Fields inherited from interface ptolemy.kernel.util.Settable
EXPERT, FULL, NONE, NOT_EDITABLE
 
Constructor Summary
AnnotationAttribute(NamedObj container, java.lang.String name)
          Construct a PropertyAttribute with the specified name, and container.
 
Method Summary
 java.lang.String getUseCaseIdentifier()
           
 void setName(java.lang.String name)
          Set the name of the attribute and error-check for name format.
 
Methods inherited from class ptolemy.kernel.util.StringAttribute
_propagateValue, addValueListener, exportMoML, getExpression, getVisibility, removeValueListener, setExpression, setVisibility, validate
 
Methods inherited from class ptolemy.kernel.util.AbstractSettableAttribute
getDefaultExpression, getValueAsString
 
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, updateContent
 
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _description, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, 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, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ptolemy.kernel.util.Settable
getDisplayName
 
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getFullName, getName, getName
 

Constructor Detail

AnnotationAttribute

public AnnotationAttribute(NamedObj container,
                           java.lang.String name)
                    throws IllegalActionException,
                           NameDuplicationException
Construct a PropertyAttribute with the specified name, and container.

Parameters:
container - Container
name - The given name for the attribute.
Throws:
IllegalActionException - If the attribute is not of an acceptable class for the container, or if the name contains a period.
NameDuplicationException - If the name coincides with an attribute already in the container.
Method Detail

setName

public void setName(java.lang.String name)
             throws IllegalActionException,
                    NameDuplicationException
Set the name of the attribute and error-check for name format. A proper name should contain an use-case identifier and an attribute label, separated by "::".

Specified by:
setName in interface Nameable
Overrides:
setName in class Attribute
Parameters:
name - The new name.
Throws:
IllegalActionException - If the name contains a period.
NameDuplicationException - If there is already an attribute with the same name in the container.
See Also:
NamedObj.getName(), NamedObj.getName(NamedObj)

getUseCaseIdentifier

public java.lang.String getUseCaseIdentifier()
                                      throws IllegalActionException
Throws:
IllegalActionException