@Override
 protected Attributes storeTo(Connection conn, Attributes attrs) {
   super.storeTo(conn, attrs);
   storeNotNull(attrs, "dcmProtocol", StringUtils.nullify(conn.getProtocol(), Protocol.DICOM));
   storeNotNull(attrs, "dcmHTTPProxy", conn.getHttpProxy());
   storeNotEmpty(attrs, "dcmBlacklistedHostname", conn.getBlacklist());
   storeNotDef(attrs, "dcmTCPBacklog", conn.getBacklog(), Connection.DEF_BACKLOG);
   storeNotDef(attrs, "dcmTCPConnectTimeout", conn.getConnectTimeout(), Connection.NO_TIMEOUT);
   storeNotDef(attrs, "dcmAARQTimeout", conn.getRequestTimeout(), Connection.NO_TIMEOUT);
   storeNotDef(attrs, "dcmAAACTimeout", conn.getAcceptTimeout(), Connection.NO_TIMEOUT);
   storeNotDef(attrs, "dcmARRPTimeout", conn.getReleaseTimeout(), Connection.NO_TIMEOUT);
   storeNotDef(attrs, "dcmResponseTimeout", conn.getResponseTimeout(), Connection.NO_TIMEOUT);
   storeNotDef(attrs, "dcmRetrieveTimeout", conn.getRetrieveTimeout(), Connection.NO_TIMEOUT);
   storeNotDef(attrs, "dcmIdleTimeout", conn.getIdleTimeout(), Connection.NO_TIMEOUT);
   storeNotDef(attrs, "dcmTCPCloseDelay", conn.getSocketCloseDelay(), Connection.DEF_SOCKETDELAY);
   storeNotDef(attrs, "dcmTCPSendBufferSize", conn.getSendBufferSize(), Connection.DEF_BUFFERSIZE);
   storeNotDef(
       attrs, "dcmTCPReceiveBufferSize", conn.getReceiveBufferSize(), Connection.DEF_BUFFERSIZE);
   storeNotDef(attrs, "dcmTCPNoDelay", conn.isTcpNoDelay(), true);
   storeNotDef(attrs, "dcmSendPDULength", conn.getSendPDULength(), Connection.DEF_MAX_PDU_LENGTH);
   storeNotDef(
       attrs, "dcmReceivePDULength", conn.getReceivePDULength(), Connection.DEF_MAX_PDU_LENGTH);
   storeNotDef(
       attrs, "dcmMaxOpsPerformed", conn.getMaxOpsPerformed(), Connection.SYNCHRONOUS_MODE);
   storeNotDef(attrs, "dcmMaxOpsInvoked", conn.getMaxOpsInvoked(), Connection.SYNCHRONOUS_MODE);
   storeNotDef(attrs, "dcmPackPDV", conn.isPackPDV(), true);
   if (conn.isTls()) {
     storeNotEmpty(attrs, "dcmTLSProtocol", conn.getTlsProtocols());
     storeNotDef(attrs, "dcmTLSNeedClientAuth", conn.isTlsNeedClientAuth(), true);
   }
   return attrs;
 }
 @Override
 protected Attributes storeTo(Device device, Attributes attrs) {
   super.storeTo(device, attrs);
   storeNotDef(attrs, "dcmLimitOpenAssociations", device.getLimitOpenAssociations(), 0);
   storeNotNull(attrs, "dcmTrustStoreURL", device.getTrustStoreURL());
   storeNotNull(attrs, "dcmTrustStoreType", device.getTrustStoreType());
   storeNotNull(attrs, "dcmTrustStorePin", device.getTrustStorePin());
   storeNotNull(attrs, "dcmTrustStorePinProperty", device.getTrustStorePinProperty());
   storeNotNull(attrs, "dcmKeyStoreURL", device.getKeyStoreURL());
   storeNotNull(attrs, "dcmKeyStoreType", device.getKeyStoreType());
   storeNotNull(attrs, "dcmKeyStorePin", device.getKeyStorePin());
   storeNotNull(attrs, "dcmKeyStorePinProperty", device.getKeyStorePinProperty());
   storeNotNull(attrs, "dcmKeyStoreKeyPin", device.getKeyStoreKeyPin());
   storeNotNull(attrs, "dcmKeyStoreKeyPinProperty", device.getKeyStoreKeyPinProperty());
   return attrs;
 }
  @Override
  protected Attributes storeTo(TransferCapability tc, Attributes attrs) {
    super.storeTo(tc, attrs);

    EnumSet<QueryOption> queryOpts = tc.getQueryOptions();
    if (queryOpts != null) {
      storeNotDef(attrs, "dcmRelationalQueries", queryOpts.contains(QueryOption.RELATIONAL), false);
      storeNotDef(
          attrs, "dcmCombinedDateTimeMatching", queryOpts.contains(QueryOption.DATETIME), false);
      storeNotDef(attrs, "dcmFuzzySemanticMatching", queryOpts.contains(QueryOption.FUZZY), false);
      storeNotDef(
          attrs, "dcmTimezoneQueryAdjustment", queryOpts.contains(QueryOption.TIMEZONE), false);
    }
    StorageOptions storageOpts = tc.getStorageOptions();
    if (storageOpts != null) {
      storeInt(attrs, "dcmStorageConformance", storageOpts.getLevelOfSupport().ordinal());
      storeInt(
          attrs, "dcmDigitalSignatureSupport", storageOpts.getDigitalSignatureSupport().ordinal());
      storeInt(attrs, "dcmDataElementCoercion", storageOpts.getElementCoercion().ordinal());
    }
    return attrs;
  }
 @Override
 protected Attributes storeTo(ApplicationEntity ae, String deviceDN, Attributes attrs) {
   super.storeTo(ae, deviceDN, attrs);
   storeNotEmpty(attrs, "dcmAcceptedCallingAETitle", ae.getAcceptedCallingAETitles());
   return attrs;
 }