(*
 * $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 value_with_unit(Value_with_unit_arm, Value_with_unit_mim);*)

uof_mapping Value_with_unit(Value_with_unit);

entity_mapping Amount_of_substance_unit(Amount_of_substance_unit, amount_of_substance_unit);

end_entity_mapping;

entity_mapping Context_dependent_unit(Context_dependent_unit, context_dependent_unit);

end_entity_mapping;

entity_mapping Conversion_based_unit(Conversion_based_unit, conversion_based_unit);

attribute_mapping conversion_factor(conversion_factor, $PATH, measure_with_unit);

	conversion_based_unit.conversion_factor -> measure_with_unit
	
end_attribute_mapping;

end_entity_mapping;

entity_mapping Derived_unit(Derived_unit, derived_unit);

attribute_mapping elements(elements, $PATH, Derived_unit_element);

			derived_unit.elements[i] -> derived_unit_element
			
end_attribute_mapping;

end_entity_mapping;

entity_mapping Duration(Duration, time_measure_with_unit);

mapping_constraints;
time_measure_with_unit <= 
measure_with_unit
end_mapping_constraints;

end_entity_mapping;

entity_mapping Electric_current_unit(Electric_current_unit, electric_current_unit);

end_entity_mapping;

entity_mapping Length_unit(Length_unit, length_unit);

end_entity_mapping;

entity_mapping Luminous_intensity_unit(Luminous_intensity_unit, luminous_intensity_unit);

end_entity_mapping;

entity_mapping Mass_unit(Mass_unit, mass_unit);

end_entity_mapping;

entity_mapping Plane_angle_unit(Plane_angle_unit, plane_angle_unit);

end_entity_mapping;

entity_mapping Ratio_unit(Ratio_unit, ratio_unit);

end_entity_mapping;

entity_mapping Solid_angle_unit(Solid_angle_unit, solid_angle_unit);

end_entity_mapping;

entity_mapping Thermodynamic_temperature_unit(Thermodynamic_temperature_unit, thermodynamic_temperature_unit);

end_entity_mapping;

entity_mapping Time_unit(Time_unit, time_unit);

end_entity_mapping;

entity_mapping Uncertainty_with_unit(Uncertainty_with_unit, uncertainty_measure_with_unit);

mapping_constraints;

			uncertainty_measure_with_unit <= measure_with_unit
			
end_mapping_constraints;

attribute_mapping name(name, uncertainty_measure_with_unit.name);

end_attribute_mapping;

attribute_mapping description(description, uncertainty_measure_with_unit.description);

end_attribute_mapping;

end_entity_mapping;

entity_mapping Unit(Unit, 
			(named_unit)
			(derived_unit));

attribute_mapping name(name, ((si_unit.name))((context_dependent_unit.name))((conversion_based_unit.name))((derived_unit.name)));
((named_unit =>
si_unit
si_unit.name))((named_unit =>
context_dependent_unit
context_dependent_unit.name))((named_unit =>
conversion_based_unit
conversion_based_unit.name))()
end_attribute_mapping;

attribute_mapping si_unit(si_unit, si_unit);
(named_unit =>
si_unit)
end_attribute_mapping;

end_entity_mapping;
(*
entity_mapping Value_with_unit(Value_with_unit, measure_with_unit);

attribute_mapping value_component(value_component, $PATH, measure_value);
measure_with_unit
measure_with_unit.value_component ->
measure_value
end_attribute_mapping;

attribute_mapping value_component(value_component, $PATH, any_number_value);
measure_with_unit
measure_with_unit.value_component -> measure_value
(measure_value = count_measure)
(measure_value = numeric_measure)
(measure_value = amount_of_substance_measure) 
(measure_value = area_measure) 
(measure_value = celsius_temperature_measure) 
(measure_value = context_dependent_measure) 
(measure_value = electric_current_measure) 
(measure_value = luminous_intensity_measure) 
(measure_value = mass_measure) 
(measure_value = parameter_value) 
(measure_value = plane_angle_measure) 
(measure_value = length_measure) 
(measure_value = positive_length_measure) 
(measure_value = positive_plane_angle_measure) 
(measure_value = positive_ratio_measure) 
(measure_value = ratio_measure)  
(measure_value = solid_angle_measure) 
(measure_value = thermodynamic_temperature_measure) 
(measure_value = time_measure) 
(measure_value = volume_measure)

end_attribute_mapping;

attribute_mapping value_component(value_component, $PATH, any_string_value);
measure_with_unit
measure_with_unit.value_component -> measure_value
measure_value = descriptive_measure
end_attribute_mapping;

attribute_mapping value_component(value_component, $PATH, length_measure);
measure_with_unit
measure_with_unit.value_component ->  measure_value
measure_value = length_measure
length_measure

end_attribute_mapping;

attribute_mapping value_component(value_component, $PATH, plane_angle_measure);
measure_with_unit
measure_with_unit.value_component ->  measure_value
measure_value = plane_angle_measure
plane_angle_measure

end_attribute_mapping;

attribute_mapping unit(unit, $PATH, Unit);

	measure_with_unit.unit_component -> unit
	
end_attribute_mapping;

end_entity_mapping; *)
end_uof_mapping;


entity_mapping Derived_unit_element(Derived_unit_element, derived_unit_element);

attribute_mapping base_unit(base_unit, $PATH, Unit);

	derived_unit_element.unit -> named_unit
	
end_attribute_mapping;

attribute_mapping exponent(exponent, derived_unit_element.exponent);

end_attribute_mapping;

end_entity_mapping;
(*end_schema_mapping;*)
