Integrated generic resource: Fundamentals of product description and support ISO 10303-41:2021(E)
© ISO

Cover page
Table of contents
Copyright
Foreword
Introduction
1 Scope
2 Normative references
3 Terms, definitions and abbreviated terms
    3.1 Terms and definitions
    3.2 Abbreviated terms
4 Action
   4.1 General
   4.2 Fundamental concepts and assumptions
   4.3 Action type definitions
   4.4 Action entity definitions
   4.5 Action function definitions
5 Application context
   5.1 General
   5.2 Fundamental concepts and assumptions
   5.3 Application context type definitions
   5.4 Application context entity definitions
6 Approval
   6.1 General
   6.2 Fundamental concepts and assumptions
   6.3 Approval type definitions
   6.4 Approval entity definitions
   6.5 Approval function definitions
7 Basic attribute
   7.1 General
   7.2 Fundamental concepts and assumptions
   7.3 Basic attribute type definitions
   7.4 Basic attribute entity definitions
   7.5 Basic attribute function definitions
8 Certification
   8.1 General
   8.2 Fundamental concepts and assumptions
   8.3 Certification entity definitions
9 Contract
   9.1 General
   9.2 Fundamental concepts and assumptions
   9.3 Contract entity definitions
   9.4 Contract function definitions
10 Date time
   10.1 General
   10.2 Fundamental concepts and assumptions
   10.3 Date time type definitions
   10.4 Date time entity definitions
   10.5 Date time function definitions

11 Document
   11.1 General
   11.2 Fundamental concepts and assumptions
   11.3 Document type definition
   11.4 Document entity definitions
   11.5 Document function definitions
12 Effectivity
   12.1 General
   12.2 Fundamental concepts and assumptions
   12.3 Effectivity type definitions
   12.4 Effectivity entity definitions
   12.5 Effectivity function definitions
13 Experience
   13.1 General
   13.2 Fundamental concepts and assumptions
   13.3 Experience entity definitions
   13.4 Experience function definitions
14 External reference
   14.1 General
   14.2 Fundamental concepts and assumptions
   14.3 External reference type definitions
   14.4 External reference entity definitions
   14.5 External reference function definitions
15 Group
   15.1 General
   15.2 Fundamental concepts and assumptions
   15.3 Group type definition
   15.4 Group entity definitions
   15.5 Group function definitions
16 Language
   16.1 General
   16.2 Fundamental concepts and assumptions
   16.3 Language entity definition
17 Location
   17.1 General
   17.2 Fundamental concepts and assumptions
   17.3 Location entity definitions
   17.4 Location function definitions
18 Management resources
   18.1 General
   18.2 Fundamental concepts and assumptions
   18.3 Management resources type definitions
   18.4 Management resources entity definitions
   18.5 Management resources function definitions

19 Measure
   19.1 General
   19.2 Fundamental concepts and assumptions
   19.3 Measure type definitions
   19.4 Measure entity definitions
   19.5 Measure function definitions
20 Person organization
   20.1 General
   20.2 Fundamental concepts and assumptions
   20.3 Person organization type definitions
   20.4 Person organization entity definitions
   20.5 Person organization function definitions
21 Product definition
   21.1 General
   21.2 Fundamental concepts and assumptions
   21.3 Product definition type definitions
   21.4 Product definition entity definitions
   21.5 Product definition function definitions
22 Product property definition
   22.1 General
   22.2 Fundamental concepts and assumptions
   22.3 Product property definition type definitions
   22.4 Product property definition entity definitions
   22.5 Product property definition function definitions
23 Product property representation
   23.1 General
   23.2 Fundamental concepts and assumptions
   23.3 Product property representation type definitions
   23.4 Product property representation entity definitions
   23.5 Product property representation function definitions
24 Qualifications
   24.1 General
   24.2 Fundamental concepts and assumptions
   24.3 Qualifications entity definitions
   24.4 Qualifications function definitions
25 Security classification
   25.1 General
   25.2 Fundamental concepts and assumptions
   25.3 Security classification entity definitions
26 Support resource
   26.1 General
   26.2 Fundamental concepts and assumptions
   26.3 Support resource type definitions
   26.4 Support resource function definitions
A Short names of entities
B Information object registration
C Computer interpretable listings
D EXPRESS-G diagrams
E Technical discussion
F Examples
G Change history
Bibliography
Index

10 Date time schema

10.1 General

The subject of the date_time_schema is the definition of dates, both calendar and ordinal, time of day, combinations of date and time of day, and periods of time. 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 date_time_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 date_time_schema;

