(*
 * $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 physical_connectivity_definition(Physical_connectivity_definition_arm, Physical_connectivity_definition_mim);*)


entity_mapping Physical_connectivity_definition_armx(Physical_connectivity_definition_armx, physical_connectivity_definition);

mapping_constraints;
physical_connectivity_definition <=
shape_aspect

end_mapping_constraints;

attribute_mapping name(name, shape_aspect.name);
physical_connectivity_definition <=
shape_aspect
shape_aspect.name

end_attribute_mapping;

attribute_mapping associated_definition(associated_definition, $PATH, Physical_unit_network_definition);
physical_connectivity_definition <=
shape_aspect
shape_aspect.of_shape ->
product_definition_shape =>
physical_unit =>
physical_unit_network_definition

end_attribute_mapping;

attribute_mapping associated_terminals(associated_terminals, $PATH, Physical_component_terminal);
physical_connectivity_definition <=
shape_aspect <-
shape_aspect_relationship.relating_shape_aspect
shape_aspect_relationship
{shape_aspect_relationship
shape_aspect_relationship.name = 'associated terminals'}
shape_aspect_relationship.related_shape_aspect ->
{shape_aspect
(shape_aspect.description = 'assembly module component terminal')
(shape_aspect.description = 'bare die component terminal')
(shape_aspect.description = 'interconnect component join terminal')
(shape_aspect.description = 'interconnect module component terminal')
(shape_aspect.description = 'packaged component join terminal')}
shape_aspect =>
component_feature =>
component_terminal =>
physical_component_terminal

end_attribute_mapping;

end_entity_mapping;

entity_mapping Physical_connectivity_definition_relationship(Physical_connectivity_definition_relationship, shape_aspect_relationship);

mapping_constraints;
{shape_aspect_relationship
shape_aspect_relationship.name = 'physical connectivity definition relationship'}

end_mapping_constraints;

attribute_mapping first_definition(first_definition, $PATH, Physical_connectivity_definition_armx);
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect =>
physical_connectivity_definition

end_attribute_mapping;

attribute_mapping second_definition(second_definition, $PATH, Physical_connectivity_definition_armx);
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect =>
physical_connectivity_definition

end_attribute_mapping;

attribute_mapping purpose(purpose, shape_aspect_relationship.description);
shape_aspect_relationship
shape_aspect_relationship.description

end_attribute_mapping;

end_entity_mapping;

entity_mapping Physical_connectivity_element_armx(Physical_connectivity_element_armx, physical_connectivity_element);

mapping_constraints;
physical_connectivity_element <=
[shape_aspect]
[shape_aspect_relationship]

end_mapping_constraints;

attribute_mapping name(name, shape_aspect.name);
physical_connectivity_element <=
shape_aspect
shape_aspect.name

end_attribute_mapping;

attribute_mapping start_terminus(start_terminus, $PATH, termination_or_junction);
physical_connectivity_element <=
shape_aspect_relationship
{shape_aspect_relationship
shape_aspect_relationship.name = 'start to end terminus'}
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect

end_attribute_mapping;

attribute_mapping start_terminus(start_terminus, $PATH, Topological_junction);
physical_connectivity_element <=
shape_aspect_relationship
{shape_aspect_relationship
shape_aspect_relationship.name = 'start to end terminus'}
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect
{shape_aspect
[shape_aspect.description = 'topological junction']
[shape_aspect.product_definitional = .TRUE.]}

end_attribute_mapping;

attribute_mapping start_terminus(start_terminus, $PATH, Component_terminal_armx);

				physical_connectivity_element <=
				shape_aspect_relationship
				{shape_aspect_relationship
				shape_aspect_relationship.name = 'start to end terminus'}
				shape_aspect_relationship.relating_shape_aspect ->
				shape_aspect =>
				component_feature =>
				component_terminal
				
end_attribute_mapping;

attribute_mapping end_terminus(end_terminus, $PATH, termination_or_junction);
physical_connectivity_element <=
shape_aspect_relationship
{shape_aspect_relationship
shape_aspect_relationship.name = 'start to end terminus'}
shape_aspect_relationship.related_shape_aspect ->
shape_aspect

end_attribute_mapping;

attribute_mapping end_terminus(end_terminus, $PATH, Topological_junction);
physical_connectivity_element <=
shape_aspect_relationship
{shape_aspect_relationship
shape_aspect_relationship.name = 'start to end terminus'}
shape_aspect_relationship.related_shape_aspect ->
shape_aspect
{shape_aspect
[shape_aspect.description = 'topological junction']
[shape_aspect.product_definitional = .TRUE.]}

end_attribute_mapping;

