(*
 * $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 annotated_presentation(Annotated_presentation_arm, Annotated_presentation_mim);*)


entity_mapping Appearance_assignment(Appearance_assignment, presentation_style_assignment)
extended;

attribute_mapping appearance_components(appearance_components, ($PATH)($PATH), fill_area_style_hatching);
	presentation_style_select = fill_area_style
	fill_area_style
	fill_area_style.fill_styles[i] ->
	fill_style_select
	fill_style_select = fill_area_style_hatching
	fill_area_style_hatching
end_attribute_mapping;

attribute_mapping appearance_components(appearance_components, ($PATH)($PATH), externally_defined_hatch_style);
	presentation_style_select = fill_area_style
	fill_area_style
	fill_area_style.fill_styles[i] ->
	fill_style_select
	fill_style_select = externally_defined_hatch_style
	externally_defined_hatch_style
end_attribute_mapping;

attribute_mapping appearance_components(appearance_components, $PATH, fill_area_style_colour);
 
	  presentation_style_select = fill_area_style
	  fill_area_style
	  fill_area_style.fill_styles[i] ->
	  fill_style_select
	  fill_style_select = fill_area_style_colour
	  fill_area_style_colour
	
end_attribute_mapping;

attribute_mapping appearance_components(appearance_components, $PATH, Surface_appearance_wireframe);

	  presentation_style_select = surface_style_usage
	  surface_style_usage
	
end_attribute_mapping;

attribute_mapping appearance_components(appearance_components, ($PATH)($PATH), fill_area_style_tiles);
		presentation_style_select = fill_area_style
	  fill_area_style
	  fill_area_style.fill_styles[i] ->
	  fill_style_select
	  fill_style_select = fill_area_style_tiles
	  fill_area_style_tiles
end_attribute_mapping;

attribute_mapping appearance_components(appearance_components, ($PATH)($PATH), externally_defined_tile_style);
		presentation_style_select = fill_area_style
	  fill_area_style
	  fill_area_style.fill_styles[i] ->
	  fill_style_select
	  fill_style_select = externally_defined_tile_style
	  externally_defined_tile_style
end_attribute_mapping;

end_entity_mapping;
(* It is not clear where this entity came from 
entity_mapping Area_placed_annotation(Area_placed_annotation, ((draughting_annotation_occurrence))((draughting_elements)))
extended;

mapping_constraints;
((draughting_annotation_occurrence <=
	annotation_occurrence))((draughting_elements <=
	draughting_callout))
end_mapping_constraints;

attribute_mapping element(element, $IDENTICAL_MAPPING, annotation_select);

end_attribute_mapping;

attribute_mapping element(element, $IDENTICAL_MAPPING, Annotation_element);

end_attribute_mapping;

attribute_mapping element(element, $IDENTICAL_MAPPING, Draughting_callout);

end_attribute_mapping;

attribute_mapping reference_area(reference_area, ($PATH)($PATH), area_select);
((draughting_annotation_occurrence <=
	  annotation_occurrence
	  representation_item <-
	  representation.items[i]
	  representation)
	  )((draughting_elements <=
	  draughting_callout <=
	  geometric_representation_item  <=
	  representation_item <-
	  representation.items[i]
	  representation)
	  )
end_attribute_mapping;

attribute_mapping reference_area(reference_area, $PATH, presentation_area);
presentation_representation =>
	  presentation_area
end_attribute_mapping;

end_entity_mapping;
*)
entity_mapping Context_dependent_appearance_assignment(Context_dependent_appearance_assignment, presentation_style_by_context)
extended;

attribute_mapping context_definition(context_definition, $PATH, Group);
 
	  style_context_select
	  style_context_select = group
	  group
	
end_attribute_mapping;

attribute_mapping context_definition(context_definition, $PATH, Layer_armx);
 
	  style_context_select = presentation_layer_assignment
	  presentation_layer_assignment
	
end_attribute_mapping;

attribute_mapping context_definition(context_definition, $PATH, View);
 
	  style_context_select = representation
	  representation =>
	  presentation_representation =>
	  presentation_view
	
end_attribute_mapping;

attribute_mapping context_definition(context_definition, ($PATH)($PATH), presentation_area);
 
	  (style_context_select = representation
	  representation =>
	  presentation_representation =>
	  presentation_area)
end_attribute_mapping;