REFERENCE FROM basic_attribute_schema    --  ISO 10303-41
  (description_attribute,
   description_attribute_select,
   get_description_value);

REFERENCE FROM measure_schema    --  ISO 10303-41
  (measure_with_unit,
   time_measure_with_unit);

REFERENCE FROM support_resource_schema    --  ISO 10303-41
  (bag_to_set,
   identifier,
   label,
   text);
(*

NOTE 1   The schemas referenced above are specified in the following parts:

basic_attribute_schema ISO 10303-41
measure_schema ISO 10303-41
support_resource_schema ISO 10303-41

NOTE 2   See Annex D for a graphical representation of this schema.

10.2 Fundamental concepts and assumptions

Any kind of product data may have a date, time, or date and time associated with it.

10.3 date_time_schema type definitions

10.3.1 ahead_or_behind   EXPRESS-G

The ahead_or_behind type is used to specify whether a given time is ahead of coordinated universal time, behind coordinated universal time or is coordinated universal time.

NOTE    Coordinated Universal Time (UTC) is the international time standard. It is the current term for what was commonly referred to as Greenwich Meridian Time (GMT). Zero (0) hours UTC is midnight in Greenwich England, which lies on the zero longitudinal meridian. Coordinated universal time is based on a 24 hour clock; therefore, afternoon hours such as 4 pm are expressed as 16:00 UTC (sixteen hours, zero minutes).

EXPRESS specification:

*)
TYPE ahead_or_behind = ENUMERATION OF
   (ahead,
    exact,
    behind);
END_TYPE;
(*

Enumerated item definitions:

ahead: a given time is ahead of coordinated universal time;

exact: a given time is coordinated universal time;

behind: a given time is behind coordinated universal time.

10.3.2 date_time_or_event_occurrence   EXPRESS-G

The date_time_or_event_occurrence type is a list of alternate data types. It provides a mechanism to refer to an instance of one of these data types. The date_time_or_event_occurrence type allows for the designation of a date_time_select or an event_occurrence.

EXPRESS specification:

*)
TYPE date_time_or_event_occurrence = SELECT
   (date_time_select,
    event_occurrence);
END_TYPE;
(*

10.3.3 date_time_select   EXPRESS-G

The date_time_select type is a list of alternate data types. It provides a mechanism to refer to an instance of one of these data types. A date_time_select type allows for the designation of a date, date_and_time, or a local_time.

EXPRESS specification:

*)
TYPE date_time_select = SELECT
   (date,
    date_and_time,
    local_time);
END_TYPE;
(*

10.3.4 day_in_month_number   EXPRESS-G

A day_in_month_number is the position of the specified day in a month.

EXPRESS specification:

*)
TYPE day_in_month_number = INTEGER;
WHERE
  WR1: {1 <= SELF <= 31};
END_TYPE;
(*

Formal propositions:

WR1: The value of the integer shall be between 1 and 31 inclusive.

10.3.5 day_in_week_number   EXPRESS-G

A day_in_week_number is the position of the specified day in a week as defined in ISO 8601.

NOTE    Monday is day number 1, Tuesday is day number 2, Wednesday is day number 3, Thursday is day number 4, Friday is day number 5, Saturday is day number 6, and Sunday is day number 7.

EXPRESS specification:

*)
TYPE day_in_week_number = INTEGER;
WHERE
  WR1: { 1 <= SELF <= 7 };
END_TYPE;
(*

Formal propositions:

WR1: The value of the integer shall be between 1 and 7 inclusive.

10.3.6 day_in_year_number   EXPRESS-G

A day_in_year_number is the position of the specified day in a year.

EXAMPLE    The 27th day of March is day 86 in years that are not leap years and day 87 in leap years.

EXPRESS specification:

*)
TYPE day_in_year_number = INTEGER;
WHERE
  WR1: {1 <= SELF <= 366};
END_TYPE;
(*

Formal propositions:

WR1: The value of the integer shall be between 1 and 366 inclusive.

10.3.7 dts_description_attribute_select   EXPRESS-G

The dts_description_attribute_select type is an extension of the description_attribute_select type. It adds the data types date_role, date_time_role and time_role to the list of alternate data types.

EXPRESS specification:

*)
TYPE dts_description_attribute_select = SELECT BASED_ON description_attribute_select WITH
   (date_role,
    date_time_role,
    time_role);
END_TYPE;
(*

10.3.8 hour_in_day   EXPRESS-G

An hour_in_day is the hour element of a specified time on a 24 hour clock. Midnight shall be represented by the value zero.

EXAMPLE    The hour_in_day corresponding to 3 o'clock in the afternoon is 15.

NOTE    Although ISO 8601 allows two representations for midnight, 0000 and 2400, this part of ISO 10303 restricts the representation to the first value.

EXPRESS specification:

*)
TYPE hour_in_day = INTEGER;
WHERE
  WR1: { 0 <= SELF < 24 };
