(*
 * $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 assembly_component_placement_requirements(Assembly_component_placement_requirements_arm, Assembly_component_placement_requirements_mim);*)

entity_mapping Assembly_group_spacing_requirement_occurrence_armx(Assembly_group_spacing_requirement_occurrence_armx, assembly_group_spacing_requirement_occurrence);

mapping_constraints;
assembly_group_spacing_requirement_occurrence <=
predefined_requirement_view_definition

end_mapping_constraints;

attribute_mapping of_spacing_type(of_spacing_type, $PATH);
assembly_group_spacing_requirement_occurrence <=
predefined_requirement_view_definition <=
product_definition			
characterized_product_definition = product_definition
characterized_product_definition
characterized_definition = characterized_product_definition
characterized_definition <-
property_definition.definition
property_definition
{property_definition.name = 'of spacing type'}
property_definition.description
{(property_definition.description = 'nearest boundary')
(property_definition.description = 'centroid')
(property_definition.description = 'furthest boundary')}

end_attribute_mapping;

attribute_mapping dependent_group(dependent_group, $PATH, Placement_group_requirement_definition);
assembly_group_spacing_requirement_occurrence <=
predefined_requirement_view_definition <=
product_definition <-
product_definition_relationship.related_product_definition
{product_definition_relationship
product_definition_relationship.name = 'dependent group'}
product_definition_relationship.relating_product_definition ->
product_definition =>
component_definition =>
group_product_definition

end_attribute_mapping;

attribute_mapping reference_group(reference_group, $PATH, Placement_group_requirement_definition);
assembly_group_spacing_requirement_occurrence <=
predefined_requirement_view_definition <=
product_definition <-
product_definition_relationship.related_product_definition
{product_definition_relationship
product_definition_relationship.name = 'reference group'}
product_definition_relationship.relating_product_definition ->
product_definition =>
component_definition =>
group_product_definition

end_attribute_mapping;

attribute_mapping required_characteristic(required_characteristic, $PATH, Length_tolerance_characteristic);
assembly_group_spacing_requirement_occurrence <=
predefined_requirement_view_definition <=
product_definition			
characterized_product_definition = product_definition
characterized_product_definition
characterized_definition = characterized_product_definition
characterized_definition <-
property_definition.definition
{property_definition.name = 'required characteristic'}
property_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation 

end_attribute_mapping;

end_entity_mapping;


entity_mapping Assembly_spacing_requirement_occurrence_armx(Assembly_spacing_requirement_occurrence_armx, assembly_spacing_requirement_occurrence);

mapping_constraints;
assembly_spacing_requirement_occurrence <=
predefined_requirement_view_definition

end_mapping_constraints;

attribute_mapping of_spacing_type(of_spacing_type, $PATH);
assembly_spacing_requirement_occurrence <=
predefined_requirement_view_definition <=
product_definition			
characterized_product_definition = product_definition
characterized_product_definition
characterized_definition = characterized_product_definition
characterized_definition <-
property_definition.definition
property_definition
{property_definition.name = 'of spacing type'}
property_definition.description
{(property_definition.description = 'nearest boundary')
(property_definition.description = 'centroid')
(property_definition.description = 'furthest boundary')}

end_attribute_mapping;

attribute_mapping dependent_design_object_category(dependent_design_object_category, group);
assembly_spacing_requirement_occurrence
groupable_item = assembly_spacing_requirement_occurrence 
groupable_item <-
applied_group_assignment.items[i]
applied_group_assignment <=
group_assignment 
{group_assignment.role ->
object_role
object_role.name = 'dependent design object category'}
group_assignment.assigned_group ->
group 
end_attribute_mapping;

