Пример #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 boolean supportsTransferCapability(
      TransferCapability transferCapability, boolean onlyAbstractSyntax) {
    TransferCapability matchingTC =
        this.getTransferCapabilityFor(
            transferCapability.getSopClass(), transferCapability.getRole());
    if (matchingTC == null) return false;
    else
      for (String ts : transferCapability.getTransferSyntaxes())
        if (!matchingTC.containsTransferSyntax(ts) && !onlyAbstractSyntax) return false;

    return true;
  }
Пример #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);
      }
    }
  }