When creating new unit categories, the metamodel must define the Base SI unit for conversion and have com.engineous.system.unit.UnitCategory as its supername. To define the base unit, define a string parameter whose value is the classpath of the base unit. All unit categories must ultimately make use of a “UnitCategory” class (most likely “StandardUnitCategory”) as its Runtime class. Example Unit Category
<MetaModel name="com.engineous.unit.Length" version="2.0.0"
supername="com.engineous.system.unit.UnitCategory" superversion="2.*.*">
<Requires>
<SystemRelease>2017</SystemRelease>
</Requires>
<DisplayName>Length</DisplayName>
<Description>The distance between two points</Description>
<Runtime
type="com.engineous.sdk.vars.Unit">com.engineous.sdk.unit.St
andardUnitCategory</Runtime>
<Variables>
<Variable name="base" tag="base" role="property"
mode="local" structure="scalar"
type="com.engineous.datatype.String">
<Value>com.engineous.unit.length.metric.Meter</Value>
</Variable>
</Variables>
</MetaModel>
|