attribute_mapping dependent_design_object_category(dependent_design_object_category, characterized_object.name);
assembly_spacing_requirement_occurrence <=
predefined_requirement_view_definition <=
product_definition			
characterized_product_definition = product_definition
characterized_product_definition
characterized_definition = characterized_product_definition
characterized_definition <-
property_definition.definition
property_definition <-
property_definition_relationship.relating_property_definition
{property_definition_relationship.name = 'dependent design object category'}
property_definition_relationship.related_property_definition ->
property_definition
property_definition.definition ->
characterized_definition
characterized_definition = characterized_object
characterized_object
characterized_object.name
{(characterized_object.name = 'assembly component category')
(characterized_object.name = 'assembly module component category')
(characterized_object.name = 'assembly module component terminal category')
(characterized_object.name = 'assembly module macro component category')
(characterized_object.name = 'assembly module macro component join terminal category')
(characterized_object.name = 'bare die component category')
(characterized_object.name = 'bare die component terminal category')
(characterized_object.name = 'buried via category')
(characterized_object.name = 'cable component category')
(characterized_object.name = 'component feature category')
(characterized_object.name = 'component termination passage category')
(characterized_object.name = 'conductive interconnect element with pre defined transitions category')
(characterized_object.name = 'cutout category')
(characterized_object.name = 'cutout edge segment category')
(characterized_object.name = 'dielectric material passage category')
(characterized_object.name = 'embedded physical component terminal category')
(characterized_object.name = 'fiducial category')
(characterized_object.name = 'fill area category')
(characterized_object.name = 'inter stratum feature category')
(characterized_object.name = 'interconnect component interface terminal category')
(characterized_object.name = 'interconnect component join terminal category')
(characterized_object.name = 'interconnect module component category')
(characterized_object.name = 'interconnect module component stratum based terminal category')
(characterized_object.name = 'interconnect module component surface feature category')
(characterized_object.name = 'interconnect module component terminal category')
(characterized_object.name = 'interconnect module edge category')
(characterized_object.name = 'interconnect module edge segment category')
(characterized_object.name = 'interconnect module macro component category')
(characterized_object.name = 'interconnect module macro component join terminal category')
(characterized_object.name = 'interface access material removal laminate component category')
(characterized_object.name = 'interface access stratum feature template component category')
(characterized_object.name = 'interface component category')
(characterized_object.name = 'interfacial connection category')
(characterized_object.name = 'internal probe access area category')
(characterized_object.name = 'laminate component category')
(characterized_object.name = 'minimally defined component terminal category')
(characterized_object.name = 'packaged component category')
(characterized_object.name = 'packaged component join terminal category')
(characterized_object.name = 'packaged connector component category')
(characterized_object.name = 'packaged connector component interface terminal category')
(characterized_object.name = 'physical component category')
(characterized_object.name = 'plated passage or unsupported passage category')
(characterized_object.name = 'routed interconnect component category')
(characterized_object.name = 'routed physical component category')
(characterized_object.name = 'stratum feature category')
(characterized_object.name = 'via category')}

end_attribute_mapping;

attribute_mapping reference_design_object_category(reference_design_object_category, group);
assembly_spacing_requirement_occurrence
groupable_item = assembly_spacing_requirement_occurrence 
groupable_item <-
applied_group_assignment.items[i]
applied_group_assignment <=
group_assignment 
{group_assignment.role ->
object_role
object_role.name = 'reference design object category'}
group_assignment.assigned_group ->
group 
end_attribute_mapping;

