public PagedCollectionResource getMeasurementsByFilter(MeasurementFilter filter) throws SDKException {
String type = filter.getType();
Date fromDate = filter.getFromDate();
Date toDate = filter.getToDate();
Class fragmentType = filter.getFragmentType();
ManagedObjectRepresentation source = filter.getSource();
if (source != null && fromDate != null && toDate != null && fragmentType != null && type != null) {
return getMeasurementsBySourceAndDateAndFragmentTypeAndType(source, fromDate, toDate, fragmentType, type);
} else if (fromDate != null && toDate != null && fragmentType != null && type != null) {
return getMeasurementsByDateAndFragmentTypeAndType(fromDate, toDate, fragmentType, type);