(*
   $Id$
   ISO TC184/SC4/WG12 N4738 - ISO/CD-TS 10303-1778 External library - EXPRESS ARM
*)

SCHEMA External_library_arm;

USE FROM External_properties_arm;  -- ISO/CD-TS 10303-1129

USE FROM External_source_arm;  -- ISO/CD-TS 10303-1331

USE FROM Plib_class_reference_arm; -- ISO/CD-TS 10303-1291

  TYPE el_external_identification_item = EXTENSIBLE GENERIC_ENTITY SELECT BASED_ON external_identification_item WITH  
    (User_defined_library_or_dictionary);
  END_TYPE;

  ENTITY Iso15926_4_rdl
    SUBTYPE OF (Known_source); 
  END_ENTITY; 

  ENTITY Known_source 
    ABSTRACT SUPERTYPE OF (ONEOF(Iso15926_4_rdl,
      Otd_catalogue,
      Otd_dictionary,
      Plib_dictionary,
      Plib_library))
    SUBTYPE OF (External_source); 
  END_ENTITY; 

  ENTITY Otd_catalogue 
    SUBTYPE OF (Known_source); 
  END_ENTITY; 

  ENTITY Otd_dictionary 
    SUBTYPE OF (Known_source); 
  END_ENTITY; 

  ENTITY Plib_dictionary 
    SUBTYPE OF (Known_source); 
  END_ENTITY; 
 
  ENTITY Plib_library 
    SUBTYPE OF (Known_source); 
  END_ENTITY; 
  
  ENTITY User_defined_library_or_dictionary 
    SUBTYPE OF (External_source); 
    INVERSE
      source : External_source_identification FOR item;
  END_ENTITY;

  SUBTYPE_CONSTRAINT external_source_subtypes FOR External_source; 
	(ONEOF (Known_source,
	  User_defined_library_or_dictionary));
  END_SUBTYPE_CONSTRAINT;
  
END_SCHEMA;
