Package ptolemy.data.ontologies
Class FlatScalarTokenRepresentativeConcept
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.InstantiableNamedObj
-
- ptolemy.kernel.Entity<T>
-
- ptolemy.kernel.ComponentEntity
-
- ptolemy.data.ontologies.Concept
-
- ptolemy.data.ontologies.FiniteConcept
-
- ptolemy.data.ontologies.InfiniteConceptRepresentative
-
- ptolemy.data.ontologies.FlatTokenRepresentativeConcept
-
- ptolemy.data.ontologies.FlatScalarTokenRepresentativeConcept
-
- All Implemented Interfaces:
java.lang.Cloneable
,InequalityTerm
,Changeable
,Debuggable
,DebugListener
,Derivable
,Flowable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class FlatScalarTokenRepresentativeConcept extends FlatTokenRepresentativeConcept
A finite concept in an ontology that represents a flat set of infinite concepts that map to an interval of scalar numbers.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Charles Shelton
- See Also:
FlatScalarTokenInfiniteConcept
- Pt.AcceptedRating:
- Red (blickly)
- Pt.ProposedRating:
- Red (blickly)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description Parameter
leftEndPoint
The value of the left endpoint of the scalar interval.Parameter
leftIntervalClosed
Indicates whether or not the interval is closed on its left endpoint.Parameter
rightEndPoint
The value of the right endpoint of the scalar interval.Parameter
rightIntervalClosed
Indicates whether or not the interval is closed on its right endpoint.-
Fields inherited from class ptolemy.data.ontologies.FiniteConcept
abovePort, belowPort
-
Fields inherited from class ptolemy.data.ontologies.Concept
isAcceptable
-
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 FlatScalarTokenRepresentativeConcept(CompositeEntity ontology, java.lang.String name)
Create a new FlatScalarTokenRepresentativeConcept with the specified name and ontology.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FlatScalarTokenInfiniteConcept
_createInfiniteConceptInstance(java.lang.String infiniteConceptString)
Create a new FlatScalarTokenInfiniteConcept for the given concept string.protected FlatScalarTokenInfiniteConcept
_instantiateFlatTokenInfiniteConcept(Token tokenValue)
Return a new FlatScalarTokenInfiniteConcept for this representative with the given token value.void
attributeChanged(Attribute attribute)
React to a change in an attribute.boolean
withinInterval(ScalarToken value)
Determine whether or not the specified ScalarToken is within the interval specified by this representative concept.-
Methods inherited from class ptolemy.data.ontologies.FlatTokenRepresentativeConcept
containsThisInfiniteConceptString, getFlatTokenInfiniteConceptByToken
-
Methods inherited from class ptolemy.data.ontologies.InfiniteConceptRepresentative
_clearInstantiatedInfiniteConcepts, clone, getInfiniteConceptByString, getInstantiatedInfiniteConcepts
-
Methods inherited from class ptolemy.data.ontologies.FiniteConcept
getCoverSetAbove, getCoverSetBelow, getIncomingPort, getOutgoingPort, toString
-
Methods inherited from class ptolemy.data.ontologies.Concept
getAssociatedObject, getColor, getOntology, getValue, getVariables, initialize, isAboveOrEqualTo, isSettable, isValueAcceptable, setValue
-
Methods inherited from class ptolemy.kernel.ComponentEntity
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, newPort, propagateExistence, setContainer, setName
-
Methods inherited from class ptolemy.kernel.Entity
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, connectionsChanged, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
-
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, 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.Derivable
getDerivedLevel, getDerivedList, propagateValue
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getDisplayName, getFullName, getName, getName
-
-
-
-
Field Detail
-
leftEndPoint
public Parameter leftEndPoint
The value of the left endpoint of the scalar interval.
-
leftIntervalClosed
public Parameter leftIntervalClosed
Indicates whether or not the interval is closed on its left endpoint.
-
rightEndPoint
public Parameter rightEndPoint
The value of the right endpoint of the scalar interval.
-
rightIntervalClosed
public Parameter rightIntervalClosed
Indicates whether or not the interval is closed on its right endpoint.
-
-
Constructor Detail
-
FlatScalarTokenRepresentativeConcept
public FlatScalarTokenRepresentativeConcept(CompositeEntity ontology, java.lang.String name) throws NameDuplicationException, IllegalActionException
Create a new FlatScalarTokenRepresentativeConcept with the specified name and ontology.- Parameters:
ontology
- The specified ontology where this concept resides.name
- The specified name for the concept.- Throws:
NameDuplicationException
- If the ontology already contains a concept with the specified name.IllegalActionException
- If the base class throws it.
-
-
Method Detail
-
attributeChanged
public void attributeChanged(Attribute attribute) throws IllegalActionException
React to a change in an attribute. If there is a change to the parameters that specify the endpoints of the interval for the scalar infinite concepts represented by this concept, change the interval endpoint values or the flags that determine whether each endpoint is closed or open.- Overrides:
attributeChanged
in classNamedObj
- Parameters:
attribute
- The attribute that has changed in this concept.- Throws:
IllegalActionException
- Thrown if the interval is invalid (the specified left endpoint is greater than the right endpoint, or vice versa).
-
withinInterval
public boolean withinInterval(ScalarToken value) throws IllegalActionException
Determine whether or not the specified ScalarToken is within the interval specified by this representative concept.- Parameters:
value
- The specified ScalarToken to be tested.- Returns:
- True if the ScalarToken value is within the interval, false otherwise.
- Throws:
IllegalActionException
- Thrown if the interval endpoints have not been specified.
-
_createInfiniteConceptInstance
protected FlatScalarTokenInfiniteConcept _createInfiniteConceptInstance(java.lang.String infiniteConceptString) throws IllegalActionException
Create a new FlatScalarTokenInfiniteConcept for the given concept string.- Overrides:
_createInfiniteConceptInstance
in classFlatTokenRepresentativeConcept
- Parameters:
infiniteConceptString
- The specified concept string that represents the FlatScalarTokenInfiniteConcept to be created.- Returns:
- The newly created FlatScalarTokenInfiniteConcept object.
- Throws:
IllegalActionException
- Thrown if a valid FlatScalarTokenInfiniteConcept cannot be created.
-
_instantiateFlatTokenInfiniteConcept
protected FlatScalarTokenInfiniteConcept _instantiateFlatTokenInfiniteConcept(Token tokenValue) throws IllegalActionException
Return a new FlatScalarTokenInfiniteConcept for this representative with the given token value.- Overrides:
_instantiateFlatTokenInfiniteConcept
in classFlatTokenRepresentativeConcept
- Parameters:
tokenValue
- The token value for the FlatTokenInfiniteConcept to be instantiated.- Returns:
- A new FlatTokenInfiniteConcept
- Throws:
IllegalActionException
- Thrown if the FlatTokenInfiniteConcept cannot be created.
-
-