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

(*
ISO/TC 184/SC 4/WG 12 N8369 - ISO 10303-41 Fundamentals of product description and support - EXPRESS
*)



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);


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

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

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

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

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

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

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

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

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

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

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

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

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

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;

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;

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

ENTITY date_and_time;
  date_component : date;
  time_component : local_time;
END_ENTITY;

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;

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;

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

ENTITY event_occurrence_context_role;
  name : label;
  description : OPTIONAL text;
END_ENTITY;

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

ENTITY event_occurrence_role;
  name : label;
  description : OPTIONAL text;
END_ENTITY;

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;

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;

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

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

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

ENTITY time_interval_role;
  name : label;
  description : OPTIONAL text;
END_ENTITY;

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;

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;

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;

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

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;

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;

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;

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;

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;

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;

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;

END_SCHEMA;  -- date_time_schema


© ISO 2021 — All rights reserved