(*
 $Id$
 ISO TC184/SC4/WG12 N4360 - ISO/TS 10303-1046 Product replacement - EXPRESS ARM
 Supersedes ISO TC184/SC4/WG12 N1144
*)
  
SCHEMA Product_replacement_arm;

USE FROM Assembly_structure_arm; -- ISO/TS 10303-1026
USE FROM Product_identification_arm; -- ISO/TS 10303-1017
   
ENTITY Alternate_product_relationship;
   name : OPTIONAL STRING;
   description : OPTIONAL STRING;
   alternate_product : Product;
   base_product : Product;
   criteria : OPTIONAL STRING;
UNIQUE
   UR1: alternate_product , base_product ;
WHERE
   WR1: alternate_product  :<>: base_product ;
   WR2: EXISTS(criteria) OR (TYPEOF(SELF\Alternate_product_relationship) <> TYPEOF(SELF));
END_ENTITY;

   
ENTITY Assembly_relationship_substitution;
  name : OPTIONAL STRING;
  description : OPTIONAL STRING;
  base_relationship        : Assembly_component_relationship;
  substitute_relationship  : Assembly_component_relationship;
UNIQUE
  UR1 : base_relationship, substitute_relationship;
WHERE
  WR1: base_relationship.relating_view :=: substitute_relationship.relating_view;
  WR2: base_relationship :<>: substitute_relationship;
END_ENTITY;

   
END_SCHEMA;
