public interface QueryResponseGenerator
This interface abstracts the communication between a query (C-FIND) server that implements the network service, and the source of information with which to respond to the query.
Typically, the server, which has been supplied a factory to generate instances of a class that implements this interface, calls the methods with the following pattern:
... receive C-FIND request from the network into AttributeList identifier ... QueryResponseGenerator queryResponseGenerator = queryResponseGeneratorFactory.newInstance(); queryResponseGenerator.performQuery(affectedSOPClassUID,identifier,false); AttributeList responseIdentifierList; while ((responseIdentifierList = queryResponseGenerator.next()) != null) { ... send response in responseIdentifierList over the network ... } queryResponseGenerator.close();
QueryResponseGeneratorFactory
Modifier and Type | Method and Description |
---|---|
boolean |
allOptionalKeysSuppliedWereSupported()
Determine information needed to qualify pending response statuses.
|
void |
close()
Clean up after the query has completed.
|
java.lang.String |
getErrorComment()
Get any error comment in the case of an error status.
|
AttributeTagAttribute |
getOffendingElement()
Get the offending element in the case of an error status.
|
int |
getStatus()
Get a status suitable for the C-FIND response.
|
AttributeList |
next()
Get the next query response.
|
void |
performQuery(java.lang.String querySOPClassUID,
AttributeList queryIdentifier,
boolean relational)
Perform the query whose results will be returned by the next() method.
|
boolean allOptionalKeysSuppliedWereSupported()
Determine information needed to qualify pending response statuses.
void close()
Clean up after the query has completed.
Typically, will discarded cached information, close any database connections, etc.
java.lang.String getErrorComment()
Get any error comment in the case of an error status.
AttributeTagAttribute getOffendingElement()
Get the offending element in the case of an error status.
int getStatus()
Get a status suitable for the C-FIND response.
AttributeList next()
Get the next query response.
void performQuery(java.lang.String querySOPClassUID, AttributeList queryIdentifier, boolean relational)
Perform the query whose results will be returned by the next() method.
Whether or not the query is actually performed during this call, or the parameters cached and perform on the first next() call, or indeed next() represents a dynamic query, is unspecified and up to the implementor of the interface.
querySOPClassUID
- defines the information model to use (e.g., study root, patient root)queryIdentifier
- the query itself, as received in the C-FIND datasetrelational
- whether or not to perform relational queries (as determined by extended negotiation)