示例#1
0
 public TransferCapability addTransferCapability(TransferCapability tc) {
   tc.setApplicationEntity(this);
   TransferCapability prev =
       (tc.getRole() == TransferCapability.Role.SCU ? scuTCs : scpTCs).put(tc.getSopClass(), tc);
   if (prev != null && prev != tc) prev.setApplicationEntity(null);
   return prev;
 }
示例#2
0
 public TransferCapability removeTransferCapabilityFor(
     String sopClass, TransferCapability.Role role) {
   TransferCapability tc =
       (role == TransferCapability.Role.SCU ? scuTCs : scpTCs).remove(sopClass);
   if (tc != null) tc.setApplicationEntity(null);
   return tc;
 }
示例#3
0
  public void setTransferCapabilities(Collection<TransferCapability> transferCapabilities) {
    scpTCs.clear();
    scuTCs.clear();

    for (TransferCapability tc : transferCapabilities) {
      tc.setApplicationEntity(this);
      switch (tc.getRole()) {
        case SCP:
          scpTCs.put(tc.getSopClass(), tc);
          break;
        case SCU:
          scuTCs.put(tc.getSopClass(), tc);
      }
    }
  }