(*
 * $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 part_definition_relationship(Part_definition_relationship_arm, Part_definition_relationship_mim);*)

uof_mapping Part_Definition_Relationship(Part_Definition_Relationship);

entity_mapping Make_from_relationship(Make_from_relationship, make_from_usage_option);

mapping_constraints;

		 make_from_usage_option <= product_definition_usage
		 
end_mapping_constraints;

attribute_mapping relating_view(relating_view, $PATH, Part_view_definition);

		 make_from_usage_option <= product_definition_usage
		 product_definition_usage <= product_definition_relationship
		 product_definition_relationship.relating_product_definition -> product_definition
			  {product_definition.frame_of_reference ->
product_definition_context
 			   product_definition_context <= application_context_element
			   application_context_element.name = 'part definition'}
		 
end_attribute_mapping;

attribute_mapping related_view(related_view, $PATH, Part_view_definition);

		 make_from_usage_option <= product_definition_usage
		 product_definition_usage <= product_definition_relationship
		 product_definition_relationship.related_product_definition -> product_definition
			  {product_definition.frame_of_reference ->
product_definition_context
 			   product_definition_context <= application_context_element
			   application_context_element.name = 'part definition'}
		 
end_attribute_mapping;

attribute_mapping quantity(quantity, $PATH, measure_with_unit);

			 make_from_usage_option.quantity -> measure_with_unit
			 
end_attribute_mapping;

attribute_mapping priority(priority, make_from_usage_option.ranking
       );

end_attribute_mapping;

end_entity_mapping;
end_uof_mapping;

(*end_schema_mapping;*)
