public static Collection<SearchResultDTO> searchResultDTOs(SearchResults results) {
        return Lists.newArrayList(Iterables.transform(results, new Function<SearchResults.Result, SearchResultDTO>() {
            @Override
            public SearchResultDTO apply(Result input) {
                return new SearchResultDTO(
                        new ResourceDTO(input.getResource().getId(), unwrapMap(input.getResource().getAttributes())),
                        input.getMetrics());
            }
        }));
    }
public static Collection < SearchResultDTO > searchResultDTOs ( SearchResults results ) { return Lists . newArrayList ( Iterables . transform ( results , new Function < SearchResults . Result , SearchResultDTO > ( ) { @ Override public SearchResultDTO apply ( Result input ) { return new SearchResultDTO ( new ResourceDTO ( input . getResource ( ) . getId ( ) , unwrapMap ( input . getResource ( ) . getAttributes ( ) ) ) , input . getMetrics ( ) ) ; } } ) ) ; }
Convert search results to {@link SearchResultDTO}s.

@param results
search results to convert.
@return converted search results.