protected RetrieveTask calculateMatches(Association as, PresentationContext pc,
final Attributes rq, Attributes keys) throws DicomServiceException {
QueryRetrieveLevel level = QueryRetrieveLevel.valueOf(keys, qrLevels);
level.validateRetrieveKeys(keys, rootLevel, relational(as, rq));
String moveDest = rq.getString(Tag.MoveDestination);
final Connection remote = getRemoteConnection(moveDest);
if (remote == null)
throw new DicomServiceException(Status.MoveDestinationUnknown,
"Move Destination: " + moveDest + " unknown");
List<InstanceLocator> matches = DcmQRSCP.this.calculateMatches(keys);
if (matches.isEmpty())