attribute_mapping context_definition(context_definition, ($PATH)($PATH), mechanical_design_geometric_presentation_area);
	  (style_context_select = representation
	  representation =>
	  presentation_representation =>
	  presentation_area =>
	  mechanical_design_geometric_presentation_area)
	
end_attribute_mapping;

end_entity_mapping;

entity_mapping Annotation_subfigure(Annotation_subfigure, annotation_subfigure_occurrence);

mapping_constraints;
annotation_subfigure_occurrence <=
      annotation_symbol_occurrence
      
end_mapping_constraints;

end_entity_mapping;

entity_mapping Annotation_symbol_armx(Annotation_symbol_armx, annotation_symbol_occurrence);

mapping_constraints;
annotation_symbol_occurrence <=
      annotation_occurrence
      {annotation_occurrence =>
      draughting_annotation_occurrence}
end_mapping_constraints;

attribute_mapping symbol_definition(symbol_definition, ($PATH)($PATH), symbol_definition_select);
((annotation_symbol_occurrence <=
	annotation_occurrence <=
	styled_item
	styled_item.item ->
	representation_item
	representation_item =>
	geometric_representation_item =>
	defined_symbol
	defined_symbol.definition ->
	defined_symbol_select)
	)((annotation_symbol_occurrence <=
	annotation_occurrence <=
	styled_item
	styled_item.item ->
	representation_item
	representation_item =>
	mapped_item
	{mapped_item =>
	annotation_symbol}
	mapped_item.mapping_source ->
	representation_map
	{representation_map =>
	symbol_representation_map}
	representation_map.mapped_representation)
	)
end_attribute_mapping;

attribute_mapping symbol_definition(symbol_definition, $PATH, Dimension_symbol);
annotation_symbol_occurrence <=
	annotation_occurrence <=
	styled_item
	styled_item.item ->
	representation_item
	representation_item =>
	geometric_representation_item =>
	defined_symbol
	defined_symbol.definition ->
	defined_symbol_select
	defined_symbol_select = pre_defined_symbol
	pre_defined_symbol =>
	pre_defined_dimension_symbol
end_attribute_mapping;

attribute_mapping symbol_definition(symbol_definition, ($PATH)($PATH), externally_defined_symbol);
	annotation_symbol_occurrence <=
	annotation_occurrence <=
	styled_item
	styled_item.item ->
	representation_item
	representation_item =>
	geometric_representation_item =>
	defined_symbol
	defined_symbol.definition ->
	defined_symbol_select
	defined_symbol_select = externally_defined_symbol
	externally_defined_symbol
end_attribute_mapping;

attribute_mapping symbol_definition(symbol_definition, ($PATH)($PATH), symbol_representation);
	annotation_symbol_occurrence <=
	annotation_occurrence <=
	styled_item
	styled_item.item ->
	representation_item
	representation_item =>
	mapped_item
	{mapped_item =>
	annotation_symbol}
	mapped_item.mapping_source ->
	representation_map
	{representation_map =>
	symbol_representation_map}
	representation_map.mapped_representation ->
	representation =>
	symbol_representation
end_attribute_mapping;

attribute_mapping symbol_definition(symbol_definition, $PATH, pre_defined_geometrical_tolerance_symbol);
annotation_symbol_occurrence <=
	annotation_occurrence <=
	styled_item
	styled_item.item ->
	representation_item
	representation_item =>
	geometric_representation_item =>
	defined_symbol
	defined_symbol.definition ->
	defined_symbol_select
	defined_symbol_select = pre_defined_symbol
	pre_defined_symbol =>
	pre_defined_dimension_symbol
end_attribute_mapping;

attribute_mapping symbol_definition(symbol_definition, $PATH, pre_defined_point_marker_symbol);
 	annotation_symbol_occurrence <=
	annotation_occurrence <=
	styled_item
	styled_item.item ->
	representation_item
	representation_item =>
	geometric_representation_item =>
	defined_symbol
	defined_symbol.definition ->
	defined_symbol_select
	defined_symbol_select = pre_defined_symbol
	pre_defined_symbol =>
	pre_defined_point_marker_symbol
end_attribute_mapping;

attribute_mapping symbol_definition(symbol_definition, $PATH, pre_defined_surface_condition_symbol);
annotation_symbol_occurrence <=
	annotation_occurrence <=
	styled_item
	styled_item.item ->
	representation_item
	representation_item =>
	geometric_representation_item =>
	defined_symbol
	defined_symbol.definition ->
	defined_symbol_select
	defined_symbol_select = pre_defined_symbol
	pre_defined_symbol =>
	pre_defined_surface_condition_symbol
