(*
 * $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 qualifications(Qualifications_arm, Qualifications_mim);*)

uof_mapping Qualifications(Qualifications);

entity_mapping Qualification_type(Qualification_type, qualification_type);

mapping_constraints;

end_mapping_constraints;

attribute_mapping name(name, qualification_type.name);

					qualification_type
					qualification_type.name
				
end_attribute_mapping;

attribute_mapping description(description, qualification_type.description);

					qualification_type
					qualification_type.description
				
end_attribute_mapping;

end_entity_mapping;

entity_mapping Qualification_assignment(Qualification_assignment, applied_qualification_type_assignment);

mapping_constraints;

				qualification_type_assignment =>
				applied_qualification_type_assignment
			
end_mapping_constraints;

attribute_mapping assigned_qualification_type(assigned_qualification_type, $PATH, Qualification_type);

					applied_qualification_type_assignment <=
					qualification_type_assignment
					qualification_type_assignment.assigned_qualification_type
					qualification_type
				
end_attribute_mapping;

attribute_mapping received_by(received_by, $PATH, qualifications_select);

                            applied_qualification_type_assignment
                            applied_qualification_type_assignment.items[1] ->
                            person_organization_item
                          
end_attribute_mapping;

attribute_mapping received_by(received_by, $PATH, Person);

					applied_qualification_type_assignment
					applied_qualification_type_assignment.items[1] ->
					person_organization_item =
					person
				
end_attribute_mapping;

attribute_mapping received_by(received_by, $PATH, Organization);

					applied_qualification_type_assignment
					applied_qualification_type_assignment.items[1] ->
					person_organization_item =
					organization
				
end_attribute_mapping;

attribute_mapping received_by(received_by, $PATH, person_and_organization);

					applied_qualification_type_assignment
					applied_qualification_type_assignment.items[1] ->
					person_organization_item =
					person_and_organization
				
end_attribute_mapping;

end_entity_mapping;

entity_mapping Qualification_type_relationship(Qualification_type_relationship, qualification_type_relationship);

mapping_constraints;

end_mapping_constraints;

attribute_mapping name(name, qualification_type_relationship.name);

end_attribute_mapping;

attribute_mapping description(description, qualification_type_relationship.description);

end_attribute_mapping;

attribute_mapping relating(relating, $PATH, Qualification_type);

					qualification_type_relationship
					qualification_type_relationship.relating_qualification_type ->
					qualification_type
				
end_attribute_mapping;

attribute_mapping related(related, $PATH, Qualification_type);

					qualification_type_relationship
					qualification_type_relationship.related_qualification_type ->
					qualification_type
				
end_attribute_mapping;

end_entity_mapping;
end_uof_mapping;

(* AIM entity is taken instead
entity_mapping Certification_assignment(Certification_assignment, applied_certification_assignment)
extended;

attribute_mapping items(items, $PATH, Qualification_assignment);

					certification_item *>
					qualification_type_certification_item
					qualification_type_certification_item =
					applied_qualification_type_assignment
				
end_attribute_mapping;

end_entity_mapping;
*)
(* AIM entity is taken instead
entity_mapping Classification_assignment(Classification_assignment, applied_classification_assignment)
extended;

attribute_mapping items(items, $PATH, Qualification_type);

					classification_item *>
					qualification_type_classification_item
					qualification_type_classification_item =
					qualification_type
				
end_attribute_mapping;

end_entity_mapping;
*)
(* Select from AIM is taken instead
entity_mapping Date_or_date_time_assignment(Date_or_date_time_assignment, ((date_assignment))((date_and_time_assignment)))
extended;

attribute_mapping items(items, $PATH, Qualification_assignment);
(
						date_item *>
						qualification_type_date_item
						qualification_type_date_item =
						applied_qualification_type_assignment
					)(
						date_and_time_item *>
						qualification_type_date_and_time_item
						qualification_type_date_and_time_item =
						applied_qualification_type_assignment
					)
end_attribute_mapping;

end_entity_mapping;
*)
(* AIM select organization_or_person_in_organization_assignment_select is used instead
entity_mapping Organization_or_person_in_organization_assignment(Organization_or_person_in_organization_assignment, ( 
			(applied_organization_assignment)
			)( 
			(applied_person_and_organization_assignment)
			))
extended;

attribute_mapping items(items, , Qualification_assignment);
(
						person_and_organization_item *>
						qualification_type_person_and_organization_item
						qualification_type_person_and_organization_item =
						applied_qualification_type_assignment
		                    )(
						person_and_organization_item *>
						qualification_type_person_and_organization_item
						qualification_type_person_and_organization_item =
						applied_qualification_type_assignment
					)
end_attribute_mapping;

attribute_mapping items(items, , Qualification_type);
(
						person_and_organization_item *>
						qualification_type_person_and_organization_item
						qualification_type_person_and_organization_item =
						qualification_type
		                    )(
						person_and_organization_item *>
						qualification_type_person_and_organization_item
						qualification_type_person_and_organization_item =
						qualification_type
					)
end_attribute_mapping;

end_entity_mapping;
*)
(*end_schema_mapping;*)
