}
// APPROXMATCH, EQUALITYMATCH, GREATEROREQUALS & LESSOREQUAL FILTERS
else if ( filter instanceof AttributeValueAssertionFilter )
{
AttributeValueAssertionFilter avaFilter = ( AttributeValueAssertionFilter ) filter;
Element newElement = null;
int filterType = avaFilter.getFilterType();
if ( filterType == LdapConstants.APPROX_MATCH_FILTER )
{
newElement = element.addElement( "approxMatch" );
}
else if ( filterType == LdapConstants.EQUALITY_MATCH_FILTER )
{
newElement = element.addElement( "equalityMatch" );
}
else if ( filterType == LdapConstants.GREATER_OR_EQUAL_FILTER )
{
newElement = element.addElement( "greaterOrEqual" );
}
else if ( filterType == LdapConstants.LESS_OR_EQUAL_FILTER )
{
newElement = element.addElement( "lessOrEqual" );
}
AttributeValueAssertion assertion = avaFilter.getAssertion();
if ( assertion != null )
{
newElement.addAttribute( "name", assertion.getAttributeDesc() );
Object value = assertion.getAssertionValue();