END_TYPE;
(*

Formal propositions:

WR1: The value of the integer shall be between 0 and 23 inclusive.

10.3.9 minute_in_hour   EXPRESS-G

A minute_in_hour is the minute element of a specified time.

EXPRESS specification:

*)
TYPE minute_in_hour = INTEGER;
WHERE
  WR1: { 0 <= SELF <= 59 };
END_TYPE;
(*

Formal propositions:

WR1: The value of the integer shall be between 0 and 59 inclusive.

10.3.10 month_in_year_number   EXPRESS-G

A month_in_year_number is the position of the specified month in a year as defined in ISO 8601.

NOTE    January is month number 1, February is month number 2, March is month number 3, April is month number 4, May is month number 5, June is month number 6, July is month number 7, August is month number 8, September is month number 9, October is month number 10, November is month number 11, and December is month number 12.

EXPRESS specification:

*)
TYPE month_in_year_number = INTEGER;
WHERE
  WR1: { 1 <= SELF <= 12 };
END_TYPE;
(*

Formal propositions:

WR1: The value of the integer shall be between 1 and 12 inclusive.

10.3.11 second_in_minute   EXPRESS-G

A second_in_minute is the position of the specified second in a minute.

EXPRESS specification:

*)
TYPE second_in_minute = REAL;
WHERE
  WR1: { 0 <= SELF < 60.0 };
END_TYPE;
(*

Formal propositions:

WR1: The value of the real number shall be between 0 to 60.0 inclusive.

NOTE 1   A value of 60 allows for leap seconds.

NOTE 2   The mean solar time is determined by the rotation of the earth. Leap seconds are added as required, usually in the middle or at the end of a year, and ensure that the legal time does not differ from the non-uniform mean solar time by more than one second, in spite of the variations of the earth rotation.

10.3.12 week_in_year_number   EXPRESS-G

A week_in_year_number is the position of the specified calendar week as defined in ISO 8601.

NOTE    Week number 1 is the week containing the first Thursday of the year. This is equivalent to saying that week number 1 contains the date 4th January.

EXPRESS specification:

*)
TYPE week_in_year_number = INTEGER;
WHERE
  WR1: { 1 <= SELF <= 53 };
END_TYPE;
(*

Formal propositions:

WR1: The value of the integer shall be between 1 and 53.

10.3.13 year_number   EXPRESS-G

A year_number is the year as defined in the Gregorian calendar. The year_number shall be completely and explicitly specified using as many digits as necessary to unambiguously convey the century and year within the century. Truncated year numbers shall not be used.

NOTE    ISO 8601:1988 defines the Gregorian calendar.

EXAMPLE    The year_number corresponding to the first manned landing on the moon is 1969 (not 69).

EXPRESS specification:

*)
TYPE year_number = INTEGER;
WHERE
  WR1: (SELF > 1581);
END_TYPE;
(*

Formal propositions:

WR1: The value of the integer shall be greater than 1581.

10.4 date_time_schema entity definitions

10.4.1 calendar_date   EXPRESS-G

A calendar_date is a type of date defined as a day in a month of a year as defined in ISO 8601.

EXPRESS specification:

*)
ENTITY calendar_date
  SUBTYPE OF (date);
  day_component : day_in_month_number;
  month_component : month_in_year_number;
WHERE
  WR1: valid_calendar_date (SELF);
END_ENTITY;
(*

Attribute definitions:

day_component: the day element of the date.

month_component: the month element of the date.

Formal propositions:

WR1: The entity shall define a valid calendar date.

NOTE    If the month_component is 'April', 'June', 'August', or 'November' the day_component will be between 1 and 30; when the month_component is 'February' and the year_component is a leap year the day_component will be between 1 and 29; if the month_component is 'February' and the year_component is not a leap year the day_component will be between 1 and 28. Otherwise, the day_component will be between 1 and 31.

10.4.2 coordinated_universal_time_offset   EXPRESS-G

A coordinated_universal_time_offset is the oriented offset (specified in hours and possibly minutes) from the coordinated universal time. The offset is defined in ISO 8601 The offset value shall be positive.

NOTE 1   Coordinated Universal Time (UTC) is the international time standard. It is the current term for what was commonly referred to as Greenwich Meridian Time (GMT). Zero (0) hours UTC is midnight in Greenwich England, which lies on the zero longitudinal meridian. Coordinated universal time is based on a 24 hour clock; therefore, afternoon hours such as 4 pm are expressed as 16:00 UTC (sixteen hours, zero minutes).

NOTE 2   A coordinated_universal_time_offset is used to relate a time to coordinated universal time by an offset (specified in hours and minutes) and a direction.

EXPRESS specification:

*)
ENTITY coordinated_universal_time_offset;
  hour_offset : INTEGER;
  minute_offset : OPTIONAL INTEGER;
  sense : ahead_or_behind;