end_attribute_mapping;

attribute_mapping symbol_definition(symbol_definition, $PATH, Terminator);
annotation_symbol_occurrence <=
	annotation_occurrence <=
	styled_item
	styled_item.item ->
	representation_item
	representation_item =>
	geometric_representation_item =>
	defined_symbol
	defined_symbol.definition ->
	defined_symbol_select
	defined_symbol_select = pre_defined_symbol
	pre_defined_symbol =>
	pre_defined_terminator_symbol
end_attribute_mapping;

end_entity_mapping;

entity_mapping Dimension_symbol(Dimension_symbol, pre_defined_dimension_symbol);

mapping_constraints;
pre_defined_dimension_symbol <=
      pre_defined_symbol
end_mapping_constraints;

end_entity_mapping;

entity_mapping Draughting_callout_armx(Draughting_callout_armx, draughting_elements);
(* extended; *) (* It is not extended - it is original mapping *)

mapping_constraints;
draughting_elements <=
      draughting_callout
      {draughting_callout =>
      (datum_feature_callout)
      (datum_target_callout)}
end_mapping_constraints;

attribute_mapping contents(contents, $PATH, draughting_callout_content_select);

	  draughting_elements <=
	  draughting_callout
	  draughting_callout.contents [i] ->
	  draughting_callout_element
	
end_attribute_mapping;

attribute_mapping contents(contents, $PATH, Annotation_curve);
	  draughting_elements <=
	  draughting_callout
	  draughting_callout.contents [i] ->
	  draughting_callout_element
	  draughting_callout_element = annotation_curve_occurrence
	  annotation_curve_occurrence
	
end_attribute_mapping;

attribute_mapping contents(contents, $PATH, Annotation_subfigure);
	  draughting_elements <=
	  draughting_callout
	  draughting_callout.contents [i] ->
	  draughting_callout_element
	  draughting_callout_element = annotation_symbol_occurrence
	  annotation_symbol_occurrence =>
	  annotation_subfigure_occurrence
	
end_attribute_mapping;

attribute_mapping contents(contents, $PATH, Annotation_symbol);
	  draughting_elements <=
	  draughting_callout
	  draughting_callout.contents [i] ->
	  draughting_callout_element
	  draughting_callout_element = annotation_symbol_occurrence
	  annotation_symbol_occurrence
	
end_attribute_mapping;

attribute_mapping contents(contents, $PATH, Text);
	  draughting_elements <=
	  draughting_callout
	  draughting_callout.contents [i] ->
	  draughting_callout_element
	  draughting_callout_element = annotation_text_occurrence
	  annotation_text_occurrence
	
end_attribute_mapping;

end_entity_mapping;
(* Use AIM entity instead
entity_mapping Fill_area(Fill_area, annotation_fill_area_occurrence);

attribute_mapping boundary(boundary, $PATH, Annotation_curve);
annotation_fill_area_occurrence <=
	annotation_occurrence <=
	styled_item
	styled_item.item ->
	representation_item =>
	geometric_representation_item =>
	annotation_fill_area
	annotation_fill_area.boundaries[i] ->
	curve <=
	geometric_representation_item <=
	representation_item <-
	styled_item.item
	styled_item =>
	annotation_occurrence =>
	annotation_curve_occurrence
end_attribute_mapping;

attribute_mapping reference_point(reference_point, $PATH, point_select);
annotation_fill_area_occurrence
	annotation_fill_area_occurrence.fill_style_target -> 
	point
end_attribute_mapping;

attribute_mapping reference_point(reference_point, $PATH, Cartesian_point);
annotation_fill_area_occurrence
	annotation_fill_area_occurrence.fill_style_target -> 
	point => 
	cartesian_point
	
end_attribute_mapping;

attribute_mapping reference_point(reference_point, $PATH, Point_on_curve);
annotation_fill_area_occurrence
	annotation_fill_area_occurrence.fill_style_target -> 
	point =>
	point_on_curve
end_attribute_mapping;

attribute_mapping reference_point(reference_point, ($PATH)($PATH), Point_on_surface);
((annotation_fill_area_occurrence
	annotation_fill_area_occurrence.fill_style_target -> 
	point =>
	point_on_surface)
	)((annotation_fill_area_occurrence
	annotation_fill_area_occurrence.fill_style_target -> 
	point =>
	degenerate_pcurve)
	)
end_attribute_mapping;

end_entity_mapping;
*)
(* USE AIM entities instead
entity_mapping General_symbol(General_symbol, ((externally_defined_symbol))(symbol_representation));

mapping_constraints;
({symbol_representation
	(symbol_representation =>
	draughting_symbol_representation)
	(symbol_representation =>
	draughting_symbol_representation =>
	drawing_sheet_layout)})
	
end_mapping_constraints;

end_entity_mapping;
*)
(* USE AIM entity instead
entity_mapping Geometric_tolerance_symbol(Geometric_tolerance_symbol, pre_defined_geometrical_tolerance_symbol);

mapping_constraints;
pre_defined_geometrical_tolerance_symbol <=
      pre_defined_symbol
end_mapping_constraints;

end_entity_mapping;
*)
(* USE AIM entity instead
entity_mapping Hatching(Hatching, ((fill_area_style_hatching))((externally_defined_hatch_style)));

end_entity_mapping;
*)
(* USE AIM entity instead
entity_mapping Solid_fill_area(Solid_fill_area, fill_area_style_colour);

end_entity_mapping;
*)
entity_mapping Styled_annotation_model(Styled_annotation_model, draughting_model);