attribute_mapping reference_design_object_category(reference_design_object_category, characterized_object.name);
assembly_spacing_requirement_occurrence <=
predefined_requirement_view_definition <=
product_definition			
characterized_product_definition = product_definition
characterized_product_definition
characterized_definition = characterized_product_definition
characterized_definition <-
property_definition.definition
property_definition <-
property_definition_relationship.relating_property_definition
{property_definition_relationship.name = 'reference design object category'}
property_definition_relationship.related_property_definition ->
property_definition
property_definition.definition ->
characterized_definition
characterized_definition = characterized_object
characterized_object
characterized_object.name
{(characterized_object.name = 'assembly component category')
(characterized_object.name = 'assembly module component category')
(characterized_object.name = 'assembly module component terminal category')
(characterized_object.name = 'assembly module macro component category')
(characterized_object.name = 'assembly module macro component join terminal category')
(characterized_object.name = 'bare die component category')
(characterized_object.name = 'bare die component terminal category')
(characterized_object.name = 'buried via category')
(characterized_object.name = 'cable component category')
(characterized_object.name = 'component feature category')
(characterized_object.name = 'component termination passage category')
(characterized_object.name = 'conductive interconnect element with pre defined transitions category')
(characterized_object.name = 'cutout category')
(characterized_object.name = 'cutout edge segment category')
(characterized_object.name = 'dielectric material passage category')
(characterized_object.name = 'embedded physical component terminal category')
(characterized_object.name = 'fiducial category')
(characterized_object.name = 'fill area category')
(characterized_object.name = 'inter stratum feature category')
(characterized_object.name = 'interconnect component interface terminal category')
(characterized_object.name = 'interconnect component join terminal category')
(characterized_object.name = 'interconnect module component category')
(characterized_object.name = 'interconnect module component stratum based terminal category')
(characterized_object.name = 'interconnect module component surface feature category')
(characterized_object.name = 'interconnect module component terminal category')
(characterized_object.name = 'interconnect module edge category')
(characterized_object.name = 'interconnect module edge segment category')
(characterized_object.name = 'interconnect module macro component category')
(characterized_object.name = 'interconnect module macro component join terminal category')
(characterized_object.name = 'interface access material removal laminate component category')
(characterized_object.name = 'interface access stratum feature template component category')
(characterized_object.name = 'interface component category')
(characterized_object.name = 'interfacial connection category')
(characterized_object.name = 'internal probe access area category')
(characterized_object.name = 'laminate component category')
(characterized_object.name = 'minimally defined component terminal category')
(characterized_object.name = 'packaged component category')
(characterized_object.name = 'packaged component join terminal category')
(characterized_object.name = 'packaged connector component category')
(characterized_object.name = 'packaged connector component interface terminal category')
(characterized_object.name = 'physical component category')
(characterized_object.name = 'plated passage or unsupported passage category')
(characterized_object.name = 'routed interconnect component category')
(characterized_object.name = 'routed physical component category')
(characterized_object.name = 'stratum feature category')
(characterized_object.name = 'via category')}

end_attribute_mapping;

attribute_mapping required_characteristic(required_characteristic, $PATH, Tolerance_characteristic);
assembly_spacing_requirement_occurrence <=
predefined_requirement_view_definition <=
product_definition			
characterized_product_definition = product_definition
characterized_product_definition
characterized_definition = characterized_product_definition
characterized_definition <-
property_definition.definition
{property_definition.name = 'required characteristic'}
property_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation

end_attribute_mapping;

end_entity_mapping;

entity_mapping Component_group_assignment(Component_group_assignment, (product_definition_relationship)(property_definition_relationship));

mapping_constraints;
({product_definition_relationship
product_definition_relationship.name = 'group member'})
({property_definition_relationship
property_definition_relationship.name = 'group member'})

end_mapping_constraints;

attribute_mapping assigned_component(assigned_component, $PATH, Assembly_component_armx);
(product_definition_relationship
product_definition_relationship.relating_product_definition ->
product_definition =>
component_definition =>
assembly_component)
(property_definition_relationship.relating_property_definition ->
property_definition
property_definition.definition ->
characterized_definition
characterized_definition = shape_definition
shape_definition = shape_aspect
shape_aspect)

end_attribute_mapping;

attribute_mapping assigned_component(assigned_component, $PATH, Component_feature);
property_definition_relationship.relating_property_definition ->
property_definition
property_definition.definition ->
characterized_definition
characterized_definition = shape_definition
shape_definition = shape_aspect
shape_aspect

end_attribute_mapping;

attribute_mapping assigned_component(assigned_component, $PATH, Assembly_component_armx);
product_definition_relationship
product_definition_relationship.relating_product_definition ->
product_definition =>
component_definition =>
assembly_component

end_attribute_mapping;

attribute_mapping associated_group(associated_group, $PATH, Placement_group_requirement_definition);
(product_definition_relationship
product_definition_relationship.related_product_definition ->
product_definition =>
component_definition =>
group_product_definition)
(property_definition_relationship.relating_property_definition ->
property_definition
property_definition.definition ->
characterized_definition
characterized_definition = characterized_product_definition
characterized_product_definition = product_definition
product_definition =>
component_definition =>
group_product_definition)

end_attribute_mapping;

end_entity_mapping;

entity_mapping Component_placement_restriction_assignment(Component_placement_restriction_assignment, representation);

mapping_constraints;
representation
{representation.name = 'component placement restriction assignment'}

end_mapping_constraints;

attribute_mapping components_permitted(components_permitted, descriptive_representation_item);
representation
representation.items[i] ->
{representation_item
representation_item.name = 'components permitted'}
representation_item =>
descriptive_representation_item
{descriptive_representation_item
(descriptive_representation_item.description = 'true')
(descriptive_representation_item.description = 'false')}

