(*
   $Id$
   ISO TC184/SC4/WG12 N4227 - ISO/TS 10303-1761 Information product - EXPRESS ARM
*)

SCHEMA Information_product_arm;

USE FROM Product_view_definition_arm;    --  ISO/TS 10303-1019
USE FROM File_identification_arm;	--  ISO/TS 10303-1127

REFERENCE FROM Product_identification_arm(types_of_product); -- ISO/TS 10303-1017 

(* Note: further specializations are needed *)
ENTITY Information_product
  ABSTRACT SUPERTYPE 
  	SUBTYPE OF (Product);
  WHERE
    WR1 : SIZEOF(['document', 'information'] * types_of_product(SELF)) = 0;
END_ENTITY;

ENTITY Information_version
  SUBTYPE OF (Product_version);
  SELF\Product_version.of_product : Information_product;
END_ENTITY;

ENTITY Information_definition
  SUBTYPE OF (Product_view_definition);
  SELF\Product_view_definition.defined_version : Information_version;
END_ENTITY;

(*
Every Product_version referencing an Information_product is a
Information_version. EXPRESS specification:
*)
RULE Information_product_version_constraint FOR
(Product_version);
WHERE
  WR1: SIZEOF ( QUERY ( pv <* Product_version | ( NOT (
  'INFORMATION_PRODUCT_ARM.' + 'INFORMATION_VERSION' IN TYPEOF
  ( pv) ) ) AND ( 'INFORMATION_PRODUCT_ARM.' + 'INFORMATION_PRODUCT' IN TYPEOF (
pv.of_product) ) ) ) =0 ;
END_RULE; 

END_SCHEMA;
