if (searchPath.endsWith("/")) {
searchPath = searchPath.substring(0, searchPath.length() - 1);
}
final String queryString = String.format(MODEL_XPATH_QUERY, searchPath, Constants.VALIDATION_MODEL_RESOURCE_TYPE,
Constants.VALIDATED_RESOURCE_TYPE, validatedResourceType);
Iterator<Resource> models = rr.findResources(queryString, Query.XPATH);
while (models.hasNext()) {
Resource model = models.next();
LOG.info("Found validation model resource {}.", model.getPath());
String jcrPath = model.getPath();
ValueMap validationModelProperties = model.adaptTo(ValueMap.class);