Template:— representing_value_with_unit_explicit (val_unit_exp)
Context:— NDLO
Date: 2007/09/28 12:44:03
Revision: 1.2

This section specifies the template representing_value_with_unit_explicit.

NOTE  The template has been defined in the context of NDLO. Refer to the business context for details of related templates.

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 unit by using the appropriate subentities and representing the code.

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


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

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

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 the representing_value_with_unit_explicit template

Figure 2 —  The graphical representation of the representing_value_with_unit_explicit template

Input parameters
The following input parameters are defined for this template:
value (Type= 'SELECT (measure_value)' )
The value of the property.
unit_type (Type= 'ENTITY (
[warning:]Error ER1: The entity SUBTYPE OF(unit) does not exist
SUBTYPE OF(unit))'
[warning:]Error EXP-1: The EXPRESS entity SUBTYPE OF(unit)
does not exist in data/schemas/ap239_arm_lf.xml.

)
The value of the parameter is an entity name consisting of one of the subtypes of 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 11 (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".
unit_code (Type='STRING')
The class name of the code of the unit. The code can be metre, hours, count.
unit_code_type (Type='CLASS')
The type of 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_code]
[warning:]Error RDL1: The class Unit_code does not exist in RDL at urn urn:plcs:rdl:std. Check the dexlib/data/refdata/rdl_index.xml
"Length_unit" (urn:plcs:rdl:std:Length_unit), [Weight_unit]
[warning:]Error RDL1: The class Weight_unit does not exist in RDL at urn urn:plcs:rdl:std. Check the dexlib/data/refdata/rdl_index.xml
[Currency_code]
[warning:]Error RDL1: The class Currency_code does not exist in RDL at urn urn:plcs:rdl:std. Check the dexlib/data/refdata/rdl_index.xml
unit_code_type_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_code_type.
unit_name (Type='STRING')
The class name of the description related to the unit_code.
unit_descr (Type='CLASS')
The class name providing a description of the identification, defined in external reference data.
The following classes and their sub-classes can be used:
classifications: [Unit_description]
[warning:]Error RDL1: The class Unit_description does not exist in RDL at urn urn:plcs:rdl:std. Check the dexlib/data/refdata/rdl_index.xml
unit_descr_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_descr.
Reference parameters
The following reference parameters are defined for this template:
value(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_value_with_unit_explicit.value%
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_value_with_unit_explicit.unit%
where target is the parameter to which the Unit is bound.
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 Templates Help/Information section.
Value_with_unit
%^value = Value_with_unit%

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

-- Instantiate Unit and assign
-- Value_with_unit to it
^value.unit -> Unit
Unit
%^unit = Unit%

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

-- Define representing_code
/representing_code(
    items=Unit,
    id=@unit_code,
    id_class_name=@unit_code_type,
    id_ecl_id=@unit_code_type_ecl_id,
    class_name=@unit_name,
    class_class_name=@unit_descr,
    class_ecl_id=@unit_descr_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_value_with_unit_explicit(value='', unit_type='', si_unit='', unit_code='', unit_code_type='', unit_code_type_ecl_id='', unit_name='', unit_descr='', unit_descr_ecl_id='')/
(an illustration of the consolidated representing_value_with_unit_explicit template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by representing_value_with_unit_explicit template

Figure 3 —  Entities instantiated by representing_value_with_unit_explicit 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_value_with_unit_explicit(value='', unit_type='', si_unit='', unit_code='', unit_code_type='', unit_code_type_ecl_id='', unit_name='', unit_descr='', unit_descr_ecl_id='')/


Figure 4 —  Instantiation of representing_value_with_unit_explicit template

Figure 4 —  Instantiation of representing_value_with_unit_explicit template

Characterizations
The following section details how the representing_value_with_unit_explicit template can be optionally characterized by assigning other constructs to it. These are characterizations commonly applied to the template. The ISO 10303-239 EXPRESS model may enable other assignments to the entities instantiated by the template.
The following characterizations may apply:
Characterization Representing_code

NOTE   this characterization is mandatory.

The template representing_code is mandatory as part of this template but in addition to the parameters represented as mandatory the template requires further parameters which can be either an identification assignment description or a referenced identification assignment.

Characterization Assigning classifications

NOTE   this characterization is optional.

The entitiy value_with_unit could be further classified.

The type of value can be further defined by using the template assigning_reference_data to assign a class to Value_with_unit. A possible classification value could be [Contractor_recommended_value]
[warning:]Error RDL1: The class Contractor_recommended_value does not exist in RDL at URI urn:plcs:rdl:std. Check the dexlib/data/refdata/rdl_index.xml
.

© OASIS 2010 — All rights reserved