Template:— assigning_code (asg_code) Date: 2009/06/10 09:53:39
Revision: 1.20

This section specifies the template assigning_code.

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

Description

This template describes the assignment of codes for classification to entity instances within a data set, where the class being used is not defined in a Reference Data Library, i.e. the class can not be referenced using the External_class_library entity. This is e.g. often the case for codes being used in legacy applications.

NOTE    The templates assigning_code and assigning_reference_data can be used interchangeably, i.e. wherever the template assigning_reference_data is being used the assigning_code template can be used instead, and vice versa. The usage of the respective template is dependent upon whether the class being used is defined as Reference Data or not.

NOTE    For DEXlib edition 1, the identification of the class (i.e. the identification of the code) is done using the Class.name attribute. The Class entity instance is then classified as being a member of a classification system using the assigning_reference_data template. This will be superseded in DEXlib edition 2, where the Class.name will be set to '/IGNORE' and the identification instead will be provided using the assigning_identification_with_no_organization template. The assigning_identification_with_no_organization template includes both the identification of the class (i.e. the code) and its classification.

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


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

Figure 1 —  An EXPRESS-G representation of the Information model for assigning_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 assigning_code template

Figure 2 —  The graphical representation of the assigning_code template

Input parameters
The following input parameters are defined for this template:
class_name (Type='STRING')
The text representing the code.
code_class_name (Type='CLASS')
The name of the class in the reference data library (External_class) being used to determine type of code.
The following classes and their sub-classes can be used:
classifications: "PLCS-ARM-LF-THING" (urn:plcs:rdl:std:PLCS-ARM-LF-THING)
code_ecl_id (Default=urn:plcs:rdl:std,Type='URN')
The id of the External_class_library that stores the External_class given in @code_class_name.
items (Type= 'SELECT (classification_item)' )
The items to which the Class is assigned.
Reference parameters
The following reference parameters are defined for this template:
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 = $assigning_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 = $assigning_code.class_asg%
where target is the parameter to which the Classification_assignment is bound.
ext_class(Type='ENTITY (External_class)')
Allow the External_class entity instantiated in this path to be referenced when this template is used.
Note: The External_class entity can be referenced in a template path by:
%^target = $assigning_code.ext_class%
where target is the parameter to which the External_class is bound.
ext_class_lib(Type='ENTITY (External_class_library)')
Allow the External_class_library entity instantiated in this path to be referenced when this template is used.
Note: The External_class_library entity can be referenced in a template path by:
%^target = $assigning_code.ext_class_lib%
where target is the parameter to which the External_class_library 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.
-- Create the class entity.
Class.id = '/IGNORE'
Class.description = '/IGNORE'
Class.name = @class_name

-- Mark the Class entity as referable when this template is used.
-- In other words, bind the Class instance to the reference
-- parameter class
%^class = Class%

-- Assign the External_class in the reference data library
-- being used to determine type of code
/assigning_reference_data(
    items=^class,
    class_name=@code_class_name,
    ecl_id=@code_ecl_id)/

-- Mark the External_class entity instantiated by the template
-- assigning_reference_data as referable when this template is used.
-- In other words, bind the External_class instance to the reference
-- parameter ext_class
%^ext_class = $assigning_reference_data.ext_class%

-- Mark the External_class_library entity instantiated by the template
-- assigning_reference_data as referable when this template is used.
-- In other words, bind the External_class_library instance to the reference
-- parameter ext_class_lib
%^ext_class_lib = $assigning_reference_data.ext_class_lib%

-- Create the Classification_assignment entity
Classification_assignment
Classification_assignment.role = '/IGNORE'
Classification_assignment.items -> @items
Classification_assignment.assigned_class -> Class

-- Mark the Classification_assignment entity as referable when this template is used.
-- In other words, bind the Classification_assignment instance to the reference
-- parameter class_asg
%^class_asg = Classification_assignment%
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Class.id '/IGNORE'
Class.description '/IGNORE'
Class.name @class_name
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:
/assigning_code(items='#1', class_name='A', code_class_name='Mission_criticallity_code', code_ecl_id='urn:plcs:rdl:sample')/
(an illustration of the consolidated assigning_code template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by assigning_code template

Figure 3 —  Entities instantiated by assigning_code template

The instance model in STEP ASCII exchange file format (ISO 10303 Part 21 syntax) is:
#1 = ACTIVITY('/IGNORE','/IGNORE','/IGNORE',$); #2 = CLASS('/IGNORE','A','/IGNORE'); #3 = CLASSIFICATION_ASSIGNMENT(#2,(#1),'/IGNORE'); #5 = CLASSIFICATION_ASSIGNMENT(#7,(#2),'/IGNORE'); #7 = EXTERNAL_CLASS('/NULL','Mission_criticallity_code','/IGNORE',#8); #8 = EXTERNAL_CLASS_LIBRARY('urn:plcs:rdl:sample',$);
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:
/assigning_code(items='#1', class_name='A', code_class_name='Mission_criticallity_code', code_ecl_id='urn:plcs:rdl:sample')/


Figure 4 —  Invocation of assigning_code template example - graphical presentations

Figure 4 —  Invocation of assigning_code template example - graphical presentations

Characterizations
The following section details how the assigning_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 Assigning description

NOTE   this characterization is optional.

Descriptions can be assigned to the Class using the assigning_descriptor template, e.g. in order to provide a description for the exchanged code.

AP239 Issue (GYL-3)
The ISO-10303-239 1st edition does not support the assignment of a Document to a Class.

This has been raised as issue, GYL-3, against ISO 10303-239. The EXPRESS schema has been modified in DEXlib (Long form: dexlib/data/schemas/ap239_arm_lf.exp, short form: dexlib/data/schemas/ap239_arm_sf.exp). These changes will be made to ISO 10303-239 as a Technical Corrigendum at some stage.

Characterization Assigning document reference

NOTE   this characterization is optional.

Document references can be assigned to the Class using the assigning_document_reference template, e.g. in order to provide a reference to a document containing the description for the exchanged code, or a description of the entire encoding system.

AP239 Issue (GYL-3)
The ISO-10303-239 1st edition does not support the assignment of a Document to a Class.

This has been raised as issue, GYL-3, against ISO 10303-239. The EXPRESS schema has been modified in DEXlib (Long form: dexlib/data/schemas/ap239_arm_lf.exp, short form: dexlib/data/schemas/ap239_arm_sf.exp). These changes will be made to ISO 10303-239 as a Technical Corrigendum at some stage.

Characterization Assigning identification

NOTE   this characterization is optional.

Identifications can be assigned to the Class using the assigning_identification template, e.g. in order to provide a name for the exchanged code.

AP239 Issue (GYL-4)
The ISO-10303-239 1st edition does not support the assignment of a Identification_assignment to a Class.

This has been raised as issue, GYL-4, against ISO 10303-239. The EXPRESS schema has been modified in DEXlib (Long form: dexlib/data/schemas/ap239_arm_lf.exp, short form: dexlib/data/schemas/ap239_arm_sf.exp). These changes will be made to ISO 10303-239 as a Technical Corrigendum at some stage.



Figure 5 —  Example of optional characterizations of entities within the assigning_code template.

Figure 5 —  Example of optional characterizations of entities within the assigning_code template.

© OASIS 2010 — All rights reserved