h2. Ava *AVA* stands for _AttributeTypeAndValue_. It describes a container holding an *[AttributeType (...)]* associated with a *[DIRAPI:Value]* in a *[Rdn]*. An example would be : {code} dc=example {code} where 'dc' is the [AttributeType (...)] and 'example' the associated value. A user is not likely to manipulate such a class. *AVA* is a final class, it can be schema aware. It's also a _Externalizable_ class. h3. Usage As for the *[Dn]* and *[Rdn]* classes, we have to hold two representation for the interned *[AttributeType (...)]* and Value : the User Provided form, and the normalized form. If the *AVA* is schema aware, we will use the AttributeType's *[Oid]* as the normalized form for the *[AttributeType (...)]*, and the value will be normalized accordingly to the equality matching rule the *[AttributeType (...)]* defines, if any. Let's see some examples. *{+}Schema Aware :+* Here we will create an *{+}AVA{+}* and check that the user provided values are preserved. The _getUpName()_ and _getString()_ methods will give back this user provided form. {code} public void testAvaSimpleNorm() throws LdapException { Ava atav = new Ava( schemaManager, " CommonName ", " This is a TEST " ); assertEquals( " CommonName = This is a TEST ", atav.toString() ); assertEquals( "2.5.4.3=this is a test", atav.getNormName() ); assertEquals( " CommonName = This is a TEST ", atav.getUpName() ); } {code} Note that the normalized value has transformed the *[AttributeType (...)]* and now uses its *[Oid]*, and the value has been lower cased and the superfluous spaces have been removed, as dictated by the _CaseIgnoreMatch_ *[MatchingRule (e)]* *{+}Not Schema Aware{+}* The biggest difference in this case is that the *[AttributeType (...)]* will not be replaced by its *[Oid]*, but instead by a lower cased form of the provided ID. We also escape the leading and trailing spaces in the value. {code} public void testAvaSimpleNorm() throws LdapException { Ava atav = new Ava( null, " CommonName ", " This is a TEST " ); assertEquals( " CommonName = This is a TEST ", atav.toString() ); assertEquals( "commonname=\\ This is a TEST\\ ", atav.getNormName() ); assertEquals( " CommonName = This is a TEST ", atav.getUpName() ); } {code}