(*
 * $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 Packaged connector model - EXPRESS ARM
   by LKSoftWare GmbH for implementation purpose within IDA-STEP(TM)
*)

SCHEMA Packaged_connector_model_xim; 

USE FROM Packaged_part_black_box_model_xim;

USE FROM Packaged_connector_model_mim;

	SUBTYPE_CONSTRAINT packaged_part_terminal_armx_subtypes FOR Packaged_part_terminal_armx; 
		(ONEOF (Packaged_part_interface_terminal,
	 	Packaged_part_join_terminal));
	END_SUBTYPE_CONSTRAINT;

  ENTITY Mating_connector_relationship
    SUBTYPE OF (Part_definition_relationship);
      SELF\product_definition_relationship.relating_product_definition : Packaged_connector_armx;
      SELF\product_definition_relationship.related_product_definition  : Packaged_connector_armx;
    DERIVE
      SELF\product_definition_relationship.name: label :='mating connector relationship';
  END_ENTITY;

  ENTITY Packaged_connector_armx
    (* CONNOTATIONAL *) SUBTYPE OF (Packaged_part_armx, packaged_connector);
    INVERSE
      characterized_connector_terminal_relationship : SET[1:?] OF packaged_connector_terminal_relationship_armx FOR connector;
  END_ENTITY;
	
  ENTITY Packaged_connector_terminal_relationship_armx
  	(* CONNOTATIONAL *) SUBTYPE OF (packaged_connector_terminal_relationship);
      SELF\shape_aspect.of_shape RENAMED connector                                   : Packaged_connector_armx;
      SELF\shape_aspect_relationship.relating_shape_aspect RENAMED join_terminal     : Packaged_part_join_terminal;
      SELF\shape_aspect_relationship.related_shape_aspect RENAMED interface_terminal : Packaged_part_interface_terminal;
    DERIVE
      SELF\shape_aspect.description : text := ?;
      SELF\shape_aspect.product_definitional : LOGICAL := ?;
      SELF\shape_aspect.name : label := ?;
      SELF\shape_aspect_relationship.name : label := ?;
    UNIQUE
      UR1 : join_terminal;
      UR2 : interface_terminal,
 connector;
  END_ENTITY;

  ENTITY Packaged_part_interface_terminal
    (* CONNOTATIONAL *) SUBTYPE OF (Packaged_part_terminal_armx);
    INVERSE
      external_connector_function : SET[0:?] OF packaged_connector_terminal_relationship_armx FOR interface_terminal;
  END_ENTITY;

END_SCHEMA;

