@Override
 protected void loadFrom(HL7Application hl7App, Attributes attrs) throws NamingException {
   super.loadFrom(hl7App, attrs);
   if (!(hl7App instanceof ArchiveHL7Application)) return;
   ArchiveHL7Application arcHL7App = (ArchiveHL7Application) hl7App;
   arcHL7App.setTemplatesURIs(stringArray(attrs.get("labeledURI")));
 }
 @Override
 protected void loadFrom(Device device, Attributes attrs)
     throws NamingException, CertificateException {
   super.loadFrom(device, attrs);
   if (!(device instanceof ArchiveDevice)) return;
   ArchiveDevice arcdev = (ArchiveDevice) device;
   arcdev.setFuzzyAlgorithmClass(stringValue(attrs.get("dcmFuzzyAlgorithmClass")));
   arcdev.setConfigurationStaleTimeout(intValue(attrs.get("dcmConfigurationStaleTimeout"), 0));
 }
 @Override
 protected void loadFrom(ApplicationEntity ae, Attributes attrs) throws NamingException {
   super.loadFrom(ae, attrs);
   if (!(ae instanceof ArchiveApplicationEntity)) return;
   ArchiveApplicationEntity arcae = (ArchiveApplicationEntity) ae;
   arcae.setFileSystemGroupID(stringValue(attrs.get("dcmFileSystemGroupID")));
   arcae.setSpoolFilePathFormat(attributesFormat(attrs.get("dcmSpoolFilePathFormat")));
   arcae.setStorageFilePathFormat(attributesFormat(attrs.get("dcmStorageFilePathFormat")));
   arcae.setDigestAlgorithm(stringValue(attrs.get("dcmDigestAlgorithm")));
   arcae.setExternalRetrieveAET(stringValue(attrs.get("dcmExternalRetrieveAET")));
   arcae.setRetrieveAETs(stringArray(attrs.get("dcmRetrieveAET")));
   arcae.setMatchUnknown(booleanValue(attrs.get("dcmMatchUnknown"), false));
   arcae.setSendPendingCGet(booleanValue(attrs.get("dcmSendPendingCGet"), false));
   arcae.setSendPendingCMoveInterval(intValue(attrs.get("dcmSendPendingCMoveInterval"), 0));
   arcae.setSuppressWarningCoercionOfDataElements(
       booleanValue(attrs.get("dcmSuppressWarningCoercionOfDataElements"), false));
   arcae.setStoreOriginalAttributes(booleanValue(attrs.get("dcmStoreOriginalAttributes"), false));
   arcae.setPreserveSpoolFileOnFailure(
       booleanValue(attrs.get("dcmPreserveSpoolFileOnFailure"), false));
   arcae.setModifyingSystem(stringValue(attrs.get("dcmModifyingSystem")));
   arcae.setStorageCommitmentDelay(intValue(attrs.get("dcmStgCmtDelay"), 0));
   arcae.setStorageCommitmentMaxRetries(intValue(attrs.get("dcmStgCmtMaxRetries"), 0));
   arcae.setStorageCommitmentRetryInterval(
       intValue(attrs.get("dcmStgCmtRetryInterval"), ArchiveApplicationEntity.DEF_RETRY_INTERVAL));
   arcae.setForwardMPPSDestinations(stringArray(attrs.get("dcmFwdMppsDestination")));
   arcae.setForwardMPPSMaxRetries(intValue(attrs.get("dcmFwdMppsMaxRetries"), 0));
   arcae.setForwardMPPSRetryInterval(
       intValue(
           attrs.get("dcmFwdMppsRetryInterval"), ArchiveApplicationEntity.DEF_RETRY_INTERVAL));
   arcae.setIANDestinations(stringArray(attrs.get("dcmIanDestination")));
   arcae.setIANMaxRetries(intValue(attrs.get("dcmIanMaxRetries"), 0));
   arcae.setIANRetryInterval(
       intValue(attrs.get("dcmIanRetryInterval"), ArchiveApplicationEntity.DEF_RETRY_INTERVAL));
   arcae.setShowEmptySeries(booleanValue(attrs.get("dcmShowEmptySeries"), false));
   arcae.setShowEmptyStudy(booleanValue(attrs.get("dcmShowEmptyStudy"), false));
   arcae.setReturnOtherPatientIDs(booleanValue(attrs.get("dcmReturnOtherPatientIDs"), false));
   arcae.setReturnOtherPatientNames(booleanValue(attrs.get("dcmReturnOtherPatientNames"), false));
   arcae.setLocalPIXConsumerApplication(stringValue(attrs.get("hl7PIXConsumerApplication")));
   arcae.setRemotePIXManagerApplication(stringValue(attrs.get("hl7PIXManagerApplication")));
 }