(enum SexType
  (enumerator notValid  0             )
  (enumerator male	1	"Male")
  (enumerator female	2	"Female")
)

(enum EmailType
  (enumerator notValid 		0	"")
  (enumerator internet 		1	"Internet")
  (enumerator compuServe 	2	"CompuServe")
  (enumerator mciMail 		3	"MCI Mail")
  (enumerator americaOnLine	4	"America Online")
  (enumerator prodigy 		5	"Prodigy")
)

(enum GroupType
  (enumerator notValid       0    "")
  (enumerator emailGroup     1    "Email Group")
  (enumerator faxGroup       2    "Fax Group")
  (enumerator telGroup       3    "Telephone Group")
  (enumerator personGroup    4    "Person Group")
  (enumerator businessGroup  5    "Business Group")
  (enumerator otherGroup     100  "Other Group")
)

(enum LookWhatChoices
  (enumerator lookAddress       0x01  "Postal Address")
  (enumerator lookTelephone     0x02  "Telephone Number")
  (enumerator lookFax           0x04  "Fax Number")
  (enumerator lookEmailAdd      0x08  "Email Address")
  (enumerator lookBirthDate     0x10  "Birth Date")
  (enumerator lookMarriageDate  0x20  "Marriage Date")
  (enumerator lookRelationships 0x40  "Relationships")
)

(enum ExportDataChoice
  (enumerator exportEmail            0x01   "Email Addresses")
  (enumerator exportFax              0x02   "Fax Numbers")
  (enumerator exportTel              0x04   "Telephone Numbers")
  (enumerator exportPostal           0x08   "Postal Addresses")
  (enumerator exportEmailAndFax      0x10   "Email Addresses And Fax Numbers")
  (enumerator exportList             0x20   "List Data")

  // OR of all the possible values
  (enumerator exportAll              0x2F   "All")
)

(enum ExportTargetName
  (enumerator exportTargetCIM1x         0x01   "DosCIM 1.x or DosCIM 2.1.x")
  (enumerator exportTargetCIM2x         0x02   "DosCIM 2.2.x or WinCIM 2.x")
  (enumerator exportTargetTabTextFile   0x03   "Tab Separated Text File")
  (enumerator exportTargetCommaTextFile 0x04   "Comma Separated Text File")
)

(enum ExportDataSource
  (enumerator exportSourceList          0x01  "")
  (enumerator exportSourceDatabase      0x02  "")
  (enumerator exportSourceAll           0x03  "")
)

(class ExportChoiceSchema
  (attribute target GiEnum
    (property qualifierName "ExportTargetName")
  )
  // this is actually OR of possible ExportDataChoice emtrs
  (attribute dataChoices GiInt32
    (property qualifierName "ExportDataChoice")
  )
  // where from the data is expected
  (attribute dataSource GiEnum
    (property qualifierName "ExportDataSource")
  )
  (attribute objectClassNames GiString)
  (attribute rootDir GiString)
  (attribute dosRelativePath GiString)  
)

(class Group
  (classProperty firstLevelEditable giTrue)
  (attribute name GiString
     (property key giTrue)
     (property displayName "Group Name")
  )
//  (attribute type GiEnum
//    (property qualifierName "GroupType")
//    (property displayName "Group Type")
//  )
//  (attribute memberClassName GiString
//    (property displayName "Group Of")
//  )
  (attribute members GiSet
    // currently, can't have multiple classes, and base class is not supported
    // so let the user choose from person objects atleast
//    (property qualifierName "Person Business Group")
//    (property qualifierName "Person")
    (property displayName "Members")
  )
  (attribute comments GiString
    (property displayName "Comments")
  )
)

