(*
 * $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_template_2d_shape(Part_template_2d_shape_arm, Part_template_2d_shape_mim);*)
entity_mapping Breakout_footprint_definition_shape_model(Breakout_footprint_definition_shape_model, shape_representation);

mapping_constraints;
{shape_representation <=
representation
[representation.name = 'ppsm']
[representation.description = 'breakout footprint definition shape model']
[representation <-
property_definition_representation.used_representation
property_definition_representation
{property_definition_representation =>
shape_definition_representation}
property_definition_representation.definition ->
property_definition =>
product_definition_shape =>
part_template_definition =>
geometric_template =>
structured_template]}
			
end_mapping_constraints;

attribute_mapping shape_characterized_definition(shape_characterized_definition, $PATH, Breakout_footprint_definition_armx);
shape_representation <=
representation <-
property_definition_representation.used_representation
property_definition_representation
{property_definition_representation =>
shape_definition_representation}
property_definition_representation.definition ->
property_definition =>
product_definition_shape =>
part_template_definition =>
geometric_template =>
structured_template =>
multi_stratum_structured_template =>
generic_footprint_definition =>
breakout_footprint_definition

end_attribute_mapping;

attribute_mapping reference_shape(reference_shape, $PATH, Footprint_definition_shape_model);
shape_representation <=
representation <-
representation_relationship.rep_2
representation_relationship
{representation_relationship
representation_relationship.name = 'reference shape'}
representation_relationship.rep_1 ->
representation =>
shape_representation

end_attribute_mapping;

end_entity_mapping;


entity_mapping Footprint_definition_armx(Footprint_definition_armx, footprint_definition);

mapping_constraints;
footprint_definition <= 
generic_footprint_definition <= 
multi_stratum_structured_template  <=
structured_template  <=
geometric_template <=
part_template_definition <=
product_definition
{[product_definition
product_definition.formation ->
product_definition_formation
product_definition_formation.of_product ->
product <-
product_related_product_category.products[i]
product_related_product_category <=
product_category
product_category.name = 'template model']
[product_definition <-
product_definition_context_association.definition
product_definition_context_association
{product_definition_context_association.role ->
product_definition_context_role
product_definition_context_role.name = 'part definition type'}
product_definition_context_association.frame_of_reference ->
product_definition_context <=
application_context_element
application_context_element.name = 'template definition']}

end_mapping_constraints;

attribute_mapping reference_package(reference_package, $PATH, Part_usage_view);
				footprint_definition <=
				generic_footprint_definition <= 
				multi_stratum_structured_template  <=
				structured_template  <=
				geometric_template <=
				part_template_definition <=
				product_definition_shape <=
				property_definition <-
				property_definition_relationship.related_property_definition
				property_definition_relationship
				{property_definition_relationship
				property_definition_relationship.name = 'reference package'}
				property_definition_relationship.relating_property_definition ->
				property_definition =>
				product_definition_shape =>
				physical_unit
				
end_attribute_mapping;

end_entity_mapping;

entity_mapping Breakout_footprint_definition_armx(Breakout_footprint_definition_armx, breakout_footprint_definition);

mapping_constraints;
breakout_footprint_definition <=
generic_footprint_definition <= 
multi_stratum_structured_template <=
structured_template <=
geometric_template <=
part_template_definition <=
product_definition
{[product_definition
product_definition.formation ->
product_definition_formation
product_definition_formation.of_product ->
product <-
product_related_product_category.products[i]
product_related_product_category <=
product_category
product_category.name = 'template model']
[product_definition <-
product_definition_context_association.definition
product_definition_context_association
{product_definition_context_association.role ->
product_definition_context_role
product_definition_context_role.name = 'part definition type'}
product_definition_context_association.frame_of_reference ->
product_definition_context <=
application_context_element
application_context_element.name = 'template definition']}

end_mapping_constraints;