DERIVE
  actual_minute_offset : INTEGER := NVL(minute_offset,0);
WHERE
  WR1: { 0 <= hour_offset < 24 };
  WR2: { 0 <= actual_minute_offset <= 59 };
  WR3: NOT (((hour_offset <> 0) OR (actual_minute_offset <>0)) AND (sense = exact));
END_ENTITY;
(*

Attribute definitions:

hour_offset: the number of hours by which a time is offset from coordinated universal time.

minute_offset: the number of minutes by which a time is offset from coordinated universal time.

sense: the direction of the offset.

actual_minute_offset: the value of the number of minutes offset used to compute the coordinated_universal_time_offset, either the value of minute_offset or 0.

Formal propositions:

WR1: The hour_offset shall be a positive number, less than 24.

WR2: The minute_offset shall be a positive number, less than or equal to 59.

WR3: If the value of sense specifies that there is no offset from the Coordinated Universal time, hour_offset and actual_minute_offset shall both be equal to zero. If either hour_offset or actual_minute_offset is different from zero, the value of sense shall specify that there is an offset, either ahead or behind, from the Coordinated Universal time.

10.4.3 date   EXPRESS-G

A date is the identification of a day or week or month in a year. A date may be either a calendar_date or an ordinal_date, or a week_of_year_and_day_date, or a year_month. The date is defined in ISO 8601.

EXPRESS specification:

*)
ENTITY date
  SUPERTYPE OF (ONEOF (calendar_date,
                       ordinal_date,
                       week_of_year_and_day_date,
                       year_month));
  year_component : year_number;
END_ENTITY;
(*

Attribute definitions:

year_component: the year in which the date occurs.

10.4.4 date_and_time   EXPRESS-G

A date_and_time is a moment of time on a particular day.

EXPRESS specification:

*)
ENTITY date_and_time;
  date_component : date;
  time_component : local_time;
END_ENTITY;
(*

Attribute definitions:

date_component: the date element of the date time combination.

time_component: the time element of the date time combination.

10.4.5 date_role   EXPRESS-G

A date_role is a role for a date A date_role is an incompletely modeled concept and requires population related entity data types to form a complete date_role.

NOTE    A date_role is a role for a date_assignment and a description of that role.

EXPRESS specification:

*)
ENTITY date_role;
  name : label;
DERIVE
  description : text := get_description_value (SELF);
