Class DerivedUnitConcept

    • Method Detail

      • createDerivedUnitConcept

        public static DerivedUnitConcept createDerivedUnitConcept​(Ontology ontology,
                                                                  DerivedDimensionRepresentativeConcept representative,
                                                                  RecordToken unitInfo)
                                                           throws IllegalActionException
        Create a new derived unit concept, belonging to the given ontology, with an automatically generated name.
        Parameters:
        ontology - The ontology to which this concept belongs.
        representative - The finite concept that represents where the infinite token concepts belong in the ontology lattice.
        unitInfo - The token value for this FlatTokenInfiniteConcept.
        Returns:
        The newly created RecordConcept.
        Throws:
        IllegalActionException - If the base class throws it.
      • findUnitByComponentMapsAndUnitFactor

        public static Concept findUnitByComponentMapsAndUnitFactor​(java.util.Map<DimensionRepresentativeConcept,​java.lang.Integer> dimensionMap,
                                                                   java.util.Map<DimensionRepresentativeConcept,​java.util.List<UnitConcept>> componentUnitsMap,
                                                                   ScalarToken newUnitFactor,
                                                                   Ontology unitOntology)
                                                            throws IllegalActionException
        Find the DerivedUnitConcept that contains the given dimension and component unit maps and the given unit conversion factor, or null if the unit doesn't exist in the ontology.
        Parameters:
        dimensionMap - The map of component dimensions to their exponents for this unit dimension.
        componentUnitsMap - The map that links the component dimensions to a list component units for that dimension.
        newUnitFactor - The unit factor for the UnitConcept to be found.
        unitOntology - The ontology for the unit dimensions.
        Returns:
        The DerivedUnitConcept that contains the dimension and component maps, or the top of the lattice if no matching unit is found.
        Throws:
        IllegalActionException - Thrown if there is a problem getting the unit dimension.
      • getComponentBaseUnits

        public java.util.Map<BaseDimensionRepresentativeConcept,​java.util.List<BaseUnitConcept>> getComponentBaseUnits()
        Get the base component units map for this DerivedUnitConcept. This map links the base component dimensions with the list of base units for each dimension.
        Returns:
        The component units map.
      • getComponentUnits

        public java.util.Map<DimensionRepresentativeConcept,​java.util.List<UnitConcept>> getComponentUnits()
        Get the component units map for this DerivedUnitConcept. This map links the component dimensions with the list of units for each dimension.
        Returns:
        The component units map.