Package ptolemy.data.ontologies
Class AnalyzeExceptionAttribute
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.actor.AbstractInitializableAttribute
-
- ptolemy.actor.lib.CatchExceptionAttribute
-
- ptolemy.data.ontologies.AnalyzeExceptionAttribute
-
- All Implemented Interfaces:
java.lang.Cloneable
,ExecutionListener
,Initializable
,Changeable
,Debuggable
,DebugListener
,Derivable
,ExceptionHandler
,HierarchyListener
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class AnalyzeExceptionAttribute extends CatchExceptionAttribute
An extension of CatchExceptionAttribute, this attribute catches exceptions and offers ontology analysis. If the exception cannot be handled, the attribute indicates this to the Manager. Status messages may be logged to a file.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Elizabeth Latronico
- Pt.AcceptedRating:
- Red (beth)
- Pt.ProposedRating:
- Red (beth)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
-
Fields inherited from class ptolemy.actor.lib.CatchExceptionAttribute
CONTINUE, exceptionMessage, logFileName, policy, RESTART, statusMessage, STOP, THROW
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
-
Constructor Summary
Constructors Constructor Description AnalyzeExceptionAttribute(CompositeEntity container, java.lang.String name)
Create a new actor in the specified container with the specified name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone(Workspace workspace)
Clone the actor into the specified workspace.boolean
handleException(NamedObj context, java.lang.Throwable exception)
Handle an exception according to the specified policy: analyze: Determine the source actor(s) and annotate output ports with error constraints.-
Methods inherited from class ptolemy.actor.lib.CatchExceptionAttribute
_writeMessage, attributeChanged, executionError, executionFinished, initialize, managerStateChanged, preinitialize
-
Methods inherited from class ptolemy.actor.AbstractInitializableAttribute
_getInitializableContainer, addInitializable, hierarchyChanged, hierarchyWillChange, removeInitializable, setContainer, wrapup
-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, 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, workspace
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
-
-
-
-
Constructor Detail
-
AnalyzeExceptionAttribute
public AnalyzeExceptionAttribute(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
Create a new actor in the specified container with the specified name. The name must be unique within the container or an exception is thrown. The container argument must not be null, or a NullPointerException will be thrown.- Parameters:
container
- The container.name
- The name of this actor within the container.- Throws:
IllegalActionException
- If this actor cannot be contained by the proposed container (see the setContainer() method).NameDuplicationException
- If the name coincides with an entity already in the container.
-
-
Method Detail
-
clone
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
Clone the actor into the specified workspace.- Overrides:
clone
in classCatchExceptionAttribute
- Parameters:
workspace
- The workspace for the new object.- Returns:
- A new actor.
- Throws:
java.lang.CloneNotSupportedException
- If a derived class contains an attribute that cannot be cloned.- See Also:
Object.clone()
-
handleException
public boolean handleException(NamedObj context, java.lang.Throwable exception) throws IllegalActionException
Handle an exception according to the specified policy: analyze: Determine the source actor(s) and annotate output ports with error constraints. others: Delegate to parent class- Specified by:
handleException
in interfaceExceptionHandler
- Overrides:
handleException
in classCatchExceptionAttribute
- Parameters:
context
- The object in which the error occurred.exception
- The exception to be handled.- Returns:
- true if the exception is handled; false if this attribute did not handle it
- Throws:
IllegalActionException
- If there is a problem writing to the log file
-
-