Application module: Multi linguism | ISO/TS 10303-1105:2019(E) © ISO |
This clause specifies the EXPRESS schema derived from the mapping table. It uses elements from the common resources or from other application modules and defines the EXPRESS constructs that are specific to this part of ISO 10303.
This clause constitutes the Module Interpreted Module (MIM) of the application module.
This clause also specifies the modifications that apply to the constructs imported from the common resources.
The following restrictions apply to the use, in this schema, of constructs defined in common resources or in application modules:
Short names of entities defined in this schema are described in Annex A. Unambiguous identification of this schema is defined in Annex B.
EXPRESS specification:
*)
SCHEMA Multi_linguism_mim;
USE FROM
management_resources_schema
--
ISO 10303-41
(attribute_classification_assignment,
attribute_value_assignment);
USE FROM
language_schema
--
ISO 10303-41
(language);
(*
NOTE 1 The schemas referenced above are specified in the following part of ISO 10303:
management_resources_schema ISO 10303-41 language_schema ISO 10303-41
NOTE 2 See Annex D, Figures D.1and D.2 for a graphical representation of this schema.
This subclause specifies the MIM types for this application module. The MIM types and definitions are specified below.
The attribute_language_item type is an extensible list of alternate data types that allows for the designation of the data types multi_language_attribute_assignment and attribute_value_assignment.
NOTE The list of entity data types may be extended in application modules that use the constructs of this module.
EXPRESS specification:
*)
TYPE
attribute_language_item =
EXTENSIBLE
GENERIC_ENTITY
SELECT
(multi_language_attribute_assignment,
attribute_value_assignment);
END_TYPE;
(*
The multi_language_attribute_item type is an extensible list of alternate data types. Additional alternate data types are specified in select data types that extend the multi_language_attribute_item type.
NOTE This empty extensible select requires extension in a further module to ensure that entities that refer to it have at least one valid instantiation.
EXPRESS specification:
*)
TYPE
multi_language_attribute_item =
EXTENSIBLE
GENERIC_ENTITY
SELECT;
END_TYPE;
(*
This subclause specifies the MIM entities for this module. The MIM entities and definitions are specified below.
The attribute value is further classified as either being specified in the original language or as a translation thereof.
EXPRESS specification:
*)
ENTITY attribute_language_assignment
SUBTYPE OF (attribute_classification_assignment);
SELF\attribute_classification_assignment.assigned_class : language;
items : SET[1:?] OF attribute_language_item;
WHERE
WR1: SELF\attribute_classification_assignment.role.name IN ['primary', 'translated'];
WR2: SELF\attribute_classification_assignment.attribute_name<> '';
END_ENTITY;
(*
Attribute definitions:
assigned_class: the language used to express the attribute of the items.
items: the instances that have a text string attribute expressed in the considered language.
Formal propositions:
WR1: For any of the items, the role of a translation of its attributes shall be 'primary' or 'translated'.
WR2: The attribute name shall not be an empty string.
EXPRESS specification:
*)
ENTITY multi_language_attribute_assignment
SUBTYPE OF (attribute_value_assignment);
items : SET[1:?] OF multi_language_attribute_item;
DERIVE
translation_language : language := language_indication[1]\attribute_classification_assignment.assigned_class;
INVERSE
language_indication : SET[1:1] OF attribute_language_assignment FOR items;
WHERE
WR1: (SELF\attribute_value_assignment.role.name = 'alternate language');
WR2: SIZEOF( QUERY( ala <* language_indication |
(ala\attribute_classification_assignment.attribute_name = 'attribute_value') AND
(ala\attribute_classification_assignment.role.name='translated') )) = 1;
WR3: SELF\attribute_value_assignment.attribute_name <> '';
WR4: SIZEOF(QUERY(ci <* items |
SIZEOF(QUERY(ata <* USEDIN(ci, 'MULTI_LINGUISM_MIM.MULTI_LANGUAGE_ATTRIBUTE_ASSIGNMENT.ITEMS') |
(ata\attribute_value_assignment.attribute_name = SELF\attribute_value_assignment.attribute_name) AND
(ata.translation_language :=: translation_language) ))>1 )) =0;
WR5: SIZEOF(QUERY(ci <* items |
SIZEOF(QUERY(ata <* USEDIN(ci, 'MULTI_LINGUISM_MIM.ATTRIBUTE_LANGUAGE_ASSIGNMENT.ITEMS') |
(ata\attribute_classification_assignment.role.name='primary') AND
(ata\attribute_classification_assignment.attribute_name= SELF\attribute_value_assignment.attribute_name) AND
(ata\attribute_classification_assignment.assigned_class :=: translation_language) ))>0 )) =0;
END_ENTITY;
(*
Attribute definitions:
items: the set of items for which an alternative string value is specified.
translation_language: the language in which the translation is provided.
language_indication: the attribute_language_assignment that specifies the language in which the attribute value is provided.
Formal propositions:
WR1: The role of the assignment shall be 'alternate language'.
WR2: The language_indication shall identify a translation language.
WR3: The attribute name shall not be an empty string.
WR4: For any of the items, the translated attribute shall not have more than one translation in the same language.
WR5: For any of the items, the translation shall not be provided for an attribute for which the primary string has been specified in the same language.
This subclause specifies the MIM rule for this module. The MIM rule and definition is specified below.
EXPRESS specification:
*)
RULE restrict_language_assignment_per_attribute FOR
(attribute_language_assignment);
WHERE
WR1: SIZEOF ( QUERY ( ala1 <* attribute_language_assignment |
SIZEOF(QUERY( it <* ala1.items |
SIZEOF ( QUERY ( ala2 <* USEDIN ( it ,'MULTI_LINGUISM_MIM.ATTRIBUTE_LANGUAGE_ASSIGNMENT.ITEMS' ) |
( ala1\attribute_classification_assignment.attribute_name = ala2\attribute_classification_assignment.attribute_name ) AND
( ala1\attribute_classification_assignment.assigned_class :=: ala2\attribute_classification_assignment.assigned_class )
)) >1
)) >0
)) =0;
END_RULE;
(*
Argument definitions:
attribute_language_assignment : the set of all instances of attribute_language_assignment.
Formal propositions:
WR1: There shall not be any instance of attribute_language_assignment such one of its items has more than one language indication of the same language for a particular text attribute.
*)
END_SCHEMA; -- Multi_linguism_mim
(*
© ISO 2019 — All rights reserved