Template:— representing_quantity (rep_quantity) Date: 2008/01/14 22:45:59
Revision: 1.26

This section specifies the template representing_quantity.

NOTE  An explanation of a template and the associated instantiation path is provided in the Template overview section.

Description

This template describes how to represent a quantity.

EXAMPLE    50 litres of petrol.

Model diagrams
The EXPRESS-G diagram in Figure 1 shows the templates and EXPRESS entities that are required to represent the template "representing_quantity". The text highlighted in blue shows the template parameters.


Figure 1 —  An EXPRESS-G representation of the Information model for representing_quantity

Figure 1 —  An EXPRESS-G representation of the Information model for representing_quantity

The graphic for the template to be used in other EXPRESS-G diagrams is shown in Figure  2 below.


Figure 2 —  
                     The graphical representation of representing_quantity template

Figure 2 —   The graphical representation of representing_quantity template

Input parameters
The following input parameters are defined for this template:
value (Type= 'TYPE (any_number_value)' )
The value of the property. The datatype is always 'any_number_value' and should not be registered together with the value, i.e. enter the value as a number, without datatype.
unit_class_name (Type='CLASS')
The class name of the corresponding to the quantity unit.
The following classes and their sub-classes can be used:
classifications: "Unit" (urn:plcs:rdl:std:Unit)
unit_ecl_id (Default=urn:plcs:rdl:std,Type='URN')
The identifier of the External_class_library storing the definition of the class referenced by the parameter @class_name.
si_unit (Default=false,Type='BOOLEAN')
Value should be set to true if the unit is a SI base unit defined by ISO, i.e. kilogram (kg) for Mass, second (s) for Time, metre (m) for Displacement, ampere (A) for Electrical current, kelvin (K) for Temperature, mole (mol) for Amount of substance, and candela (cd) for Luminous intensity. If this is not the case it should be set to false.
Note that the representation of true and false depends on exchange format. In Part 21 (a STEP file) true is represented by the string ".T.", and false by ".F.", while in Part 28 (XML) they are represented by text strings "true" and "false".
Reference parameters
The following reference parameters are defined for this template:
quantity(Type='ENTITY (Value_with_unit)')
Allow the Value_with_unit entity instantiated in this path to be referenced when this template is used.
Note: The Value_with_unit entity can be referenced in a template path by:
%^target = $representing_quantity.quantity%
where target is the parameter to which the Value_with_unit is bound.
unit(Type='ENTITY (Unit)')
Allow the Unit entity instantiated in this path to be referenced when this template is used.
Note: The Unit entity can be referenced in a template path by:
%^target = $representing_quantity.unit%
where target is the parameter to which the Unit is bound.
Uniqueness constraints

The following parameter combinations specify a uniqueness constraint:
Unique constraint: Unique unit
There shall be at most one instance of the entity (Unit) within the data set uniquely identified by a combination of the following parameters on this template (representing_quantity) namely: unit_class_name, unit_ecl_id.
The instance is referenced by the following template parameter: unit.
Instantiation path
The instantiation path shown below specifies the entities that are to be instantiated by the template.
A description of templates and the syntax for the instantiation path is provided in the Reading Capability Templates help section.
-- Instantiate Value_with_unit entity
Value_with_unit

-- Set the Value_with_unit attributes
Value_with_unit.value_component -> @value

-- Bind the Value_with_unit to the parameter ^quantity.
-- The parameter is a reference parameter so the Value_with_unit
-- entity can be referred to when this template is used.
%^quantity = Value_with_unit%

-- Bind the Unitt to the parameter ^unit.
-- The parameter is a reference parameter so the Uunit
-- entity can be referred to when this template is used.
%^unit = Unit%

-- Instantiate entity Unit and point at it
Value_with_unit.unit -> Unit

-- Set the Unit attributes
Unit.si_unit -> @si_unit
Unit.name = '/IGNORE'

-- Assign reference data for name of Unit
/assigning_reference_data(
    items=Unit,
    class_name=@unit_class_name,
    ecl_id=@unit_ecl_id)/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Unit.name '/IGNORE'
Instance diagrams
The instance diagram in Figure  3 shows an example of the EXPRESS entities and templates that are instantiated by the template:
/representing_quantity(value='ANY_NUMBER_VALUE(5)', si_unit='false', unit_class_name='Gallon', unit_ecl_id='urn:plcs:rdl:sample')/
(an illustration of the consolidated representing_quantity template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by representing_quantity template

Figure 3 —  Entities instantiated by representing_quantity template

The instance diagram in Figure 4 shows the graphic symbol for the template that is to be used in other instance diagrams. The example template is:
/representing_quantity(value='ANY_NUMBER_VALUE(5)', si_unit='false', unit_class_name='Gallon', unit_ecl_id='urn:plcs:rdl:sample')/


Figure 4 —  Instantiation of representing_quantity template

Figure 4 —  Instantiation of representing_quantity template

Characterizations
No common characterizations of the template representing_quantity have been identified. However, the ISO 10303-239 EXPRESS model may enable other assignments to the entities instantiated by the template.

© OASIS 2008 — All rights reserved