---
# 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_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
