Class DerivedDimensionRepresentativeConcept
- 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.lattice.unit.DimensionRepresentativeConcept
-
- ptolemy.data.ontologies.lattice.unit.DerivedDimensionRepresentativeConcept
-
- All Implemented Interfaces:
java.lang.Cloneable
,InequalityTerm
,Changeable
,Debuggable
,DebugListener
,Derivable
,Flowable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
- Direct Known Subclasses:
SIDerivedDimensionRepresentativeConcept
public class DerivedDimensionRepresentativeConcept extends DimensionRepresentativeConcept
A representative concept in the unitSystem ontology for a set of units for a specific physical dimension that is derived from other dimensions. For example, the Force dimension is derived from:
Force = Mass * Position / (Time ^ 2)
And its SI unit Newtons (N) is derived from:
N = kg * m / (s ^ 2)
Dimensions can be composed of other derived dimensions hierarchically. For example, the force dimension can also be derived as:
Velocity = Position / Time
Acceleration = Velocity / Time
Force = Mass * Acceleration- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Charles Shelton
- See Also:
DerivedUnitConcept
,BaseUnitConcept
- Pt.AcceptedRating:
- Red (cshelton)
- Pt.ProposedRating:
- Red (cshelton)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description Parameter
dimensionArray
An array of records that specifies the dimensions and exponents that comprise this dimension.-
Fields inherited from class ptolemy.data.ontologies.lattice.unit.DimensionRepresentativeConcept
_userDefinedUnitRecords, unitInfoRecords
-
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 DerivedDimensionRepresentativeConcept(CompositeEntity ontology, java.lang.String name)
Create a new DerivedUnitRepresentativeConcept with the specified name and ontology.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DerivedUnitConcept
_createInfiniteConceptInstance(java.lang.String infiniteConceptString)
Return a BaseUnitConcept instance from the given concept string representation.static java.util.Map<BaseDimensionRepresentativeConcept,java.lang.Integer>
deriveComponentBaseDimensionsMap(java.util.Map<DimensionRepresentativeConcept,java.lang.Integer> dimensionMap)
Derive a map of base dimensions to exponents that represents the given dimension map.java.util.List<DerivedUnitConcept>
getAllUnits()
Return a list of all the possible units contained in this derived dimension.java.util.Map<BaseDimensionRepresentativeConcept,java.lang.Integer>
getComponentBaseDimensions()
Return the component base dimensions map for this derived unit dimension.java.util.Map<DimensionRepresentativeConcept,java.lang.Integer>
getComponentDimensions()
Return the component dimensions map for this derived unit dimension.java.lang.String
getReferenceNameByDimensionName(java.lang.String dimensionName)
Return the reference name used by the unit specifications in this concept for the given dimension name.-
Methods inherited from class ptolemy.data.ontologies.lattice.unit.DimensionRepresentativeConcept
_findUnitRecordByName, attributeChanged
-
Methods inherited from class ptolemy.data.ontologies.FlatTokenRepresentativeConcept
_instantiateFlatTokenInfiniteConcept, 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
-
dimensionArray
public Parameter dimensionArray
An array of records that specifies the dimensions and exponents that comprise this dimension.
-
-
Constructor Detail
-
DerivedDimensionRepresentativeConcept
public DerivedDimensionRepresentativeConcept(CompositeEntity ontology, java.lang.String name) throws NameDuplicationException, IllegalActionException
Create a new DerivedUnitRepresentativeConcept 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
-
getComponentBaseDimensions
public java.util.Map<BaseDimensionRepresentativeConcept,java.lang.Integer> getComponentBaseDimensions() throws IllegalActionException
Return the component base dimensions map for this derived unit dimension.- Returns:
- The map of component base dimensions and their exponents for this derived dimension.
- Throws:
IllegalActionException
- Thrown if there is a problem getting the component base dimensions map.
-
getComponentDimensions
public java.util.Map<DimensionRepresentativeConcept,java.lang.Integer> getComponentDimensions() throws IllegalActionException
Return the component dimensions map for this derived unit dimension.- Returns:
- The map of component dimensions and their exponents for this derived dimension.
- Throws:
IllegalActionException
- Thrown if there is a problem getting the component dimensions map.
-
deriveComponentBaseDimensionsMap
public static java.util.Map<BaseDimensionRepresentativeConcept,java.lang.Integer> deriveComponentBaseDimensionsMap(java.util.Map<DimensionRepresentativeConcept,java.lang.Integer> dimensionMap) throws IllegalActionException
Derive a map of base dimensions to exponents that represents the given dimension map.- Parameters:
dimensionMap
- The map of dimensions to exponents from which base dimension map will be derived- Returns:
- The map of base dimensions to exponents that composes the given dimension map.
- Throws:
IllegalActionException
- Thrown if an invalid dimension concept is found.
-
getAllUnits
public java.util.List<DerivedUnitConcept> getAllUnits() throws IllegalActionException
Return a list of all the possible units contained in this derived dimension.- Overrides:
getAllUnits
in classDimensionRepresentativeConcept
- Returns:
- The list of all DerivedUnitConcepts that have this DerivedDimensionRepresentativeConcept as a representative.
- Throws:
IllegalActionException
- Thrown if there is a problem getting any unit concepts from the ontology.
-
getReferenceNameByDimensionName
public java.lang.String getReferenceNameByDimensionName(java.lang.String dimensionName)
Return the reference name used by the unit specifications in this concept for the given dimension name. The reference name allows us to specify derived dimension representative concepts in MoML that may depend on other dimension concepts without have to specify those dependencies until after the ontology model is created.- Parameters:
dimensionName
- The name of the dimension being referenced.- Returns:
- The reference name used in the unit specifications to refer to the given dimension.
-
_createInfiniteConceptInstance
protected DerivedUnitConcept _createInfiniteConceptInstance(java.lang.String infiniteConceptString) throws IllegalActionException
Return a BaseUnitConcept instance from the given concept string representation. The string must represent one of the units specified for this physical dimension.- Specified by:
_createInfiniteConceptInstance
in classDimensionRepresentativeConcept
- Parameters:
infiniteConceptString
- The string that represents the unit concept to be returned.- Returns:
- The BaseUnitConcept represented by the given string.
- Throws:
IllegalActionException
- Thrown if there is a problem creating the unit concept.
-
-