(class Person
   (classProperty firstLevelEditable giTrue)
   (attribute name GiString
      (property key giTrue)
      (property displayName "Name")
   )
   (attribute alias GiString
      (property displayName "Alias")
   )
//   (attribute group GiInstance
//      (property qualifierName "Group")
//      (property displayName "Group")
//      (property selectButton giTrue)
//   )
   (attribute livingWith GiInstance
      (property qualifierName "Person")
      (property selectButton giTrue)
      (property displayName "Living With")
   )
   (attribute livingSet GiSet
      (property qualifierName "Person")
      (property archive giFalse)
      (property userEditable giFalse)
      (property displayName "Living Together")
   )
   (attribute homeAddress GiInstance
      (property qualifierName "PostalAddress")
      (property displayName "Home Address")
      (property userEditable giFalse)
      (property editButton giTrue)
   )
   (attribute homeTelSet GiSet
      (property qualifierName "Phone")
      (property displayName "Home Tel Numbers")
      (property editButton giTrue)
   )
   (attribute homeFaxSet GiSet
      (property qualifierName "Phone")
      (property displayName "Home Fax Numbers")
      (property editButton giTrue)
   )

//   (attribute workingAt GiInstance
//      (property qualifierName "Business")
//      (property displayName "Working At")
// // workaround
// //      (property selectButton giTrue)
//
//      (property editButton giTrue)
//   )

   (attribute workingWith GiInstance
      (property qualifierName "Person")
      (property displayName "Working With")
      (property selectButton giTrue)
   )

   (attribute workingSet GiSet
      (property qualifierName "Person")
      (property archive giFalse)
      (property userEditable giFalse)
      (property displayName "Working Together")
   )

   (attribute companyName GiString
      (property displayName "Company Name")
   )

   (attribute workAddress GiInstance
      (property qualifierName "PostalAddress")
      (property displayName "Work Address")
      (property userEditable giFalse)
      (property editButton giTrue)
   )

   (attribute workTelSet GiSet
      (property qualifierName "Phone")
      (property displayName "Work Tel Numbers")
      (property editButton giTrue)
   )

   (attribute workFaxSet GiSet
      (property qualifierName "Phone")
      (property displayName "Work Fax Numbers")
      (property editButton giTrue)
   )

   (attribute emailSet GiSet
      (property qualifierName "Email")
      (property displayName "Email Address")
      (property editButton giTrue)
   )

   (attribute birthDate GiDate
      (property displayName "Birth Date")
   )

   (attribute marriageDate GiDate
      (property displayName "Marriage Date")
   )

   (attribute sex GiEnum
      (property qualifierName "SexType")
      (property displayName "Sex")
   )

   (attribute father GiInstance
      (property qualifierName "Person")
      (property displayName "Father")
      (property selectButton giTrue)
   )

   (attribute mother GiInstance
      (property qualifierName "Person")
      (property displayName "Mother")
      (property selectButton giTrue)
   )

   (attribute spouse GiInstance
      (property qualifierName "Person")
      (property displayName "Spouse")
      (property selectButton giTrue)
   )

   (attribute children GiSet
      (property qualifierName "Person")
      (property displayName "Children")
      (property userEditable giFalse)
      (property archive giFalse)
   )
)

(class Business
   (classProperty firstLevelEditable giTrue)
   (attribute businessName GiString
      (property key giTrue)
      (property displayName "Business Name")
   )
   (attribute additionalName GiString
      (property displayName "Additional Name")
   )
   (attribute address GiInstance
      (property qualifierName "PostalAddress")
      (property displayName "Postal Address")
      (property editButton giTrue)
      (property userEditable giFalse)
   )
   (attribute telSet GiSet
      (property qualifierName "Phone")
      (property displayName "Tel Numbers")
      (property editButton giTrue)
   )
   (attribute faxSet GiSet
      (property qualifierName "Phone")
      (property displayName "Fax Numbers")
      (property editButton giTrue)
   )
   (attribute emailSet GiSet
      (property qualifierName "Email")
      (property displayName "Email Address")
      (property editButton giTrue)
   )
   (attribute comment GiString
      (property displayName "Comments")
   )
)

(class PostalAddress
   (classProperty displayRule "street, city, state, zip, country")

   (attribute street GiString
     (property displayName "Street")
   )
   (attribute city GiString
      (property displayName "City")
   )
   (attribute state GiString
      (property displayName "State")
   )
   (attribute zip GiString
      (property displayName "Zip")
   )
   (attribute country GiString
      (property displayName "Country")
   )
)

(class Phone
   (classProperty displayRule "phoneNumber, description")

   (attribute phoneNumber GiString
      (property displayName "Phone Number")
   )
   (attribute description GiString
      (property displayName "Comment")
   )
)

(class Email
   (attribute emailAddress GiString
      (property key giTrue)
      (property displayName "Email Address")
   )
   (attribute emailType GiEnum
      (property qualifierName "EmailType")
      (property displayName "Email Format")
   )
)

(class TableCellSchema
   (attribute attrName GiString
   )
   (attribute displayName GiString
   )
   (attribute columnWidth GiInt32
   )
)

(class TableSchema
   (attribute tableName GiString
      (property key giTrue)
   )
   (attribute objectClassName GiString
   )
   (attribute tableCellSet GiSet
      (property qualifierName "TableCellSchema")
   )
   (attribute left GiInt32
   )
   (attribute top GiInt32
   )
   (attribute width GiInt32
   )
   (attribute height GiInt32
   )
   (attribute readOnly GiBoolean
   )
)

(class ReportSchema
   (attribute reportName GiString
   )
   (attribute objectClassName GiString
   )
   (attribute rule GiString
   )
   (attribute cellWidth GiInt32
   )
   (attribute cellHeight GiInt32
   )
   (attribute borderMargin GiInt32
   )
)

(class OptionsSchema
  (attribute majorVersion GiInt32)
  (attribute minorVersion GiInt32)
  (attribute patchVersion GiInt32)
  (attribute serialNumber GiInt32)
  (attribute installNumber GiInt32)
  (attribute userName GiString)
  (attribute companyName GiString)

  (attribute shareHomeTelephone GiBoolean)
  (attribute shareHomeFax GiBoolean)
  (attribute shareWorkTelephone GiBoolean)
  (attribute shareWorkFax GiBoolean)

  (attribute autoOpenLastFile GiBoolean)
  (attribute compuServeRoot GiString)
)
