Exemplo n.º 1
0
 public Collection<TransferCapability> getTransferCapabilities() {
   ArrayList<TransferCapability> tcs =
       new ArrayList<TransferCapability>(scuTCs.size() + scpTCs.size());
   tcs.addAll(scpTCs.values());
   tcs.addAll(scuTCs.values());
   return tcs;
 }
Exemplo n.º 2
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);
      }
    }
  }
Exemplo n.º 3
0
  private TransferCapability getTC(
      Map<String, TransferCapability> tcs, String asuid, AAssociateRQ rq) {
    TransferCapability tc = tcs.get(asuid);
    if (tc != null) return tc;

    CommonExtendedNegotiation commonExtNeg = rq.getCommonExtendedNegotiationFor(asuid);
    if (commonExtNeg != null) {
      for (String cuid : commonExtNeg.getRelatedGeneralSOPClassUIDs()) {
        tc = tcs.get(cuid);
        if (tc != null) return tc;
      }
      tc = tcs.get(commonExtNeg.getServiceClassUID());
      if (tc != null) return tc;
    }

    return tcs.get("*");
  }
Exemplo n.º 4
0
 private void reconfigureTransferCapabilities(ApplicationEntity src) {
   scuTCs.clear();
   scuTCs.putAll(src.scuTCs);
   scpTCs.clear();
   scpTCs.putAll(src.scpTCs);
 }