001    /*
002     *  Licensed to the Apache Software Foundation (ASF) under one
003     *  or more contributor license agreements.  See the NOTICE file
004     *  distributed with this work for additional information
005     *  regarding copyright ownership.  The ASF licenses this file
006     *  to you under the Apache License, Version 2.0 (the
007     *  "License"); you may not use this file except in compliance
008     *  with the License.  You may obtain a copy of the License at
009     *  
010     *    http://www.apache.org/licenses/LICENSE-2.0
011     *  
012     *  Unless required by applicable law or agreed to in writing,
013     *  software distributed under the License is distributed on an
014     *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015     *  KIND, either express or implied.  See the License for the
016     *  specific language governing permissions and limitations
017     *  under the License. 
018     *  
019     */
020    package org.apache.directory.server.schema.bootstrap;
021    
022    
023    import javax.naming.NamingException;
024    
025    import org.apache.directory.server.schema.bootstrap.ProducerTypeEnum;
026    import org.apache.directory.server.schema.registries.Registries;
027    import org.apache.directory.server.schema.registries.SyntaxCheckerRegistry;
028    import org.apache.directory.shared.ldap.constants.SchemaConstants;
029    
030    
031    /**
032     * A simple Syntax factory for the core LDAP schema in Section 4.3.2 of
033     * <a href="http://www.faqs.org/rfcs/rfc2252.html">RFC2252</a>.
034     * The following table reproduced from RFC2252 shows the syntaxes included
035     * within this SyntaxFactory:
036     * <pre>
037     * Index   Value being represented   H-R     OBJECT IDENTIFIER
038     * =====================================================================
039     * 0 ACI Item                         N  1.3.6.1.4.1.1466.115.121.1.1
040     * 1 Access Point                     Y  1.3.6.1.4.1.1466.115.121.1.2
041     * 2 Attribute Type Description       Y  1.3.6.1.4.1.1466.115.121.1.3
042     * 3 Audio                            N  1.3.6.1.4.1.1466.115.121.1.4
043     * 4 Binary                           N  1.3.6.1.4.1.1466.115.121.1.5
044     * 5 Bit String                       Y  1.3.6.1.4.1.1466.115.121.1.6
045     * 6 Boolean                          Y  1.3.6.1.4.1.1466.115.121.1.7
046     * 7 Certificate                      N  1.3.6.1.4.1.1466.115.121.1.8
047     * 8 Certificate List                 N  1.3.6.1.4.1.1466.115.121.1.9
048     * 9 Certificate Pair                 N  1.3.6.1.4.1.1466.115.121.1.10
049     * 10 Country String                  Y  1.3.6.1.4.1.1466.115.121.1.11
050     * 11 DN                              Y  1.3.6.1.4.1.1466.115.121.1.12
051     * 12 Data Quality Syntax             Y  1.3.6.1.4.1.1466.115.121.1.13
052     * 13 Delivery Method                 Y  1.3.6.1.4.1.1466.115.121.1.14
053     * 14 Directory String                Y  1.3.6.1.4.1.1466.115.121.1.15
054     * 15 DIT Content Rule Description    Y  1.3.6.1.4.1.1466.115.121.1.16
055     * 16 DIT Structure Rule Description  Y  1.3.6.1.4.1.1466.115.121.1.17
056     * 17 DL Submit Permission            Y  1.3.6.1.4.1.1466.115.121.1.18
057     * 18 DSA Quality Syntax              Y  1.3.6.1.4.1.1466.115.121.1.19
058     * 19 DSE Type                        Y  1.3.6.1.4.1.1466.115.121.1.20
059     * 20 Enhanced Guide                  Y  1.3.6.1.4.1.1466.115.121.1.21
060     * 21 Facsimile Telephone Number      Y  1.3.6.1.4.1.1466.115.121.1.22
061     * 22 Fax                             N  1.3.6.1.4.1.1466.115.121.1.23
062     * 23 Generalized Time                Y  1.3.6.1.4.1.1466.115.121.1.24
063     * 24 Guide                           Y  1.3.6.1.4.1.1466.115.121.1.25
064     * 25 IA5 String                      Y  1.3.6.1.4.1.1466.115.121.1.26
065     * 26 INTEGER                         Y  1.3.6.1.4.1.1466.115.121.1.27
066     * 27 JPEG                            N  1.3.6.1.4.1.1466.115.121.1.28
067     * 28 Master And Shadow Access Points Y  1.3.6.1.4.1.1466.115.121.1.29
068     * 29 Matching Rule Description       Y  1.3.6.1.4.1.1466.115.121.1.30
069     * 30 Matching Rule Use Description   Y  1.3.6.1.4.1.1466.115.121.1.31
070     * 31 Mail Preference                 Y  1.3.6.1.4.1.1466.115.121.1.32
071     * 32 MHS OR Address                  Y  1.3.6.1.4.1.1466.115.121.1.33
072     * 33 Name And Optional UID           Y  1.3.6.1.4.1.1466.115.121.1.34
073     * 34 Name Form Description           Y  1.3.6.1.4.1.1466.115.121.1.35
074     * 35 Numeric String                  Y  1.3.6.1.4.1.1466.115.121.1.36
075     * 36 Object Class Description        Y  1.3.6.1.4.1.1466.115.121.1.37
076     * 37 OID                             Y  1.3.6.1.4.1.1466.115.121.1.38
077     * 38 Other Mailbox                   Y  1.3.6.1.4.1.1466.115.121.1.39
078     *
079     * 39 Octet String                    Y  1.3.6.1.4.1.1466.115.121.1.40
080     *
081     * This is not going to be followed for OctetString which needs to be treated
082     * as binary data.
083     *
084     * 40 Postal Address                  Y  1.3.6.1.4.1.1466.115.121.1.41
085     * 41 Protocol Information            Y  1.3.6.1.4.1.1466.115.121.1.42
086     * 42 Presentation Address            Y  1.3.6.1.4.1.1466.115.121.1.43
087     * 43 Printable String                Y  1.3.6.1.4.1.1466.115.121.1.44
088     * 44 Subtree Specification           Y  1.3.6.1.4.1.1466.115.121.1.45
089     * 45 Supplier Information            Y  1.3.6.1.4.1.1466.115.121.1.46
090     * 46 Supplier Or Consumer            Y  1.3.6.1.4.1.1466.115.121.1.47
091     * 47 Supplier And Consumer           Y  1.3.6.1.4.1.1466.115.121.1.48
092     * 48 Supported Algorithm             N  1.3.6.1.4.1.1466.115.121.1.49
093     * 49 Telephone Number                Y  1.3.6.1.4.1.1466.115.121.1.50
094     * 50 Teletex Terminal Identifier     Y  1.3.6.1.4.1.1466.115.121.1.51
095     * 51 Telex Number                    Y  1.3.6.1.4.1.1466.115.121.1.52
096     * 52 UTC Time                        Y  1.3.6.1.4.1.1466.115.121.1.53
097     * 53 LDAP Syntax Description         Y  1.3.6.1.4.1.1466.115.121.1.54
098     * 54 Modify Rights                   Y  1.3.6.1.4.1.1466.115.121.1.55
099     * 55 LDAP Schema Definition          Y  1.3.6.1.4.1.1466.115.121.1.56
100     * 56 LDAP Schema Description         Y  1.3.6.1.4.1.1466.115.121.1.57
101     * 57 Substring Assertion             Y  1.3.6.1.4.1.1466.115.121.1.58
102     * 58 Attribute Certificate Assertion N  1.3.6.1.4.1.1466.115.121.1.59
103     * </pre>
104     *
105     *
106     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
107     * @version $Rev: 781976 $
108     */
109    public class SystemSyntaxProducer extends AbstractBootstrapProducer
110    {
111        public SystemSyntaxProducer()
112        {
113            super( ProducerTypeEnum.SYNTAX_PRODUCER );
114        }
115    
116    
117        // ------------------------------------------------------------------------
118        // BootstrapProducer Methods
119        // ------------------------------------------------------------------------
120        public void produce( Registries registries, ProducerCallback cb ) throws NamingException
121        {
122            BootstrapSyntax syntax;
123            SyntaxCheckerRegistry syntaxCheckerRegistry = registries.getSyntaxCheckerRegistry();
124    
125            /*
126             * From RFC 2252 Section 4.3.2. on Syntax Object Identifiers
127             */
128    
129            /*
130             * Value being represented        H-R OBJECT IDENTIFIER
131             * ==================================================================
132             * 0 ACI Item                        N  1.3.6.1.4.1.1466.115.121.1.1
133             * 1 Access Point                    Y  1.3.6.1.4.1.1466.115.121.1.2
134             * 2 Attribute Type Description      Y  1.3.6.1.4.1.1466.115.121.1.3
135             * 3 Audio                           N  1.3.6.1.4.1.1466.115.121.1.4
136             * 4 Binary                          N  1.3.6.1.4.1.1466.115.121.1.5
137             * 5 Bit String                      Y  1.3.6.1.4.1.1466.115.121.1.6
138             * 6 Boolean                         Y  1.3.6.1.4.1.1466.115.121.1.7
139             * 7 Certificate                     N  1.3.6.1.4.1.1466.115.121.1.8
140             * 8 Certificate List                N  1.3.6.1.4.1.1466.115.121.1.9
141             * 9 Certificate Pair                N  1.3.6.1.4.1.1466.115.121.1.10
142             */
143            syntax = new BootstrapSyntax( SchemaConstants.ACI_ITEM_SYNTAX, syntaxCheckerRegistry );
144            syntax.setNames( new String[]
145                { "ACI Item" } );
146            // This is in direct conflict with RFC 2252 but for us ACI Item is human readable
147            syntax.setHumanReadable( true );
148            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
149    
150            syntax = new BootstrapSyntax( SchemaConstants.ACCESS_POINT_SYNTAX, syntaxCheckerRegistry );
151            syntax.setNames( new String[]
152                { "Access Point" } );
153            syntax.setHumanReadable( true );
154            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
155    
156            syntax = new BootstrapSyntax( SchemaConstants.ATTRIBUT_TYPE_DESCRIPTION_SYNTAX, syntaxCheckerRegistry );
157            syntax.setNames( new String[]
158                { "Attribute Type Description" } );
159            syntax.setHumanReadable( true );
160            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
161    
162            syntax = new BootstrapSyntax( SchemaConstants.AUDIO_SYNTAX, syntaxCheckerRegistry );
163            syntax.setNames( new String[]
164                { "Audio" } );
165            syntax.setHumanReadable( false );
166            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
167    
168            syntax = new BootstrapSyntax( SchemaConstants.BINARY_SYNTAX, syntaxCheckerRegistry );
169            syntax.setNames( new String[]
170                { "Binary" } );
171            syntax.setHumanReadable( false );
172            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
173    
174            syntax = new BootstrapSyntax( SchemaConstants.BIT_STRING_SYNTAX, syntaxCheckerRegistry );
175            syntax.setNames( new String[]
176                { "Bit String" } );
177            syntax.setHumanReadable( true );
178            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
179    
180            syntax = new BootstrapSyntax( SchemaConstants.BOOLEAN_SYNTAX, syntaxCheckerRegistry );
181            syntax.setNames( new String[]
182                { "Boolean" } );
183            syntax.setHumanReadable( true );
184            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
185    
186            syntax = new BootstrapSyntax( SchemaConstants.CERTIFICATE_SYNTAX, syntaxCheckerRegistry );
187            syntax.setNames( new String[]
188                { "Certificate" } );
189            syntax.setHumanReadable( false );
190            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
191    
192            syntax = new BootstrapSyntax( SchemaConstants.CERTIFICATE_LIST_SYNTAX, syntaxCheckerRegistry );
193            syntax.setNames( new String[]
194                { "Certificate List" } );
195            syntax.setHumanReadable( false );
196            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
197    
198            syntax = new BootstrapSyntax( SchemaConstants.CERTIFICATE_PAIR_SYNTAX, syntaxCheckerRegistry );
199            syntax.setNames( new String[]
200                { "Certificate Pair" } );
201            syntax.setHumanReadable( false );
202            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
203    
204            /*
205             * Value being represented        H-R OBJECT IDENTIFIER
206             * ===================================================================
207             * 10 Country String                  Y  1.3.6.1.4.1.1466.115.121.1.11
208             * 11 DN                              Y  1.3.6.1.4.1.1466.115.121.1.12
209             * 12 Data Quality Syntax             Y  1.3.6.1.4.1.1466.115.121.1.13
210             * 13 Delivery Method                 Y  1.3.6.1.4.1.1466.115.121.1.14
211             * 14 Directory String                Y  1.3.6.1.4.1.1466.115.121.1.15
212             * 15 DIT Content Rule Description    Y  1.3.6.1.4.1.1466.115.121.1.16
213             * 16 DIT Structure Rule Description  Y  1.3.6.1.4.1.1466.115.121.1.17
214             * 17 DL Submit Permission            Y  1.3.6.1.4.1.1466.115.121.1.18
215             * 18 DSA Quality Syntax              Y  1.3.6.1.4.1.1466.115.121.1.19
216             * 19 DSE Type                        Y  1.3.6.1.4.1.1466.115.121.1.20
217             */
218            syntax = new BootstrapSyntax( SchemaConstants.COUNTRY_STRING_SYNTAX, syntaxCheckerRegistry );
219            syntax.setNames( new String[]
220                { "Country String" } );
221            syntax.setHumanReadable( true );
222            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
223    
224            syntax = new BootstrapSyntax( SchemaConstants.DN_SYNTAX, syntaxCheckerRegistry );
225            syntax.setNames( new String[]
226                { "DN" } );
227            syntax.setHumanReadable( true );
228            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
229    
230            syntax = new BootstrapSyntax( SchemaConstants.DATA_QUALITY_SYNTAX, syntaxCheckerRegistry );
231            syntax.setNames( new String[]
232                { "Data Quality Syntax" } );
233            syntax.setHumanReadable( true );
234            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
235    
236            syntax = new BootstrapSyntax( SchemaConstants.DELIVERY_METHOD_SYNTAX, syntaxCheckerRegistry );
237            syntax.setNames( new String[]
238                { "Delivery Method" } );
239            syntax.setHumanReadable( true );
240            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
241    
242            syntax = new BootstrapSyntax( SchemaConstants.DIRECTORY_STRING_SYNTAX, syntaxCheckerRegistry );
243            syntax.setNames( new String[]
244                { "Directory String" } );
245            syntax.setHumanReadable( true );
246            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
247    
248            syntax = new BootstrapSyntax( SchemaConstants.DIT_CONTENT_RULE_SYNTAX, syntaxCheckerRegistry );
249            syntax.setNames( new String[]
250                { "DIT Content Rule Description" } );
251            syntax.setHumanReadable( true );
252            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
253    
254            syntax = new BootstrapSyntax( SchemaConstants.DIT_STRUCTURE_RULE_SYNTAX, syntaxCheckerRegistry );
255            syntax.setNames( new String[]
256                { "DIT Structure Rule Description" } );
257            syntax.setHumanReadable( true );
258            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
259    
260            syntax = new BootstrapSyntax( SchemaConstants.DL_SUBMIT_PERMISSION_SYNTAX, syntaxCheckerRegistry );
261            syntax.setNames( new String[]
262                { "DL Submit Permission" } );
263            syntax.setHumanReadable( true );
264            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
265    
266            syntax = new BootstrapSyntax( SchemaConstants.DSA_QUALITY_SYNTAX, syntaxCheckerRegistry );
267            syntax.setNames( new String[]
268                { "DSA Quality Syntax" } );
269            syntax.setHumanReadable( true );
270            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
271    
272            syntax = new BootstrapSyntax( SchemaConstants.DSE_TYPE_SYNTAX, syntaxCheckerRegistry );
273            syntax.setNames( new String[]
274                { "DSE Type" } );
275            syntax.setHumanReadable( true );
276            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
277    
278            /*
279             * Value being represented        H-R OBJECT IDENTIFIER
280             * ===================================================================
281             * 20 Enhanced Guide                  Y  1.3.6.1.4.1.1466.115.121.1.21
282             * 21 Facsimile Telephone Number      Y  1.3.6.1.4.1.1466.115.121.1.22
283             * 22 Fax                             N  1.3.6.1.4.1.1466.115.121.1.23
284             * 23 Generalized Time                Y  1.3.6.1.4.1.1466.115.121.1.24
285             * 24 Guide                           Y  1.3.6.1.4.1.1466.115.121.1.25
286             * 25 IA5 String                      Y  1.3.6.1.4.1.1466.115.121.1.26
287             * 26 INTEGER                         Y  1.3.6.1.4.1.1466.115.121.1.27
288             * 27 JPEG                            N  1.3.6.1.4.1.1466.115.121.1.28
289             * 28 Master And Shadow Access Points Y  1.3.6.1.4.1.1466.115.121.1.29
290             * 29 Matching Rule Description       Y  1.3.6.1.4.1.1466.115.121.1.30
291             */
292            syntax = new BootstrapSyntax( SchemaConstants.ENHANCED_GUIDE_SYNTAX, syntaxCheckerRegistry );
293            syntax.setNames( new String[]
294                { "Enhanced Guide" } );
295            syntax.setHumanReadable( true );
296            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
297    
298            syntax = new BootstrapSyntax( SchemaConstants.FACSIMILE_TELEPHONE_NUMBER_SYNTAX, syntaxCheckerRegistry );
299            syntax.setNames( new String[]
300                { "Facsimile Telephone Number" } );
301            syntax.setHumanReadable( true );
302            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
303    
304            syntax = new BootstrapSyntax( SchemaConstants.FAX_SYNTAX, syntaxCheckerRegistry );
305            syntax.setNames( new String[]
306                { "Fax" } );
307            syntax.setHumanReadable( false );
308            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
309    
310            syntax = new BootstrapSyntax( SchemaConstants.GENERALIZED_TIME_SYNTAX, syntaxCheckerRegistry );
311            syntax.setNames( new String[]
312                { "Generalized Time" } );
313            syntax.setHumanReadable( true );
314            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
315    
316            syntax = new BootstrapSyntax( SchemaConstants.GUIDE_SYNTAX, syntaxCheckerRegistry );
317            syntax.setNames( new String[]
318                { "Guide" } );
319            syntax.setHumanReadable( true );
320            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
321    
322            syntax = new BootstrapSyntax( SchemaConstants.IA5_STRING_SYNTAX, syntaxCheckerRegistry );
323            syntax.setNames( new String[]
324                { "IA5 String" } );
325            syntax.setHumanReadable( true );
326            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
327    
328            syntax = new BootstrapSyntax( SchemaConstants.INTEGER_SYNTAX, syntaxCheckerRegistry );
329            syntax.setNames( new String[]
330                { "INTEGER" } );
331            syntax.setHumanReadable( true );
332            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
333    
334            syntax = new BootstrapSyntax( SchemaConstants.JPEG_SYNTAX, syntaxCheckerRegistry );
335            syntax.setNames( new String[]
336                { "JPEG" } );
337            syntax.setHumanReadable( false );
338            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
339    
340            syntax = new BootstrapSyntax( SchemaConstants.MASTER_AND_SHADOW_ACCESS_POINTS_SYNTAX, syntaxCheckerRegistry );
341            syntax.setNames( new String[]
342                { "Master And Shadow Access Points" } );
343            syntax.setHumanReadable( true );
344            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
345    
346            syntax = new BootstrapSyntax( SchemaConstants.MATCHING_RULE_DESCRIPTION_SYNTAX, syntaxCheckerRegistry );
347            syntax.setNames( new String[]
348                { "Matching Rule Description" } );
349            syntax.setHumanReadable( true );
350            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
351    
352            /*
353             * Value being represented        H-R OBJECT IDENTIFIER
354             * ==================================================================
355             * 30 Matching Rule Use Description   Y  1.3.6.1.4.1.1466.115.121.1.31
356             * 31 Mail Preference                 Y  1.3.6.1.4.1.1466.115.121.1.32
357             * 32 MHS OR Address                  Y  1.3.6.1.4.1.1466.115.121.1.33
358             * 33 Name And Optional UID           Y  1.3.6.1.4.1.1466.115.121.1.34
359             * 34 Name Form Description           Y  1.3.6.1.4.1.1466.115.121.1.35
360             * 35 Numeric String                  Y  1.3.6.1.4.1.1466.115.121.1.36
361             * 36 Object Class Description        Y  1.3.6.1.4.1.1466.115.121.1.37
362             * 37 OID                             Y  1.3.6.1.4.1.1466.115.121.1.38
363             * 38 Other Mailbox                   Y  1.3.6.1.4.1.1466.115.121.1.39
364             * 39 Octet String                    Y  1.3.6.1.4.1.1466.115.121.1.40
365             */
366            syntax = new BootstrapSyntax( SchemaConstants.MATCHING_RULE_USE_DESCRIPTION_SYNTAX, syntaxCheckerRegistry );
367            syntax.setNames( new String[]
368                { "Matching Rule Use Description" } );
369            syntax.setHumanReadable( true );
370            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
371    
372            syntax = new BootstrapSyntax( SchemaConstants.MAIL_PREFERENCE_SYNTAX, syntaxCheckerRegistry );
373            syntax.setNames( new String[]
374                { "Mail Preference" } );
375            syntax.setHumanReadable( true );
376            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
377    
378            syntax = new BootstrapSyntax( SchemaConstants.MHS_OR_ADDRESS_SYNTAX, syntaxCheckerRegistry );
379            syntax.setNames( new String[]
380                { "MHS OR Address" } );
381            syntax.setHumanReadable( true );
382            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
383    
384            syntax = new BootstrapSyntax( SchemaConstants.NAME_AND_OPTIONAL_UID_SYNTAX, syntaxCheckerRegistry );
385            syntax.setNames( new String[]
386                { "Name And Optional UID" } );
387            syntax.setHumanReadable( true );
388            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
389    
390            syntax = new BootstrapSyntax( SchemaConstants.NAME_FORM_DESCRIPTION_SYNTAX, syntaxCheckerRegistry );
391            syntax.setNames( new String[]
392                { "Name Form Description" } );
393            syntax.setHumanReadable( true );
394            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
395    
396            syntax = new BootstrapSyntax( SchemaConstants.NUMERIC_STRING_SYNTAX, syntaxCheckerRegistry );
397            syntax.setNames( new String[]
398                { "Numeric String" } );
399            syntax.setHumanReadable( true );
400            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
401    
402            syntax = new BootstrapSyntax( SchemaConstants.OBJECT_CLASS_DESCRIPTION_SYNTAX, syntaxCheckerRegistry );
403            syntax.setNames( new String[]
404                { "Object Class Description" } );
405            syntax.setHumanReadable( true );
406            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
407    
408            syntax = new BootstrapSyntax( SchemaConstants.OID_SYNTAX, syntaxCheckerRegistry );
409            syntax.setNames( new String[]
410                { "OID" } );
411            syntax.setHumanReadable( true );
412            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
413    
414            syntax = new BootstrapSyntax( SchemaConstants.OTHER_MAILBOX_SYNTAX, syntaxCheckerRegistry );
415            syntax.setNames( new String[]
416                { "Other Mailbox" } );
417            syntax.setHumanReadable( true );
418            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
419    
420            /*
421             * This is where we deviate.  An octet string may or may not be human readable.  Essentially
422             * we are using this property of a syntax to determine if a value should be treated as binary
423             * data or not.  It must be human readable always in order to get this property set to true.
424             *
425             * If we set this to true then userPasswords which implement this syntax are not treated as
426             * binary attributes.  If that happens we can have data corruption due to UTF-8 handling.
427             */
428            syntax = new BootstrapSyntax( SchemaConstants.OCTET_STRING_SYNTAX, syntaxCheckerRegistry );
429            syntax.setNames( new String[]
430                { "Octet String" } );
431            syntax.setHumanReadable( false );
432            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
433    
434            /*
435             * Value being represented        H-R OBJECT IDENTIFIER
436             * ===================================================================
437             * 40 Postal Address                  Y  1.3.6.1.4.1.1466.115.121.1.41
438             * 41 Protocol Information            Y  1.3.6.1.4.1.1466.115.121.1.42
439             * 42 Presentation Address            Y  1.3.6.1.4.1.1466.115.121.1.43
440             * 43 Printable String                Y  1.3.6.1.4.1.1466.115.121.1.44
441             * 44 Subtree Specification           Y  1.3.6.1.4.1.1466.115.121.1.45
442             * 45 Supplier Information            Y  1.3.6.1.4.1.1466.115.121.1.46
443             * 46 Supplier Or Consumer            Y  1.3.6.1.4.1.1466.115.121.1.47
444             * 47 Supplier And Consumer           Y  1.3.6.1.4.1.1466.115.121.1.48
445             * 48 Supported Algorithm             N  1.3.6.1.4.1.1466.115.121.1.49
446             * 49 Telephone Number                Y  1.3.6.1.4.1.1466.115.121.1.50
447             */
448            syntax = new BootstrapSyntax( SchemaConstants.POSTAL_ADDRESS_SYNTAX, syntaxCheckerRegistry );
449            syntax.setNames( new String[]
450                { "Postal Address" } );
451            syntax.setHumanReadable( true );
452            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
453    
454            syntax = new BootstrapSyntax( SchemaConstants.PROTOCOL_INFORMATION_SYNTAX, syntaxCheckerRegistry );
455            syntax.setNames( new String[]
456                { "Protocol Information" } );
457            syntax.setHumanReadable( true );
458            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
459    
460            syntax = new BootstrapSyntax( SchemaConstants.PRESENTATION_ADDRESS_SYNTAX, syntaxCheckerRegistry );
461            syntax.setNames( new String[]
462                { "Presentation Address" } );
463            syntax.setHumanReadable( true );
464            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
465    
466            syntax = new BootstrapSyntax( SchemaConstants.PRINTABLE_STRING_SYNTAX, syntaxCheckerRegistry );
467            syntax.setNames( new String[]
468                { "Printable String" } );
469            syntax.setHumanReadable( true );
470            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
471    
472            syntax = new BootstrapSyntax( SchemaConstants.SUBTREE_SPECIFICATION_SYNTAX, syntaxCheckerRegistry );
473            syntax.setNames( new String[]
474                { "Subtree Specification" } );
475            syntax.setHumanReadable( true );
476            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
477    
478            syntax = new BootstrapSyntax( SchemaConstants.SUPPLIER_INFORMATION_SYNTAX, syntaxCheckerRegistry );
479            syntax.setNames( new String[]
480                { "Supplier Information" } );
481            syntax.setHumanReadable( true );
482            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
483    
484            syntax = new BootstrapSyntax( SchemaConstants.SUPPLIER_OR_CONSUMER_SYNTAX, syntaxCheckerRegistry );
485            syntax.setNames( new String[]
486                { "Supplier Or Consumer" } );
487            syntax.setHumanReadable( true );
488            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
489    
490            syntax = new BootstrapSyntax( SchemaConstants.SUPPLIER_AND_CONSUMER_SYNTAX, syntaxCheckerRegistry );
491            syntax.setNames( new String[]
492                { "Supplier And Consumer" } );
493            syntax.setHumanReadable( true );
494            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
495    
496            syntax = new BootstrapSyntax( SchemaConstants.SUPPORTED_ALGORITHM_SYNTAX, syntaxCheckerRegistry );
497            syntax.setNames( new String[]
498                { "Supported Algorithm" } );
499            syntax.setHumanReadable( false );
500            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
501    
502            syntax = new BootstrapSyntax( SchemaConstants.TELEPHONE_NUMBER_SYNTAX, syntaxCheckerRegistry );
503            syntax.setNames( new String[]
504                { "Telephone Number" } );
505            syntax.setHumanReadable( true );
506            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
507    
508            /*
509             * Value being represented        H-R OBJECT IDENTIFIER
510             * ==================================================================
511             * 50 Teletex Terminal Identifier     Y  1.3.6.1.4.1.1466.115.121.1.51
512             * 51 Telex Number                    Y  1.3.6.1.4.1.1466.115.121.1.52
513             * 52 UTC Time                        Y  1.3.6.1.4.1.1466.115.121.1.53
514             * 53 LDAP Syntax Description         Y  1.3.6.1.4.1.1466.115.121.1.54
515             * 54 Modify Rights                   Y  1.3.6.1.4.1.1466.115.121.1.55
516             * 55 LDAP BootstrapSchema Definition          Y  1.3.6.1.4.1.1466.115.121.1.56
517             * 56 LDAP BootstrapSchema Description         Y  1.3.6.1.4.1.1466.115.121.1.57
518             * 57 Substring Assertion             Y  1.3.6.1.4.1.1466.115.121.1.58
519             */
520            syntax = new BootstrapSyntax( SchemaConstants.TELETEX_TERMINAL_IDENTIFIER_SYNTAX, syntaxCheckerRegistry );
521            syntax.setNames( new String[]
522                { "Teletex Terminal Identifier" } );
523            syntax.setHumanReadable( true );
524            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
525    
526            syntax = new BootstrapSyntax( SchemaConstants.TELEX_NUMBER_SYNTAX, syntaxCheckerRegistry );
527            syntax.setNames( new String[]
528                { "Telex Number" } );
529            syntax.setHumanReadable( true );
530            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
531    
532            syntax = new BootstrapSyntax( SchemaConstants.UTC_TIME_SYNTAX, syntaxCheckerRegistry );
533            syntax.setNames( new String[]
534                { "UTC Time" } );
535            syntax.setHumanReadable( true );
536            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
537    
538            syntax = new BootstrapSyntax( SchemaConstants.LDAP_SYNTAX_DESCRIPTION_SYNTAX, syntaxCheckerRegistry );
539            syntax.setNames( new String[]
540                { "LDAP Syntax Description" } );
541            syntax.setHumanReadable( true );
542            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
543    
544            syntax = new BootstrapSyntax( SchemaConstants.MODIFY_RIGHTS_SYNTAX, syntaxCheckerRegistry );
545            syntax.setNames( new String[]
546                { "Modify Rights" } );
547            syntax.setHumanReadable( true );
548            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
549    
550            syntax = new BootstrapSyntax( SchemaConstants.LDAP_SCHEMA_DEFINITION_SYNTAX, syntaxCheckerRegistry );
551            syntax.setNames( new String[]
552                { "LDAP BootstrapSchema Definition" } );
553            syntax.setHumanReadable( true );
554            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
555    
556            syntax = new BootstrapSyntax( SchemaConstants.LDAP_SCHEMA_DESCRIPTION_SYNTAX, syntaxCheckerRegistry );
557            syntax.setNames( new String[]
558                { "LDAP BootstrapSchema Description" } );
559            syntax.setHumanReadable( true );
560            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
561    
562            syntax = new BootstrapSyntax( SchemaConstants.SUBSTRING_ASSERTION_SYNTAX, syntaxCheckerRegistry );
563            syntax.setNames( new String[]
564                { "Substring Assertion" } );
565            syntax.setHumanReadable( true );
566            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
567            
568            syntax = new BootstrapSyntax( SchemaConstants.ATTRIBUTE_CERTIFICATE_ASSERTION_SYNTAX, syntaxCheckerRegistry );
569            syntax.setNames( new String[]
570                { "Trigger Specification" } );
571            syntax.setHumanReadable( true );
572            cb.schemaObjectProduced( this, syntax.getOid(), syntax );
573        }
574    }