Date dateFrom = filter.getFromDate();
Date dateTo = filter.getToDate();
Class fragmentType = filter.getFragmentType();
ManagedObjectRepresentation source = filter.getSource();
Map filterMap = new HashMap();
if (null != source) {
filterMap.put(SOURCE, source.getId().getValue());
}
if (null != dateFrom) {
filterMap.put(DATE_FROM, DateUtils.format(dateFrom));
}
if (null != dateTo) {
filterMap.put(DATE_TO, DateUtils.format(dateTo));
}
if (null != fragmentType) {
filterMap.put(FRAGMENT_TYPE, ExtensibilityConverter.classToStringRepresentation(fragmentType));
}
if (null != type) {
filterMap.put(TYPE, type);
}
QueryURLBuilder query = new QueryURLBuilder(templateUrlParser, filterMap, getEventApiRepresentation().getURITemplates(),
OPTIONAL_PARAMETERS);
String queryUrl = query.build();