private static DicomServiceException identifierDoesNotMatchSOPClass(String comment, int tag) { return new DicomServiceException(Status.IdentifierDoesNotMatchSOPClass, comment) .setOffendingElements(tag); } }
private void wrappedFindNextInstance() throws DicomServiceException { try { findNextInstance(); } catch (IOException e) { throw new DicomServiceException(Status.UnableToProcess, e); } }
public static void mayNoLongerBeUpdated() throws DicomServiceException { throw new DicomServiceException(Status.ProcessingFailure, "Performed Procedure Step Object may no longer be updated") .setErrorID(0xA710); }
private static DicomServiceException identifierDoesNotMatchSOPClass(String comment, int tag) { return new DicomServiceException(Status.IdentifierDoesNotMatchSOPClass, comment) .setOffendingElements(tag); } }
private void wrappedFindNextSeries() throws DicomServiceException { try { findNextSeries(); } catch (IOException e) { throw new DicomServiceException(Status.UnableToProcess, e); } }
private void wrappedFindNextInstance() throws DicomServiceException { try { findNextInstance(); } catch (IOException e) { throw new DicomServiceException(Status.UnableToProcess, e); } }
private void wrappedFindNextSeries() throws DicomServiceException { try { findNextSeries(); } catch (IOException e) { throw new DicomServiceException(Status.UnableToProcess, e); } }
private void wrappedFindNextPatient() throws DicomServiceException { try { findNextPatient(); } catch (IOException e) { throw new DicomServiceException(Status.UnableToProcess, e); } }
private void wrappedFindNextStudy() throws DicomServiceException { try { findNextStudy(); } catch (IOException e) { throw new DicomServiceException(Status.UnableToProcess, e); } }
private void wrappedFindNextPatient() throws DicomServiceException { try { findNextPatient(); } catch (IOException e) { throw new DicomServiceException(Status.UnableToProcess, e); } }
@Override public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse, Attributes cmd, Attributes data) throws IOException { if (dimse != Dimse.C_ECHO_RQ) throw new DicomServiceException(Status.UnrecognizedOperation); as.tryWriteDimseRSP(pc, Commands.mkEchoRSP(cmd, Status.Success)); }
@Override public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse, Attributes cmd, Attributes data) throws IOException { if (dimse != Dimse.N_CREATE_RQ) throw new DicomServiceException(Status.UnrecognizedOperation); Attributes rsp = Commands.mkNCreateRSP(cmd, status); Attributes rspAttrs = IanSCP.this.create(as, cmd, data); as.tryWriteDimseRSP(pc, rsp, rspAttrs); } };
private Association openStoreAssociation(Association as, Connection remote, AAssociateRQ aarq) throws DicomServiceException { try { return as.getApplicationEntity().connect( as.getConnection(), remote, aarq); } catch (Exception e) { throw new DicomServiceException(Status.UnableToPerformSubOperations, e); } }
@Override public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse, Attributes rq, PDVInputStream data) throws IOException { if (dimse != Dimse.C_STORE_RQ) throw new DicomServiceException(Status.UnrecognizedOperation); Attributes rsp = Commands.mkCStoreRSP(rq, Status.Success); store(as, pc, rq, data, rsp); as.tryWriteDimseRSP(pc, rsp); }
private static void check(ValidationResult result) throws DicomServiceException { if (!result.isValid()) throw new DicomServiceException( Status.IdentifierDoesNotMatchSOPClass, result.getErrorComment()) .setOffendingElements(result.getOffendingElements()); } }
@Override public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse, Attributes rq, Attributes keys) throws IOException { if (dimse != Dimse.C_FIND_RQ) throw new DicomServiceException(Status.UnrecognizedOperation); QueryTask queryTask = calculateMatches(as, pc, rq, keys); as.getApplicationEntity().getDevice().execute(queryTask); }
private static void check(ValidationResult result) throws DicomServiceException { if (!result.isValid()) throw new DicomServiceException( Status.IdentifierDoesNotMatchSOPClass, result.getErrorComment()) .setOffendingElements(result.getOffendingElements()); } }
@Override public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse, Attributes cmd, Attributes keys) throws IOException { if (dimse != Dimse.C_MOVE_RQ) throw new DicomServiceException(Status.UnrecognizedOperation); RetrieveTask retrieveTask = calculateMatches(as, pc, cmd, keys); if (retrieveTask != null) as.getApplicationEntity().getDevice().execute(retrieveTask); else as.tryWriteDimseRSP(pc, Commands.mkCMoveRSP(cmd, Status.Success)); }
@Override public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse, Attributes cmd, Attributes keys) throws IOException { if (dimse != Dimse.C_GET_RQ) throw new DicomServiceException(Status.UnrecognizedOperation); RetrieveTask retrieveTask = calculateMatches(as, pc, cmd, keys); if (retrieveTask != null) as.getApplicationEntity().getDevice().execute(retrieveTask); else as.tryWriteDimseRSP(pc, Commands.mkCGetRSP(cmd, Status.Success)); }
@Override public void onDimseRQ(Association as, PresentationContext pc, Dimse dimse, Attributes cmd, Attributes keys) throws IOException { if (dimse != Dimse.C_GET_RQ) throw new DicomServiceException(Status.UnrecognizedOperation); RetrieveTask retrieveTask = calculateMatches(as, pc, cmd, keys); if (retrieveTask != null) as.getApplicationEntity().getDevice().execute(retrieveTask); else as.tryWriteDimseRSP(pc, Commands.mkCGetRSP(cmd, Status.Success)); }