logger.trace("Possible searchable subresources found: {}", searchableSubResources); //$NON-NLS-1$
// save the current data in case we need to role back the information if
// the search fails and we will need to continue to the next
// sub-resource
// (for continued search mode only)
AccumulatedData originalData = result.getData();
// iterate through all sub-resources until a match is found.
// JAX-RS compliance requires to look only at the first sub-resource -
// this will be the case
// unless the search policy is specifically set to "continued search"
for (SubResourceInstance subResourceInstance : searchableSubResources) {
SubResourceRecord subResourceRecord = subResourceInstance.getRecord();
// set a clone of the accumulated data before continuing to the next
// sub-resource
result.setData(originalData.clone());
// handle the sub-resource
if (subResourceRecord instanceof SubResourceMethodRecord) {
handleSubResourceMethod(subResourceInstance, subResources, context, chain);
if (result.isFound()) {