(*
 * $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 component_feature(Component_feature_arm, Component_feature_mim);*)


entity_mapping Component_feature_armx(Component_feature_armx, component_feature);

mapping_constraints;
component_feature <=
shape_aspect

end_mapping_constraints;

attribute_mapping associated_component(associated_component, $PATH, Assembly_component_armx);
component_feature <=
shape_aspect
shape_aspect.of_shape ->
product_definition_shape =>
assembly_component

end_attribute_mapping;


attribute_mapping definition(definition, $PATH, Printed_part_template_terminal_armx);
component_feature <=
shape_aspect <-
shape_aspect_relationship.related_shape_aspect
{shape_aspect_relationship
shape_aspect_relationship.name = 'instantiated feature'}
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
			shape_aspect =>
			printed_part_template_terminal
			
end_attribute_mapping;

attribute_mapping definition(definition, $PATH, Land_template_terminal_armx);
component_feature <=
shape_aspect <-
shape_aspect_relationship.related_shape_aspect
{shape_aspect_relationship
shape_aspect_relationship.name = 'instantiated feature'}
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
			shape_aspect =>
			land_template_terminal
			
end_attribute_mapping;

attribute_mapping definition(definition, $PATH, Component_termination_passage_template_terminal);
component_feature <=
shape_aspect <-
shape_aspect_relationship.related_shape_aspect
{shape_aspect_relationship
shape_aspect_relationship.name = 'instantiated feature'}
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect

end_attribute_mapping;

attribute_mapping definition(definition, $PATH, Via_template_terminal);
component_feature <=
shape_aspect <-
shape_aspect_relationship.related_shape_aspect
{shape_aspect_relationship
shape_aspect_relationship.name = 'instantiated feature'}
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect

end_attribute_mapping;

attribute_mapping definition(definition, $PATH, Part_terminal_external_reference);
component_feature <=
shape_aspect <-
shape_aspect_relationship.related_shape_aspect
{shape_aspect_relationship
shape_aspect_relationship.name = 'instantiated feature'}
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect
				shape_definition = shape_aspect 
				characterized_definition = shape_definition 
				characterized_definition <- 
				property_definition.definition 
				property_definition <- 
				property_definition_representation.definition 
				property_definition_representation 
				property_definition_representation.used_representation -> 
				{representation 
				representation.name = 'part terminal external reference'} 
				representation 
			
end_attribute_mapping;


attribute_mapping definition(definition, $PATH, Part_feature);
component_feature <=
shape_aspect <-
shape_aspect_relationship.related_shape_aspect
{shape_aspect_relationship
shape_aspect_relationship.name = 'instantiated feature'}
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect

end_attribute_mapping;

end_entity_mapping;

entity_mapping Component_feature_joint_armx(Component_feature_joint_armx, component_feature_joint);

mapping_constraints;
component_feature_joint <=
[shape_aspect]
[shape_aspect_relationship]

end_mapping_constraints;

attribute_mapping feature_1(feature_1, $PATH, Component_feature_armx);
component_feature_joint <=
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect

end_attribute_mapping;

attribute_mapping feature_2(feature_2, $PATH, Component_feature_armx);
				component_feature_joint <=
				shape_aspect_relationship
				shape_aspect_relationship.relating_shape_aspect ->
				shape_aspect => 
				component_feature
				
end_attribute_mapping;

attribute_mapping associated_definition(associated_definition, $PATH, Item_shape);
component_feature_joint <=
shape_aspect
shape_aspect.of_shape ->
product_definition_shape

end_attribute_mapping;

end_entity_mapping;

entity_mapping Component_feature_make_from_relationship(Component_feature_make_from_relationship, make_from_feature_relationship);

mapping_constraints;
make_from_feature_relationship <=
component_feature_relationship <=
shape_aspect_relationship

end_mapping_constraints;

attribute_mapping resultant_feature(resultant_feature, $PATH, Component_feature_armx);
make_from_feature_relationship <=
component_feature_relationship <=					
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect =>
component_feature

end_attribute_mapping;

attribute_mapping reusable_feature(reusable_feature, $PATH, Component_feature_armx);
make_from_feature_relationship <=
component_feature_relationship <=					
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect =>
component_feature

end_attribute_mapping;

end_entity_mapping;

entity_mapping Component_feature_relationship_armx(Component_feature_relationship_armx, component_feature_relationship);

mapping_constraints;
{component_feature_relationship <=
shape_aspect_relationship}

end_mapping_constraints;

attribute_mapping related(related, $PATH, Component_feature_armx);
component_feature_relationship <=
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect =>
component_feature

end_attribute_mapping;

attribute_mapping relating(relating, $PATH, Component_feature_armx);
component_feature_relationship <=
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect =>
component_feature

end_attribute_mapping;

end_entity_mapping;

entity_mapping Component_feature_to_physical_usage_view_assignment(Component_feature_to_physical_usage_view_assignment, shape_aspect_relationship);

mapping_constraints;
{shape_aspect_relationship
shape_aspect_relationship.name = 'component feature to physical usage assignment'}

end_mapping_constraints;

attribute_mapping assigned_design_object(assigned_design_object, $PATH, Component_feature_armx);
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect =>
component_feature

end_attribute_mapping;

attribute_mapping defined_part_feature(defined_part_feature, $PATH, Part_feature);
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect

end_attribute_mapping;

end_entity_mapping;

entity_mapping Component_terminal_armx(Component_terminal_armx, component_terminal);

mapping_constraints;
component_terminal <=
component_feature <=
shape_aspect
!{shape_aspect.description = 'package terminal occurrence'}

end_mapping_constraints;

attribute_mapping global_swappable(global_swappable, descriptive_representation_item);
component_terminal <=
component_feature <=					
shape_aspect
shape_definition = shape_aspect
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
{representation_item
representation_item.name = 'global swappable'}
representation_item =>
{descriptive_representation_item
(descriptive_representation_item.description = 'false')
(descriptive_representation_item.description = 'true')}
descriptive_representation_item

end_attribute_mapping;

attribute_mapping local_swappable(local_swappable, descriptive_representation_item);
component_terminal <=
component_feature <=					
shape_aspect
shape_definition = shape_aspect
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
{representation_item
representation_item.name = 'local swappable'}
representation_item =>
{descriptive_representation_item
(descriptive_representation_item.description = 'false')
(descriptive_representation_item.description = 'true')}
descriptive_representation_item

end_attribute_mapping;

attribute_mapping swap_code(swap_code, descriptive_representation_item.description);
component_terminal <=
component_feature <=					
shape_aspect
shape_definition = shape_aspect
characterized_definition = shape_definition
characterized_definition <-
property_definition.definition
property_definition <-
property_definition_representation.definition
property_definition_representation
property_definition_representation.used_representation ->
representation
representation.items[i] ->
{representation_item
representation_item.name = 'swap code'}
representation_item =>
descriptive_representation_item
descriptive_representation_item.description 

end_attribute_mapping;

end_entity_mapping;

(*end_schema_mapping;*)
