use of org.apache.directory.api.ldap.model.schema.normalizers.OidNormalizer in project directory-ldap-api by apache.
the class SearchRequestSubstringTest method setUp.
@BeforeClass
public static void setUp() throws Exception {
// DC normalizer
OidNormalizer dcOidNormalizer = new OidNormalizer("dc", new DeepTrimToLowerNormalizer(SchemaConstants.DOMAIN_COMPONENT_AT_OID));
oids.put("dc", dcOidNormalizer);
oids.put("domaincomponent", dcOidNormalizer);
oids.put("0.9.2342.19200300.100.1.25", dcOidNormalizer);
// OU normalizer
OidNormalizer ouOidNormalizer = new OidNormalizer("ou", new DeepTrimToLowerNormalizer(SchemaConstants.OU_AT_OID));
oids.put("ou", ouOidNormalizer);
oids.put("organizationalUnitName", ouOidNormalizer);
oids.put("2.5.4.11", ouOidNormalizer);
// ObjectClass normalizer
OidNormalizer objectClassOidNormalizer = new OidNormalizer("objectClass", new DeepTrimToLowerNormalizer(SchemaConstants.OBJECT_CLASS_AT_OID));
oids.put("objectclass", objectClassOidNormalizer);
oids.put("2.5.4.0", objectClassOidNormalizer);
}
use of org.apache.directory.api.ldap.model.schema.normalizers.OidNormalizer in project directory-ldap-api by apache.
the class SearchRequestTest method setUp.
@Before
public void setUp() throws Exception {
// DC normalizer
OidNormalizer dcOidNormalizer = new OidNormalizer("dc", new DeepTrimToLowerNormalizer(SchemaConstants.DOMAIN_COMPONENT_AT_OID));
oids.put("dc", dcOidNormalizer);
oids.put("domaincomponent", dcOidNormalizer);
oids.put("0.9.2342.19200300.100.1.25", dcOidNormalizer);
// OU normalizer
OidNormalizer ouOidNormalizer = new OidNormalizer("ou", new DeepTrimToLowerNormalizer(SchemaConstants.OU_AT_OID));
oids.put("ou", ouOidNormalizer);
oids.put("organizationalUnitName", ouOidNormalizer);
oids.put("2.5.4.11", ouOidNormalizer);
// ObjectClass normalizer
OidNormalizer objectClassOidNormalizer = new OidNormalizer("objectClass", new DeepTrimToLowerNormalizer(SchemaConstants.OBJECT_CLASS_AT_OID));
oids.put("objectclass", objectClassOidNormalizer);
oids.put("2.5.4.0", objectClassOidNormalizer);
}
use of org.apache.directory.api.ldap.model.schema.normalizers.OidNormalizer in project directory-ldap-api by apache.
the class SearchRequestMatchingRuleAssertionTest method setUp.
@BeforeClass
public static void setUp() throws Exception {
// DC normalizer
OidNormalizer dcOidNormalizer = new OidNormalizer("dc", new DeepTrimToLowerNormalizer(SchemaConstants.DOMAIN_COMPONENT_AT_OID));
oids.put("dc", dcOidNormalizer);
oids.put("domaincomponent", dcOidNormalizer);
oids.put("0.9.2342.19200300.100.1.25", dcOidNormalizer);
// OU normalizer
OidNormalizer ouOidNormalizer = new OidNormalizer("ou", new DeepTrimToLowerNormalizer(SchemaConstants.OU_AT_OID));
oids.put("ou", ouOidNormalizer);
oids.put("organizationalUnitName", ouOidNormalizer);
oids.put("2.5.4.11", ouOidNormalizer);
// ObjectClass normalizer
OidNormalizer objectClassOidNormalizer = new OidNormalizer("objectClass", new DeepTrimToLowerNormalizer(SchemaConstants.OBJECT_CLASS_AT_OID));
oids.put("objectclass", objectClassOidNormalizer);
oids.put("2.5.4.0", objectClassOidNormalizer);
}
use of org.apache.directory.api.ldap.model.schema.normalizers.OidNormalizer in project directory-ldap-api by apache.
the class DefaultAttributeTypeRegistry method addMappingFor.
/**
* {@inheritDoc}
*/
@Override
public void addMappingFor(AttributeType attributeType) throws LdapException {
MatchingRule equality = attributeType.getEquality();
OidNormalizer oidNormalizer;
String oid = attributeType.getOid();
if (equality == null) {
LOG.debug("Attribute {} does not have an EQUALITY MatchingRule : using NoopNormalizer", attributeType.getName());
oidNormalizer = new OidNormalizer(oid, new NoOpNormalizer(attributeType.getOid()));
} else {
oidNormalizer = new OidNormalizer(oid, equality.getNormalizer());
}
oidNormalizerMap.put(oid, oidNormalizer);
// Also inject the attributeType's short names in the map
for (String name : attributeType.getNames()) {
oidNormalizerMap.put(Strings.toLowerCaseAscii(name), oidNormalizer);
}
}
Aggregations