Integrated generic resource: Fundamentals of product description and support | ISO 10303-41:2021(E) © ISO |
Each implementation of an AP that uses this schema and that encodes entity names shall use the encoding specified in Annex A. Each reference to this schema in an open system shall use the identifier encoding specified in Annex B. This schema is illustrated in Annex D using the EXPRESS-G notation.
EXPRESS specification:
*)
SCHEMA external_reference_schema;
REFERENCE FROM
basic_attribute_schema
--
ISO 10303-41
(description_attribute,
description_attribute_select,
get_description_value);
REFERENCE FROM
support_resource_schema
--
ISO 10303-41
(label,
text,
identifier,
bag_to_set);
(*
NOTE 1 The schemas referenced above are specified in the following parts:
basic_attribute_schema ISO 10303-41 support_resource_schema ISO 10303-41
NOTE 2 See Annex D for a graphical representation of this schema.
EXPRESS specification:
*)
TYPE
ers_description_attribute_select
=
SELECT
BASED_ON
description_attribute_select
WITH
(external_source);
END_TYPE;
(*
NOTE The role of message can be defined in the annotated EXPRESS schemas that use or specialize this entity, or by default, in an agreement of common understanding between the partners sharing this information.
EXPRESS specification:
*)
TYPE
message
=
STRING;
END_TYPE;
(*
EXPRESS specification:
*)
TYPE
source_item
=
SELECT
(identifier,
message);
END_TYPE;
(*
NOTE 1 The product data may conform to some other part of this International Standard.
EXPRESS specification:
*)
ENTITY external_source;
source_id : source_item;
DERIVE
description : text := get_description_value(SELF);
WHERE
WR1: SIZEOF(USEDIN(SELF, 'BASIC_ATTRIBUTE_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
END_ENTITY;
(*
Attribute definitions:
source_id: the identification of the external_source.
description: the text that characterizes the external_source.
NOTE 2 This attribute is an upwardly compatible addition to external_source as specified in ISO 10303-41:1994.
Formal propositions:
WR1: Each external_source shall be the described_item in at most one description_attribute.
NOTE 3 The description_attribute data type is defined in basic_attribute_schema of this part of ISO 10303.
NOTE 4 A template for constraining the population of the entity data types defined in the basic_attribute_schema is described in annex E.
NOTE 1 The role of external_source_relationship can be defined in the annotated EXPRESS schemas that use or specialize this entity, or by default, in an agreement of common understanding between the partners sharing this information.
EXAMPLE One external_source may be a subset of another external_source. This entity may be specialized to specify such a relationship.
NOTE 2 This entity, together with the external_source entity, is based on the relationship template that is described in annex E.3
EXPRESS specification:
*)
ENTITY external_source_relationship;
name : label;
description :
OPTIONAL
text;
relating_source : external_source;
related_source : external_source;
END_ENTITY;
(*
Attribute definitions:
name: the label by which the external_source_relationship is known.
description: the text that characterizes the external_source_relationship. The value of the attribute need not be specified.
relating_source: one of the instances of external_source that is a part of the relationship.
NOTE 3 The meaning of this attribute can be defined in the annotated EXPRESS schemas that use or specialize this entity, or in an agreement of common understanding between the partners sharing this information.
related_source: the other instance of external_source that is a part of the relationship. If one element of the relationship is dependent upon the other, this attribute shall be the dependent one.
NOTE 4 The meaning of this attribute can be defined in the annotated EXPRESS schemas that use or specialize this entity, or in an agreement of common understanding between the partners sharing this information.
EXPRESS specification:
*)
ENTITY externally_defined_item;
item_id : source_item;
source : external_source;
END_ENTITY;
(*
Attribute definitions:
item_id: the string that specifies the identification of the referent item.
source: an external_source that contains the referent item.
NOTE 1 The role of externally_defined_item_relationship can be defined in the annotated EXPRESS schemas that use or specialize this entity, or by default, in an agreement of common understanding between the partners sharing this information.
NOTE 2 Relationships represented using this entity may be parent child relationship. Annotated EXPRESS schemas that use or specialize this entity specify whether or not the relationship is directed.
NOTE 3 This entity, together with the externally_defined_item entity, is based on the relationship template that is described in annex E.3.
EXPRESS specification:
*)
ENTITY externally_defined_item_relationship;
name : label;
description :
OPTIONAL
text;
relating_item : externally_defined_item;
related_item : externally_defined_item;
END_ENTITY;
(*
Attribute definitions:
name: the label by which the externally_defined_item_relationship is known.
description: the text that characterizes the externally_defined_item_relationship. The value of the attribute need not be specified.
relating_item: one of the instance of externally_defined_item that is a part of the relationship.
NOTE 4 The meaning of this attribute can be defined in the annotated EXPRESS schemas that use or specialize this entity, or in an agreement of common understanding between the partners sharing this information.
related_item: the other instance of externally_defined_item that is a part of the relationship. If one element of the relationship is dependent up on the other, this attribute shall be the dependent one.
NOTE 5 The meaning of this attribute can be defined in the annotated EXPRESS schemas that use or specialize this entity, or in an agreement of common understanding between the partners sharing this information.
EXPRESS specification:
*)
ENTITY externally_defined_item_with_multiple_references
SUBTYPE OF (externally_defined_item);
references : LIST[1:?] OF
UNIQUE
source_item;
UNIQUE
UR1: references;
WHERE
WR1: NOT(SELF\externally_defined_item.item_id IN references);
END_ENTITY;
(*
Attribute definitions:
references: a list of source_items defining a path to the target item_id.
Formal propositions:
UR1: The list of references shall be unique.
WR1: An externally_defined_item_with_multiple_references is a type of item_id that adds a list of references to provide an unambiguous path in the external data. The item_id inherited from the externally_defined_item is the target for the reference list, but is excluded from the list itself. The list ends at a entity data type that explicitly references the target or that is explicitly referenced by the target.
EXAMPLE A reference to the colour 'red' without any definition of the associated red-green-blue values would be a pre_defined_item if the red-green-blue values of the colour 'red' were specified in the relevant annotated EXPRESS schema.
EXPRESS specification:
*)
ENTITY pre_defined_item;
name : label;
END_ENTITY;
(*
Attribute definitions:
name: the label by which the pre_defined_item is known.
The function returns TRUE if no cycle has been detected. Otherwise it returns FALSE.
NOTE 1 The algorithm of the function is explained in annex E.2.
NOTE 2 This function is not used in this schema. It is defined here because other ISO 10303 integrated resources and application protocols that use the external_source_relationship entity include rules that use this function.
EXPRESS specification:
*)
FUNCTION acyclic_external_source_relationship (relation : external_source_relationship; relatives : SET[1:?] OF external_source; specific_relation : STRING) : BOOLEAN;
LOCAL x : SET OF external_source_relationship; END_LOCAL; IF relation.relating_source IN relatives THEN RETURN (FALSE); END_IF; x := QUERY(es <* bag_to_set(USEDIN(relation.relating_source, 'EXTERNAL_REFERENCE_SCHEMA.' + 'EXTERNAL_SOURCE_RELATIONSHIP.' + 'RELATED_SOURCE')) | specific_relation IN TYPEOF(es)); REPEAT i := 1 TO HIINDEX(x); IF NOT acyclic_external_source_relationship(x[i], relatives + relation.relating_source, specific_relation) THEN RETURN (FALSE); END_IF; END_REPEAT; RETURN (TRUE);
END_FUNCTION;
(*
Argument definitions:
relation: (input) the candidate external_source_relationship to be checked.
relatives: (input) the set of instances of the entity data type external_source for which the function is searching in the relating_source parameter of the relation argument.
specific_relation: (input) the fully qualified name of a subtype of the external_source_relationship entity.
The function returns TRUE if no cycle has been detected. Otherwise it returns FALSE.
NOTE 1 The algorithm of the function is explained in annex E.2.
NOTE 2 This function is not used in this schema. It is defined here because other ISO 10303 integrated resources and application protocols that use the externally_defined_item_relationship entity include rules that use this function.
EXPRESS specification:
*)
FUNCTION acyclic_externally_defined_item_relationship (relation : externally_defined_item_relationship; relatives : SET[1:?] OF externally_defined_item; specific_relation : STRING) : BOOLEAN;
LOCAL x : SET OF externally_defined_item_relationship; END_LOCAL; IF relation.relating_item IN relatives THEN RETURN (FALSE); END_IF; x := QUERY(edi <* bag_to_set(USEDIN(relation.relating_item, 'EXTERNAL_REFERENCE_SCHEMA.' + 'EXTERNALLY_DEFINED_ITEM_RELATIONSHIP.' + 'RELATED_ITEM')) | specific_relation IN TYPEOF(edi)); REPEAT i := 1 TO HIINDEX(x); IF NOT acyclic_externally_defined_item_relationship(x[i], relatives + relation.relating_item, specific_relation) THEN RETURN (FALSE); END_IF; END_REPEAT; RETURN (TRUE);
END_FUNCTION;
(*
Argument definitions:
relation: (input) the candidate externally_defined_item_relationship to be checked.
relatives: (input) the set of instances of the entity data type externally_defined_item for which the function is searching in the relating_item parameter of the relation argument.
specific_relation: (input) the fully qualified entity name of a type of externally_defined_item_relationship entity.
*)
END_SCHEMA; -- external_reference_schema
(*
© ISO 2021 — All rights reserved