Integrated generic resource: Fundamentals of product description and support | ISO 10303-41:2021(E) © ISO |
EXAMPLE The identification of a geographical location is an example of generic data relating to a location.
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 location_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 location_schema;
REFERENCE FROM
support_resource_schema
--
ISO 10303-41
(identifier,
label,
text,
bag_to_set);
(*
NOTE 1 The schemas referenced above are specified in the following parts:
support_resource_schema ISO 10303-41
NOTE 2 See Annex D for a graphical representation of this schema.
This schema provides resources for the identification, naming, and description of:
NOTE The specification or representation of a location might take the form of a postal address, a set of geographical or spacial coordinates, or an association with a product.
EXAMPLE 1 A map reference specifies a location where a building exists.
EXAMPLE 2 The "bridge" of a particular ship specifies a location where navigation equipment should be installed.
EXPRESS specification:
*)
ENTITY location;
id : identifier;
name : label;
description :
OPTIONAL
text;
END_ENTITY;
(*
Attribute definitions:
id: the identifier that distinguishes the location.
name: the label by which the location is known.
description: the text that characterizes the location. The value of this attribute need not be specified.
EXPRESS specification:
*)
ENTITY location_relationship;
id : identifier;
name : label;
description :
OPTIONAL
text;
relating_location : location;
related_location : location;
END_ENTITY;
(*
Attribute definitions:
id: the identifier that distinguishes the location_relationship.
name: the label by which the location_relationship is known.
description: the text that characterizes the location_relationship. The value of this attribute need not be specified.
relating_location: one of the instances of location that is a part of the relationship.
NOTE 1 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_location: the other instance of location that is a part of the relationship. If one element of the relationship is dependent upon the other, attribute shall be the dependent one.
NOTE 2 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.
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 location_relationship entity include rules that use this function.
EXPRESS specification:
*)
FUNCTION acyclic_location_relationship (relation : location_relationship; relatives : SET[0:?] OF location; specific_relation : STRING) : BOOLEAN;
LOCAL x : SET OF location_relationship; END_LOCAL; IF relation.relating_location IN relatives THEN RETURN (FALSE); END_IF; x := QUERY(lctn <* bag_to_set(USEDIN(relation.relating_location, 'LOCATION_SCHEMA.' + 'LOCATION_RELATIONSHIP.' + 'RELATED_LOCATION')) | specific_relation IN TYPEOF(lctn)); REPEAT i := 1 TO HIINDEX(x); IF NOT acyclic_location_relationship(x[i], relatives + relation.relating_location, specific_relation) THEN RETURN (FALSE); END_IF; END_REPEAT; RETURN (TRUE);
END_FUNCTION;
(*
Argument definitions:
relation: (input) the candidate location_relationship to be checked.
relatives: (input) the set of instances of the entity data type location that the function is searching for in the relating_location parameter of the relation argument.
specific_relation: (input) the fully qualified name of a subtype of the location_relationship entity.
*)
END_SCHEMA; -- location_schema
(*
© ISO 2021 — All rights reserved