Integrated generic resource: Fundamentals of product description and support | ISO 10303-41:2021(E) © ISO |
NOTE In contrast to elements of the generic product description resource schemas, which are also potentially referenced by more than one ISO 10303 integrated resource schema, the elements of this schema cannot exist without (that is, are existent-dependent upon) the entities that reference them.
This clause defines the information requirements to which implementations shall conform using the EXPRESS language as defined in ISO 10303-11. The following EXPRESS declaration begins the support_resource_schema and identifies the necessary external references.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 support_resource_schema;
Product data items may have an identification. The formats used to define identifiers are quite various. This International Standard defines identifiers as strings. It does not specify the internal structure and content of these strings.
Product data items may have a label. The formats used to define labels are quite various. This International Standard defines identifiers as strings. It does not specify the internal structure and content of these strings.
NOTE An identifier may or may not have a natural-language meaning.
EXAMPLE In the context of a product, a part number or serial number would be an example of an identifier.
EXPRESS specification:
*)
TYPE
identifier
=
STRING;
END_TYPE;
(*
EXAMPLE 'Smith', 'Widget Inc.', and 'Materials Test Laboratory' are examples of labels.
EXPRESS specification:
*)
TYPE
label
=
STRING;
END_TYPE;
(*
EXPRESS specification:
*)
TYPE
text
=
STRING;
END_TYPE;
(*
EXAMPLE This function can be used to convert the BAGs returned by the USEDIN function into SETs.
EXPRESS specification:
*)
FUNCTION bag_to_set (the_bag : BAG[0:?] OF GENERIC) : SET[0:?] OF GENERIC;
LOCAL the_set : SET OF GENERIC:intype := []; END_LOCAL; IF SIZEOF(the_bag) > 0 THEN REPEAT i := 1 TO HIINDEX(the_bag); the_set := the_set + the_bag[i]; END_REPEAT; END_IF; RETURN (the_set);
END_FUNCTION;
(*
Argument definitions:
the_bag: (input) the BAG that is to be converted into a SET.
Depending on the value of criterion, it returns TRUE if:
NOTE 1 If sub_names contains the entity names of all the subtypes of a particular entity data type, this case can be used to ensure that no instance of the supertype exists.
NOTE 2 If sub_names contains the entity names of subtypes of a particular entity data type, this function can be used to ensure that no instance of these subtypes exists.
NOTE 3 If sub_names contains the entity names of all the subtypes of a particular entity data type, this function can be used to ensure that no complex entity instance of subtypes of the entity exists and that only instances of subtypes of the entity exist.
NOTE 4 The concept of complex entity instance is defined in ISO 10303-11.
NOTE 5 If sub_names contains the entity names of subtypes of a particular entity data type, this function can be used to ensure that no complex entity instance of these subtypes of the entity exists.
EXPRESS specification:
*)
FUNCTION type_check_function (the_type : GENERIC; sub_names : SET[0:?] OF STRING; criterion : INTEGER) : LOGICAL;
IF ((NOT EXISTS(the_type)) OR (SIZEOF(sub_names) = 0)) THEN RETURN (UNKNOWN); ELSE CASE criterion OF 0: RETURN (SIZEOF(sub_names * TYPEOF(the_type)) > 0); 1: RETURN (SIZEOF(sub_names * TYPEOF(the_type)) = 0); 2: RETURN (SIZEOF(sub_names * TYPEOF(the_type)) = 1); 3: RETURN (SIZEOF(sub_names * TYPEOF(the_type)) <= 1); OTHERWISE : RETURN (UNKNOWN); END_CASE; END_IF;
END_FUNCTION;
(*
Argument definitions:
the_type: (input) the instance whose data type is checked.
sub_names: (input) the set of names of the entity data types that are candidates for the type of the_type.
criterion: (input) the integer number value between 0 and 3.
*)
END_SCHEMA; -- support_resource_schema
(*
© ISO 2021 — All rights reserved