end_attribute_mapping;

attribute_mapping mounting_clearance(mounting_clearance, $PATH, Length_tolerance_characteristic);
representation <-
representation_relationship.rep_1
representation_relationship
{representation_relationship.name = 'mounting clearance'}
representation_relationship.rep_2 ->
representation

end_attribute_mapping;

attribute_mapping maximum_negative_component_height(maximum_negative_component_height, $PATH, Length_tolerance_characteristic);
representation <-
representation_relationship.rep_1
representation_relationship
{representation_relationship.name = 'maximum negative component height'}
representation_relationship.rep_2 ->
representation

end_attribute_mapping;

attribute_mapping maximum_positive_component_height(maximum_positive_component_height, $PATH, Length_tolerance_characteristic);
representation <-
representation_relationship.rep_1
representation_relationship
{representation_relationship.name = 'maximum positive component height'}
representation_relationship.rep_2 ->
representation

end_attribute_mapping;

attribute_mapping requirement(requirement, $PATH, Item_restricted_requirement_occurrence_armx);
representation <-
property_definition_representation.used_representation
property_definition_representation
property_definition_representation.definition ->
property_definition.definition ->
characterized_definition
characterized_definition = characterized_product_definition
characterized_product_definition
characterized_product_definition = product_definition
product_definition =>
predefined_requirement_view_definition =>
item_restricted_requirement_occurrence

end_attribute_mapping;

attribute_mapping area(area, $PATH, Mounting_restriction_area);
representation <-
representation_relationship.rep_1
{representation_relationship
representation_relationship.name = 'component placement restriction assignment area'}
representation_relationship.rep_2 ->
representation <-
property_definition_representation.used_representation
property_definition_representation
property_definition_representation.definition ->
property_definition
property_definition.definition ->
characterized_definition
characterized_definition = shape_definition
shape_definition
shape_definition = shape_aspect
shape_aspect =>
mounting_restriction_area

end_attribute_mapping;

attribute_mapping volume(volume, $PATH, Mounting_restriction_volume);
representation <-
representation_relationship.rep_1
{representation_relationship
representation_relationship.name = 'component placement restriction assignment volume'}
representation_relationship.rep_2 ->
representation <-
property_definition_representation.used_representation
property_definition_representation
property_definition_representation.definition ->
property_definition
property_definition.definition ->
characterized_definition
characterized_definition = shape_definition
shape_definition
shape_definition = shape_aspect
shape_aspect =>
mounting_restriction_volume

end_attribute_mapping;

end_entity_mapping;

entity_mapping Item_restricted_requirement_occurrence_armx(Item_restricted_requirement_occurrence_armx, item_restricted_requirement_occurrence);

mapping_constraints;
item_restricted_requirement_occurrence <=
[group]
[predefined_requirement_view_definition <=
product_definition]

end_mapping_constraints;

attribute_mapping basis(basis, $PATH, restriction_basis_item);
item_restricted_requirement_occurrence <=
group <- 
group_assignment.assigned_group
group_assignment =>
applied_group_assignment
applied_group_assignment.items[i] ->
groupable_item

end_attribute_mapping;

end_entity_mapping;

entity_mapping Item_restricted_requirement_occurrence_armx(Item_restricted_requirement_occurrence_armx, item_restricted_requirement_occurrence)
extended;

attribute_mapping basis(basis, $PATH, Predefined_requirement_view_definition_armx);
				groupable_item
				groupable_item = predefined_requirement_view_definition
				predefined_requirement_view_definition
				
end_attribute_mapping;

attribute_mapping basis(basis, $PATH, Part_feature);
				groupable_item
				groupable_item = shape_aspect
				shape_aspect
				
end_attribute_mapping;

end_entity_mapping;

entity_mapping mounting_restriction_area_armx(mounting_restriction_area_armx, mounting_restriction_area);

mapping_constraints;
mounting_restriction_area <=
shape_aspect

end_mapping_constraints;

attribute_mapping mounting_surface(mounting_surface, $PATH, Interconnect_module_component_surface_feature_armx);
mounting_restriction_area <=
shape_aspect <-
shape_aspect_relationship.relating_shape_aspect
{shape_aspect_relationship
shape_aspect_relationship.name = 'mounting surface'}
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
{shape_aspect.description = 'interconnect module component surface feature'}
shape_aspect =>
component_feature =>				
physical_component_feature =>
interconnect_module_component_surface_feature 