WHERE
  WR1: SIZEOF (USEDIN (SELF, 'BASIC_ATTRIBUTE_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
END_ENTITY;
(*

Attribute definitions:

name: the label by which the date_role is known.

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.

description: the text that characterizes the date_role. The value of the attribute need not be specified.

NOTE 2   This attribute is an upwardly compatible addition to date_role as specified in ISO 10303-41:1994.

Formal propositions:

WR1: Each date_role 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.

10.4.6 date_time_role   EXPRESS-G

A date_time_role a role for for a moment of time on a particular day. A date_time_role is an incompletely modeled concept that requires population of related entity data types to form a complete date_time_role

NOTE    A date_time_role is a role for a date_and_time_assignment and a description of that role.

EXPRESS specification:

*)
ENTITY date_time_role;
  name : label;
DERIVE
  description : text := get_description_value (SELF);
WHERE
  WR1: SIZEOF (USEDIN (SELF, 'BASIC_ATTRIBUTE_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
END_ENTITY;
(*

Attribute definitions:

name: the label by which the date_time_role is known.

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.

description: the text that characterizes the date_time_role.

NOTE 2   This attribute is an upwardly compatible addition to date_time_role as specified in ISO 10303-41:1994.

Formal propositions:

WR1: Each date_time_role 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.

10.4.7 event_occurrence   EXPRESS-G

An event_occurrence is the fact of a transition between states at some point in time. The description of the event_occurrrnece can provide an implicit representation of either the state preceeding the event_occurrence or the state after the event_occurrence.

NOTE 1   The point in time of the existence may not be known in terms of a calendar date before the event_occurrence actually happens. One reason, why the event_occurrence cannot always be expressed as a calendar date, is that the event_occurrence is not possible to plan, for example a break down of a machine.

EXAMPLE    The event_occurrence 'start of production' implicitly declares that the before the event_occurrence a product was not in production.

EXPRESS specification:

*)
ENTITY event_occurrence;
  id : identifier;
  name : label;
  description : OPTIONAL text;
END_ENTITY;
(*

Attribute definitions:

id: the identifier that distinguishes the event_occurrence.

NOTE 2   The context in which id is used as a discriminating characteristic can be identified in an annotated Express schema that uses or specializes this entity, or by default, in an agreement of common understanding between partners sharing this information.

name: the label by which the event_occurrence is known.

description: the text that characterizes the event_occurrence. The value of the attribute need not be specified.

10.4.8 event_occurrence_context_role   EXPRESS-G

An event_occurrence_context_role establishes a context for an event_occurrence_assignment. An event_occurrence is an incompletely modeled concept and requires population of related entity data types for forme a complete event_occurrence_context_role

EXAMPLE    For the event_occurrence 'start of production' the product, for which production starts, is the context for that event_occurrence.

EXPRESS specification:

*)
ENTITY event_occurrence_context_role;
  name : label;
  description : OPTIONAL text;
END_ENTITY;
(*

Attribute definitions:

name: the label by which the event_occurrence_context_role is known.

description: the text that characterizes the event_occurrence_context_role. The value of the attribute need not be specified.

10.4.9 event_occurrence_relationship   EXPRESS-G

An event_occurrence_relationship is a relationship between two event_occurrences with a description of their relationship.

NOTE 1   The role of event_occurrence_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   This entity, together with the event_occurrence entity, is based on the relationship template that is described in annex E.3.

EXPRESS specification:

*)
ENTITY event_occurrence_relationship;
  name : label;
  description : OPTIONAL text;
  relating_event : event_occurrence;
  related_event : event_occurrence;
END_ENTITY;
(*

Attribute definitions:

name: the label by which the event_occurrence_relationship is known.

description: the text that characterizes the event_occurrence_relationship. The value of the attribute need not be specified.

relating_event: one of the instances of event_occurrences 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_event: the other instance of event_occurrence. 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.

10.4.10 event_occurrence_role   EXPRESS-G

An event_occurrence_role establishes a role for an event_occurrence. An event_occurrence_role is an incompletely modeled concept and requires population of related entity data types to form a complete event_occurrence_role

EXPRESS specification:

*)
ENTITY event_occurrence_role;
  name : label;
  description : OPTIONAL text;
END_ENTITY;
(*

Attribute definitions:

name: the label by which the event_occurrence_role is known.

description: the text that characterizes the event_occurrence_role. The value of the attribute need not be specified.

10.4.11 local_time   EXPRESS-G

A local_time is an instance of time represented on a 24-hour clock by hour, minute, and second. The instance is expressed in the local time zone and the offset with the coordinate universal time shall be specified. This concept is defined in ISO 8601.

NOTE    This construct is used to represent a moment of time whereas time_measure represents amounts of time.

EXPRESS specification:

*)
ENTITY local_time;
  hour_component : hour_in_day;
  minute_component : OPTIONAL minute_in_hour;
  second_component : OPTIONAL second_in_minute;
  zone : coordinated_universal_time_offset;
WHERE
  WR1: valid_time (SELF);
END_ENTITY;
(*

Attribute definitions:

hour_component: the number of hours.

minute_component: the number of minutes. The value of the attribute need not be specified.

second_component: the number of seconds. The value of the attribute need not be specified.

zone: the offset of the local time zone to the coordinated universal time.

Formal propositions:

WR1: The entity shall define a valid time. The second_component attribute shall only exist if the minute_component attribute exists.

10.4.12 ordinal_date   EXPRESS-G

An ordinal_date is a type of date defined as a day of a year. This concept is defined in ISO 8601.

EXPRESS specification:

*)
ENTITY ordinal_date
  SUBTYPE OF (date);
  day_component : day_in_year_number;
WHERE
  WR1: (NOT leap_year(SELF.year_component) AND { 1 <= day_component <= 365 }) OR (leap_year(SELF.year_component) AND { 1 <= day_component <= 366 });
END_ENTITY;
(*

Attribute definitions:

day_component: the day element of the date.

Formal propositions:

WR1: The day_component shall be between 1 and 365 if the year_component is not a leap year. Otherwise the day_component shall be between 1 and 366.

10.4.13 relative_event_occurrence   EXPRESS-G

A relative_event_occurrence is a type of event_occurrence that takes place with an offset to an event_occurrence.

EXAMPLE    'Five days after start of production' is an example for a relative_event_occurrence, where 'five days' is an offset relative to an event_occurrence 'start of production'.

EXPRESS specification:

*)
ENTITY relative_event_occurrence
  SUBTYPE OF (event_occurrence);
  base_event : event_occurrence;
  offset : time_measure_with_unit;
END_ENTITY;
(*

Attribute definitions:

base_event: the relative_event_occurrence is defined with respect to the base_event.

offset: the amount of time that passes between the occurrence of the base_event and the relative_event_occurrence. A negative offset specifies that the relative_event_occurrence occurs before the base_event.

10.4.14 time_interval   EXPRESS-G

A time_interval is the identification of an interval of time. This concept is defined in ISO 8601.

EXAMPLE    'Strike duration', 'delay of production', and 'Christmas holidays' are examples for time_intervals.

EXPRESS specification:

*)
ENTITY time_interval;
  id : identifier;
  name : label;
  description : OPTIONAL text;
END_ENTITY;
(*

Attribute definitions:

id: the identifier that distinguishes the time_interval.

NOTE    The context in which id is used as a discriminating characteristic can be identified in an annotated Express schema that uses or specializes this entity, or by default, in an agreement of common understanding between partners sharing this information.

name: the label by which the time_interval is known.

description: the text that characterizes the time_interval. The value of the attribute need not be specified.

10.4.15 time_interval_relationship   EXPRESS-G

A time_interval_relationship is a relationship between two time_intervals with a description of their relationship.

NOTE 1   The role of time_interval_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   This entity, together with the time_interval entity, is based on the relationship template that is described in annex E.3.

EXPRESS specification:

*)
ENTITY time_interval_relationship;
  name : label;
  description : OPTIONAL text;
  relating_time_interval : time_interval;
  related_time_interval : time_interval;
END_ENTITY;
(*

Attribute definitions:

name: the label by which the time_interval_relationship is known.

description: the text that characterizes the time_interval_relationship. The value of the attribute need not be specified.

relating_time_interval: one of the instances of time_interval 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_time_interval: the other instance of time_interval. 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.

10.4.16 time_interval_role   EXPRESS-G

A time_interval_role is a role that may be assigned to a time_interval and includes a description of that role.

NOTE    The assignment of a role to a time_interval is accomplished by the time_interval_assignment entity data type.

EXPRESS specification:

*)
ENTITY time_interval_role;
  name : label;
  description : OPTIONAL text;
END_ENTITY;
(*

Attribute definitions:

name: the label by which the time_interval_role is known.

description: the text that characterizes the time_interval_role. The value of the attribute need not be specified.

NOTE    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.

10.4.17 time_interval_with_bounds   EXPRESS-G

A time_interval_with_bounds is a type of time_interval. The time_interval_with_bounds is bounded either on one side or both sides. If neither secondary_bound nor duration are specified, the time interval begins at the point in time identified by primary_bound and has no specified end point.

EXAMPLE    'From 01-01-1999 to 31-12-1999' is an example for a both side bounded time_interval_with_bounds, 'from 01-01-2000 on', and 'until start of production' are examples for a one side bounded time_interval_with_bounds.

EXPRESS specification:

*)
ENTITY time_interval_with_bounds
  SUBTYPE OF (time_interval);
  primary_bound : OPTIONAL date_time_or_event_occurrence;
  secondary_bound : OPTIONAL date_time_or_event_occurrence;
  duration : OPTIONAL time_measure_with_unit;
WHERE
  WR1: EXISTS(primary_bound) OR EXISTS(secondary_bound);
  WR2: NOT (EXISTS(primary_bound) AND EXISTS(secondary_bound) AND EXISTS(duration));
  WR3: EXISTS(primary_bound) AND NOT EXISTS(secondary_bound) AND (NOT EXISTS(duration) OR duration_is_positive(duration));
  WR4: EXISTS(secondary_bound) AND NOT EXISTS(primary_bound) AND EXISTS(duration) AND duration_is_negative(duration);
END_ENTITY;
(*

Attribute definitions:

primary_bound: one of the bounds of the time_interval_with_bounds. The value of this attribute need not be specified.

secondary_bound: the other bound of the time_interval_with_bounds. The value of this attribute need not be specified.

duration: the time_measure_with_unit that specifies the length of a time_interval_with_bounds. If positive, the time_interval_with_bounds is a lower bounded time_interval_with_bounds, else an upper bounded time_interval_with_bounds. The value of this attribute need not be specified.

Formal propositions:

WR1: Either the primary_bound or the secondary_bound or both shall be specified.

WR2: The combination of primary_bound, secondary_bound and duration shall not be specified.

WR3: If primary_bound is specified and secondary_bound is not specified and if duration is specified, the duration shall be positive.

WR4: If primary_bound is not specified and secondary_bound is specified, duration shall be specified and the duration shall be negative.

10.4.18 time_role   EXPRESS-G

A time_role is a definition of a role for a local_time.

NOTE    The assignment of the role to a local_time is accomplished by the time_assignment entity data type.

EXPRESS specification:

*)
ENTITY time_role;
  name : label;
DERIVE
  description : text := get_description_value (SELF);
WHERE
  WR1: SIZEOF (USEDIN (SELF, 'BASIC_ATTRIBUTE_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
END_ENTITY;
(*

Attribute definitions:

name: the label by which the time_role is known.

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.

description: the text that characterizes the time_role.

NOTE 2   This attribute is an upwardly compatible addition to time_role as specified in ISO 10303-41:1994

Formal propositions:

WR1: Each time_role 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.

10.4.19 week_of_year_and_day_date   EXPRESS-G

A week_of_year_and_day_date is a type of date defined by identifying the week within a year and the day within that particular week.

EXPRESS specification:

*)
ENTITY week_of_year_and_day_date
  SUBTYPE OF (date);
  week_component : week_in_year_number;
  day_component : OPTIONAL day_in_week_number;
WHERE
  WR1: NOT(leap_year(SELF\date.year_component)) OR { 1<= (day_component + (7 * (week_component - 1))) <= 366 };
  WR2: leap_year(SELF\date.year_component) OR { 1<= (day_component + (7 * (week_component - 1))) <= 365 };
END_ENTITY;
(*

Attribute definitions:

week_component: the week element of the date.

day_component: the day element of the date.

Formal propositions:

WR1: The result of the expression day_component + (7 * week_component) shall be between 1 and 366 if the year_component is a leap year.

WR2: The result of the expression day_component + (7 * week_component) shall be between 1 and 365 if the year_component is not a leap year.

10.4.20 year_month   EXPRESS-G

A year_month is a type of date defined as a month of a year.

EXPRESS specification:

*)
ENTITY year_month
  SUBTYPE OF (date);
  month_component : month_in_year_number;
END_ENTITY;
(*

Attribute definitions:

month_component: the month element of the date.

10.5 date_time_schema function definitions

10.5.1 acyclic_event_occurrence_relationship

The acyclic_event_occurrence_relationship function determines whether the graph of instances of the entity data type event_occurrence that contains relation as one of its links contains a cycle. This function may be used to evaluate either an event_occurrence_relationship or any of its subtypes.

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 event_occurrence_relationship entity include rules that use this function.

EXPRESS specification:

*)
FUNCTION acyclic_event_occurrence_relationship (relation : event_occurrence_relationship; relatives : SET[1:?] OF event_occurrence; specific_relation : STRING) : BOOLEAN;
LOCAL
      x : SET OF event_occurrence_relationship;
    END_LOCAL;

    IF relation.relating_event IN relatives THEN
      RETURN (FALSE);
    END_IF;
    x := QUERY(evnt <* bag_to_set(USEDIN(relation.relating_event, 'DATE_TIME_SCHEMA.' + 'EVENT_OCCURRENCE_RELATIONSHIP.' + 'RELATED_EVENT')) | specific_relation IN TYPEOF(evnt));
    REPEAT i := 1 TO HIINDEX(x);
      IF NOT acyclic_event_occurrence_relationship(x[i], relatives + relation.relating_event, specific_relation) THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION;
(*

Argument definitions:

relation: (input) the candidate event_occurrence_relationship to be checked.

relatives: (input) the set of instances of the entity data type event_occurrence for which the function is searching in the relating_event parameter of the relation argument.

specific_relation: (input) the fully qualified entity name of a type of event_occurrence_relationship entity.

10.5.2 acyclic_time_interval_relationship

The acyclic_time_interval_relationship function determines whether the graph of instances of the entity data type time_interval that contains relation as one of its links contains a cycle. This function may be used to evaluate either a time_interval_relationship or any of its subtypes.

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 time_interval_relationship entity include rules that use this function.

EXPRESS specification:

*)
FUNCTION acyclic_time_interval_relationship (relation : time_interval_relationship; relatives : SET[1:?] OF time_interval; specific_relation : STRING) : BOOLEAN;
LOCAL
      x : SET OF time_interval_relationship;
    END_LOCAL;

    IF relation.relating_time_interval IN relatives THEN
      RETURN (FALSE);
    END_IF;
    x := QUERY(ti <* bag_to_set(USEDIN(relation.relating_time_interval, 'DATE_TIME_SCHEMA.' + 'TIME_INTERVAL_RELATIONSHIP.' + 'RELATED_TIME_INTERVAL')) | specific_relation IN TYPEOF(ti));
    REPEAT i := 1 TO HIINDEX(x);
      IF NOT acyclic_time_interval_relationship(x[i], relatives + relation.relating_time_interval, specific_relation) THEN
        RETURN (FALSE);
      END_IF;
    END_REPEAT;
    RETURN (TRUE);
END_FUNCTION;
(*

Argument definitions:

relation: (input) the candidate time_interval_relationship to be checked.

relatives: (input) the set of instances of the entity data type time_interval for which the function is searching in the relating_time_interval parameter of the relation argument.

specific_relation: (input) the fully qualified entity name of a type of time_interval_relationship entity.

10.5.3 duration_is_negative

The duration_is_negative function determines whether a given duration is negative. It returns TRUE if the duration is negative. Otherwise, it returns FALSE.

EXPRESS specification:

*)
FUNCTION duration_is_negative (duration : time_measure_with_unit) : BOOLEAN;
IF (duration\measure_with_unit.value_component < 0.0) THEN
    RETURN (TRUE);
  ELSE
    RETURN (FALSE);
  END_IF;
END_FUNCTION;
(*

Argument definitions:

duration: (input) the candidate duration that is being checked.

10.5.4 duration_is_positive

The duration_is_positive function determines whether a given duration is positive. It returns TRUE if the duration is a positive. Otherwise, it returns FALSE.

EXPRESS specification:

*)
FUNCTION duration_is_positive (duration : time_measure_with_unit) : BOOLEAN;
IF (duration\measure_with_unit.value_component > 0.0) THEN
    RETURN (TRUE);
  ELSE
    RETURN (FALSE);
  END_IF;
END_FUNCTION;
(*

Argument definitions:

duration: (input) the candidate duration that is being checked.

10.5.5 leap_year

The leap_year function checks whether or not a particular year contains 366 days instead of 365 days, known as a leap year.

NOTE    Leap years occur every for years.

EXPRESS specification:

*)
FUNCTION leap_year (year : year_number) : BOOLEAN;
IF ((((year MOD 4) = 0) AND ((year MOD 100) <> 0)) OR ((year MOD 400) = 0)) THEN
    RETURN (TRUE);
  ELSE
    RETURN (FALSE);
  END_IF;
END_FUNCTION;
(*

Argument definitions:

year: an integer representing a particular year in the Gregorian calendar.

10.5.6 valid_calendar_date

The valid_calendar_date function determines whether the components of a calendar_date indicate a valid date. If the calendar_date is valid, the function returns TRUE. Otherwise it returns FALSE.

EXPRESS specification:

*)
FUNCTION valid_calendar_date (date : calendar_date) : LOGICAL;
CASE date.month_component OF
    1  : RETURN({ 1 <= date.day_component <= 31 });
    2  : BEGIN
           IF (leap_year(date.year_component)) THEN
             RETURN({ 1 <= date.day_component <= 29 });
           ELSE
             RETURN({ 1 <= date.day_component <= 28 });
           END_IF;
         END;
    3  : RETURN({ 1 <= date.day_component <= 31 });
    4  : RETURN({ 1 <= date.day_component <= 30 });
    5  : RETURN({ 1 <= date.day_component <= 31 });
    6  : RETURN({ 1 <= date.day_component <= 30 });
    7  : RETURN({ 1 <= date.day_component <= 31 });
    8  : RETURN({ 1 <= date.day_component <= 31 });
    9  : RETURN({ 1 <= date.day_component <= 30 });
    10 : RETURN({ 1 <= date.day_component <= 31 });
    11 : RETURN({ 1 <= date.day_component <= 30 });
    12 : RETURN({ 1 <= date.day_component <= 31 });
  END_CASE;
  RETURN (FALSE);
END_FUNCTION;
(*

Argument definitions:

date: (input) the candidate calendar_date that is to be checked.

10.5.7 valid_time

The valid_time function determines whether a candidate local_time has a minute_component if it has a second_component. It returns FALSE if the condition is not met. Otherwise it returns TRUE.

EXPRESS specification:

*)
FUNCTION valid_time (time : local_time) : BOOLEAN;
IF EXISTS(time.second_component) THEN
    RETURN (EXISTS(time.minute_component));
  ELSE
    RETURN (TRUE);
  END_IF;
END_FUNCTION;
(*

Argument definitions:

time: (input) the candidate local_time that is to be checked.



*)
END_SCHEMA;  -- date_time_schema
(*


© ISO 2021 — All rights reserved