(*
 * $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 product_placement(Product_placement_arm, Product_placement_mim);*)

uof_mapping Product_placement(Product_placement);

entity_mapping Occurrence_placement__rrwt(Occurrence_placement__rrwt, representation_relationship_with_transformation);

mapping_constraints;
representation_relationship_with_transformation <= representation_relationship
   
end_mapping_constraints;

attribute_mapping reference_physical_element(reference_physical_element, ($PATH)($PATH)($PATH)($PATH), Physical_element_definition);
(
representation_relationship_with_transformation <= representation_relationship
{representation_relationship.name = 'instance placement'}
representation_relationship.rep_2 ->
representation <- (* Add line *)
{representation => shape_representation}
property_definition_representation.used_representation
property_definition_representation
{property_definition_representation => shape_definition_representation}
property_definition_representation.definition -> represented_definition
represented_definition = property_definition
property_definition
{property_definition => product_definition_shape}
property_definition.definition -> characterized_definition
characterized_definition = characterized_product_definition
characterized_product_definition = product_definition
product_definition
{product_definition.frame_of_reference ->
product_definition_context <=
application_context_element
application_context_element.name = 'conceptual definition'}
	)(
representation_relationship_with_transformation <= representation_relationship
{representation_relationship.name = 'instance placement'}
representation_relationship.rep_2 ->
representation <- (* Add line *)
{representation.name = 'model property value'}
property_definition_representation.used_representation
property_definition_representation
property_definition_representation.definition -> represented_definition
represented_definition = property_definition
property_definition
{property_definition.name = 'positioning'}
property_definition.definition -> characterized_definition
characterized_definition = characterized_product_definition
characterized_product_definition = product_definition
product_definition
{product_definition.frame_of_reference ->
product_definition_context <=
application_context_element
application_context_element.name = 'conceptual definition'}
	)
end_attribute_mapping;

attribute_mapping reference_geometric_space(reference_geometric_space, ($PATH)($PATH)($PATH)($PATH), Shape_representation);
(
representation_relationship_with_transformation <= representation_relationship
{representation_relationship.name = 'instance placement'}
representation_relationship.rep_2 ->
representation
{representation => shape_representation}
	)(
representation_relationship_with_transformation <= representation_relationship
{representation_relationship.name = 'instance placement'}
representation_relationship.rep_2 ->
{representation.name = 'model property value'}
	)
end_attribute_mapping;

attribute_mapping positioned_representation(positioned_representation, ($PATH)($PATH), Mapping_based_template_instance__rr);
representation_relationship_with_transformation <= representation_relationship
{representation_relationship.name = 'instance placement'}
representation_relationship.rep_1 -> representation
{representation => shape_representation}

end_attribute_mapping;

attribute_mapping positioned_representation(positioned_representation, ($PATH)($PATH), Transformation_based_template_instance__rr);
representation_relationship_with_transformation <= representation_relationship
{representation_relationship.name = 'instance placement'}
representation_relationship.rep_1 -> representation
{representation => shape_representation}

end_attribute_mapping;

end_entity_mapping;

entity_mapping Occurrence_placement__mi(Occurrence_placement__mi, mapped_item);

attribute_mapping reference_physical_element(reference_physical_element, ($PATH)($PATH)($PATH)($PATH), Physical_element_definition);
(
mapped_item <=
representation_item <-
representation.items[i]
representation <-
{representation => shape_representation}
property_definition_representation.used_representation
property_definition_representation
{property_definition_representation => shape_definition_representation}
property_definition_representation.definition -> represented_definition
represented_definition = property_definition
property_definition
{property_definition => product_definition_shape}
property_definition.definition -> characterized_definition
characterized_definition = characterized_product_definition
characterized_product_definition = product_definition
product_definition
{product_definition.frame_of_reference ->
product_definition_context <=
application_context_element
application_context_element.name = 'conceptual definition'}
	)(
mapped_item <=
representation_item <-
representation.items[i]
representation <-
{representation.name = 'model property value'}
property_definition_representation.used_representation
property_definition_representation
property_definition_representation.definition -> represented_definition
represented_definition = property_definition
property_definition
{property_definition.name = 'positioning'}
property_definition.definition -> characterized_definition
characterized_definition = characterized_product_definition
characterized_product_definition = product_definition
product_definition
{product_definition.frame_of_reference ->
product_definition_context <=
application_context_element
application_context_element.name = 'conceptual definition'}
	)
end_attribute_mapping;

attribute_mapping reference_geometric_space(reference_geometric_space, ($PATH)($PATH)($PATH)($PATH), Shape_representation);
(
mapped_item <=
representation_item <-
representation.items[i]
representation
{representation => shape_representation}
	)(
mapped_item <=
representation_item <-
representation.items[i]
representation
{representation.name = 'model property value'}
	)
