diff --git a/src/hazard/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/HazardMetadata.java b/src/hazard/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/HazardMetadata.java new file mode 100644 index 0000000000000000000000000000000000000000..2e8378706615b2224f10abbdb3df9d373f508def --- /dev/null +++ b/src/hazard/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/HazardMetadata.java @@ -0,0 +1,37 @@ +package gov.usgs.earthquake.nshmp.netcdf.www; + +import gov.usgs.earthquake.nshmp.gmm.Imt; +import gov.usgs.earthquake.nshmp.gmm.NehrpSiteClass; +import gov.usgs.earthquake.nshmp.netcdf.Nshm; +import gov.usgs.earthquake.nshmp.netcdf.www.Metadata.ServiceResponseMetadata; +import gov.usgs.earthquake.nshmp.netcdf.www.Request.RequestData; +import gov.usgs.earthquake.nshmp.netcdf.www.RequestHazardCurves.HazardRequestDataImt; + +/** + * Hazard metadata. + * + * @author U.S. Geological Survey + */ +public class HazardMetadata { + + static class HazardResponseMetadata extends ServiceResponseMetadata { + public final Nshm nshm; + public final Imt imt; + + HazardResponseMetadata( + Nshm nshm, + NehrpSiteClass siteClass, + Imt imt, + String xLabel, + String yLabel) { + super(siteClass, xLabel, yLabel); + this.nshm = nshm; + this.imt = imt; + } + + @Override + public HazardRequestDataImt toRequestMetadata(RequestData requestData) { + return new HazardRequestDataImt(nshm, requestData.site, siteClass, imt, requestData.format); + } + } +}