diff --git a/src/lib/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfService.java b/src/lib/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfService.java index ff23fae475fd7f3dee0e31546490149425470f43..9d88e3cfa083f37dae1b03ff0ffc6c271e2a248e 100644 --- a/src/lib/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfService.java +++ b/src/lib/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfService.java @@ -30,7 +30,7 @@ import io.micronaut.http.HttpResponse; * * @author U.S. Geological Survey */ -public abstract class NetcdfService<T extends Query> { +public abstract class NetcdfService<S, T extends Query> { protected static final Logger LOGGER = Logger.getLogger(NetcdfService.class.getName()); @@ -45,7 +45,7 @@ public abstract class NetcdfService<T extends Query> { * * @param httpRequest The HTTP request */ - abstract ResponseBody<String, Metadata<T>> getMetadataResponse(HttpRequest<?> httpRequest); + abstract ResponseBody<String, Metadata<S, T>> getMetadataResponse(HttpRequest<?> httpRequest); /** * Returns the service name @@ -107,11 +107,7 @@ public abstract class NetcdfService<T extends Query> { /** * Returns the source models. */ - List<SourceModel> getSourceModels() { - return netcdfDataFiles().stream() - .map(SourceModel::new) - .collect(Collectors.toList()); - } + abstract S getSourceModels(); <U extends ServiceResponseMetadata> String toCsvResponse( RequestData requestData,