Esempio n. 1
0
 protected void setApplicationEntityAttributes(ApplicationEntity from) {
   setOlockHash(from.olockHash);
   setDescription(from.description);
   setAETitleAliases(from.getAETitleAliases());
   setVendorData(from.vendorData);
   setApplicationClusters(from.applicationClusters);
   setPreferredCalledAETitles(from.preferredCalledAETitles);
   setPreferredCallingAETitles(from.preferredCallingAETitles);
   setAcceptedCallingAETitles(from.getAcceptedCallingAETitles());
   setSupportedCharacterSets(from.supportedCharacterSets);
   setAssociationAcceptor(from.associationAcceptor);
   setAssociationInitiator(from.associationInitiator);
   setAeInstalled(from.aeInstalled);
   setUuid(from.getUuid());
 }
  private static ApplicationEntity createAE(
      String aet,
      String description,
      Connection dicom,
      Connection dicomTLS,
      QueryRetrieveView qrView,
      boolean storeSCP,
      boolean storeSCU) {
    ApplicationEntity ae = new ApplicationEntity(aet);
    ae.setDescription(description);
    ae.addConnection(dicom);
    if (dicomTLS != null) ae.addConnection(dicomTLS);

    ArchiveAEExtension aeExt = new ArchiveAEExtension();
    ae.addAEExtension(aeExt);
    ae.setAssociationAcceptor(true);
    ae.setAssociationInitiator(true);
    addTC(ae, null, SCP, UID.VerificationSOPClass, UID.ImplicitVRLittleEndian);
    addTC(ae, null, SCU, UID.VerificationSOPClass, UID.ImplicitVRLittleEndian);
    addTCs(ae, EnumSet.allOf(QueryOption.class), SCP, QUERY_CUIDS, UID.ImplicitVRLittleEndian);
    if (storeSCU) {
      addTCs(
          ae, EnumSet.of(QueryOption.RELATIONAL), SCP, RETRIEVE_CUIDS, UID.ImplicitVRLittleEndian);
      for (int i = 0; i < CUIDS_TSUIDS.length; i++, i++)
        addTCs(ae, null, SCU, CUIDS_TSUIDS[i], CUIDS_TSUIDS[i + 1]);
    }
    if (storeSCP) {
      for (int i = 0; i < CUIDS_TSUIDS.length; i++, i++)
        addTCs(ae, null, SCP, CUIDS_TSUIDS[i], CUIDS_TSUIDS[i + 1]);
      addTC(ae, null, SCP, UID.StorageCommitmentPushModelSOPClass, UID.ImplicitVRLittleEndian);
      addTC(ae, null, SCP, UID.ModalityPerformedProcedureStepSOPClass, UID.ImplicitVRLittleEndian);
      addTC(ae, null, SCU, UID.ModalityPerformedProcedureStepSOPClass, UID.ImplicitVRLittleEndian);
    }
    aeExt.setQueryRetrieveViewID(qrView.getViewID());
    return ae;
  }