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.
This template describes how to represent a quantity.
EXAMPLE
50 litres of petrol.
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
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
The following input parameters are defined for this template:
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.
The class name of the corresponding to the quantity unit.
The following classes and their sub-classes can be used:
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".
The following reference parameters are defined for this template:
Allow the
Value_with_unit
entity instantiated in this path to be referenced when this template is used.
%^target = $representing_quantity.quantity%
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.
The following parameter combinations specify a uniqueness constraint:
Unique constraint: Unique unit
Each instance of the
entity
(
Unit)
within the data set shall be 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.
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.
-- 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_unitUnit.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' |
—
|
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
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
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.