return new MeasurementCollectionImpl(restConnector, url, pageSize);
}
private PagedCollectionResource getMeasurementsBySourceAndDateAndFragmentType(
ManagedObjectRepresentation source, Date dateFrom, Date dateTo, Class fragmentType) throws SDKException {
Map filter = new HashMap();
filter.put(SOURCE, source.getId().getValue());
filter.put(DATE_FROM, DateUtils.format(dateFrom));
filter.put(DATE_TO, DateUtils.format(dateTo));
filter.put(FRAGMENT_TYPE, ExtensibilityConverter.classToStringRepresentation(fragmentType));
String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForSourceAndDateAndFragmentType();
String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
return new MeasurementCollectionImpl(restConnector, url, pageSize);
}