Template:— representing_numerical_item (rep_num_item) Date: 2008/03/10 08:13:07
Revision: 1.22

This section specifies the template representing_numerical_item.

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 numerical item with unit. A numerical item is referenced from a (subtype of) Representation, as is the case for properties.

EXAMPLE    The value and unit of a product property, e.g. "3.1 kg" for a weight property.

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


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

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

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_numerical_item template

Figure 2 —   The graphical representation of representing_numerical_item 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 (Type='CLASS')
The class name of the unit in which the value is expressed, defined in external reference data.
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 @unit.
si_unit (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:
item(Type='ENTITY (Numerical_item_with_unit)')
Allow the Numerical_item_with_unit entity instantiated in this path to be referenced when this template is used.
Note: The Numerical_item_with_unit entity can be referenced in a template path by:
%^target = $representing_numerical_item.item%
where target is the parameter to which the Numerical_item_with_unit is bound.
unit_entity(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_numerical_item.unit_entity%
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_numerical_item) namely: unit, unit_ecl_id.
The instance is referenced by the following template parameter: unit_entity.
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 Numerical_item_with_unit
-- and associate it with reference param ^item
Numerical_item_with_unit
%^item = Numerical_item_with_unit%

-- Set the Numerical_item_with_unit attribute name to be ignored
Numerical_item_with_unit.name = '/IGNORE'

-- Set the Numerical_item_with_unit attribute value_component to the
-- value of the input parameter value
Numerical_item_with_unit.value_component -> @value

-- Instantiate Unit and Bind the Unit to the parameter ^unit_entity.
-- The parameter is a reference parameter so the Unit
-- entity can be referred to when this template is used.
%^unit_entity = Unit%

-- Instantiate assign Numerical_item_with_unit to unit
Numerical_item_with_unit.unit -> ^unit_entity

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

-- Assign reference data for name of Unit
/assigning_reference_data(
    items=Unit,
    class_name=@unit,
    ecl_id=@unit_ecl_id)/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Numerical_item_with_unit.name '/IGNORE' Representation_item.name
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_numerical_item(value='any_number_value(3.1)', si_unit='T', unit='Kilogram', unit_ecl_id='urn:plcs:rdl:std')/
(an illustration of the consolidated representing_numerical_item template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by representing_numerical_item template

Figure 3 —  Entities instantiated by representing_numerical_item 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_numerical_item(value='any_number_value(3.1)', si_unit='T', unit='Kilogram', unit_ecl_id='urn:plcs:rdl:std')/


Figure 4 —  Instantiation of template

Figure 4 —  Instantiation of template

Characterizations
No common characterizations of the template representing_numerical_item 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