Template:— representing_code (rep_code)
Context:— NDLO
Date: 2008/02/21 16:26:54
Revision: 1.3

This section specifies the template representing_code.

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 code with its encoding system. An instance of identification_assignment should have an instance of document_assignment classified as "Encoding system" assigned to it. The encoding system is specified by either identification assignment description (template assigning_descriptor), referenced identification assignment (template assigning_referenced_document) or both.

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


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

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

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

Figure 2 —  The graphical representation of the representing_code template

Input parameters
The following input parameters are defined for this template:
id (Type='STRING')
The identifier being assigned. In this case the specifying the name of the code, e.g. Critical. If there is no value for the identifier the value should be set to "class_name"+"."+"class_class_name".
id_class_name (Type='CLASS')
The name of the class used to classify the identifier and so provide the role or reason for the identification. In this case the class should carry the same prefix than the class used to classify the value of the code, e.g. Safety_name.
The following classes and their sub-classes can be used:
classifications: "Identifier_type" (urn:plcs:rdl:std:Identifier_type)
id_ecl_id (Default=urn:plcs:rdl:std,Type='URN')
The id of the External_class_library storing the id_class_name class
class_name (Type='STRING')
The class_name represents the value of the code, e.g. "3".
class_class_name (Type='CLASS')
The name of the class used to classify the identifier and so provide the role or reason for the identification. In this case the class specifies the type of code, e.g. Safety_code.
The following classes and their sub-classes can be used:
classifications: "Identifier_type" (urn:plcs:rdl:std:Identifier_type)
class_ecl_id (Default=urn:plcs:rdl:std,Type='URN')
The id of the External_class_library storing the id_class_name class
items (Type= 'SELECT (identification_item)' )
The items to which the identification is assigned
Reference parameters
The following reference parameters are defined for this template:
id_assgn(Type='ENTITY (Identification_assignment)')
Allow the Identification_assignment entity instantiated in this path to be referenced when this template is used.
Note: The Identification_assignment entity can be referenced in a template path by:
%^target = $representing_code.id_assgn%
where target is the parameter to which the Identification_assignment is bound.
class(Type='ENTITY (Class)')
Allow the Class entity instantiated in this path to be referenced when this template is used.
Note: The Class entity can be referenced in a template path by:
%^target = $representing_code.class%
where target is the parameter to which the Class is bound.
class_asg(Type='ENTITY (Classification_assignment)')
Allow the Classification_assignment entity instantiated in this path to be referenced when this template is used.
Note: The Classification_assignment entity can be referenced in a template path by:
%^target = $representing_code.class_asg%
where target is the parameter to which the Classification_assignment 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.
Identification_assignment

-- Mark the Identification_assignment entity as
-- referable when this template is used by binding it to the reference
-- parameter id_assgn
%^id_assgn = Identification_assignment%
Identification_assignment.identifier = @id
Identification_assignment.role = '/IGNORE'
Identification_assignment.description = '/NULL'
Identification_assignment.items -> @items

-- provide the role of the identification by classifying the Identification_assignment
/assigning_reference_data(
    items=^id_assgn,
    class_name=@id_class_name,
    ecl_id=@id_ecl_id)/
Class

-- Mark the Class entity as referable when this template is used.
%^class = Class%
^class.id = '/IGNORE'
^class.name = @class_name
^class.description = '/IGNORE'

-- provide the description of the identification by classifying the class
/assigning_reference_data(
    items=^class,
    class_name=@class_class_name,
    ecl_id=@class_ecl_id)/
Classification_assignment

-- Mark the Classification_assignment entity as referable when this template is used.
-- In other words, bind the Document_assignment instance to the reference
-- parameter doc_asg
%^class_asg = Classification_assignment%
^class_asg.role = '/IGNORE'
^class_asg.items -> ^id_assgn

-- Assign the identification_assignment to class entity it is used for
^class_asg.assigned_document -> ^class
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Identification_assignment.identifier @id
Identification_assignment.role '/IGNORE'
Identification_assignment.description '/NULL'
Class.id '/IGNORE'
Class.name @class_name
Class.description '/IGNORE'
Classification_assignment.role '/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_code(items='#1', class_name='....', ecl_id='urn:plcs:rdl:std')/
(an illustration of the consolidated representing_code template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by representing_code template

Figure 3 —  Entities instantiated by representing_code 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_code(items='#1', class_name='....', ecl_id='urn:plcs:rdl:std')/


Figure 4 —  Instantiation of representing_code template

Figure 4 —  Instantiation of representing_code template

Characterizations
The following section details how the representing_code 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 Identification description or document reference

NOTE   this characterization is optional.

The identification assignment Identification_assignment has to have one of the optional templates assigned. Either assigning_descriptor or assigning_referenced_document
[warning:]Error T1: DEX assigning_referenced_document not in Dexlib
. The parameters for both templates are listed as part of the list of input parameters and have to be chosen respectively.

© OASIS 2010 — All rights reserved