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

(* Mixture of AIM and ARM *)
 
SCHEMA Property_assignment_xim;

USE FROM Foundation_representation_xim;    -- ISO/TS 10303-1006

USE FROM Independent_property_xim;    -- ISO/TS 10303-1036

USE FROM product_property_definition_schema(
	characterized_object,
	property_definition);

USE FROM product_property_representation_schema(property_definition_representation);

USE FROM support_resource_schema(
	identifier, 
	label,
	text);

TYPE property_assignment_select = EXTENSIBLE SELECT;
END_TYPE; 

TYPE property_value_select = SELECT
  (measure_with_unit,
  text);
END_TYPE; 

ENTITY Applied_independent_property
  (* CONNOTATIONAL *) SUBTYPE OF (Assigned_property);
  	base_independent_property : General_property; 
DERIVE
  SELF\Property_definition.name : STRING := base_independent_property.name;
END_ENTITY;
(** Made it ABSTRACT in order to minimize wrong hits on the mapping *)
ENTITY Assigned_property
	(* CONNOTATIONAL *)ABSTRACT SUBTYPE OF (Property_definition);
  	id_x : OPTIONAL STRING;
  	SELF\property_definition.definition RENAMED described_element : property_assignment_select;
  	(** Added in XIMs only in order to simplify model and avoid property_representation, representation, etc. **)
  	representation : OPTIONAL property_value_select;
  DERIVE
  	SELF\property_definition.id : identifier := id_x;
END_ENTITY;

(** Simplified XIM and remove this
ENTITY Property_representation
	SUBTYPE OF (property_definition_representation);
    SELF\property_definition_representation.definition RENAMED property     : Assigned_property;
END_ENTITY;
*)

END_SCHEMA;  -- Property_assignment_xim

