(*
 * $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/
 *)

(*schema_mapping effectivity_application(Effectivity_application_arm, Effectivity_application_mim);*)

uof_mapping Effectivity_Application(Effectivity_Application);

(** Moved pre_defined_product_...specializations *)
entity_mapping Pre_defined_effectivity_or_ineffectivity_assignment__aea(Pre_defined_effectivity_or_ineffectivity_assignment__aea, effectivity_assignment);

mapping_constraints;
			effectivity_assignment
			effectivity_assignment.role -> object_role
			object_role.name
			{(object_role.name = 'actual') 
			(object_role.name = 'planned') 
			(object_role.name = 'required')}
			
end_mapping_constraints;

end_entity_mapping;

entity_mapping Applied_effectivity_assignment__actual(Applied_effectivity_assignment__actual, effectivity_assignment);

mapping_constraints;

			effectivity_assignment
			effectivity_assignment.role -> object_role
			object_role.name
			{object_role.name = 'actual'}
		
end_mapping_constraints;

end_entity_mapping;

entity_mapping Applied_effectivity_assignment__planned(Applied_effectivity_assignment__planned, effectivity_assignment);

mapping_constraints;

			effectivity_assignment
			effectivity_assignment.role -> object_role
			object_role.name
			{object_role.name = 'planned'}
		
end_mapping_constraints;

end_entity_mapping;

entity_mapping Applied_effectivity_assignment__required(Applied_effectivity_assignment__required, effectivity_assignment);

mapping_constraints;

			effectivity_assignment
			effectivity_assignment.role -> object_role
			object_role.name
			{object_role.name = 'required'}
		
end_mapping_constraints;

end_entity_mapping;

(* Take it from AIM
entity_mapping Effectivity_assignment(Effectivity_assignment, 
				applied_effectivity_assignment
			);

mapping_constraints;

					applied_effectivity_assignment <= effectivity_assignment 
					
end_mapping_constraints;

attribute_mapping assigned_effectivity(assigned_effectivity, $PATH, Effectivity);

					applied_effectivity_assignment <= effectivity_assignment
					effectivity_assignment.assigned_effectivity -> effectivity
				
end_attribute_mapping;

attribute_mapping role(role, object_role.name);

					applied_effectivity_assignment <= effectivity_assignment
					effectivity_assignment =role_select
					role_select <- role_association.item_with_role
					role_association.role -> object_role
					object_role.name
				
end_attribute_mapping;

attribute_mapping items(items, $PATH, effectivity_item);

					applied_effectivity_assignment.items[i] -> effectivity_item
				
end_attribute_mapping;

end_entity_mapping;
*)
end_uof_mapping;

(*end_schema_mapping;*)
