(*
 * $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 time_interval(Time_interval_arm, Time_interval_mim);*)


entity_mapping Time_interval(Time_interval, 
				time_interval
			);

attribute_mapping id(id, 
					time_interval.id
				);

end_attribute_mapping;

attribute_mapping name(name, 
					time_interval.name
				);

end_attribute_mapping;

attribute_mapping description(description, 
					time_interval.description
				);

end_attribute_mapping;

end_entity_mapping;

entity_mapping Time_interval_relationship(Time_interval_relationship, 
				time_interval_relationship
			);

attribute_mapping relation_type(relation_type, 
					time_interval_relationship.name
				);

end_attribute_mapping;

attribute_mapping description(description, 
					time_interval_relationship.description
				);

end_attribute_mapping;

attribute_mapping relating_time_interval(relating_time_interval, $PATH, Time_interval);

		    		time_interval_relationship.relating_time_interval -> time_interval
		    	
end_attribute_mapping;

attribute_mapping related_time_interval(related_time_interval, $PATH, Time_interval);

		    		time_interval_relationship.related_time_interval -> time_interval
		    	
end_attribute_mapping;

end_entity_mapping;

entity_mapping Time_interval_with_bounds(Time_interval_with_bounds, 
				time_interval_with_bounds
			);

attribute_mapping primary_bound(primary_bound, $PATH, Calendar_date);

					time_interval_with_bounds.primary_bound -> date_time_or_event_occurrence
					{date_time_or_event_occurrence = date_time_select
					date_time_select = date
					date => calendar_date}
				
end_attribute_mapping;

attribute_mapping primary_bound(primary_bound, $PATH, date_and_time);

					time_interval_with_bounds.primary_bound -> date_time_or_event_occurrence
					{date_time_or_event_occurrence = date_time_select
					date_time_select = date_and_time}
				
end_attribute_mapping;

attribute_mapping primary_bound(primary_bound, $PATH, Event);

					time_interval_with_bounds.primary_bound -> date_time_or_event_occurrence
					{date_time_or_event_occurrence = event_occurrence}
				
end_attribute_mapping;

attribute_mapping secondary_bound(secondary_bound, $PATH, Calendar_date);

					time_interval_with_bounds.secondary_bound -> date_time_or_event_occurrence
					{date_time_or_event_occurrence = date_time_select
					date_time_select = date
					date => calendar_date}
				
end_attribute_mapping;

attribute_mapping secondary_bound(secondary_bound, $PATH, date_and_time);

					time_interval_with_bounds.secondary_bound -> date_time_or_event_occurrence
					{date_time_or_event_occurrence = date_time_select
					date_time_select = date_and_time}
				
end_attribute_mapping;

attribute_mapping secondary_bound(secondary_bound, $PATH, Event);

					time_interval_with_bounds.secondary_bound -> date_time_or_event_occurrence
					{date_time_or_event_occurrence = event_occurrence}
				
end_attribute_mapping;

attribute_mapping duration_from_primary_bound(duration_from_primary_bound, $PATH, time_measure_with_unit);

					time_interval_with_bounds.duration -> time_measure_with_unit
				
end_attribute_mapping;

end_entity_mapping;
(*end_schema_mapping;*)
