final private String matchRuleDef2MatchRuleDesc(Attributes attrs) throws NamingException {
  StringBuffer matchRuleDesc=new StringBuffer("( ");
  Attribute attr=null;
  int count=0;
  attr=attrs.get(NUMERICOID_ID);
  if (attr != null) {
    matchRuleDesc.append(writeNumericOID(attr));
    count++;
  }
 else {
    throw new ConfigurationException("Attribute type doesn't" + "have a numeric OID");
  }
  attr=attrs.get(NAME_ID);
  if (attr != null) {
    matchRuleDesc.append(writeQDescrs(attr));
    count++;
  }
  attr=attrs.get(DESC_ID);
  if (attr != null) {
    matchRuleDesc.append(writeQDString(attr));
    count++;
  }
  attr=attrs.get(OBSOLETE_ID);
  if (attr != null) {
    matchRuleDesc.append(writeBoolean(attr));
    count++;
  }
  attr=attrs.get(SYNTAX_ID);
  if (attr != null) {
    matchRuleDesc.append(writeWOID(attr));
    count++;
  }
 else {
    throw new ConfigurationException("Attribute type doesn't" + "have a syntax OID");
  }
  if (count < attrs.size()) {
    String attrId=null;
    for (NamingEnumeration<? extends Attribute> ae=attrs.getAll(); ae.hasMoreElements(); ) {
      attr=ae.next();
      attrId=attr.getID();
      if (attrId.equals(NUMERICOID_ID) || attrId.equals(NAME_ID) || attrId.equals(SYNTAX_ID)|| attrId.equals(DESC_ID)|| attrId.equals(OBSOLETE_ID)) {
        continue;
      }
 else {
        matchRuleDesc.append(writeQDStrings(attr));
      }
    }
  }
  matchRuleDesc.append(")");
  return matchRuleDesc.toString();
}

final private String matchRuleDef2MatchRuleDesc ( Attributes attrs ) throws NamingException { StringBuffer matchRuleDesc = new StringBuffer ( "( " ) ; Attribute attr = null ; int count = 0 ; attr = attrs . get ( NUMERICOID_ID ) ; if ( attr != null ) { matchRuleDesc . append ( writeNumericOID ( attr ) ) ; count ++ ; } else { throw new ConfigurationException ( "Attribute type doesn't" + "have a numeric OID" ) ; } attr = attrs . get ( NAME_ID ) ; if ( attr != null ) { matchRuleDesc . append ( writeQDescrs ( attr ) ) ; count ++ ; } attr = attrs . get ( DESC_ID ) ; if ( attr != null ) { matchRuleDesc . append ( writeQDString ( attr ) ) ; count ++ ; } attr = attrs . get ( OBSOLETE_ID ) ; if ( attr != null ) { matchRuleDesc . append ( writeBoolean ( attr ) ) ; count ++ ; } attr = attrs . get ( SYNTAX_ID ) ; if ( attr != null ) { matchRuleDesc . append ( writeWOID ( attr ) ) ; count ++ ; } else { throw new ConfigurationException ( "Attribute type doesn't" + "have a syntax OID" ) ; } if ( count < attrs . size ( ) ) { String attrId = null ; for ( NamingEnumeration < ? extends Attribute > ae = attrs . getAll ( ) ; ae . hasMoreElements ( ) ; ) { attr = ae . next ( ) ; attrId = attr . getID ( ) ; if ( attrId . equals ( NUMERICOID_ID ) || attrId . equals ( NAME_ID ) || attrId . equals ( SYNTAX_ID ) || attrId . equals ( DESC_ID ) || attrId . equals ( OBSOLETE_ID ) ) { continue ; } else { matchRuleDesc . append ( writeQDStrings ( attr ) ) ; } } } matchRuleDesc . append ( ")" ) ; return matchRuleDesc . toString ( ) ; }
translate attributes that describe an attribute matching rule definition into the string description as defined in rfc 2252 .
