1TConstrChoice DEFINITIONS ::=
2BEGIN
3
4
5FilterItem ::= CHOICE {
6    equality [0] AttributeValueAssertion,
7    substrings [1] SEQUENCE {
8	type ATTRIBUTE.&id({SupportedAttributes}),
9	strings SEQUENCE OF CHOICE {
10	    initial [0] ATTRIBUTE.&Type
11	    ({SupportedAttributes}{@substrings.type}),
12	    any [1] ATTRIBUTE.&Type
13	    ({SupportedAttributes}{@substrings.type}),
14	    final [2] ATTRIBUTE.&Type
15	    ({SupportedAttributes}{@substrings.type}) }},
16    greaterOrEqual [2] AttributeValueAssertion,
17    lessOrEqual [3] AttributeValueAssertion,
18    present [4] AttributeType,
19    approximateMatch [5] AttributeValueAssertion,
20    extensibleMatch [6] MatchingRuleAssertion }
21
22AttributeValueAssertion ::= SEQUENCE {
23    type ATTRIBUTE.&id({SupportedAttributes}),
24    assertion ATTRIBUTE.&equality-match.&AssertionType
25    ({SupportedAttributes}{@type}) }
26
27MatchingRuleAssertion ::= SEQUENCE {
28    type MATCHING-RULE.&id({MatchingRules}),
29    assertion MATCHING-RULE.&AssertionType ({MatchingRules}{@type})
30    }
31
32AttributeType ::= INTEGER(0..127)
33
34ATTRIBUTE ::= CLASS {
35    &derivation ATTRIBUTE OPTIONAL,
36    &Type OPTIONAL,
37    &equality-match MATCHING-RULE OPTIONAL,
38    &ordering-match MATCHING-RULE OPTIONAL,
39    &substrings-match MATCHING-RULE OPTIONAL,
40    &single-valued BOOLEAN DEFAULT FALSE,
41    &collective BOOLEAN DEFAULT FALSE,
42    &no-user-modification BOOLEAN DEFAULT FALSE,
43    &usage Attribute-Usage DEFAULT userApplications,
44    &id OBJECT IDENTIFIER UNIQUE }
45WITH SYNTAX {
46    [SUBTYPE OF &derivation]
47    [WITH SYNTAX &Type]
48    [EQUALITY MATCHING RULE &equality-match]
49    [ORDERING MATCHING RULE &ordering-match]
50    [SUBSTRINGS MATCHING RULE &substrings-match]
51    [SINGLE VALUE &single-valued]
52    [COLLECTIVE &collective]
53    [NO USER MODIFICATION &no-user-modification]
54    [USAGE &usage]
55    ID &id }
56
57Attribute-Usage ::= ENUMERATED { userApplications(0),
58    directoryOperation(1), distributedOperation(2),
59    dSAOperation(3) }
60
61
62surname ATTRIBUTE ::= { -- family name
63    SUBTYPE OF name
64    WITH SYNTAX DirectoryString
65    ID id-at-surname }
66
67givenName ATTRIBUTE ::= { -- first name
68    SUBTYPE OF name
69    WITH SYNTAX DirectoryString
70    ID id-at-givenName }
71
72countryName ATTRIBUTE ::= { -- country
73    SUBTYPE OF name
74    WITH SYNTAX PrintableString (SIZE (2)) -- [ISO3166] codes
75    SINGLE VALUE TRUE
76    ID id-at-countryName}
77
78SupportedAttributes ATTRIBUTE ::=
79{surname | givenName | countryName}
80
81-- id-at-surname DirectoryString ::= universalString:"SureName"
82
83id-at-surname OBJECT IDENTIFIER ::= {2 4}
84
85-- id-at-givenName DirectoryString ::= printableString:"GivenName"
86
87id-at-givenName OBJECT IDENTIFIER ::= {2 5}
88
89-- id-at-countryName  PrintableString (SIZE (2)) ::= "CN"
90
91id-at-countryName OBJECT IDENTIFIER ::= {2 6}
92
93MATCHING-RULE ::= CLASS {
94    &AssertionType OPTIONAL,
95    &id OBJECT IDENTIFIER UNIQUE }
96WITH SYNTAX {
97    [SYNTAX &AssertionType]
98    ID &id }
99
100MatchingRules MATCHING-RULE ::= {
101    caseIgnoreMatch | booleanMatch | integerMatch }
102
103LessMatchingRules MATCHING-RULE ::= {
104    MatchingRules EXCEPT caseIgnoreMatch }
105
106ExtensibleMatchingRules MATCHING-RULE ::= {
107    caseIgnoreMatch | booleanMatch | integerMatch, ... }
108
109name ATTRIBUTE ::= {
110    WITH SYNTAX DirectoryString
111    EQUALITY MATCHING RULE caseIgnoreMatch
112    ID id-name }
113
114
115DirectoryString ::= CHOICE {
116    teletexString TeletexString (SIZE (1..maxSize)),
117    printableString PrintableString (SIZE (1..maxSize)),
118    universalString UniversalString (SIZE (1..maxSize)),
119    bmpString BMPString (SIZE (1..maxSize))
120--    utf8String UTF8String (SIZE (1..maxSize))
121    }
122
123maxSize INTEGER ::= 25
124
125caseIgnoreMatch MATCHING-RULE ::= {
126    SYNTAX DirectoryString
127    ID id-caseIgnoreMatch
128    }
129
130booleanMatch MATCHING-RULE ::= {
131    SYNTAX  BOOLEAN
132    ID id-booleanMatch
133    }
134
135integerMatch MATCHING-RULE ::= {
136    SYNTAX INTEGER
137    ID  id-integerMatch
138    }
139
140id-mr OBJECT IDENTIFIER ::=
141{2 5 11}
142
143id-name OBJECT IDENTIFIER ::= {2 5 11 5}
144
145id-caseIgnoreMatch OBJECT IDENTIFIER ::= {2 5 11 2}
146
147id-booleanMatch OBJECT IDENTIFIER ::= {2 5 11 13}
148
149id-integerMatch OBJECT IDENTIFIER ::= {2 5 11 14}
150
151--{joint-iso-itu-t ds(5) matchingRule(13)}
152
153-- test code for OTP-4248
154
155NOTUNIQUE ::= CLASS {
156  &value  INTEGER,
157  &Type
158}
159WITH SYNTAX {
160  VALUE &value
161  TYPE &Type
162}
163
164
165nuObject NOTUNIQUE ::= {VALUE 3 TYPE FilterItem}
166
167NuObjectSet NOTUNIQUE ::= {nuObject}
168
169Seq ::= SEQUENCE {
170  a  NOTUNIQUE.&value ({NuObjectSet}),
171  b  NOTUNIQUE.&Type ({NuObjectSet}{@a})
172}
173
174
175END
176