end_attribute_mapping;

attribute_mapping positioned_representation(positioned_representation, ($PATH)($PATH), Mapping_based_template_instance__mi);
mapped_item
mapped_item.mapping_source -> representation_map
representation_map.mapped_representation -> representation
{representation => shape_representation}

end_attribute_mapping;

attribute_mapping positioned_representation(positioned_representation, ($PATH)($PATH), Transformation_based_template_instance__mi);
mapped_item
mapped_item.mapping_source -> representation_map
representation_map.mapped_representation -> representation
{representation => shape_representation}

end_attribute_mapping;

end_entity_mapping;

entity_mapping Part_occurrence_placement__rrwt(Part_occurrence_placement__rrwt, representation_relationship_with_transformation);

mapping_constraints;
representation_relationship_with_transformation <= representation_relationship
{representation_relationship.name = 'instance placement'}
end_mapping_constraints;

attribute_mapping placed_part_occurrence(placed_part_occurrence, ($PATH)($PATH), Single_instance);
representation_relationship_with_transformation <= representation_relationship
{representation_relationship.name = 'instance placement'}
representation_relationship.rep_1 -> representation
{representation => shape_representation}
representation <- property_definition_representation.used_representation
property_definition_representation
{property_definition_representation => shape_definition_representation}
property_definition_representation.definition -> represented_definition
represented_definition = property_definition
property_definition
{property_definition => product_definition_shape}
property_definition.definition -> characterized_definition
characterized_definition = characterized_product_definition
characterized_product_definition = product_definition
product_definition
{[product_definition.frame_of_reference ->
product_definition_context <=
application_context_element
application_context_element.name = 'part occurrence']
[product_definition.name = 'single instance']}

end_attribute_mapping;

end_entity_mapping;

entity_mapping Part_occurrence_placement__mi(Part_occurrence_placement__mi, mapped_item);

attribute_mapping placed_part_occurrence(placed_part_occurrence, ($PATH)($PATH), Single_instance);
mapped_item
mapped_item.mapping_source -> representation_map
representation_map.mapped_representation -> representation
{representation => shape_representation}
representation <- property_definition_representation.used_representation
property_definition_representation
{property_definition_representation => shape_definition_representation}
property_definition_representation.definition -> represented_definition
represented_definition = property_definition
property_definition
{property_definition => product_definition_shape}
property_definition.definition -> characterized_definition
characterized_definition = characterized_product_definition
characterized_product_definition = product_definition
product_definition
{[product_definition.frame_of_reference ->
product_definition_context <=
application_context_element
application_context_element.name = 'part occurrence']
[product_definition.name = 'single instance']}

end_attribute_mapping;

end_entity_mapping;

entity_mapping Physical_element_placement__rrwt(Physical_element_placement__rrwt, representation_relationship_with_transformation);

mapping_constraints;
representation_relationship_with_transformation <= representation_relationship
{representation_relationship.name = 'component placement'}
end_mapping_constraints;

attribute_mapping placed_physical_element(placed_physical_element, ($PATH)($PATH), Single_instance);
representation_relationship_with_transformation <= representation_relationship
{representation_relationship.name = 'component placement'}
representation_relationship.rep_1 -> representation
{representation.name = 'model property value'}
representation <- property_definition_representation.used_representation
property_definition_representation.definition -> represented_definition
represented_definition = property_definition
property_definition
{property_definition.name = 'positioning'}
property_definition.definition -> characterized_definition
characterized_definition = characterized_product_definition
characterized_product_definition
characterized_product_definition = product_definition
product_definition
{product_definition.frame_of_reference ->
product_definition_context <=
application_context_element
application_context_element.name = 'conceptual definition'}

end_attribute_mapping;

end_entity_mapping;

entity_mapping Physical_element_placement__mi(Physical_element_placement__mi, mapped_item);

attribute_mapping placed_physical_element(placed_physical_element, ($PATH)($PATH), Single_instance);
mapped_item
mapped_item.mapping_source -> representation_map
representation_map.mapped_representation -> representation
{representation.name = 'model property value'}
representation <- property_definition_representation.used_representation
property_definition_representation.definition -> represented_definition
represented_definition = property_definition
property_definition
{property_definition.name = 'positioning'}
property_definition.definition -> characterized_definition
characterized_definition = characterized_product_definition
characterized_product_definition
characterized_product_definition = product_definition
product_definition
{product_definition.frame_of_reference ->
product_definition_context <=
application_context_element
application_context_element.name = 'conceptual definition'}

end_attribute_mapping;

end_entity_mapping;

end_uof_mapping;

(*end_schema_mapping;*)