attribute_mapping reference_footprint(reference_footprint, $PATH, Footprint_definition_armx);
				breakout_footprint_definition <=
				generic_footprint_definition <=
				multi_stratum_structured_template <=
				structured_template <=
				geometric_template <=
				part_template_definition <=
				product_definition <-
				product_definition_relationship.related_product_definition
				{product_definition_relationship
				product_definition_relationship.name = 'reference footprint'}
				product_definition_relationship
				product_definition_relationship.relating_product_definition -> product_definition
				product_definition =>
				part_template_definition =>
				geometric_template =>
				structured_template =>
				multi_stratum_structured_template =>
				generic_footprint_definition =>
				footprint_definition
				
end_attribute_mapping;


end_entity_mapping;


entity_mapping Generic_footprint_definition_armx(Generic_footprint_definition_armx, generic_footprint_definition);

mapping_constraints;
generic_footprint_definition <= 
multi_stratum_structured_template <=
structured_template <=
geometric_template <=
part_template_definition <=
product_definition
{[product_definition
product_definition.formation ->
product_definition_formation
product_definition_formation.of_product ->
product <-
product_related_product_category.products[i]
product_related_product_category <=
product_category
product_category.name = 'template model']
[product_definition <-
product_definition_context_association.definition
product_definition_context_association
{product_definition_context_association.role ->
product_definition_context_role
product_definition_context_role.name = 'part definition type'}
product_definition_context_association.frame_of_reference ->
product_definition_context <=
application_context_element
application_context_element.name = 'template definition']}

end_mapping_constraints;

end_entity_mapping;

entity_mapping Footprint_definition_shape_model(Footprint_definition_shape_model, shape_representation);

mapping_constraints;
{shape_representation <=
representation
[representation.name = 'ppsm']
[representation.description = 'footprint definition shape model']
[representation <-
property_definition_representation.used_representation
property_definition_representation
{property_definition_representation =>
shape_definition_representation}
property_definition_representation.definition ->
property_definition =>
product_definition_shape =>
part_template_definition =>
geometric_template =>
structured_template =>
multi_stratum_structured_template =>
generic_footprint_definition]}

end_mapping_constraints;

attribute_mapping shape_characterized_definition(shape_characterized_definition, $PATH, Generic_footprint_definition_armx);
shape_representation <=
representation <-
property_definition_representation.used_representation
property_definition_representation
{property_definition_representation =>
shape_definition_representation}
property_definition_representation.definition ->
property_definition =>
product_definition_shape =>
part_template_definition =>
geometric_template =>
structured_template =>
multi_stratum_structured_template =>
generic_footprint_definition

end_attribute_mapping;

attribute_mapping reference_shape(reference_shape, $PATH, physical_unit_shape_model_select);
shape_representation <=
representation <-
representation_relationship.rep_2
representation_relationship
{representation_relationship
representation_relationship.name = 'reference shape'}
representation_relationship.rep_1 ->
representation =>
shape_representation

end_attribute_mapping;

end_entity_mapping;

entity_mapping Footprint_definition_shape_model(Footprint_definition_shape_model, shape_representation)
extended;

attribute_mapping reference_shape(reference_shape, $PATH, Part_template_planar_shape_model);
				shape_representation
				
end_attribute_mapping;

attribute_mapping reference_shape(reference_shape, $PATH, Physical_unit_planar_shape_model);
				shape_representation
				
end_attribute_mapping;

end_entity_mapping;

entity_mapping Part_feature_based_template_location(Part_feature_based_template_location, assembly_component_usage);

mapping_constraints;
{assembly_component_usage <=
product_definition_usage <=
product_definition_relationship
product_definition_relationship.name = 'tlist'}
characterized_product_definition = product_definition_relationship
characterized_definition = characterized_product_definition
characterized_definition <-
property_definition.definition
property_definition <-
property_definition_relationship.related_property_definition
{property_definition_relationship
property_definition_relationship.name = 'reference feature'}
property_definition_relationship.relating_property_definition ->
property_definition.definition ->
characterized_definition = shape_definition
shape_definition = shape_aspect
shape_aspect

