package: "https://oasis-open.org/jadn/v1.0/examples" description: "Example type definitions from JADN Specification" Person = Record 1 name String 2 id Integer 3 email String optional Product = Choice // Discriminated union 1 furniture Furniture 2 appliance Appliance 3 software Software Dept = Enumerated // Explicit Tag values derived from the Choice 1 furniture 2 appliance 3 software Software = String /uri Stock1 = Record // Discriminated union with intrinsic tag 1 quantity Integer 2 product Product // Value = Map with one key/value Stock2 = Record // Container with explicitly-tagged discriminate.. 1 dept Dept // Tag = one key from Choice 2 quantity Integer 3 product Product(TagId[dept]) // Choice specifying an explicit tag field Hashes = Map{1..*} // Multiple discriminated unions with intrinsic .. 1 md5 Binary{16..16} /x optional 2 sha1 Binary{20..20} /x optional 3 sha256 Binary{32..32} /x optional Hashes2 = ArrayOf(HashVal) // Multiple discriminated unions with explicit t.. HashVal = Record 1 algorithm Enumerated(Enum[HashAlg]) // Tag - one key from Choice 2 value HashAlg(TagId[algorithm]) // Value selected from Choice by 'algorithm' field HashAlg = Choice 1 md5 Binary{16..16} /x 2 sha1 Binary{20..20} /x 3 sha256 Binary{32..32} /x Member = Record 1 name String 2 email String /email Member2 = Record 1 name String 2 email Member2$email Member2$email = String /email // Tool-generated type definition. Roster = Record 1 org_name String 2 members Member [0..*] // Optional and repeated: minc=0, maxc=0 Roster2 = Record 1 org_name String 2 members Roster2$members optional // Optional: minc=0, maxc=1 Roster2$members = ArrayOf(Member){1..*} // Tool-generated array: minv=1, maxv=0 Roster3 = Record 1 org_name String 2 members Members // members field is required: default minc = 1, m.. Members = ArrayOf(Member) // Explicitly-defined array: default minv = 0, m.. Pixel = Map 1 red Integer 2 green Integer 3 blue Integer Channel = Enumerated(Enum[Pixel]) // Derived Enumerated type ChannelMask = ArrayOf(Enum[Pixel]) // ArrayOf(derived enumeration) Channel2 = Enumerated 1 red 2 green 3 blue ChannelMask2 = ArrayOf(Channel) Channel3 = Enumerated 1 red 2 green 3 blue Pixel3 = MapOf(Channel3, Integer) Catalog = Record 1 a TypeA 2 b/ TypeB TypeA = Record 1 x Number 2 y Number TypeB = Record 1 foo String 2 bar Integer Paths = Enumerated(Pointer[Catalog]) Paths2 = Enumerated 1 a // Item 1 2 b/foo // Item 2 3 b/bar // Item 3 Person2 = Record 1 id Key(Integer) // key 2 name String 3 mother Link(Person2) // link 4 father Link(Person2) // link 5 siblings Link(Person2) [0..*] // link 6 friends Link(Person2) [0..*] // link 7 employer Link(Organization) optional Organization = Record 1 ein Key(String{10..10}) 2 name String