Interface RetrieveResponseGenerator


public interface RetrieveResponseGenerator

This interface abstracts the communication between a retrieve (C-MOVE) server that implements the network service, and the source of information with which to respond to the retrieve request.

Typically, the server which has been supplied a factor to generate instances of a class that implements this interface, calls the methods with the following pattern:

        ... receive C-MOVE request from the network into AttributeList identifier ...
        RetrieveResponseGenerator retrieveResponseGenerator = retrieveResponseGeneratorFactory.newInstance();
        retrieveResponseGenerator.performRetrieve(affectedSOPClassUID,identifier,false);
        SetOfDicomFiles dicomFiles = retrieveResponseGenerator.getDicomFiles();
        int status = retrieveResponseGenerator.getStatus();
        AttributeTagAttribute badElement = retrieveResponseGenerator.getOffendingElement();
        retrieveResponseGenerator.close();
        ... send C-MOVE response ...
See Also:
  • Method Details

    • performRetrieve

      void performRetrieve(String retrieveSOPClassUID, AttributeList requestIdentifier, boolean relational)

      Perform the retrieve whose results will be returned by the getDicomFiles() method.

      Parameters:
      retrieveSOPClassUID - defines the information model to use (e.g., study root, patient root)
      requestIdentifier - the request itself, as received in the C-MOVE dataset
      relational - whether or not to perform relational queries (as determined by extended negotiation)
    • getDicomFiles

      SetOfDicomFiles getDicomFiles()

      Get the list of files that satisfy the entire retrieval request.

      Returns:
      the list of files to be retrieved
    • getStatus

      int getStatus()

      Get a status suitable for the C-MOVE response.

      Returns:
      the retrieve status
    • getOffendingElement

      AttributeTagAttribute getOffendingElement()

      Get the offending element in the case of an error status.

      Returns:
      the offending element
    • getErrorComment

      String getErrorComment()

      Get any error comment in the case of an error status.

      Returns:
      the error comment, or null if none
    • close

      void close()

      Clean up after the retrieval has completed.

      Typically, will discarded cached information, close any database connections, etc.