(*
 * $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 N3127 - ISO/TS 10303-1140 Requirement identification and version - EXPRESS ARM
   by LKSoftWare GmbH for implementation purpose within IDA-STEP(TM)
*)

(* Based on ARM *) 


SCHEMA Requirement_identification_and_version_xim;

USE FROM Management_resource_information_xim;    -- ISO/TS 10303-1288

USE FROM product_version_relationship_xim;    -- ISO/TS 10303-1020

USE FROM support_resource_schema(
  identifier,
  label);

USE FROM application_context_schema(product_context);

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

TYPE requirement_identification_and_version_identification_item = SELECT BASED_ON identification_item WITH 
   (Requirement, 
    Requirement_version);
END_TYPE; 

ENTITY Requirement
  (* CONNOTATIONAL *) SUBTYPE OF (Product_armx);
(** Added for consistency reasons - it is in the mapping and in similar cases in the ARM (e.g. Part, Template...), so have it here as well **)
WHERE
  WR1: SIZEOF(['requirement']*types_of_product(SELF))=1;
END_ENTITY;

ENTITY Requirement_version
  (* CONNOTATIONAL *) SUBTYPE OF (product_definition_formation);
  SELF\Product_definition_formation.of_product : Requirement;
END_ENTITY;

ENTITY Requirement_version_relationship
  (* CONNOTATIONAL *) SUBTYPE OF (product_definition_formation_relationship);
  SELF\Product_definition_formation_relationship.relating_product_definition_formation RENAMED predecessor : Requirement_version;
  SELF\Product_definition_formation_relationship.related_product_definition_formation RENAMED successor : Requirement_version;
DERIVE
  SELF\product_definition_formation_relationship.id : identifier := ?;
END_ENTITY;

END_SCHEMA;  -- Requirement_identification_and_version_xim