mapping_constraints;
draughting_model <=
      representation
      {representation.items[i] ->
      representation_item =>
      (styled_item =>
      annotation_occurrence =>
      draughting_annotation_occurrence)
      (geometric_representation_item =>
      draughting_callout =>
      draughting_elements)}
      
end_mapping_constraints;

attribute_mapping is_defined_in(is_defined_in, $PATH, geometric_representation_context);
draughting_model <=
	representation
	representation.context_of_items ->
	representation_context =>
	geometric_representation_context
end_attribute_mapping;

end_entity_mapping;
(* Use AIM entity instead
entity_mapping Surface_condition_symbol(Surface_condition_symbol, pre_defined_surface_condition_symbol);

mapping_constraints;
pre_defined_surface_condition_symbol <=
      pre_defined_symbol
end_mapping_constraints;

end_entity_mapping;
*)
(* Directly use one of alternatives from AIM
entity_mapping Tiling(Tiling, ((fill_area_style_tiles))((externally_defined_tile_style)
      ));

end_entity_mapping;
*)
entity_mapping View(View, presentation_view);

attribute_mapping id(id, representation.id
	);
presentation_view <=
	presentation_representation <=
	representation
	representation.id
end_attribute_mapping;

attribute_mapping name(name, representation.name);
presentation_view <=
	presentation_representation <=
	representation
	representation.name
end_attribute_mapping;

attribute_mapping description(description, representation.description);
presentation_view <=
	presentation_representation <=
	representation
	representation.description
end_attribute_mapping;

attribute_mapping layout(layout, $PATH, area_select);
presentation_view <=
	presentation_representation <=
	representation <-
	representation_map.mapped_representation
	representation_map <-
	mapped_item.mapping_source
	mapped_item <=
	representation_item <-
	representation.items[i]
	representation =>
	presentation_representation
	
end_attribute_mapping;

attribute_mapping layout(layout, $PATH, mechanical_design_geometric_presentation_area);

	  presentation_view <=
	  presentation_representation <=
	  representation <-
	  representation_map.mapped_representation
	  representation_map <-
	  mapped_item.mapping_source
	  mapped_item <=
	  representation_item <-
	  representation.items[i]
	  representation =>
	  presentation_representation =>
	  presentation_area =>
	mechanical_design_geometric_presentation_area
end_attribute_mapping;

attribute_mapping view_placement(view_placement, $PATH, view_placement_select);
presentation_view <=
	presentation_representation <=
	representation <-
	representation_map.mapped_representation
	representation_map
	{representation_map.mapping_origin ->
	representation_item =>
	geometric_representation_item =>
	placement =>
	axis2_placement_2d}
	representation_map <-
	mapped_item.mapping_source
	mapped_item
