*/
String getTemporalDomainRepresentation(DimensionInfo dimension, TreeSet<? extends Object> values) {
String timeMetadata = null;
final StringBuilder buff = new StringBuilder();
final ISO8601Formatter df = new ISO8601Formatter();
if (DimensionPresentation.LIST == dimension.getPresentation()) {
for (Object date : values) {
buff.append(df.format(date));
buff.append(",");
}
timeMetadata = buff.substring(0, buff.length() - 1).replaceAll("\\[", "")
.replaceAll("\\]", "").replaceAll(" ", "");
} else if (DimensionPresentation.CONTINUOUS_INTERVAL == dimension.getPresentation()) {
DateRange interval = getMinMaxTimeInterval(values);
buff.append(df.format(interval.getMinValue()));
buff.append("/");
buff.append(df.format(interval.getMaxValue()));
buff.append("/PT1S");
timeMetadata = buff.toString();
} else if (DimensionPresentation.DISCRETE_INTERVAL == dimension.getPresentation()) {
DateRange interval = getMinMaxTimeInterval(values);
buff.append(df.format(interval.getMinValue()));
buff.append("/");
buff.append(df.format(interval.getMaxValue()));
buff.append("/");
final BigDecimal resolution = dimension.getResolution();
if (resolution != null) {
// resolution has been provided