//-------------------------------------------------------------------------
@Override
public HistoricalTimeSeriesInfoMetaDataResult metaData(HistoricalTimeSeriesInfoMetaDataRequest request) {
ArgumentChecker.notNull(request, "request");
HistoricalTimeSeriesInfoMetaDataResult defaultResult = getDefaultDelegate().metaData(request);
if (getDelegates().isEmpty()) {
return defaultResult;
}
Set<String> dataFields = new HashSet<String>();
Set<String> dataSources = new HashSet<String>();
Set<String> dataProviders = new HashSet<String>();
Set<String> observationTimes = new HashSet<String>();
dataFields.addAll(defaultResult.getDataFields());
dataSources.addAll(defaultResult.getDataSources());
dataProviders.addAll(defaultResult.getDataProviders());
observationTimes.addAll(defaultResult.getObservationTimes());
for (HistoricalTimeSeriesMaster delegate : getDelegates().values()) {
HistoricalTimeSeriesInfoMetaDataResult delegateResult = delegate.metaData(request);
dataFields.addAll(delegateResult.getDataFields());
dataSources.addAll(delegateResult.getDataSources());
dataProviders.addAll(delegateResult.getDataProviders());
observationTimes.addAll(delegateResult.getObservationTimes());
}
HistoricalTimeSeriesInfoMetaDataResult result = new HistoricalTimeSeriesInfoMetaDataResult();
result.getDataFields().addAll(dataFields);
result.getDataSources().addAll(dataSources);
result.getDataProviders().addAll(dataProviders);
result.getObservationTimes().addAll(observationTimes);
return result;
}