---
# this is neat. by specifying 'customTagName', we can define new instance
# generation methods within the YAML itself!
# specify 'customTagName' on the instance for the defining tag name
# then specify 'customTagName' on each attribute or relationship to
# define the attributes/relationships that get set on the instance
#
# the system will automatically recognize 'index' as the suggested
# instance index value

- library: '&IDL_MochaBaseSystem;'
  instances:
  - class: '&IDC_Relationship;'
    name: Relationship
    index: 3
    customTagName: 'relationship'
    instancesLabeledByRAMB: '&IDMB_Relationship__get__Fully_Qualified_Name;'
    previewElementId: '&IDE_Relationship_Definition;'
    attributes:
    - instance: '&IDA_RelationshipType;'
      customTagName: 'type'
    - instance: '&IDA_Singular;'
      customTagName: 'singular'
    relationships:
    - instance: '&IDR_Relationship__has_source__Class;'
      customTagName: 'sourceClassId'
    - instance: '&IDR_Relationship__has_destination__Class;'
      customTagName: 'destinationClassId'
    - instance: '&IDR_Relationship__has_sibling__Relationship;'
      customTagName: 'siblingRelationshipId'
    defaultTask: '&IDI_Task_Relationship_View;'
    relatedTasks:
    - instance: '&IDI_Task_Relationship_View;'
    - instance: '&IDI_Task_Relationship_Edit;'


  - relationship: '&IDR_Class__has__Attribute;'
    index: 1
    sourceClassId: '&IDC_Class;'
    type: 'has'
    destinationClassId: '&IDC_Attribute;'
    siblingRelationshipId: '&IDR_Attribute__for__Class;'
    singular: no

  - relationship: '&IDR_Attribute__for__Class;'
    index: 2
    sourceClassId: '&IDC_Attribute;'
    type: 'for'
    destinationClassId: '&IDC_Class;'
    siblingRelationshipId: '&IDR_Class__has__Attribute;'
    singular: no

  - relationship: '&IDR_Class__has__Relationship;'
    index: 3
    sourceClassId: '&IDC_Class;'
    type: 'has'
    destinationClassId: '&IDC_Relationship;'
    siblingRelationshipId: '&IDR_Relationship__for__Class;'
    singular: no

  - relationship: '&IDR_Relationship__for__Class;'
    index: 4
    sourceClassId: '&IDC_Relationship;'
    type: 'for'
    destinationClassId: '&IDC_Class;'
    siblingRelationshipId: '&IDR_Class__has__Attribute;'
    singular: no

  - relationship: '&IDR_Relationship__has_sibling__Relationship;'
    index: 5
    sourceClassId: '&IDC_Relationship;'
    type: 'has sibling'
    destinationClassId: '&IDC_Relationship;'
    siblingRelationshipId: '&IDR_Relationship__is_sibling__Relationship;'
    singular: yes

  - relationship: '&IDR_Relationship__is_sibling__Relationship;'
    index: 6
    sourceClassId: '&IDC_Relationship;'
    type: 'is sibling'
    destinationClassId: '&IDC_Relationship;'
    siblingRelationshipId: '&IDR_Relationship__has_sibling__Relationship;'
    singular: yes

  - relationship: '&IDR_Class__has_super__Class;'
    index: 7
    sourceClassId: '&IDC_Class;'
    type: 'has super'
    destinationClassId: '&IDC_Class;'
    siblingRelationshipId: '&IDR_Class__has_sub__Class;'
    singular: no

  - relationship: '&IDR_Class__has_sub__Class;'
    index: 8
    sourceClassId: '&IDC_Class;'
    type: 'has sub'
    destinationClassId: '&IDC_Class;'
    siblingRelationshipId: '&IDR_Class__has_super__Class;'
    singular: no

  - relationship: '&IDR_Work_Set__has_valid__Class;'
    index: 9
    sourceClassId: '&IDC_WorkSet;'
    type: 'has valid'
    destinationClassId: '&IDC_Class;'
    siblingRelationshipId: '&IDR_Class__valid_for__Work_Set;'
    singular: no

  - relationship: '&IDR_Class__valid_for__Work_Set;'
    index: 10
    sourceClassId: '&IDC_Class;'
    type: 'valid for'
    destinationClassId: '&IDC_WorkSet;'
    siblingRelationshipId: '&IDR_Work_Set__has_valid__Class;'
    singular: no

  - relationship: '&IDR_Control_Transaction_Method__processes__Element;'
    index: 11
    sourceClassId: '&IDC_ControlTransactionMethod;'
    type: 'processes'
    destinationClassId: '&IDC_Element;'
    siblingRelationshipId: '&IDR_Element__processed_by__Control_Transaction_Method;'
    singular: no

  - relationship: '&IDR_Element__processed_by__Control_Transaction_Method;'
    index: 12
    sourceClassId: '&IDC_Element;'
    type: 'processed by'
    destinationClassId: '&IDC_ControlTransactionMethod;'
    siblingRelationshipId: '&IDR_Control_Transaction_Method__processes__Element;'
    singular: yes

  #- relationship: '&IDR_Element__has_text_node_value__Attribute;'
  #  index: 13,
  #  sourceClassId: '&IDC_Element;'
  #   type: 'has text node value'
  #   destinationClassId: '&IDC_Attribute;'
  #   siblingRelationshipId: '&IDR_Element__processed_by__Control_Transaction_Method;'
  #   singular: yes

  # - relationship: '&IDR_Attribute__is_text_node_value_for__Element;'
  #   index: 14,
  #   sourceClassId: '&IDC_Attribute;'
  #   type: 'is text node value for'
  #   destinationClassId: '&IDC_Element;'
  #   siblingRelationshipId: '&IDR_Element__has_text_node_value__Attribute;'
  #   singular: yes

  - relationship: '&IDR_Class__has__Method;'
    index: 15
    sourceClassId: '&IDC_Class;'
    type: 'has'
    destinationClassId: '&IDC_Method;'
    siblingRelationshipId: '&IDR_Method__for__Class;'
    singular: no

  - relationship: '&IDR_Method__for__Class;'
    index: 16
    sourceClassId: '&IDC_Method;'
    type: 'for'
    destinationClassId: '&IDC_Class;'
    siblingRelationshipId: '&IDR_Class__has__Method;'
    singular: no

  # - relationship: '&IDR_Class__has_implementation__Method;'
  #   index: 17,
  #   sourceClassId: '&IDC_Class;'
  #   type: 'has implementation'
  #   destinationClassId: '&IDC_Method;'
  #   siblingRelationshipId: '&IDR_Method__implements_for__Class;'
  #   singular: no

  # - relationship: '&IDR_Method__implements_for__Class;'
  #   index: 18,
  #   sourceClassId: '&IDC_Method;'
  #   type: 'implements for'
  #   destinationClassId: '&IDC_Class;'
  #   siblingRelationshipId: '&IDR_Class__has_implementation__Method;'
  #   singular: yes

  # - relationship: '&IDR_Method__implements__Method;'
  #   index: 19
  #   sourceClassId: '&IDC_Method;'
  #   type: 'implements'
  #   destinationClassId: '&IDC_Method;'
  #   siblingRelationshipId: '&IDR_Method__implemented_by__Method;'
  #   singular: no

  # - relationship: '&IDR_Method__implemented_by__Method;'
  #   index: 20,
  #   sourceClassId: '&IDC_Method;'
  #   type: 'implemented by'
  #   destinationClassId: '&IDC_Method;'
  #   siblingRelationshipId: '&IDR_Method__implements__Method;'
  #   singular: no

  - relationship: '&IDR_Class__has_default__Task;'
    index: 87
    sourceClassId: '&IDC_Class;'
    type: 'has default'
    destinationClassId: '&IDC_Task;'
    siblingRelationshipId: '&IDR_Task__default_for__Class;'
    singular: yes

  - relationship: '&IDR_Task__default_for__Class;'
    index: 88
    sourceClassId: '&IDC_Task;'
    type: 'default for'
    destinationClassId: '&IDC_Class;'
    siblingRelationshipId: '&IDR_Class__has_default__Task;'
    singular: no

  - relationship: '&IDR_Class__instances_labeled_by__Executable_returning_Attribute;'
    index: 109
    sourceClassId: '&IDC_Class;'
    type: 'instances labeled by'
    destinationClassId: '&IDC_ExecutableReturningAttribute;'
    siblingRelationshipId: '&IDR_Executable_returning_Attribute__labels_instances_of__Class;'
    singular: yes

  - relationship: '&IDR_Executable_returning_Attribute__labels_instances_of__Class;'
    index: 110
    sourceClassId: '&IDC_ExecutableReturningAttribute;'
    type: 'labels instances of'
    destinationClassId: '&IDC_Class;'
    siblingRelationshipId: '&IDR_Class__instances_labeled_by__Executable_returning_Attribute;'
    singular: no

  - relationship: '&IDR_Relationship__has_source__Class;'
    index: 157
    sourceClassId: '&IDC_Relationship;'
    type: 'has source'
    destinationClassId: '&IDC_Class;'
    siblingRelationshipId: '&IDR_Class__source_for__Relationship;'
    singular: yes

  - relationship: '&IDR_Class__source_for__Relationship;'
    index: 158
    sourceClassId: '&IDC_Class;'
    type: 'source for'
    destinationClassId: '&IDC_Relationship;'
    siblingRelationshipId: '&IDR_Relationship__has_source__Class;'
    singular: no

  - relationship: '&IDR_Relationship__has_destination__Class;'
    index: 159
    sourceClassId: '&IDC_Relationship;'
    type: 'has destination'
    destinationClassId: '&IDC_Class;'
    siblingRelationshipId: '&IDR_Class__destination_for__Relationship;'
    singular: yes

  - relationship: '&IDR_Class__destination_for__Relationship;'
    index: 160
    sourceClassId: '&IDC_Class;'
    type: 'destination for'
    destinationClassId: '&IDC_Relationship;'
    siblingRelationshipId: '&IDR_Relationship__has_destination__Class;'
    singular: no

  - relationship: '&IDR_Class__has__Instance;'
    index: 249
    sourceClassId: '&IDC_Class;'
    type: 'has'
    destinationClassId: '&IDC_Instance;'
    siblingRelationshipId: '&IDR_Instance__for__Class;'
    singular: no

  - relationship: '&IDR_Instance__for__Class;'
    index: 250
    sourceClassId: '&IDC_Instance;'
    type: 'for'
    destinationClassId: '&IDC_Class;'
    siblingRelationshipId: '&IDR_Class__has__Instance;'
    singular: no

  - relationship: '&IDR_Class__uses_preview__Executable_returning_Element;'
    index: 3480 # was: Instance Set.uses alternate preview Executable returning Element
    sourceClassId: '&IDC_Class;'
    type: 'uses preview'
    destinationClassId: '&IDC_ExecutableReturningElement;'
    siblingRelationshipId: '&IDR_Executable_returning_Element__preview_used_by__Class;'
    singular: yes

  - relationship: '&IDR_Executable_returning_Element__preview_used_by__Class;'
    index: 3481 # was: Executable returning Element.alternate preview for Instance Set
    sourceClassId: '&IDC_ExecutableReturningElement;'
    type: 'preview used by'
    destinationClassId: '&IDC_Class;'
    siblingRelationshipId: '&IDR_Class__uses_preview__Executable_returning_Element;'
    singular: no

  - relationship: '&IDR_Task__has__Task_Category;'
    index: 7910 # was: UI Task.has Related Menu Item
    sourceClassId: '&IDC_Task;'
    type: 'has'
    destinationClassId: '&IDC_TaskCategory;'
    siblingRelationshipId: '&IDR_Task_Category__for__Task;'
    singular: yes

  - relationship: '&IDR_Task_Category__for__Task;'
    index: 7911 # was: Related Menu Item.for UI Task
    sourceClassId: '&IDC_TaskCategory;'
    type: 'for'
    destinationClassId: '&IDC_Task;'
    siblingRelationshipId: '&IDR_Task__has__Task_Category;'
    singular: no

  - relationship: '&IDR_Class__has_related__Task;'
    index: 7991 # was: Class.instances have Related Menu Item (3$7991) # was: Related Menu Item.uses object of Class (3$7948)
    sourceClassId: '&IDC_Class;'
    type: 'has related'
    destinationClassId: '&IDC_Task;'
    siblingRelationshipId: '&IDR_Task__related_for__Class;'
    singular: no

  - relationship: '&IDR_Task__related_for__Class;'
    index: 7990 # was: Related Menu Item.for any instance of Class (3$7990) # was: Class.object for Related Menu Item (3$7949)
    sourceClassId: '&IDC_Task;'
    type: 'related for'
    destinationClassId: '&IDC_Class;'
    siblingRelationshipId: '&IDR_Class__has_related__Task;'
    singular: no