(*
 * $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/
 *)

(*
   Derived from ISO TC184/SC4/WG12 N - ISO/CD-TS 10303-xxxx Interconnect module to assembly module relationship - EXPRESS ARM
   by LKSoftWare GmbH for implementation purpose within IDA-STEP(TM)
*)

SCHEMA Interconnect_module_to_assembly_module_relationship_xim;

USE FROM Interconnect_module_connection_routing_xim;

  TYPE component_based_message_type = ENUMERATION OF
    (component_reference_designation,
     terminal_designation);
  END_TYPE;

	SUBTYPE_CONSTRAINT component_feature_to_layout_feature_relationship_subtypes FOR Component_feature_to_layout_feature_relationship;
	  ONEOF (Component_based_annotation_symbol_placement_relationship,
	         Component_based_annotation_text_relationship);
	END_SUBTYPE_CONSTRAINT;
	
 	TYPE component_or_component_feature = SELECT
 		(Assembly_component_armx,
	     Component_external_reference,
	     Component_feature_armx,
	     Component_feature_external_reference);
	END_TYPE;

	TYPE imtar_bare_die_component_or_packaged_component = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON bare_die_component_or_packaged_component WITH  
    (Packaged_component_armx,
     Bare_die_component_armx);
  END_TYPE;

	TYPE imtar_bare_die_terminal_or_packaged_part_terminal = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON bare_die_terminal_or_packaged_part_terminal WITH  
    (Bare_die_terminal_armx,
     Packaged_part_terminal_armx);
  END_TYPE;

	TYPE imtar_requirement_assignment_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON requirement_assignment_item WITH 
	    (Component_feature_to_layout_feature_relationship);
	END_TYPE; 

	TYPE imtar_restriction_basis_item = EXTENSIBLE SELECT BASED_ON restriction_basis_item WITH 
	   (component_or_component_feature);
	END_TYPE; 

	TYPE imtar_documented_element_select = EXTENSIBLE SELECT BASED_ON documented_element_select WITH 
	    (component_or_component_feature);
	END_TYPE;

	ENTITY Assembly_requirement_for_interconnect_relationship 
 		(* CONNOTATIONAL *) SUBTYPE OF (Part_definition_relationship);
      SELF\Product_definition_relationship.relating_product_definition RENAMED relating_view : Assembly_module; 		
	  SELF\Product_definition_relationship.related_product_definition RENAMED related_view   : Interconnect_module;
	END_ENTITY;

  ENTITY Component_based_annotation_symbol_placement_relationship
    (* CONNOTATIONAL *) SUBTYPE OF (Component_feature_to_layout_feature_relationship);
       SELF\Component_feature_to_layout_feature_relationship.related_stratum_concept : special_symbol_component;
  END_ENTITY;

  ENTITY Component_based_annotation_text_relationship
    (* CONNOTATIONAL *) SUBTYPE OF (Component_feature_to_layout_feature_relationship);
      SELF\Component_feature_to_layout_feature_relationship.related_stratum_concept : Laminate_text_string_component_armx;
      message_type                                                                  : component_based_message_type;
  END_ENTITY;

  ENTITY Component_feature_to_layout_feature_relationship
	  SUPERTYPE OF (ONEOF (Component_based_annotation_symbol_placement_relationship,
	         Component_based_annotation_text_relationship))
  	(* CONNOTATIONAL *) SUBTYPE OF (shape_aspect_relationship);
      relating_feature	: component_or_component_feature;
      related_stratum_concept	: stratum_concept;
    DERIVE
      SELF\shape_aspect_relationship.description : text := ?;
      SELF\shape_aspect_relationship.name : label := ?;
      SELF\shape_aspect_relationship.related_shape_aspect : shape_aspect := ?;
      SELF\shape_aspect_relationship.relating_shape_aspect : shape_aspect := ?;
    INVERSE
	  	requirement : SET[0:1] OF requirement_assignment_armx FOR assigned_to;
  END_ENTITY;
END_SCHEMA;


