Class DimensionRepresentativeConcept

    • Field Detail

      • unitInfoRecords

        public Parameter unitInfoRecords
        The array of information records for the units for this dimension.
      • _userDefinedUnitRecords

        protected RecordToken[] _userDefinedUnitRecords
        The array of record tokens specified by the user in the unitInfoRecords parameter.
    • Constructor Detail

      • DimensionRepresentativeConcept

        public DimensionRepresentativeConcept​(CompositeEntity ontology,
                                              java.lang.String name)
                                       throws NameDuplicationException,
                                              IllegalActionException
        Create a new DimensionRepresentativeConcept 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 the unitInfoRecords parameter. Update the array of user defined unit specification record tokens based on the value of the unitInfoRecords parameter.
        Overrides:
        attributeChanged in class NamedObj
        Parameters:
        attribute - The attribute that has changed.
        Throws:
        IllegalActionException - Thrown if there is a problem getting the token from the unitInfoRecords parameter.
      • getAllUnits

        public java.util.List<? extends UnitConcept> getAllUnits()
                                                          throws IllegalActionException
        Return a list of all the possible units contained in this dimension representative concept.
        Returns:
        The list of all UnitConcepts that have this DimensionRepresentativeConcept as a representative.
        Throws:
        IllegalActionException - Thrown if there is a problem getting any unit concepts from the ontology.
      • _createInfiniteConceptInstance

        protected abstract UnitConcept _createInfiniteConceptInstance​(java.lang.String infiniteConceptString)
                                                               throws IllegalActionException
        Return a UnitConcept instance from the given concept string representation. The string must represent one of the units specified for this physical dimension.
        Overrides:
        _createInfiniteConceptInstance in class FlatTokenRepresentativeConcept
        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.
      • _findUnitRecordByName

        protected RecordToken _findUnitRecordByName​(java.lang.String unitName)
                                             throws IllegalActionException
        Return the unit info record token with the given Name field. First look in the array of user defined record tokens, and if it is not found there then look in the list of pre-specified unit parameters.
        Parameters:
        unitName - The value of the Name field of the unit record token to be found.
        Returns:
        The unit info RecordToken with the given Name field.
        Throws:
        IllegalActionException - Thrown if the unit cannot be found, or if the unit specification parameter is invalid.