mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

matthew_swift
28.47.2010 f2160f4bd1c8ac67e5a86a6710d431e8932877f9
sdk/src/org/opends/sdk/schema/CoreSchemaImpl.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 *      Copyright 2009-2010 Sun Microsystems, Inc.
 */
package org.opends.sdk.schema;
@@ -37,8 +37,7 @@
final class CoreSchemaImpl
{
  private static final Map<String, List<String>> X500_ORIGIN = Collections
      .singletonMap(SCHEMA_PROPERTY_ORIGIN, Collections
          .singletonList("X.500"));
      .singletonMap(SCHEMA_PROPERTY_ORIGIN, Collections.singletonList("X.500"));
  private static final Map<String, List<String>> RFC2252_ORIGIN = Collections
      .singletonMap(SCHEMA_PROPERTY_ORIGIN, Collections
@@ -74,8 +73,7 @@
  private static final String EMPTY_STRING = "".intern();
  private static final Set<String> EMPTY_STRING_SET = Collections
      .emptySet();
  private static final Set<String> EMPTY_STRING_SET = Collections.emptySet();
  private static final Schema SINGLETON;
@@ -105,56 +103,50 @@
  private static void addRFC3045(SchemaBuilder builder)
  private static void addRFC3045(final SchemaBuilder builder)
  {
    builder.addAttributeType("1.3.6.1.1.4", Collections
        .singletonList("vendorName"), EMPTY_STRING, false, null,
        EMR_CASE_EXACT_IA5_OID, null, null, null,
        SYNTAX_DIRECTORY_STRING_OID, true, false, true,
        AttributeUsage.DSA_OPERATION, RFC3045_ORIGIN, false);
        EMR_CASE_EXACT_IA5_OID, null, null, null, SYNTAX_DIRECTORY_STRING_OID,
        true, false, true, AttributeUsage.DSA_OPERATION, RFC3045_ORIGIN, false);
    builder.addAttributeType("1.3.6.1.1.5", Collections
        .singletonList("vendorVersion"), EMPTY_STRING, false, null,
        EMR_CASE_EXACT_IA5_OID, null, null, null,
        SYNTAX_DIRECTORY_STRING_OID, true, false, true,
        AttributeUsage.DSA_OPERATION, RFC3045_ORIGIN, false);
        EMR_CASE_EXACT_IA5_OID, null, null, null, SYNTAX_DIRECTORY_STRING_OID,
        true, false, true, AttributeUsage.DSA_OPERATION, RFC3045_ORIGIN, false);
  }
  private static void addRFC3112(SchemaBuilder builder)
  private static void addRFC3112(final SchemaBuilder builder)
  {
    builder.addSyntax(SYNTAX_AUTH_PASSWORD_OID,
        SYNTAX_AUTH_PASSWORD_DESCRIPTION, RFC3112_ORIGIN,
        new AuthPasswordSyntaxImpl(), false);
    builder.addMatchingRule(EMR_AUTH_PASSWORD_EXACT_OID, Collections
        .singletonList(EMR_AUTH_PASSWORD_EXACT_NAME),
        EMR_AUTH_PASSWORD_EXACT_DESCRIPTION, false,
        SYNTAX_AUTH_PASSWORD_OID, RFC3112_ORIGIN,
        new AuthPasswordExactEqualityMatchingRuleImpl(), false);
        EMR_AUTH_PASSWORD_EXACT_DESCRIPTION, false, SYNTAX_AUTH_PASSWORD_OID,
        RFC3112_ORIGIN, new AuthPasswordExactEqualityMatchingRuleImpl(), false);
    builder.addAttributeType("1.3.6.1.4.1.4203.1.3.3", Collections
        .singletonList("supportedAuthPasswordSchemes"),
        "supported password storage schemes", false, null,
        EMR_CASE_EXACT_IA5_OID, null, null, null,
        SYNTAX_IA5_STRING_OID, false, false, false,
        AttributeUsage.DSA_OPERATION, RFC3112_ORIGIN, false);
        EMR_CASE_EXACT_IA5_OID, null, null, null, SYNTAX_IA5_STRING_OID, false,
        false, false, AttributeUsage.DSA_OPERATION, RFC3112_ORIGIN, false);
    builder.addAttributeType("1.3.6.1.4.1.4203.1.3.4", Collections
        .singletonList("authPassword"),
        "password authentication information", false, null,
        EMR_AUTH_PASSWORD_EXACT_OID, null, null, null,
        .singletonList("authPassword"), "password authentication information",
        false, null, EMR_AUTH_PASSWORD_EXACT_OID, null, null, null,
        SYNTAX_AUTH_PASSWORD_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC3112_ORIGIN, false);
    builder.addObjectClass("1.3.6.1.4.1.4203.1.4.7", Collections
        .singletonList("authPasswordObject"),
        "authentication password mix in class", false,
        EMPTY_STRING_SET, EMPTY_STRING_SET, Collections
            .singleton("authPassword"), ObjectClassType.AUXILIARY,
        RFC3112_ORIGIN, false);
        "authentication password mix in class", false, EMPTY_STRING_SET,
        EMPTY_STRING_SET, Collections.singleton("authPassword"),
        ObjectClassType.AUXILIARY, RFC3112_ORIGIN, false);
  }
  private static void addRFC4519(SchemaBuilder builder)
  private static void addRFC4519(final SchemaBuilder builder)
  {
    builder.addAttributeType("2.5.4.15", Collections
        .singletonList("businessCategory"), EMPTY_STRING, false, null,
@@ -162,21 +154,24 @@
        SYNTAX_DIRECTORY_STRING_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.6", Arrays.asList("c",
        "countryName"), EMPTY_STRING, false, "name", null, null, null,
        null, SYNTAX_COUNTRY_STRING_OID, true, false, false,
    builder.addAttributeType("2.5.4.41", Collections.singletonList("name"),
        EMPTY_STRING, false, null, EMR_CASE_IGNORE_OID, null,
        SMR_CASE_IGNORE_OID, null, SYNTAX_DIRECTORY_STRING_OID, false, false,
        false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.6", Arrays.asList("c", "countryName"),
        EMPTY_STRING, false, "name", null, null, null, null,
        SYNTAX_COUNTRY_STRING_OID, true, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.3", Arrays.asList("cn",
        "commonName"), EMPTY_STRING, false, "name", null, null, null,
        null, null, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.3", Arrays.asList("cn", "commonName"),
        EMPTY_STRING, false, "name", null, null, null, null, null, false,
        false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("0.9.2342.19200300.100.1.25", Arrays
        .asList("dc", "domainComponent"), EMPTY_STRING, false, null,
        EMR_CASE_IGNORE_IA5_OID, null, SMR_CASE_IGNORE_IA5_OID, null,
        SYNTAX_IA5_STRING_OID, true, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("0.9.2342.19200300.100.1.25", Arrays.asList("dc",
        "domainComponent"), EMPTY_STRING, false, null, EMR_CASE_IGNORE_IA5_OID,
        null, SMR_CASE_IGNORE_IA5_OID, null, SYNTAX_IA5_STRING_OID, true,
        false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.13", Collections
        .singletonList("description"), EMPTY_STRING, false, null,
@@ -185,42 +180,40 @@
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.27", Collections
        .singletonList("destinationIndicator"), EMPTY_STRING, false,
        null, EMR_CASE_IGNORE_OID, null, SMR_CASE_IGNORE_OID, null,
        .singletonList("destinationIndicator"), EMPTY_STRING, false, null,
        EMR_CASE_IGNORE_OID, null, SMR_CASE_IGNORE_OID, null,
        SYNTAX_PRINTABLE_STRING_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.49", Collections
        .singletonList("distinguishedName"), EMPTY_STRING, false, null,
        EMR_DN_OID, null, null, null, SYNTAX_DN_OID, false, false,
        false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
        EMR_DN_OID, null, null, null, SYNTAX_DN_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.46", Collections
        .singletonList("dnQualifier"), EMPTY_STRING, false, null,
        EMR_CASE_IGNORE_OID, OMR_CASE_IGNORE_OID, SMR_CASE_IGNORE_OID,
        null, SYNTAX_PRINTABLE_STRING_OID, false, false, false,
        EMR_CASE_IGNORE_OID, OMR_CASE_IGNORE_OID, SMR_CASE_IGNORE_OID, null,
        SYNTAX_PRINTABLE_STRING_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.47", Collections
        .singletonList("enhancedSearchGuide"), EMPTY_STRING, false,
        null, null, null, null, null, SYNTAX_ENHANCED_GUIDE_OID, false,
        false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN,
        false);
    builder.addAttributeType("2.5.4.23", Collections
        .singletonList("facsimileTelephoneNumber"), EMPTY_STRING,
        false, null, null, null, null, null, SYNTAX_FAXNUMBER_OID,
        false, false, false, AttributeUsage.USER_APPLICATIONS,
        RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.44", Collections
        .singletonList("generationQualifier"), EMPTY_STRING, false,
        "name", null, null, null, null, null, false, false, false,
        .singletonList("enhancedSearchGuide"), EMPTY_STRING, false, null, null,
        null, null, null, SYNTAX_ENHANCED_GUIDE_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.42", Collections
        .singletonList("givenName"), EMPTY_STRING, false, "name", null,
        null, null, null, null, false, false, false,
    builder.addAttributeType("2.5.4.23", Collections
        .singletonList("facsimileTelephoneNumber"), EMPTY_STRING, false, null,
        null, null, null, null, SYNTAX_FAXNUMBER_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.44", Collections
        .singletonList("generationQualifier"), EMPTY_STRING, false, "name",
        null, null, null, null, null, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.42",
        Collections.singletonList("givenName"), EMPTY_STRING, false, "name",
        null, null, null, null, null, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.51", Collections
@@ -229,36 +222,27 @@
        SYNTAX_DIRECTORY_STRING_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.43", Collections
        .singletonList("initials"), EMPTY_STRING, false, "name", null,
        null, null, null, null, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.43", Collections.singletonList("initials"),
        EMPTY_STRING, false, "name", null, null, null, null, null, false,
        false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.25", Collections
        .singletonList("internationalISDNNumber"), EMPTY_STRING, false,
        null, EMR_NUMERIC_STRING_OID, null, SMR_NUMERIC_STRING_OID,
        null, SYNTAX_NUMERIC_STRING_OID, false, false, false,
        .singletonList("internationalISDNNumber"), EMPTY_STRING, false, null,
        EMR_NUMERIC_STRING_OID, null, SMR_NUMERIC_STRING_OID, null,
        SYNTAX_NUMERIC_STRING_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.7", Arrays.asList("l",
        "localityName"), EMPTY_STRING, false, "name", null, null, null,
        null, null, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.7", Arrays.asList("l", "localityName"),
        EMPTY_STRING, false, "name", null, null, null, null, null, false,
        false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.31", Collections
        .singletonList("member"), EMPTY_STRING, false,
        "distinguishedName", null, null, null, null, null, false,
        false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN,
    builder.addAttributeType("2.5.4.31", Collections.singletonList("member"),
        EMPTY_STRING, false, "distinguishedName", null, null, null, null, null,
        false, false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN,
        false);
    builder.addAttributeType("2.5.4.41", Collections
        .singletonList("name"), EMPTY_STRING, false, null,
        EMR_CASE_IGNORE_OID, null, SMR_CASE_IGNORE_OID, null,
        SYNTAX_DIRECTORY_STRING_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.10", Arrays.asList("o",
        "organizationName"), EMPTY_STRING, false, null,
    builder.addAttributeType("2.5.4.10",
        Arrays.asList("o", "organizationName"), EMPTY_STRING, false, null,
        EMR_CASE_IGNORE_OID, null, SMR_CASE_IGNORE_OID, null,
        SYNTAX_DIRECTORY_STRING_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
@@ -269,16 +253,15 @@
        SYNTAX_DIRECTORY_STRING_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.32", Collections
        .singletonList("owner"), EMPTY_STRING, false,
        "distinguishedName", null, null, null, null, null, false,
        false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN,
    builder.addAttributeType("2.5.4.32", Collections.singletonList("owner"),
        EMPTY_STRING, false, "distinguishedName", null, null, null, null, null,
        false, false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN,
        false);
    builder.addAttributeType("2.5.4.19", Collections
        .singletonList("physicalDeliveryOfficeName"), EMPTY_STRING,
        false, null, EMR_CASE_IGNORE_OID, null, SMR_CASE_IGNORE_OID,
        null, SYNTAX_DIRECTORY_STRING_OID, false, false, false,
        .singletonList("physicalDeliveryOfficeName"), EMPTY_STRING, false,
        null, EMR_CASE_IGNORE_OID, null, SMR_CASE_IGNORE_OID, null,
        SYNTAX_DIRECTORY_STRING_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.16", Collections
@@ -300,32 +283,29 @@
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.28", Collections
        .singletonList("preferredDeliveryMethod"), EMPTY_STRING, false,
        null, null, null, null, null, SYNTAX_DELIVERY_METHOD_OID, true,
        false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN,
        false);
        .singletonList("preferredDeliveryMethod"), EMPTY_STRING, false, null,
        null, null, null, null, SYNTAX_DELIVERY_METHOD_OID, true, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.26", Collections
        .singletonList("registeredAddress"), EMPTY_STRING, false,
        "postalAddress", null, null, null, null,
        SYNTAX_POSTAL_ADDRESS_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
        "postalAddress", null, null, null, null, SYNTAX_POSTAL_ADDRESS_OID,
        false, false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN,
        false);
    builder.addAttributeType("2.5.4.33", Collections
        .singletonList("roleOccupant"), EMPTY_STRING, false,
        "distinguishedName", null, null, null, null, null, false,
        false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN,
        false);
    builder.addAttributeType("2.5.4.14", Collections
        .singletonList("searchGuide"), EMPTY_STRING, false, null, null,
        null, null, null, SYNTAX_GUIDE_OID, false, false, false,
        "distinguishedName", null, null, null, null, null, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.34", Collections
        .singletonList("seeAlso"), EMPTY_STRING, false,
        "distinguishedName", null, null, null, null, null, false,
        false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN,
    builder.addAttributeType("2.5.4.14", Collections
        .singletonList("searchGuide"), EMPTY_STRING, false, null, null, null,
        null, null, SYNTAX_GUIDE_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.34", Collections.singletonList("seeAlso"),
        EMPTY_STRING, false, "distinguishedName", null, null, null, null, null,
        false, false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN,
        false);
    builder.addAttributeType("2.5.4.5", Collections
@@ -335,48 +315,44 @@
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.4", Arrays.asList("sn", "surname"),
        EMPTY_STRING, false, "name", null, null, null, null, null,
        false, false, false, AttributeUsage.USER_APPLICATIONS,
        RFC4519_ORIGIN, false);
        EMPTY_STRING, false, "name", null, null, null, null, null, false,
        false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.8", Arrays.asList("st",
        "stateOrProvinceName"), EMPTY_STRING, false, "name", null,
        null, null, null, null, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
        "stateOrProvinceName"), EMPTY_STRING, false, "name", null, null, null,
        null, null, false, false, false, AttributeUsage.USER_APPLICATIONS,
        RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.9", Arrays.asList("street",
        "streetAddress"), EMPTY_STRING, false, null,
    builder.addAttributeType("2.5.4.9", Arrays
        .asList("street", "streetAddress"), EMPTY_STRING, false, null,
        EMR_CASE_IGNORE_OID, null, SMR_CASE_IGNORE_OID, null,
        SYNTAX_DIRECTORY_STRING_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.20", Collections
        .singletonList("telephoneNumber"), EMPTY_STRING, false, null,
        EMR_TELEPHONE_OID, null, SMR_TELEPHONE_OID, null,
        SYNTAX_TELEPHONE_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
        EMR_TELEPHONE_OID, null, SMR_TELEPHONE_OID, null, SYNTAX_TELEPHONE_OID,
        false, false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN,
        false);
    builder.addAttributeType("2.5.4.22", Collections
        .singletonList("teletexTerminalIdentifier"), EMPTY_STRING,
        false, null, null, null, null, null,
        SYNTAX_TELETEX_TERM_ID_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
        .singletonList("teletexTerminalIdentifier"), EMPTY_STRING, false, null,
        null, null, null, null, SYNTAX_TELETEX_TERM_ID_OID, false, false,
        false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.21", Collections
        .singletonList("telexNumber"), EMPTY_STRING, false, null, null,
        null, null, null, SYNTAX_TELEX_OID, false, false, false,
        .singletonList("telexNumber"), EMPTY_STRING, false, null, null, null,
        null, null, SYNTAX_TELEX_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.12", Collections
        .singletonList("title"), EMPTY_STRING, false, "name", null,
        null, null, null, null, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.12", Collections.singletonList("title"),
        EMPTY_STRING, false, "name", null, null, null, null, null, false,
        false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("0.9.2342.19200300.100.1.1", Arrays
        .asList("uid", "userid"), EMPTY_STRING, false, null,
        EMR_CASE_IGNORE_OID, null, SMR_CASE_IGNORE_OID, null,
        SYNTAX_DIRECTORY_STRING_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("0.9.2342.19200300.100.1.1", Arrays.asList("uid",
        "userid"), EMPTY_STRING, false, null, EMR_CASE_IGNORE_OID, null,
        SMR_CASE_IGNORE_OID, null, SYNTAX_DIRECTORY_STRING_OID, false, false,
        false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.50", Collections
        .singletonList("uniqueMember"), EMPTY_STRING, false, null,
@@ -386,9 +362,8 @@
    builder.addAttributeType("2.5.4.35", Collections
        .singletonList("userPassword"), EMPTY_STRING, false, null,
        EMR_OCTET_STRING_OID, null, null, null,
        SYNTAX_OCTET_STRING_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
        EMR_OCTET_STRING_OID, null, null, null, SYNTAX_OCTET_STRING_OID, false,
        false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.24", Collections
        .singletonList("x121Address"), EMPTY_STRING, false, null,
@@ -397,10 +372,9 @@
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    builder.addAttributeType("2.5.4.45", Collections
        .singletonList("x500UniqueIdentifier"), EMPTY_STRING, false,
        null, EMR_BIT_STRING_OID, null, null, null,
        SYNTAX_BIT_STRING_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
        .singletonList("x500UniqueIdentifier"), EMPTY_STRING, false, null,
        EMR_BIT_STRING_OID, null, null, null, SYNTAX_BIT_STRING_OID, false,
        false, false, AttributeUsage.USER_APPLICATIONS, RFC4519_ORIGIN, false);
    Set<String> attrs = new HashSet<String>();
    attrs.add("seeAlso");
@@ -409,25 +383,23 @@
    attrs.add("description");
    builder.addObjectClass("2.5.6.11", Collections
        .singletonList("applicationProcess"), EMPTY_STRING, false,
        Collections.singleton(TOP_OBJECTCLASS_NAME), Collections
            .singleton("cn"), attrs, ObjectClassType.STRUCTURAL,
        RFC4519_ORIGIN, false);
        .singletonList("applicationProcess"), EMPTY_STRING, false, Collections
        .singleton(TOP_OBJECTCLASS_NAME), Collections.singleton("cn"), attrs,
        ObjectClassType.STRUCTURAL, RFC4519_ORIGIN, false);
    attrs = new HashSet<String>();
    attrs.add("searchGuide");
    attrs.add("description");
    builder.addObjectClass("2.5.6.2", Collections
        .singletonList("country"), EMPTY_STRING, false, Collections
        .singleton(TOP_OBJECTCLASS_NAME), Collections.singleton("c"),
        attrs, ObjectClassType.STRUCTURAL, RFC4519_ORIGIN, false);
    builder.addObjectClass("2.5.6.2", Collections.singletonList("country"),
        EMPTY_STRING, false, Collections.singleton(TOP_OBJECTCLASS_NAME),
        Collections.singleton("c"), attrs, ObjectClassType.STRUCTURAL,
        RFC4519_ORIGIN, false);
    builder.addObjectClass("1.3.6.1.4.1.1466.344", Collections
        .singletonList("dcObject"), EMPTY_STRING, false, Collections
        .singleton(TOP_OBJECTCLASS_NAME), Collections.singleton("dc"),
        EMPTY_STRING_SET, ObjectClassType.AUXILIARY, RFC4519_ORIGIN,
        false);
        EMPTY_STRING_SET, ObjectClassType.AUXILIARY, RFC4519_ORIGIN, false);
    attrs = new HashSet<String>();
    attrs.add("serialNumber");
@@ -438,10 +410,10 @@
    attrs.add("l");
    attrs.add("description");
    builder.addObjectClass("2.5.6.14", Collections
        .singletonList("device"), EMPTY_STRING, false, Collections
        .singleton(TOP_OBJECTCLASS_NAME), Collections.singleton("cn"),
        attrs, ObjectClassType.STRUCTURAL, RFC4519_ORIGIN, false);
    builder.addObjectClass("2.5.6.14", Collections.singletonList("device"),
        EMPTY_STRING, false, Collections.singleton(TOP_OBJECTCLASS_NAME),
        Collections.singleton("cn"), attrs, ObjectClassType.STRUCTURAL,
        RFC4519_ORIGIN, false);
    Set<String> must = new HashSet<String>();
    must.add("member");
@@ -455,8 +427,8 @@
    attrs.add("o");
    attrs.add("description");
    builder.addObjectClass("2.5.6.9", Collections
        .singletonList("groupOfNames"), EMPTY_STRING, false,
    builder.addObjectClass("2.5.6.9",
        Collections.singletonList("groupOfNames"), EMPTY_STRING, false,
        Collections.singleton(TOP_OBJECTCLASS_NAME), must, attrs,
        ObjectClassType.STRUCTURAL, RFC4519_ORIGIN, false);
@@ -469,8 +441,8 @@
    attrs.add("description");
    builder.addObjectClass("2.5.6.17", Collections
        .singletonList("groupOfUniqueNames"), EMPTY_STRING, false,
        Collections.singleton(TOP_OBJECTCLASS_NAME), must, attrs,
        .singletonList("groupOfUniqueNames"), EMPTY_STRING, false, Collections
        .singleton(TOP_OBJECTCLASS_NAME), must, attrs,
        ObjectClassType.STRUCTURAL, RFC4519_ORIGIN, false);
    attrs = new HashSet<String>();
@@ -481,10 +453,10 @@
    attrs.add("l");
    attrs.add("description");
    builder.addObjectClass("2.5.6.3", Collections
        .singletonList("locality"), EMPTY_STRING, false, Collections
        .singleton(TOP_OBJECTCLASS_NAME), EMPTY_STRING_SET, attrs,
        ObjectClassType.STRUCTURAL, RFC4519_ORIGIN, false);
    builder.addObjectClass("2.5.6.3", Collections.singletonList("locality"),
        EMPTY_STRING, false, Collections.singleton(TOP_OBJECTCLASS_NAME),
        EMPTY_STRING_SET, attrs, ObjectClassType.STRUCTURAL, RFC4519_ORIGIN,
        false);
    attrs = new HashSet<String>();
    attrs.add("userPassword");
@@ -509,10 +481,10 @@
    attrs.add("l");
    attrs.add("description");
    builder.addObjectClass("2.5.6.4", Collections
        .singletonList("organization"), EMPTY_STRING, false,
        Collections.singleton(TOP_OBJECTCLASS_NAME), Collections
            .singleton("o"), attrs, ObjectClassType.STRUCTURAL,
    builder.addObjectClass("2.5.6.4",
        Collections.singletonList("organization"), EMPTY_STRING, false,
        Collections.singleton(TOP_OBJECTCLASS_NAME),
        Collections.singleton("o"), attrs, ObjectClassType.STRUCTURAL,
        RFC4519_ORIGIN, false);
    attrs = new HashSet<String>();
@@ -564,10 +536,9 @@
    attrs.add("description");
    builder.addObjectClass("2.5.6.8", Collections
        .singletonList("organizationalRole"), EMPTY_STRING, false,
        Collections.singleton(TOP_OBJECTCLASS_NAME), Collections
            .singleton("cn"), attrs, ObjectClassType.STRUCTURAL,
        RFC4519_ORIGIN, false);
        .singletonList("organizationalRole"), EMPTY_STRING, false, Collections
        .singleton(TOP_OBJECTCLASS_NAME), Collections.singleton("cn"), attrs,
        ObjectClassType.STRUCTURAL, RFC4519_ORIGIN, false);
    attrs = new HashSet<String>();
    attrs.add("businessCategory");
@@ -593,10 +564,9 @@
    attrs.add("x121Address");
    builder.addObjectClass("2.5.6.5", Collections
        .singletonList("organizationalUnit"), EMPTY_STRING, false,
        Collections.singleton(TOP_OBJECTCLASS_NAME), Collections
            .singleton("ou"), attrs, ObjectClassType.STRUCTURAL,
        RFC4519_ORIGIN, false);
        .singletonList("organizationalUnit"), EMPTY_STRING, false, Collections
        .singleton(TOP_OBJECTCLASS_NAME), Collections.singleton("ou"), attrs,
        ObjectClassType.STRUCTURAL, RFC4519_ORIGIN, false);
    must = new HashSet<String>();
    must.add("sn");
@@ -609,10 +579,9 @@
    attrs.add("seeAlso");
    attrs.add("description");
    builder.addObjectClass("2.5.6.6", Collections
        .singletonList("person"), EMPTY_STRING, false, Collections
        .singleton(TOP_OBJECTCLASS_NAME), must, attrs,
        ObjectClassType.STRUCTURAL, RFC4519_ORIGIN, false);
    builder.addObjectClass("2.5.6.6", Collections.singletonList("person"),
        EMPTY_STRING, false, Collections.singleton(TOP_OBJECTCLASS_NAME), must,
        attrs, ObjectClassType.STRUCTURAL, RFC4519_ORIGIN, false);
    attrs = new HashSet<String>();
    attrs.add("businessCategory");
@@ -635,104 +604,92 @@
    attrs.add("l");
    builder.addObjectClass("2.5.6.10", Collections
        .singletonList("residentialPerson"), EMPTY_STRING, false,
        Collections.singleton("person"), Collections.singleton("l"),
        attrs, ObjectClassType.STRUCTURAL, RFC4519_ORIGIN, false);
        .singletonList("residentialPerson"), EMPTY_STRING, false, Collections
        .singleton("person"), Collections.singleton("l"), attrs,
        ObjectClassType.STRUCTURAL, RFC4519_ORIGIN, false);
    builder.addObjectClass("1.3.6.1.1.3.1", Collections
        .singletonList("uidObject"), EMPTY_STRING, false, Collections
        .singleton(TOP_OBJECTCLASS_NAME), Collections.singleton("uid"),
        attrs, ObjectClassType.AUXILIARY, RFC4519_ORIGIN, false);
        .singleton(TOP_OBJECTCLASS_NAME), Collections.singleton("uid"), attrs,
        ObjectClassType.AUXILIARY, RFC4519_ORIGIN, false);
  }
  private static void addRFC4530(SchemaBuilder builder)
  private static void addRFC4530(final SchemaBuilder builder)
  {
    builder.addSyntax(SYNTAX_UUID_OID, SYNTAX_UUID_DESCRIPTION,
        RFC4530_ORIGIN, new UUIDSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_UUID_OID, SYNTAX_UUID_DESCRIPTION, RFC4530_ORIGIN,
        new UUIDSyntaxImpl(), false);
    builder.addMatchingRule(EMR_UUID_OID, Collections
        .singletonList(EMR_UUID_NAME), EMPTY_STRING, false,
        SYNTAX_UUID_OID, RFC4530_ORIGIN,
        new UUIDEqualityMatchingRuleImpl(), false);
        .singletonList(EMR_UUID_NAME), EMPTY_STRING, false, SYNTAX_UUID_OID,
        RFC4530_ORIGIN, new UUIDEqualityMatchingRuleImpl(), false);
    builder.addMatchingRule(OMR_UUID_OID, Collections
        .singletonList(OMR_UUID_NAME), EMPTY_STRING, false,
        SYNTAX_UUID_OID, RFC4530_ORIGIN,
        new UUIDOrderingMatchingRuleImpl(), false);
        .singletonList(OMR_UUID_NAME), EMPTY_STRING, false, SYNTAX_UUID_OID,
        RFC4530_ORIGIN, new UUIDOrderingMatchingRuleImpl(), false);
    builder.addAttributeType("1.3.6.1.1.16.4", Collections
        .singletonList("entryUUID"), "UUID of the entry", false, null,
        EMR_UUID_OID, OMR_UUID_OID, null, null, SYNTAX_UUID_OID, true,
        false, true, AttributeUsage.DIRECTORY_OPERATION,
        RFC4530_ORIGIN, false);
        EMR_UUID_OID, OMR_UUID_OID, null, null, SYNTAX_UUID_OID, true, false,
        true, AttributeUsage.DIRECTORY_OPERATION, RFC4530_ORIGIN, false);
  }
  private static void addSunProprietary(SchemaBuilder builder)
  private static void addSunProprietary(final SchemaBuilder builder)
  {
    builder.addSyntax(SYNTAX_USER_PASSWORD_OID,
        SYNTAX_USER_PASSWORD_DESCRIPTION, OPENDS_ORIGIN,
        new UserPasswordSyntaxImpl(), false);
    builder.addMatchingRule(EMR_USER_PASSWORD_EXACT_OID, Collections
        .singletonList(EMR_USER_PASSWORD_EXACT_NAME),
        EMR_USER_PASSWORD_EXACT_DESCRIPTION, false,
        SYNTAX_USER_PASSWORD_OID, OPENDS_ORIGIN,
        new UserPasswordExactEqualityMatchingRuleImpl(), false);
        EMR_USER_PASSWORD_EXACT_DESCRIPTION, false, SYNTAX_USER_PASSWORD_OID,
        OPENDS_ORIGIN, new UserPasswordExactEqualityMatchingRuleImpl(), false);
    builder.addMatchingRule(AMR_DOUBLE_METAPHONE_OID, Collections
        .singletonList(AMR_DOUBLE_METAPHONE_NAME),
        AMR_DOUBLE_METAPHONE_DESCRIPTION, false,
        SYNTAX_DIRECTORY_STRING_OID, OPENDS_ORIGIN,
        new DoubleMetaphoneApproximateMatchingRuleImpl(), false);
        AMR_DOUBLE_METAPHONE_DESCRIPTION, false, SYNTAX_DIRECTORY_STRING_OID,
        OPENDS_ORIGIN, new DoubleMetaphoneApproximateMatchingRuleImpl(), false);
  }
  private static void defaultAttributeTypes(SchemaBuilder builder)
  private static void defaultAttributeTypes(final SchemaBuilder builder)
  {
    builder.addAttributeType("2.5.4.0", Collections
        .singletonList("objectClass"), EMPTY_STRING, false, null,
        EMR_OID_NAME, null, null, null, SYNTAX_OID_OID, false, false,
        false, AttributeUsage.USER_APPLICATIONS, RFC4512_ORIGIN, false);
        .singletonList("objectClass"), EMPTY_STRING, false, null, EMR_OID_NAME,
        null, null, null, SYNTAX_OID_OID, false, false, false,
        AttributeUsage.USER_APPLICATIONS, RFC4512_ORIGIN, false);
    builder.addAttributeType("2.5.4.1", Collections
        .singletonList("aliasedObjectName"), EMPTY_STRING, false, null,
        EMR_DN_NAME, null, null, null, SYNTAX_DN_OID, true, false,
        false, AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN,
        false);
        EMR_DN_NAME, null, null, null, SYNTAX_DN_OID, true, false, false,
        AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("2.5.18.1", Collections
        .singletonList("createTimestamp"), EMPTY_STRING, false, null,
        EMR_GENERALIZED_TIME_NAME, OMR_GENERALIZED_TIME_NAME, null,
        null, SYNTAX_GENERALIZED_TIME_OID, true, false, true,
        EMR_GENERALIZED_TIME_NAME, OMR_GENERALIZED_TIME_NAME, null, null,
        SYNTAX_GENERALIZED_TIME_OID, true, false, true,
        AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("2.5.18.2", Collections
        .singletonList("modifyTimestamp"), EMPTY_STRING, false, null,
        EMR_GENERALIZED_TIME_NAME, OMR_GENERALIZED_TIME_NAME, null,
        null, SYNTAX_GENERALIZED_TIME_OID, true, false, true,
        EMR_GENERALIZED_TIME_NAME, OMR_GENERALIZED_TIME_NAME, null, null,
        SYNTAX_GENERALIZED_TIME_OID, true, false, true,
        AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN, false);
    builder
        .addAttributeType("2.5.18.3", Collections
            .singletonList("creatorsName"), EMPTY_STRING, false, null,
            EMR_DN_NAME, null, null, null, SYNTAX_DN_OID, true, false,
            true, AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN,
            false);
    builder.addAttributeType("2.5.18.3", Collections
        .singletonList("creatorsName"), EMPTY_STRING, false, null, EMR_DN_NAME,
        null, null, null, SYNTAX_DN_OID, true, false, true,
        AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN, false);
    builder
        .addAttributeType("2.5.18.4", Collections
            .singletonList("modifiersName"), EMPTY_STRING, false, null,
            EMR_DN_NAME, null, null, null, SYNTAX_DN_OID, true, false,
            true, AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN,
            false);
    builder.addAttributeType("2.5.18.4", Collections
        .singletonList("modifiersName"), EMPTY_STRING, false, null,
        EMR_DN_NAME, null, null, null, SYNTAX_DN_OID, true, false, true,
        AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN, false);
    builder
        .addAttributeType("2.5.18.10", Collections
            .singletonList("subschemaSubentry"), EMPTY_STRING, false,
            null, EMR_DN_NAME, null, null, null, SYNTAX_DN_OID, true,
            false, true, AttributeUsage.DIRECTORY_OPERATION,
            RFC4512_ORIGIN, false);
    builder.addAttributeType("2.5.18.10", Collections
        .singletonList("subschemaSubentry"), EMPTY_STRING, false, null,
        EMR_DN_NAME, null, null, null, SYNTAX_DN_OID, true, false, true,
        AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("2.5.21.5", Collections
        .singletonList("attributeTypes"), EMPTY_STRING, false, null,
@@ -742,9 +699,9 @@
    builder.addAttributeType("2.5.21.6", Collections
        .singletonList("objectClasses"), EMPTY_STRING, false, null,
        EMR_OID_FIRST_COMPONENT_NAME, null, null, null,
        SYNTAX_OBJECTCLASS_OID, false, false, false,
        AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN, false);
        EMR_OID_FIRST_COMPONENT_NAME, null, null, null, SYNTAX_OBJECTCLASS_OID,
        false, false, false, AttributeUsage.DIRECTORY_OPERATION,
        RFC4512_ORIGIN, false);
    builder.addAttributeType("2.5.21.4", Collections
        .singletonList("matchingRules"), EMPTY_STRING, false, null,
@@ -759,58 +716,55 @@
        AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("2.5.21.9", Collections
        .singletonList("structuralObjectClass"), EMPTY_STRING, false,
        null, EMR_OID_NAME, null, null, null, SYNTAX_OID_OID, true,
        false, true, AttributeUsage.DIRECTORY_OPERATION,
        RFC4512_ORIGIN, false);
        .singletonList("structuralObjectClass"), EMPTY_STRING, false, null,
        EMR_OID_NAME, null, null, null, SYNTAX_OID_OID, true, false, true,
        AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("2.5.21.10", Collections
        .singletonList("governingStructureRule"), EMPTY_STRING, false,
        null, EMR_INTEGER_NAME, null, null, null, SYNTAX_INTEGER_OID,
        true, false, true, AttributeUsage.DIRECTORY_OPERATION,
        RFC4512_ORIGIN, false);
        .singletonList("governingStructureRule"), EMPTY_STRING, false, null,
        EMR_INTEGER_NAME, null, null, null, SYNTAX_INTEGER_OID, true, false,
        true, AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("1.3.6.1.4.1.1466.101.120.5", Collections
        .singletonList("namingContexts"), EMPTY_STRING, false, null,
        null, null, null, null, SYNTAX_DN_OID, false, false, false,
        .singletonList("namingContexts"), EMPTY_STRING, false, null, null,
        null, null, null, SYNTAX_DN_OID, false, false, false,
        AttributeUsage.DSA_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("1.3.6.1.4.1.1466.101.120.6", Collections
        .singletonList("altServer"), EMPTY_STRING, false, null, null,
        null, null, null, SYNTAX_IA5_STRING_OID, false, false, false,
        .singletonList("altServer"), EMPTY_STRING, false, null, null, null,
        null, null, SYNTAX_IA5_STRING_OID, false, false, false,
        AttributeUsage.DSA_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("1.3.6.1.4.1.1466.101.120.7", Collections
        .singletonList("supportedExtension"), EMPTY_STRING, false,
        null, null, null, null, null, SYNTAX_OID_OID, false, false,
        false, AttributeUsage.DSA_OPERATION, RFC4512_ORIGIN, false);
        .singletonList("supportedExtension"), EMPTY_STRING, false, null, null,
        null, null, null, SYNTAX_OID_OID, false, false, false,
        AttributeUsage.DSA_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("1.3.6.1.4.1.1466.101.120.13", Collections
        .singletonList("supportedControl"), EMPTY_STRING, false, null,
        null, null, null, null, SYNTAX_OID_OID, false, false, false,
        .singletonList("supportedControl"), EMPTY_STRING, false, null, null,
        null, null, null, SYNTAX_OID_OID, false, false, false,
        AttributeUsage.DSA_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("1.3.6.1.4.1.1466.101.120.14", Collections
        .singletonList("supportedSASLMechanisms"), EMPTY_STRING, false,
        null, null, null, null, null, SYNTAX_DIRECTORY_STRING_OID,
        false, false, false, AttributeUsage.DSA_OPERATION,
        RFC4512_ORIGIN, false);
        .singletonList("supportedSASLMechanisms"), EMPTY_STRING, false, null,
        null, null, null, null, SYNTAX_DIRECTORY_STRING_OID, false, false,
        false, AttributeUsage.DSA_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("1.3.6.1.4.1.4203.1.3.5", Collections
        .singletonList("supportedFeatures"), EMPTY_STRING, false, null,
        EMR_OID_NAME, null, null, null, SYNTAX_OID_OID, false, false,
        false, AttributeUsage.DSA_OPERATION, RFC4512_ORIGIN, false);
        EMR_OID_NAME, null, null, null, SYNTAX_OID_OID, false, false, false,
        AttributeUsage.DSA_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("1.3.6.1.4.1.1466.101.120.15", Collections
        .singletonList("supportedLDAPVersion"), EMPTY_STRING, false,
        null, null, null, null, null, SYNTAX_INTEGER_OID, false, false,
        false, AttributeUsage.DSA_OPERATION, RFC4512_ORIGIN, false);
        .singletonList("supportedLDAPVersion"), EMPTY_STRING, false, null,
        null, null, null, null, SYNTAX_INTEGER_OID, false, false, false,
        AttributeUsage.DSA_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("1.3.6.1.4.1.1466.101.120.16", Collections
        .singletonList("ldapSyntaxes"), EMPTY_STRING, false, null,
        EMR_OID_FIRST_COMPONENT_NAME, null, null, null,
        SYNTAX_LDAP_SYNTAX_OID, false, false, false,
        AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN, false);
        EMR_OID_FIRST_COMPONENT_NAME, null, null, null, SYNTAX_LDAP_SYNTAX_OID,
        false, false, false, AttributeUsage.DIRECTORY_OPERATION,
        RFC4512_ORIGIN, false);
    builder.addAttributeType("2.5.21.1", Collections
        .singletonList("ditStructureRules"), EMPTY_STRING, false, null,
@@ -818,11 +772,11 @@
        SYNTAX_DIT_STRUCTURE_RULE_OID, false, false, false,
        AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("2.5.21.7", Collections
        .singletonList("nameForms"), EMPTY_STRING, false, null,
        EMR_OID_FIRST_COMPONENT_NAME, null, null, null,
        SYNTAX_NAME_FORM_OID, false, false, false,
        AttributeUsage.DIRECTORY_OPERATION, RFC4512_ORIGIN, false);
    builder.addAttributeType("2.5.21.7",
        Collections.singletonList("nameForms"), EMPTY_STRING, false, null,
        EMR_OID_FIRST_COMPONENT_NAME, null, null, null, SYNTAX_NAME_FORM_OID,
        false, false, false, AttributeUsage.DIRECTORY_OPERATION,
        RFC4512_ORIGIN, false);
    builder.addAttributeType("2.5.21.2", Collections
        .singletonList("ditContentRules"), EMPTY_STRING, false, null,
@@ -833,7 +787,7 @@
  private static void defaultMatchingRules(SchemaBuilder builder)
  private static void defaultMatchingRules(final SchemaBuilder builder)
  {
    builder.addMatchingRule(EMR_BIT_STRING_OID, Collections
        .singletonList(EMR_BIT_STRING_NAME), EMPTY_STRING, false,
@@ -892,15 +846,11 @@
        SYNTAX_SUBSTRING_ASSERTION_OID, RFC4512_ORIGIN,
        new CaseIgnoreSubstringMatchingRuleImpl(), false);
    builder.addMatchingRule(EMR_DIRECTORY_STRING_FIRST_COMPONENT_OID,
        Collections
            .singletonList(EMR_DIRECTORY_STRING_FIRST_COMPONENT_NAME),
        EMPTY_STRING, false, SYNTAX_DIRECTORY_STRING_OID,
        RFC4512_ORIGIN,
        new DirectoryStringFirstComponentEqualityMatchingRuleImpl(),
        false);
    builder.addMatchingRule(EMR_DN_OID, Collections
        .singletonList(EMR_DN_NAME), EMPTY_STRING, false,
        SYNTAX_DN_OID, RFC4512_ORIGIN,
        Collections.singletonList(EMR_DIRECTORY_STRING_FIRST_COMPONENT_NAME),
        EMPTY_STRING, false, SYNTAX_DIRECTORY_STRING_OID, RFC4512_ORIGIN,
        new DirectoryStringFirstComponentEqualityMatchingRuleImpl(), false);
    builder.addMatchingRule(EMR_DN_OID, Collections.singletonList(EMR_DN_NAME),
        EMPTY_STRING, false, SYNTAX_DN_OID, RFC4512_ORIGIN,
        new DistinguishedNameEqualityMatchingRuleImpl(), false);
    builder.addMatchingRule(EMR_GENERALIZED_TIME_OID, Collections
        .singletonList(EMR_GENERALIZED_TIME_NAME), EMPTY_STRING, false,
@@ -910,9 +860,9 @@
        .singletonList(OMR_GENERALIZED_TIME_NAME), EMPTY_STRING, false,
        SYNTAX_GENERALIZED_TIME_OID, RFC4512_ORIGIN,
        new GeneralizedTimeOrderingMatchingRuleImpl(), false);
    builder.addMatchingRule(EMR_INTEGER_FIRST_COMPONENT_OID,
        Collections.singletonList(EMR_INTEGER_FIRST_COMPONENT_NAME),
        EMPTY_STRING, false, SYNTAX_INTEGER_OID, RFC4512_ORIGIN,
    builder.addMatchingRule(EMR_INTEGER_FIRST_COMPONENT_OID, Collections
        .singletonList(EMR_INTEGER_FIRST_COMPONENT_NAME), EMPTY_STRING, false,
        SYNTAX_INTEGER_OID, RFC4512_ORIGIN,
        new IntegerFirstComponentEqualityMatchingRuleImpl(), false);
    builder.addMatchingRule(EMR_INTEGER_OID, Collections
        .singletonList(EMR_INTEGER_NAME), EMPTY_STRING, false,
@@ -939,14 +889,12 @@
        SYNTAX_SUBSTRING_ASSERTION_OID, RFC4512_ORIGIN,
        new NumericStringSubstringMatchingRuleImpl(), false);
    builder.addMatchingRule(EMR_OID_FIRST_COMPONENT_OID, Collections
        .singletonList(EMR_OID_FIRST_COMPONENT_NAME), EMPTY_STRING,
        false, SYNTAX_OID_OID, RFC4512_ORIGIN,
        new ObjectIdentifierFirstComponentEqualityMatchingRuleImpl(),
        false);
    builder.addMatchingRule(EMR_OID_OID, Collections
        .singletonList(EMR_OID_NAME), EMPTY_STRING, false,
        .singletonList(EMR_OID_FIRST_COMPONENT_NAME), EMPTY_STRING, false,
        SYNTAX_OID_OID, RFC4512_ORIGIN,
        new ObjectIdentifierEqualityMatchingRuleImpl(), false);
        new ObjectIdentifierFirstComponentEqualityMatchingRuleImpl(), false);
    builder.addMatchingRule(EMR_OID_OID, Collections
        .singletonList(EMR_OID_NAME), EMPTY_STRING, false, SYNTAX_OID_OID,
        RFC4512_ORIGIN, new ObjectIdentifierEqualityMatchingRuleImpl(), false);
    builder.addMatchingRule(EMR_OCTET_STRING_OID, Collections
        .singletonList(EMR_OCTET_STRING_NAME), EMPTY_STRING, false,
        SYNTAX_OCTET_STRING_OID, RFC4512_ORIGIN,
@@ -962,13 +910,13 @@
        new OctetStringSubstringMatchingRuleImpl(), false);
    // Depreciated in RFC 4512
    builder.addMatchingRule(EMR_PROTOCOL_INFORMATION_OID, Collections
        .singletonList(EMR_PROTOCOL_INFORMATION_NAME), EMPTY_STRING,
        false, SYNTAX_PROTOCOL_INFORMATION_OID, RFC2252_ORIGIN,
        .singletonList(EMR_PROTOCOL_INFORMATION_NAME), EMPTY_STRING, false,
        SYNTAX_PROTOCOL_INFORMATION_OID, RFC2252_ORIGIN,
        new ProtocolInformationEqualityMatchingRuleImpl(), false);
    // Depreciated in RFC 4512
    builder.addMatchingRule(EMR_PRESENTATION_ADDRESS_OID, Collections
        .singletonList(EMR_PRESENTATION_ADDRESS_NAME), EMPTY_STRING,
        false, SYNTAX_PRESENTATION_ADDRESS_OID, RFC2252_ORIGIN,
        .singletonList(EMR_PRESENTATION_ADDRESS_NAME), EMPTY_STRING, false,
        SYNTAX_PRESENTATION_ADDRESS_OID, RFC2252_ORIGIN,
        new PresentationAddressEqualityMatchingRuleImpl(), false);
    builder.addMatchingRule(EMR_TELEPHONE_OID, Collections
        .singletonList(EMR_TELEPHONE_NAME), EMPTY_STRING, false,
@@ -990,26 +938,22 @@
  private static void defaultObjectClasses(SchemaBuilder builder)
  private static void defaultObjectClasses(final SchemaBuilder builder)
  {
    builder.addObjectClass(TOP_OBJECTCLASS_OID, Collections
        .singletonList(TOP_OBJECTCLASS_NAME),
        TOP_OBJECTCLASS_DESCRIPTION, false, EMPTY_STRING_SET,
        Collections.singleton("objectClass"), EMPTY_STRING_SET,
        ObjectClassType.ABSTRACT, RFC4512_ORIGIN, false);
        .singletonList(TOP_OBJECTCLASS_NAME), TOP_OBJECTCLASS_DESCRIPTION,
        false, EMPTY_STRING_SET, Collections.singleton("objectClass"),
        EMPTY_STRING_SET, ObjectClassType.ABSTRACT, RFC4512_ORIGIN, false);
    builder.addObjectClass("2.5.6.1", Collections
        .singletonList("alias"), EMPTY_STRING, false, Collections
        .singleton("top"), Collections.singleton("aliasedObjectName"),
        EMPTY_STRING_SET, ObjectClassType.STRUCTURAL, RFC4512_ORIGIN,
        false);
    builder.addObjectClass("2.5.6.1", Collections.singletonList("alias"),
        EMPTY_STRING, false, Collections.singleton("top"), Collections
            .singleton("aliasedObjectName"), EMPTY_STRING_SET,
        ObjectClassType.STRUCTURAL, RFC4512_ORIGIN, false);
    builder.addObjectClass(EXTENSIBLE_OBJECT_OBJECTCLASS_OID,
        Collections.singletonList(EXTENSIBLE_OBJECT_OBJECTCLASS_NAME),
        EMPTY_STRING, false, Collections
            .singleton(TOP_OBJECTCLASS_NAME), EMPTY_STRING_SET,
        EMPTY_STRING_SET, ObjectClassType.AUXILIARY, RFC4512_ORIGIN,
        false);
    builder.addObjectClass(EXTENSIBLE_OBJECT_OBJECTCLASS_OID, Collections
        .singletonList(EXTENSIBLE_OBJECT_OBJECTCLASS_NAME), EMPTY_STRING,
        false, Collections.singleton(TOP_OBJECTCLASS_NAME), EMPTY_STRING_SET,
        EMPTY_STRING_SET, ObjectClassType.AUXILIARY, RFC4512_ORIGIN, false);
    final Set<String> subschemaAttrs = new HashSet<String>();
    subschemaAttrs.add("dITStructureRules");
@@ -1020,16 +964,15 @@
    subschemaAttrs.add("matchingRules");
    subschemaAttrs.add("matchingRuleUse");
    builder.addObjectClass("2.5.20.1", Collections
        .singletonList("subschema"), EMPTY_STRING, false, Collections
        .singleton(TOP_OBJECTCLASS_NAME), EMPTY_STRING_SET,
        subschemaAttrs, ObjectClassType.AUXILIARY, RFC4512_ORIGIN,
        false);
    builder.addObjectClass("2.5.20.1", Collections.singletonList("subschema"),
        EMPTY_STRING, false, Collections.singleton(TOP_OBJECTCLASS_NAME),
        EMPTY_STRING_SET, subschemaAttrs, ObjectClassType.AUXILIARY,
        RFC4512_ORIGIN, false);
  }
  private static void defaultSyntaxes(SchemaBuilder builder)
  private static void defaultSyntaxes(final SchemaBuilder builder)
  {
    // All RFC 4512 / 4517
    builder.addSyntax(SYNTAX_ATTRIBUTE_TYPE_OID,
@@ -1037,18 +980,16 @@
        new AttributeTypeSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_BINARY_OID, SYNTAX_BINARY_DESCRIPTION,
        RFC4512_ORIGIN, new BinarySyntaxImpl(), false);
    builder.addSyntax(SYNTAX_BIT_STRING_OID,
        SYNTAX_BIT_STRING_DESCRIPTION, RFC4512_ORIGIN,
        new BitStringSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_BIT_STRING_OID, SYNTAX_BIT_STRING_DESCRIPTION,
        RFC4512_ORIGIN, new BitStringSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_BOOLEAN_OID, SYNTAX_BOOLEAN_DESCRIPTION,
        RFC4512_ORIGIN, new BooleanSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_CERTLIST_OID, SYNTAX_CERTLIST_DESCRIPTION,
        RFC4512_ORIGIN, new CertificateListSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_CERTPAIR_OID, SYNTAX_CERTPAIR_DESCRIPTION,
        RFC4512_ORIGIN, new CertificatePairSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_CERTIFICATE_OID,
        SYNTAX_CERTIFICATE_DESCRIPTION, RFC4512_ORIGIN,
        new CertificateSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_CERTIFICATE_OID, SYNTAX_CERTIFICATE_DESCRIPTION,
        RFC4512_ORIGIN, new CertificateSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_COUNTRY_STRING_OID,
        SYNTAX_COUNTRY_STRING_DESCRIPTION, RFC4512_ORIGIN,
        new CountryStringSyntaxImpl(), false);
@@ -1064,54 +1005,48 @@
    builder.addSyntax(SYNTAX_DIT_STRUCTURE_RULE_OID,
        SYNTAX_DIT_STRUCTURE_RULE_DESCRIPTION, RFC4512_ORIGIN,
        new DITStructureRuleSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_DN_OID, SYNTAX_DN_DESCRIPTION,
        RFC4512_ORIGIN, new DistinguishedNameSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_DN_OID, SYNTAX_DN_DESCRIPTION, RFC4512_ORIGIN,
        new DistinguishedNameSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_ENHANCED_GUIDE_OID,
        SYNTAX_ENHANCED_GUIDE_DESCRIPTION, RFC4512_ORIGIN,
        new EnhancedGuideSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_FAXNUMBER_OID,
        SYNTAX_FAXNUMBER_DESCRIPTION, RFC4512_ORIGIN,
        new FacsimileNumberSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_FAX_OID, SYNTAX_FAX_DESCRIPTION,
        RFC4512_ORIGIN, new FaxSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_FAXNUMBER_OID, SYNTAX_FAXNUMBER_DESCRIPTION,
        RFC4512_ORIGIN, new FacsimileNumberSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_FAX_OID, SYNTAX_FAX_DESCRIPTION, RFC4512_ORIGIN,
        new FaxSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_GENERALIZED_TIME_OID,
        SYNTAX_GENERALIZED_TIME_DESCRIPTION, RFC4512_ORIGIN,
        new GeneralizedTimeSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_GUIDE_OID, SYNTAX_GUIDE_DESCRIPTION,
        RFC4512_ORIGIN, new GuideSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_IA5_STRING_OID,
        SYNTAX_IA5_STRING_DESCRIPTION, RFC4512_ORIGIN,
        new IA5StringSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_IA5_STRING_OID, SYNTAX_IA5_STRING_DESCRIPTION,
        RFC4512_ORIGIN, new IA5StringSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_INTEGER_OID, SYNTAX_INTEGER_DESCRIPTION,
        RFC4512_ORIGIN, new IntegerSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_JPEG_OID, SYNTAX_JPEG_DESCRIPTION,
        RFC4512_ORIGIN, new JPEGSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_JPEG_OID, SYNTAX_JPEG_DESCRIPTION, RFC4512_ORIGIN,
        new JPEGSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_MATCHING_RULE_OID,
        SYNTAX_MATCHING_RULE_DESCRIPTION, RFC4512_ORIGIN,
        new MatchingRuleSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_MATCHING_RULE_USE_OID,
        SYNTAX_MATCHING_RULE_USE_DESCRIPTION, RFC4512_ORIGIN,
        new MatchingRuleUseSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_LDAP_SYNTAX_OID,
        SYNTAX_LDAP_SYNTAX_DESCRIPTION, RFC4512_ORIGIN,
        new LDAPSyntaxDescriptionSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_LDAP_SYNTAX_OID, SYNTAX_LDAP_SYNTAX_DESCRIPTION,
        RFC4512_ORIGIN, new LDAPSyntaxDescriptionSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_NAME_AND_OPTIONAL_UID_OID,
        SYNTAX_NAME_AND_OPTIONAL_UID_DESCRIPTION, RFC4517_ORIGIN,
        new NameAndOptionalUIDSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_NAME_FORM_OID,
        SYNTAX_NAME_FORM_DESCRIPTION, RFC4512_ORIGIN,
        new NameFormSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_NAME_FORM_OID, SYNTAX_NAME_FORM_DESCRIPTION,
        RFC4512_ORIGIN, new NameFormSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_NUMERIC_STRING_OID,
        SYNTAX_NUMERIC_STRING_DESCRIPTION, RFC4512_ORIGIN,
        new NumericStringSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_OBJECTCLASS_OID,
        SYNTAX_OBJECTCLASS_DESCRIPTION, RFC4512_ORIGIN,
        new ObjectClassSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_OCTET_STRING_OID,
        SYNTAX_OCTET_STRING_DESCRIPTION, RFC4512_ORIGIN,
        new OctetStringSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_OID_OID, SYNTAX_OID_DESCRIPTION,
        RFC4512_ORIGIN, new OIDSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_OBJECTCLASS_OID, SYNTAX_OBJECTCLASS_DESCRIPTION,
        RFC4512_ORIGIN, new ObjectClassSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_OCTET_STRING_OID, SYNTAX_OCTET_STRING_DESCRIPTION,
        RFC4512_ORIGIN, new OctetStringSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_OID_OID, SYNTAX_OID_DESCRIPTION, RFC4512_ORIGIN,
        new OIDSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_OTHER_MAILBOX_OID,
        SYNTAX_OTHER_MAILBOX_DESCRIPTION, RFC4512_ORIGIN,
        new OtherMailboxSyntaxImpl(), false);
@@ -1135,9 +1070,8 @@
    builder.addSyntax(SYNTAX_SUPPORTED_ALGORITHM_OID,
        SYNTAX_SUPPORTED_ALGORITHM_DESCRIPTION, RFC4512_ORIGIN,
        new SupportedAlgorithmSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_TELEPHONE_OID,
        SYNTAX_TELEPHONE_DESCRIPTION, RFC4512_ORIGIN,
        new TelephoneNumberSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_TELEPHONE_OID, SYNTAX_TELEPHONE_DESCRIPTION,
        RFC4512_ORIGIN, new TelephoneNumberSyntaxImpl(), false);
    builder.addSyntax(SYNTAX_TELETEX_TERM_ID_OID,
        SYNTAX_TELETEX_TERM_ID_DESCRIPTION, RFC4512_ORIGIN,
        new TeletexTerminalIdentifierSyntaxImpl(), false);
@@ -1146,4 +1080,11 @@
    builder.addSyntax(SYNTAX_UTC_TIME_OID, SYNTAX_UTC_TIME_DESCRIPTION,
        RFC4512_ORIGIN, new UTCTimeSyntaxImpl(), false);
  }
  private CoreSchemaImpl()
  {
    // Prevent instantiation.
  }
}