(*
 * $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 foundation_representation(Foundation_representation_arm, Foundation_representation_mim);*)

uof_mapping Foundation_representation(Foundation_representation);

entity_mapping Numerical_representation_context(Numerical_representation_context, (representation_context)(
	global_unit_assigned_context
	)(
global_uncertainty_assigned_context
	)(
	[global_uncertainty_assigned_context]
	[global_unit_assigned_context]
	));

mapping_constraints;
(
	global_unit_assigned_context <= representation_context
	)(
	global_uncertainty_assigned_context <= representation_context
	)(
	[global_unit_assigned_context <= representation_context]
	[global_uncertainty_assigned_context <= representation_context]
	)
end_mapping_constraints;

attribute_mapping accuracies(accuracies, $PATH, uncertainty_measure_with_unit);

global_uncertainty_assigned_context
global_uncertainty_assigned_context.uncertainty[i] ->
uncertainty_measure_with_unit
{uncertainty_measure_with_unit <=
measure_with_unit =>
length_measure_with_unit}

end_attribute_mapping;

attribute_mapping units(units, $PATH, Unit);

global_unit_assigned_context
global_unit_assigned_context.units[i] -> unit

end_attribute_mapping;

end_entity_mapping;

entity_mapping Representation(Representation, representation);

attribute_mapping name(name, representation.name);

end_attribute_mapping;

attribute_mapping items(items, $PATH, Representation_item);
representation
representation.items  -> representation_item
representation_item

end_attribute_mapping;

attribute_mapping context_of_items(context_of_items, $PATH, Representation_context);
representation
representation.context_of_items -> representation_context
representation_context
end_attribute_mapping;

attribute_mapping description(description, description_attribute.attribute_value);

				 representation = description_attribute_select
				 description_attribute_select <- description_attribute.described_item
				 description_attribute.attribute_value
				 
end_attribute_mapping;

attribute_mapping id(id, id_attribute.attribute_value);

				 representation = id_attribute_select
				 id_attribute_select <- id_attribute.identified_item
				 id_attribute.attribute_value
				 
end_attribute_mapping;

end_entity_mapping;

entity_mapping Representation_context(Representation_context, representation_context);

attribute_mapping id(id, representation_context.context_identifier);

end_attribute_mapping;

attribute_mapping kind(kind, representation_context.context_type);

end_attribute_mapping;

end_entity_mapping;

entity_mapping Representation_item(Representation_item, representation_item);

attribute_mapping name(name, representation_item.name);

end_attribute_mapping;

end_entity_mapping;

entity_mapping Representation_relationship(Representation_relationship, representation_relationship);

attribute_mapping relation_type(relation_type, representation_relationship.name);

end_attribute_mapping;

attribute_mapping description(description, representation_relationship.description);

end_attribute_mapping;

attribute_mapping rep_1(rep_1, $PATH, Representation);
representation_relationship.rep_1 -> representation
end_attribute_mapping;

attribute_mapping rep_2(rep_2, $PATH, Representation);
representation_relationship.rep_2 -> representation
end_attribute_mapping;

end_entity_mapping;
(*
entity_mapping String_representation_item(String_representation_item, descriptive_representation_item);

mapping_constraints;

			descriptive_representation_item <= representation_item
			
end_mapping_constraints;

attribute_mapping string_value(string_value, descriptive_representation_item.description);

end_attribute_mapping;

end_entity_mapping;
*)
end_uof_mapping;

(*end_schema_mapping;*)
