(*
 * $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 text_representation(Text_representation_arm, Text_representation_mim);*)


entity_mapping Character_glyph_font_usage(Character_glyph_font_usage, character_glyph_font_usage);

mapping_constraints;

end_mapping_constraints;

attribute_mapping character(character, $PATH, Character_glyph_symbol);
character_glyph_font_usage
character_glyph_font_usage.character ->
generic_character_glyph_symbol
end_attribute_mapping;

attribute_mapping font(font, $PATH, Text_font);
character_glyph_font_usage
character_glyph_font_usage.font ->
text_font
end_attribute_mapping;

end_entity_mapping;

entity_mapping Character_glyph_symbol(Character_glyph_symbol, generic_character_glyph_symbol);

mapping_constraints;

end_mapping_constraints;

attribute_mapping character(character, representation.name);
generic_character_glyph_symbol <=
symbol_representation <=
representation
representation.name

end_attribute_mapping;

end_entity_mapping;

entity_mapping Draughting_pre_defined_text_font(Draughting_pre_defined_text_font, draughting_pre_defined_text_font);

mapping_constraints;

			{draughting_pre_defined_text_font <=
			pre_defined_text_font <=
			pre_defined_item
			(pre_defined_item.name = 'ISO 3098-1 font A')
			(pre_defined_item.name = 'ISO 3098-1 font B')}
			
end_mapping_constraints;

end_entity_mapping;

entity_mapping Externally_defined_text_font(Externally_defined_text_font, externally_defined_text_font);

mapping_constraints;

end_mapping_constraints;

attribute_mapping name(name, $PATH);
externally_defined_text_font <=
externally_defined_item
externally_defined_item.item_id ->
source_item = identifier
identifier

end_attribute_mapping;

end_entity_mapping;

entity_mapping Text_font(Text_font, text_font
			);

attribute_mapping id(id, text_font.id
				);

end_attribute_mapping;

attribute_mapping name(name, text_font.name
				);

end_attribute_mapping;

attribute_mapping description(description, text_font.description
				);

end_attribute_mapping;

end_entity_mapping;

entity_mapping Text_font_family(Text_font_family, text_font_family
			);

attribute_mapping id(id, text_font_family.id
				);

end_attribute_mapping;

attribute_mapping name(name, text_font_family.name
				);

end_attribute_mapping;

attribute_mapping description(description, text_font_family.description
				);

end_attribute_mapping;

end_entity_mapping;

entity_mapping Text_font_in_family(Text_font_in_family, text_font_in_family);

mapping_constraints;

end_mapping_constraints;

attribute_mapping font(font, $PATH, Text_font);
text_font_in_family
text_font_in_family.font ->
text_font
end_attribute_mapping;

attribute_mapping family(family, $PATH, Text_font_family);
text_font_in_family
text_font_in_family.family ->
text_font_family
end_attribute_mapping;

end_entity_mapping;

entity_mapping Text_literal_with_extent(Text_literal_with_extent, text_literal_with_extent);

mapping_constraints;

end_mapping_constraints;

attribute_mapping font(font, $PATH, Text_font);
text_literal_with_extent <=
text_literal
text_literal.font ->
font_select = text_font
text_font
end_attribute_mapping;

attribute_mapping font(font, $PATH, Draughting_pre_defined_text_font);
text_literal_with_extent <=
text_literal
text_literal.font ->
font_select = draughting_pre_defined_text_font
draughting_pre_defined_text_font
end_attribute_mapping;

attribute_mapping font(font, $PATH, Externally_defined_text_font);
text_literal_with_extent <=
text_literal
text_literal.font ->
font_select = externally_defined_text_font
externally_defined_text_font
end_attribute_mapping;

end_entity_mapping;
(*end_schema_mapping;*)
