Template:— assigning_language_code (asg_lang_code)
Context:— FMV
Date: 2008/02/05 12:07:42
Revision: 1.3

This section specifies the template assigning_language_code.

NOTE  The template has been defined in the context of FMV. 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 the assignment of a language code to an entity attribute.

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


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

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

Figure 2 —  The graphical representation of the assigning_language_code template

Input parameters
The following input parameters are defined for this template:
lang (Type='CLASS')
The name of the External_class used to identify the language.
The following classes and their sub-classes can be used:
classifications: "Language" (urn:plcs:rdl:std:Language)
lang_ecl_id (Default=urn:plcs:rdl:std,Type='URN')
The id of the External_class_library storing the @lang class
attr (Type='STRING')
The name of the attribute to which the language code applies.
considered_instance (Type= 'SELECT (string_select)' )
The entity to which the language indication is assigned.
Reference parameters
The following reference parameters are defined for this template:
lang(Type='ENTITY (Language)')
Allow the Language entity instantiated in this path to be referenced when this template is used.
Note: The Language entity can be referenced in a template path by:
%^target = $assigning_language_code.lang%
where target is the parameter to which the Language is bound.
lang_ind(Type='ENTITY (Language_indication)')
Allow the Language_indication entity instantiated in this path to be referenced when this template is used.
Note: The Language_indication entity can be referenced in a template path by:
%^target = $assigning_language_code.lang_ind%
where target is the parameter to which the Language_indication is bound.
Uniqueness constraints

The following parameter combinations specify a uniqueness constraint:
Unique constraint: Unique language
Each instance of the entity (Language) within the data set shall be uniquely identified by a combination of the following parameters on this template (assigning_language_code) namely: lang, lang_ecl_id.
The instance is referenced by the following template parameter: lang.
This rule means that there can be only one instance of a language code within a data set (Language ).
Unique constraint: Unique language indication
Each instance of the entity (Language_indication) within the data set shall be uniquely identified by a combination of the following parameters on this template (assigning_language_code) namely: lang, lang_ecl_id, attr, considered_instance.
The instance is referenced by the following template parameter: lang_ind.
This rule means that there can be only one instance of a language code being assigned to the same attribute of an entity instance within a data set (Language_indication ).
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.
Language

-- Mark the Language entity as
-- referable when this template is used by binding it to the reference
-- parameter lang
%^lang = Language%
Language.language_code = '/IGNORE'
Language.country_code = '/IGNORE'

-- provide the language code of by classifying the Language entiity
/assigning_reference_data(
    items=^lang,
    class_name=@lang,
    ecl_id=@lang_ecl_id)/
Language_indication

-- Mark the Language_indication entity as
-- referable when this template is used by binding it to the reference
-- parameter lang_ind
%^lang_ind = Language_indication%
Language_indication.used_language -> ^lang
Language_indication.considered_instance -> @considered_instance
Language_indication.considered_attribute = @attr
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Language.language_code '/IGNORE'
Language.country_code '/IGNORE'
Language_indication.considered_attribute @attr
Instance diagrams
The instance diagram in Figure  3 shows an example of the EXPRESS entities and templates that are instantiated by the template:
/assigning_language_code(lang='en', lang_ecl_id='urn:plcs:rdl:std', attr='identifier', considered_instance='#1')/
(an illustration of the consolidated assigning_language_code template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by assigning_language_code template

Figure 3 —  Entities instantiated by assigning_language_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:
/assigning_language_code(lang='en', lang_ecl_id='urn:plcs:rdl:std', attr='identifier', considered_instance='#1')/


Figure 4 —  Instantiation of assigning_language_code template

Figure 4 —  Instantiation of assigning_language_code template

Characterizations
No common characterizations of the template assigning_language_code have been identified. However, the ISO 10303-239 EXPRESS model may enable other assignments to the entities instantiated by the template.

© OASIS 2010 — All rights reserved