(*
 * $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 group(Group_arm, Group_mim);*)

uof_mapping Group(Group);

(* Take from AIM
entity_mapping Group(Group, (
				group
			)([group]
			[applied_group_assignment]
			));

mapping_constraints;

			group <- group_assignment.assigned_group
			group_assignment => applied_group_assignment
			
end_mapping_constraints;

attribute_mapping id(id, id_attribute.attribute_value);

group = id_attribute_select 
id_attribute_select <- id_attribute.identified_item
id_attribute.attribute_value
			
end_attribute_mapping;

attribute_mapping name(name, 
					group.name
				);

end_attribute_mapping;

attribute_mapping description(description, 
					group.description
				);

end_attribute_mapping;

attribute_mapping elements(elements, $PATH, groupable_item);

				  group <- group_assignment.assigned_group
					group_assignment => applied_group_assignment
					applied_group_assignment.items[i] -> groupable_item
				
end_attribute_mapping;

attribute_mapping membership_meaning(membership_meaning, object_role.name);

					applied_group_assignment
					applied_group_assignment <= group_assignment
					group_assignment.role -> object_role
					object_role.name
				
end_attribute_mapping;

end_entity_mapping;

entity_mapping Group_relationship(Group_relationship, group_relationship
			);

attribute_mapping relation_type(relation_type, group_relationship.name
				);

end_attribute_mapping;

attribute_mapping relating_group(relating_group, $PATH, Group);

					group_relationship.relating_group -> group
				
end_attribute_mapping;

attribute_mapping related_group(related_group, $PATH, Group);

					group_relationship.related_group -> group
				
end_attribute_mapping;

attribute_mapping description(description, group_relationship.description
				);

end_attribute_mapping;

end_entity_mapping;
*)
end_uof_mapping;

(*end_schema_mapping;*)
