code: private RelationType getRelationType(int index)
     {
        if (index < 0 || index > RELATION_TYPES.length)
        {
           index = 0;
        }
  
        return RELATION_TYPES[index];
     }
docs: Convert an integer into a RelationType instance.
  
  @param index integer value
  @return RelationType instance