end_attribute_mapping;
(* Removed option
attribute_mapping view_placement(view_placement, $PATH, Mapping_based_template_instance__mi);
presentation_view <=
	presentation_representation <=
	representation <-
	representation_map.mapped_representation
	representation_map
	{representation_map.mapping_origin ->
	representation_item =>
	geometric_representation_item =>
	placement =>
	axis2_placement_2d}
	representation_map <-
	mapped_item.mapping_source
	mapped_item 
	{mapped_item <-
	representation.items[i]
	representation =>
	presentation_representation =>
	presentation_area
	(presentation_area)
	(presentation_area =>
	drawing_sheet_revision)}
	mapped_item.mapping_target
	{mapped_item.mapping_target ->
	representation_item =>
	geometric_representation_item =>
	(placement =>
	axis2_placement_2d)
	(cartesian_transformation_operator =>
	cartesian_transformation_operator_2d)}
end_attribute_mapping;
*)
attribute_mapping view_placement(view_placement, $PATH, cartesian_transformation_operator_2d);
presentation_view <=
	presentation_representation <=
	representation <-
	representation_map.mapped_representation
	representation_map
	{representation_map.mapping_origin ->
	representation_item =>
	geometric_representation_item =>
	placement =>
	axis2_placement_2d}
	representation_map <-
	mapped_item.mapping_source
	mapped_item 
	{mapped_item <-
	representation.items[i]
	representation =>
	presentation_representation =>
	presentation_area
	(presentation_area)
	(presentation_area =>
	drawing_sheet_revision)}
	mapped_item.mapping_target
	{mapped_item.mapping_target ->
	representation_item =>
	geometric_representation_item =>
	(placement =>
	axis2_placement_2d)
	(cartesian_transformation_operator =>
	cartesian_transformation_operator_2d)}
end_attribute_mapping;

attribute_mapping view_placement(view_placement, $PATH, item_defined_transformation);
presentation_view <=
	presentation_representation <=
	representation <-
	representation_map.mapped_representation
	representation_map
	{representation_map.mapping_origin ->
	representation_item =>
	geometric_representation_item =>
	placement =>
	axis2_placement_2d}
	representation_map <-
	mapped_item.mapping_source
	mapped_item 
	{mapped_item <-
	representation.items[i]
	representation =>
	presentation_representation =>
	presentation_area
	(presentation_area)
	(presentation_area =>
	drawing_sheet_revision)}
	mapped_item.mapping_target
	{mapped_item.mapping_target ->
	representation_item =>
	geometric_representation_item =>
	(placement =>
	axis2_placement_2d)
	(cartesian_transformation_operator =>
	cartesian_transformation_operator_2d)}
end_attribute_mapping;

attribute_mapping view_space(view_space, $PATH, geometric_representation_context);
presentation_view <=
	presentation_representation <=
	representation
	representation.context_of_items ->
	representation_context =>
	geometric_representation_context
	{geometric_representation_context.coordinate_space_dimension = 2}
end_attribute_mapping;

end_entity_mapping;
(* Use AIM alternatives instead
entity_mapping View_area(View_area, ((presentation_area))((mechanical_design_geometric_presentation_area)));

mapping_constraints;
({mechanical_design_geometric_presentation_area <=
      presentation_area})
      
end_mapping_constraints;

attribute_mapping id(id, (representation.id)(representation.id));
((presentation_area <=
	  presentation_representation <=
	  representation
	  representation.id))((mechanical_design_geometric_presentation_area <=
	  presentation_area <=
	  presentation_representation <=
	  representation
	  representation.id))
end_attribute_mapping;

attribute_mapping name(name, (representation.name)(representation.name));
((presentation_area
	  presentation_representation <=
	  representation
	  representation.name))((mechanical_design_geometric_presentation_area <=
	  presentation_area
	  presentation_representation <=
	  representation
	  representation.name))
end_attribute_mapping;

attribute_mapping description(description, (representation.description)(representation.description));
((presentation_area
	  presentation_representation <=
	  representation
	  representation.description))((mechanical_design_geometric_presentation_area <=
	  presentation_area
	  presentation_representation <=
	  representation
	  representation.description))
end_attribute_mapping;

attribute_mapping size(size, presentation_size.size);

end_attribute_mapping;

attribute_mapping area_space(area_space, , geometric_representation_context);
((presentation_area <=
	  presentation_representation <=
	  representation
	  representation.context_of_items ->
	  representation_context =>
	  geometric_representation_context
	  {geometric_representation_context.coordinate_space_dimension = 2}))((mechanical_design_geometric_presentation_area <=
	  presentation_area <=
	  presentation_representation <=
	  representation
	  representation.context_of_items ->
	  representation_context =>
	  geometric_representation_context
	  {geometric_representation_context.coordinate_space_dimension = 2}))
end_attribute_mapping;

attribute_mapping revision_id(revision_id, (identification_assignment.assigned_id)(identification_assignment.assigned_id));
((presentation_area 
	  identification_item = presentation_area
	  identification_item <-
	  applied_identification_assignment.items[i]
	  applied_identification_assignment <=
	  identification_assignment
	  {identification_assignment.role ->
	  identification_role
	  identification_role.name = 'version'}
	  identification_assignment.assigned_id))((mechanical_design_geometric_presentation_area <=
	  presentation_area
	  identification_item = presentation_area
	  identification_item <-
	  applied_identification_assignment.items[i]
	  applied_identification_assignment <=
	  identification_assignment
	  {identification_assignment.role ->
	  identification_role
	  identification_role.name = 'version'}
	  identification_assignment.assigned_id))
end_attribute_mapping;

end_entity_mapping;
*)
entity_mapping View_area_assignment(View_area_assignment, presented_item_representation);

