(*
 * $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 WG12N2628 - ISO/TS 10303-1147 Manufacturing_configuration_effectivity - EXPRESS ARM
   by LKSoftWare GmbH for implementation purpose within IDA-STEP(TM)
*)

SCHEMA Manufacturing_configuration_effectivity_xim;

USE FROM Configuration_effectivity_xim;

USE FROM Person_organization_xim;

USE FROM Product_occurrence_xim;

USE FROM Specified_product_xim;

USE FROM Manufacturing_configuration_effectivity_mim;

ENTITY Dated_configuration
(* CONNOTATIONAL *) SUBTYPE OF (Manufacturing_configuration, dated_effectivity);
	DERIVE 
   effectivity_domain: dated_effectivity := SELF;
END_ENTITY;

ENTITY Lot_configuration
(* CONNOTATIONAL *) SUBTYPE OF (Manufacturing_configuration, lot_effectivity);
	DERIVE 
   effectivity_domain: lot_effectivity := SELF;
END_ENTITY;

ENTITY Manufacturing_configuration
ABSTRACT SUPERTYPE OF (ONEOF(Serial_configuration,Dated_configuration,
                         Lot_configuration))
(* CONNOTATIONAL *) SUBTYPE OF (configuration_effectivity);
  concerned_organization : OPTIONAL SET[1:?] OF Organization; (** Originally it is mandatory SET[0:?] **)
WHERE
WR1: ('MANUFACTURING_CONFIGURATION_EFFECTIVITY_XIM' + '.PRODUCT_SPECIFICATION_ARMX') IN TYPEOF(configuration.configuration);
WR2: ('MANUFACTURING_CONFIGURATION_EFFECTIVITY_XIM' + '.PRODUCT_OCCURRENCE') IN
TYPEOF(configuration_effectivity\product_definition_relationship.related_product_definition); 
END_ENTITY;

ENTITY Serial_configuration
 (* CONNOTATIONAL *) SUBTYPE OF (Manufacturing_configuration, serial_numbered_effectivity);
	DERIVE 
   effectivity_domain: serial_numbered_effectivity := SELF;
END_ENTITY;

END_SCHEMA;
