(*
   $Id$
   ISO TC184/SC4/WG12 N4664 - ISO/CD-TS 10303-1773 Basic data representation - EXPRESS MIM
*)
(* UNDER DEVELOPMENT *)
SCHEMA Basic_data_representation_mim;

USE FROM Extended_date_mim; -- ISO/TS 10303-1776

USE FROM Foundation_representation_mim; -- ISO/TS 10303-1006

USE FROM ISO13584_expressions_schema -- ISO 13584-20
  (boolean_literal,
  int_literal,
  slash_expression,
  real_literal); 

USE FROM ISO13584_generic_expressions_schema
  (binary_generic_expression);

USE FROM mathematical_functions_schema  -- ISO 10303-50
  (logical_literal);

  ENTITY boolean_representation_item
    SUBTYPE OF (representation_item, boolean_literal);
  END_ENTITY;

  ENTITY date_representation_item
    SUBTYPE OF (representation_item, date);
  END_ENTITY;

  ENTITY date_time_representation_item
    SUBTYPE OF (representation_item, date_and_time);
  END_ENTITY;

  ENTITY integer_representation_item
    SUBTYPE OF (representation_item, int_literal);
  END_ENTITY;

  ENTITY logical_representation_item
    SUBTYPE OF (representation_item, logical_literal);
  END_ENTITY;
 
  ENTITY rational_representation_item
    SUBTYPE OF (representation_item, slash_expression);
    WHERE 
      WR1: SIZEOF( QUERY( operand <* SELF\binary_generic_expression.operands | 
        NOT('ISO13584_EXPRESSIONS_SCHEMA.INT_LITERAL' IN TYPEOF(operand)))) = 0;
  END_ENTITY;

  ENTITY real_representation_item
    SUBTYPE OF (representation_item, real_literal);
  END_ENTITY;

  SUBTYPE_CONSTRAINT representation_item_subtypes FOR representation_item; 
	(ONEOF (boolean_representation_item,
      date_representation_item,
      date_time_representation_item,
      integer_representation_item,
      logical_representation_item,
      rational_representation_item,
      real_representation_item));
  END_SUBTYPE_CONSTRAINT;

END_SCHEMA;