attribute_mapping associated_view_area(associated_view_area, $PATH, presentation_area);
presented_item_representation
	presented_item_representation.presentation ->
	presentation_representation_select
	presentation_representation_select = presentation_representation
	presentation_representation =>
	presentation_area
end_attribute_mapping;

attribute_mapping is_describing(is_describing, $PATH, presentation_association_select);
presented_item_representation
	presented_item_representation.item ->
	presented_item
	presented_item =>
	applied_presented_item
	applied_presented_item.items[i] ->
	presented_item_select
end_attribute_mapping;

end_entity_mapping;

entity_mapping View_area_relationship(View_area_relationship, representation_relationship);

attribute_mapping description(description, representation_relationship.description);

end_attribute_mapping;

attribute_mapping related(related, ($PATH)($PATH), mechanical_design_geometric_presentation_area);
representation_relationship
	representation_relationship.rep_2 ->
	representation =>
	presentation_representation =>
	presentation_area =>
	mechanical_design_geometric_presentation_area
end_attribute_mapping;

attribute_mapping relating(relating, $PATH, presentation_area);
representation_relationship
	representation_relationship.rep_1 ->
	representation =>
	presentation_representation =>
	presentation_area
	
end_attribute_mapping;

attribute_mapping relating(relating, $PATH, mechanical_design_geometric_presentation_area);
representation_relationship
	representation_relationship.rep_1 ->
	representation =>
	presentation_representation =>
	presentation_area =>
	mechanical_design_geometric_presentation_area
	
end_attribute_mapping;


attribute_mapping relationship_type(relationship_type, representation_relationship.name);

end_attribute_mapping;

end_entity_mapping;
(* Not clear where it came from 
entity_mapping View_placed_annotation(View_placed_annotation, ((draughting_annotation_occurrence))((draughting_elements)));

mapping_constraints;
((draughting_annotation_occurrence <=
      annotation_occurrence))((draughting_elements <=
      draughting_callout))
end_mapping_constraints;

attribute_mapping element(element, $IDENTICAL_MAPPING, annotation_select);

end_attribute_mapping;

attribute_mapping element(element, $IDENTICAL_MAPPING, Annotation_element);

end_attribute_mapping;

attribute_mapping element(element, $IDENTICAL_MAPPING, Draughting_callout);

end_attribute_mapping;

attribute_mapping reference_view(reference_view, ($PATH)($PATH), View);
((draughting_annotation_occurrence <=
	  annotation_occurrence <=
	  styled_item <=
	  representation_item <-
	  representation.items[i]
	  representation =>
	  presentation_representation =>
	  presentation_view)
	  )((draughting_elements <=
	  draughting_callout <=
	  geometric_representation_item <=
	  representation_item <-
	  representation.items[i]
	  representation =>
	  presentation_representation =>
	  presentation_view)
	  )
end_attribute_mapping;

end_entity_mapping;
*)
(* Not clear where it came from 
entity_mapping View_relationship(View_relationship, representation_relationship);

attribute_mapping relationship_type(relation_type, representation_relationship.name);
{(representation_relationship.name)
	(representation_relationship.name = 'dependency')}
end_attribute_mapping;

attribute_mapping description(description, representation_relationship.description);

end_attribute_mapping;

attribute_mapping relating(relating, $PATH, View);
representation_relationship
	representation_relationship.rep_1 ->
	representation =>
	presentation_representation =>
	presentation_view
end_attribute_mapping;

attribute_mapping related(related, $PATH, View);
representation_relationship
	representation_relationship.rep_2 ->
	representation =>
	presentation_representation =>
	presentation_view
end_attribute_mapping;

end_entity_mapping;
*)
(*end_schema_mapping;*)