end_mapping_constraints;

attribute_mapping reference_feature(reference_feature, $PATH, Shape_element);
assembly_component_usage <=
product_definition_usage <=
product_definition_relationship
characterized_product_definition = product_definition_relationship
characterized_definition = characterized_product_definition
characterized_definition <-
property_definition.definition
property_definition <-
property_definition_relationship.related_property_definition
{property_definition_relationship
property_definition_relationship.name = 'reference feature'}
property_definition_relationship.relating_property_definition ->
property_definition.definition ->
characterized_definition = shape_definition
shape_definition = shape_aspect
shape_aspect

end_attribute_mapping;

end_entity_mapping;



entity_mapping Stratum_feature_template_location_in_breakout_footprint_definition(Stratum_feature_template_location_in_breakout_footprint_definition, stratum_specific_template_location);

mapping_constraints;
stratum_specific_template_location <=
assembly_component_usage <=
product_definition_usage <=
product_definition_relationship
{product_definition_relationship.name = 'tlist'}
{product_definition_relationship.relating_product_definition ->
product_definition =>
part_template_definition =>
geometric_template =>
structured_template =>
multi_stratum_structured_template =>
generic_footprint_definition =>
breakout_footprint_definition}

end_mapping_constraints;

attribute_mapping template(template, $PATH, Stratum_feature_template_armx);
stratum_specific_template_location <=
assembly_component_usage <=
product_definition_usage <=
product_definition_relationship
product_definition_relationship.related_product_definition ->
product_definition =>
part_template_definition =>
single_stratum_template =>
single_stratum_continuous_template =>
stratum_feature_template

end_attribute_mapping;

attribute_mapping assembly(assembly, $PATH, Breakout_footprint_definition_armx);
stratum_specific_template_location <=
assembly_component_usage <=
product_definition_usage <=
product_definition_relationship
product_definition_relationship.relating_product_definition ->
product_definition =>
part_template_definition =>
geometric_template =>
structured_template =>
multi_stratum_structured_template =>
generic_footprint_definition =>
breakout_footprint_definition

end_attribute_mapping;

attribute_mapping original_padstack(original_padstack, $PATH, Part_feature_based_template_location);
stratum_specific_template_location <=
assembly_component_usage <=
product_definition_usage <=
product_definition_relationship
characterized_product_definition = product_definition_relationship
characterized_product_definition
characterized_definition = characterized_product_definition
characterized_definition <-
property_definition.definition
property_definition <-
property_definition_relationship.related_property_definition
property_definition_relationship
{property_definition_relationship.name = 'original padstack'}
property_definition_relationship.relating_property_definition ->
property_definition
property_definition.definition ->
characterized_definition
characterized_definition = characterized_product_definition
characterized_product_definition
characterized_product_definition = product_definition_relationship
product_definition_relationship =>
product_definition_usage =>
assembly_component_usage

end_attribute_mapping;

attribute_mapping breakout_padstack(breakout_padstack, $PATH, Template_location_in_structured_template);
stratum_specific_template_location <=
assembly_component_usage <=
product_definition_usage <=
product_definition_relationship
characterized_product_definition = product_definition_relationship
characterized_product_definition
characterized_definition = characterized_product_definition
characterized_definition <-
property_definition.definition
property_definition <-
property_definition_relationship.related_property_definition
property_definition_relationship
{property_definition_relationship.name = 'breakout padstack'}
property_definition_relationship.relating_property_definition ->
property_definition
property_definition.definition ->
characterized_definition
characterized_definition = characterized_product_definition
characterized_product_definition
characterized_product_definition = product_definition_relationship
{product_definition_relationship.name = 'tlist'}
product_definition_relationship =>
product_definition_usage =>
assembly_component_usage

end_attribute_mapping;


end_entity_mapping;

(*end_schema_mapping;*)