attribute_mapping end_terminus(end_terminus, $PATH, Component_terminal_armx);

				physical_connectivity_element <=
				shape_aspect_relationship
				{shape_aspect_relationship
				shape_aspect_relationship.name = 'start to end terminus'}
				shape_aspect_relationship.relating_shape_aspect ->
				shape_aspect =>
				component_feature =>
				component_terminal
				
end_attribute_mapping;

attribute_mapping connectivity_context(connectivity_context, $PATH, Physical_connectivity_structure_definition);
physical_connectivity_element <=
shape_aspect <-
shape_aspect_relationship.related_shape_aspect
{shape_aspect_relationship
shape_aspect_relationship.name = 'structure element'}
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect =>
physical_connectivity_definition

end_attribute_mapping;

end_entity_mapping;

entity_mapping Physical_connectivity_make_from_relationship(Physical_connectivity_make_from_relationship, make_from_connectivity_relationship);

mapping_constraints;
make_from_connectivity_relationship <=
shape_aspect_relationship

end_mapping_constraints;

attribute_mapping resultant_definition(resultant_definition, $PATH, Physical_connectivity_definition_armx);
make_from_connectivity_relationship <=
shape_aspect_relationship
shape_aspect_relationship.related_shape_aspect ->
shape_aspect =>
physical_connectivity_definition

end_attribute_mapping;

attribute_mapping reusable_definition(reusable_definition, $PATH, Physical_connectivity_definition_armx);
make_from_connectivity_relationship <=
shape_aspect_relationship
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect =>
physical_connectivity_definition

end_attribute_mapping;

end_entity_mapping;

entity_mapping Physical_connectivity_structure_definition(Physical_connectivity_structure_definition, physical_connectivity_definition);

mapping_constraints;
physical_connectivity_definition <=
shape_aspect
(* GL - Add a constraint from INVERSE attribute *)
{shape_aspect <-
shape_aspect_relationship.relating_shape_aspect
shape_aspect_relationship
{shape_aspect_relationship
shape_aspect_relationship.name = 'structure element'}
shape_aspect_relationship.related_shape_aspect ->
shape_aspect =>
physical_connectivity_element}

end_mapping_constraints;

end_entity_mapping;

entity_mapping Physical_unit_network_definition_armx(Physical_unit_network_definition_armx, physical_unit_network_definition);

mapping_constraints;
physical_unit_network_definition <=
physical_unit <=
product_definition

end_mapping_constraints;

end_entity_mapping;

entity_mapping Requirement_assignment_armx(Requirement_assignment_armx, requirement_assignment)
extended;

attribute_mapping assigned_to(assigned_to, , Physical_connectivity_element_armx);

					requirement_assigned_item *> pcd_requirement_assigned_item
					pcd_requirement_assigned_item = shape_aspect_relationship
					shape_aspect_relationship =>
					physical_connectivity_element
				
end_attribute_mapping;

attribute_mapping assigned_to(assigned_to, , Physical_connectivity_definition_armx);

					requirement_assigned_item *> pcd_requirement_assigned_item
					pcd_requirement_assigned_item = 
					physical_connectivity_definition
				
end_attribute_mapping;

attribute_mapping assigned_to(assigned_to, , Physical_connectivity_definition_relationship);

					requirement_assigned_item *> pcd_requirement_assigned_item
					pcd_requirement_assigned_item = 
					shape_aspect_relationship
				
end_attribute_mapping;

end_entity_mapping;

entity_mapping Topological_junction(Topological_junction, shape_aspect);

mapping_constraints;
{shape_aspect
[shape_aspect.description = 'topological junction']
[shape_aspect.product_definitional = .TRUE.]}

end_mapping_constraints;

attribute_mapping name(name, shape_aspect.name);

end_attribute_mapping;

attribute_mapping scope(scope, $PATH, Physical_connectivity_structure_definition);
shape_aspect <-
shape_aspect_relationship.related_shape_aspect
shape_aspect_relationship
{shape_aspect_relationship
shape_aspect_relationship.name = 'topological junction scope'}
shape_aspect_relationship.relating_shape_aspect ->
shape_aspect =>
physical_connectivity_definition

end_attribute_mapping;

end_entity_mapping;

entity_mapping Document_assignment(Document_assignment, applied_document_reference)
extended;

attribute_mapping is_assigned_to(is_assigned_to, , Physical_connectivity_definition_armx);
						document_reference_item *> pcd_document_reference_item
						pcd_document_reference_item = physical_connectivity_definition
end_attribute_mapping;

attribute_mapping is_assigned_to(is_assigned_to, , Physical_connectivity_element_armx);
						document_reference_item *> pcd_document_reference_item
						pcd_document_reference_item = physical_connectivity_element
end_attribute_mapping;

end_entity_mapping;

(*end_schema_mapping;*)