end_attribute_mapping;

attribute_mapping scope(scope, $PATH, Assembly_module);
mounting_restriction_area <=
shape_aspect
shape_aspect.of_shape ->
product_definition_shape
{product_definition_shape <=
property_definition
{property_definition.name = 'assembly module'}}
product_definition_shape =>
physical_unit

end_attribute_mapping;

end_entity_mapping;

entity_mapping mounting_restriction_volume_armx(mounting_restriction_volume_armx, mounting_restriction_volume);

mapping_constraints;
mounting_restriction_volume <=
shape_aspect

end_mapping_constraints;

attribute_mapping mounting_surface(mounting_surface, $PATH, Interconnect_module_component_surface_feature_armx);
mounting_restriction_volume <=
shape_aspect <-
shape_aspect_relationship.relating_shape_aspect
{shape_aspect_relationship
shape_aspect_relationship.name = 'mounting surface'}
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
{shape_aspect.description = 'interconnect module component surface feature'}
shape_aspect =>
component_feature =>				
physical_component_feature =>
interconnect_module_component_surface_feature 

end_attribute_mapping;

attribute_mapping scope(scope, $PATH, Assembly_module);
mounting_restriction_volume <=
shape_aspect
shape_aspect.of_shape ->
product_definition_shape
{product_definition_shape <=
property_definition
{property_definition.name = 'assembly module'}}
product_definition_shape =>
physical_unit

end_attribute_mapping;

end_entity_mapping;

entity_mapping Placement_group_requirement_definition(Placement_group_requirement_definition, group_product_definition);

mapping_constraints;
group_product_definition <=
component_definition <=
product_definition
{product_definition
product_definition.description = 'placement group'}

end_mapping_constraints;

attribute_mapping design_specific_usage(design_specific_usage, product_definition.id);
group_product_definition <=
component_definition <=
product_definition
product_definition.id

end_attribute_mapping;

end_entity_mapping;

entity_mapping Placement_group_area_assignment(Placement_group_area_assignment, shape_aspect_relationship);

mapping_constraints;
{shape_aspect_relationship
shape_aspect_relationship.name = 'area impacted group'}

end_mapping_constraints;

attribute_mapping area(area, $PATH, Mounting_restriction_area);
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect =>
mounting_restriction_area

end_attribute_mapping;

attribute_mapping placed_group(placed_group, $PATH, Placement_group_requirement_definition);
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect
shape_aspect.of_shape ->
product_definition_shape <=
property_definition
property_definition.definition ->
characterized_definition
characterized_definition = characterized_product_definition
characterized_product_definition
characterized_product_definition = product_definition
product_definition =>
component_definition =>
group_product_definition

end_attribute_mapping;

end_entity_mapping;

entity_mapping Placement_group_volume_assignment(Placement_group_volume_assignment, shape_aspect_relationship);

mapping_constraints;
{shape_aspect_relationship
shape_aspect_relationship.name = 'volume impacted group'}

end_mapping_constraints;

attribute_mapping volume(volume, $PATH, Mounting_restriction_area);
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect =>
mounting_restriction_volume

end_attribute_mapping;

attribute_mapping placed_group(placed_group, $PATH, Placement_group_requirement_definition);
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect
shape_aspect.of_shape ->
product_definition_shape <=
property_definition
property_definition.definition ->
characterized_definition
characterized_definition = characterized_product_definition
characterized_product_definition
characterized_product_definition = product_definition
{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'}
product_definition =>
component_definition =>
group_product_definition

end_attribute_mapping;

end_entity_mapping;

entity_mapping requirement_assignment_armx(requirement_assignment_armx, requirement_assignment)
extended;

attribute_mapping assigned_to(assigned_to, , Placement_group_requirement_definition);

					requirement_assigned_item *> acpr_requirement_assigned_item
					acpr_requirement_assigned_item = 
					group_product_definition
				
end_attribute_mapping;
attribute_mapping assigned_to(assigned_to, , restriction_basis_item);

					requirement_assigned_item *> acpr_requirement_assigned_item
				
end_attribute_mapping;

end_entity_mapping;
(*end_schema_mapping;*)
