(*
	$Id$
	ISO TC184/SC4/WG12 N4783 - ISO/CD-TS 10303-1330 Presentation hierarchy - EXPRESS ARM
*)

SCHEMA Presentation_hierarchy_arm;

  USE FROM Appearance_assignment_arm;  -- ISO/CD-TS 10303-1001

  USE FROM Contextual_shape_positioning_arm; -- ISO/TS 10303-1027

  TYPE area_select = EXTENSIBLE SELECT
    (View_area);
  END_TYPE; 

  TYPE presentation_association_select = EXTENSIBLE GENERIC_ENTITY SELECT; 
  END_TYPE;

  TYPE view_area_element_select = EXTENSIBLE GENERIC_ENTITY SELECT ( 
     Styled_element, 
     View_area_replication, 
     Axis_placement_2d); 
  END_TYPE;   

  TYPE view_area_relation_type = ENUMERATION OF
    (copy,
     derivation,
     hierarchy,
     substitution,
     unspecified);
  END_TYPE;

  TYPE view_area_replication_model = SELECT 
    (View_area, View); 
  END_TYPE;

  TYPE view_element_select = EXTENSIBLE GENERIC_ENTITY SELECT ( 
     Styled_element, 
     Axis_placement_2d); 
  END_TYPE;   

  TYPE view_relation_type = ENUMERATION OF
    (dependency,
     unspecified);
  END_TYPE;

  ENTITY Presentation_set;
    areas : SET[1:?] OF View_area; 
  END_ENTITY;

  ENTITY Presentation_set_assignment; 
    associated_presentation : Presentation_set;
    is_describing           : presentation_association_select;
  END_ENTITY;

  ENTITY View 
    SUBTYPE OF (Styled_model); 
      SELF\Representation.items : SET [1:?] OF view_element_select; 
  WHERE 
    WR1: SELF\Representation.context_of_items\Geometric_coordinate_space.dimension_count = 2;      
  END_ENTITY;   

  ENTITY View_area
    SUBTYPE OF (Styled_model); 
      size : Planar_box;  
      SELF\Representation.items : SET [1:?] OF view_area_element_select; 
    WHERE 
      WR1: SELF\Representation.context_of_items\Geometric_coordinate_space.dimension_count = 2;
  END_ENTITY; 

  ENTITY View_area_assignment;
    associated_view_area : View_area;
    is_describing        : presentation_association_select;
  END_ENTITY;

  ENTITY View_area_relationship;
    relation_type : view_area_relation_type;
    description   : OPTIONAL STRING;
    relating      : View_area;
    related       : View_area;
  END_ENTITY;

  ENTITY View_area_replication 
    SUBTYPE OF (Styled_model_replication); 
      SELF\Styled_model_replication.replicated_model : view_area_replication_model; 
  END_ENTITY; 

  ENTITY View_relationship;
    relation_type : view_relation_type;
    description   : OPTIONAL STRING;
    relating      : View;
    related       : View;
  END_ENTITY;

  SUBTYPE_CONSTRAINT ph_styled_model_subtypes FOR Styled_model;
    ONEOF (View,
      View_area);
  END_SUBTYPE_CONSTRAINT;

END_SCHEMA;
