(*
 * $Id$
 *
 * JSDAI(TM), a way to implement STEP, ISO 10303
 * Copyright (C) 1997-2008, LKSoftWare GmbH, Germany
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License
 * version 3 as published by the Free Software Foundation (AGPL v3).
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * JSDAI is a registered trademark of LKSoftWare GmbH, Germany
 * This software is also available under commercial licenses.
 * See also http://www.jsdai.net/
 *)

(*
 Derived from ISO TC184/SC4/WG12 N3199 - ISO/TS 10303-1217 Zonal breakdown - EXPRESS ARM
 by LKSoftWare GmbH for implementation purpose within IDA-STEP(TM)
*) 


SCHEMA Zonal_breakdown_xim;

USE FROM Product_breakdown_xim;    -- ISO/TS 10303-1248

USE FROM Product_view_definition_xim;    -- ISO/TS 10303-1019

USE FROM zonal_breakdown_mim;

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

TYPE in_zone_item = EXTENSIBLE SELECT
   (Product_view_definition);
END_TYPE; 

ENTITY In_zone_armx
  SUBTYPE OF (in_zone);
  id_x : STRING;
  located_item : in_zone_item;
  zone : Zone_element_definition;
  DERIVE
    SELF\group.id : identifier := id_x;
END_ENTITY;

ENTITY Zone_breakdown
  SUBTYPE OF (Breakdown);
END_ENTITY;

ENTITY Zone_breakdown_context_armx
  SUBTYPE OF (Breakdown_context_armx, zone_breakdown_context);
  SELF\Breakdown_context_armx.breakdown : Zone_breakdown_version;
  SELF\Breakdown_context_armx.breakdown_element : Zone_element_definition;
END_ENTITY;

ENTITY Zone_breakdown_version
  SUBTYPE OF (Breakdown_version);
  SELF\product_definition_formation.of_product : Zone_breakdown;
END_ENTITY;

ENTITY Zone_element
  SUBTYPE OF (Breakdown_element);
  (* GL added *)
  WHERE
    WR1  : 'zone element' IN types_of_product(SELF);
END_ENTITY;

ENTITY Zone_element_definition
  SUBTYPE OF (Breakdown_element_definition);
  SELF\product_definition.formation : Zone_element_version;
  (* GL added to reflect restrictions from mapping *)
  WHERE
    WR1: SELF\Product_view_definition.initial_context\product_definition_context.name = 'zone definition';
END_ENTITY;

ENTITY Zone_element_usage_armx
  SUBTYPE OF (Breakdown_element_usage_armx, zone_element_usage);
  SELF\Breakdown_element_usage_armx.parent_element : Zone_element_definition;
  SELF\Breakdown_element_usage_armx.child_element : Zone_element_definition;
END_ENTITY;

ENTITY Zone_element_version
  SUBTYPE OF (Breakdown_element_version);
  SELF\product_definition_formation.of_product : Zone_element;
END_ENTITY;

END_SCHEMA;  -- Zonal_breakdown_xim

