private static Attributes storeTo(RejectionNote ac, BasicAttributes attrs) {
   attrs.put("objectclass", "dcmRejectionNote");
   storeNotNull(attrs, "dcmCodeValue", ac.getCodeValue());
   storeNotNull(attrs, "dcmCodingSchemeDesignator", ac.getCodingSchemeDesignator());
   storeNotNull(attrs, "dcmCodingSchemeVersion", ac.getCodingSchemeVersion());
   storeNotNull(attrs, "dcmCodeMeaning", ac.getCodeMeaning());
   storeNotEmpty(attrs, "dcmRejectionAction", ac.getActions().toArray());
   return attrs;
 }
 private static String dnOf(RejectionNote rn, String parentDN) {
   StringBuilder sb = new StringBuilder();
   sb.append("dcmCodeValue=").append(rn.getCodeValue());
   sb.append("+dcmCodingSchemeDesignator=").append(rn.getCodingSchemeDesignator());
   if (rn.getCodingSchemeVersion() != null)
     sb.append("+dcmCodingSchemeVersion=").append(rn.getCodingSchemeVersion());
   sb.append(',').append(parentDN);
   return sb.toString();
 }