final ResourceInfo resource = layer.getResource();
final PropertyModel metadata = new PropertyModel(model, "resource.metadata");
// time
IModel time = new MetadataMapModel(metadata, ResourceInfo.TIME, DimensionInfo.class);
if (time.getObject() == null) {
time.setObject(new DimensionInfoImpl());
}
add(new DimensionEditor("time", time, resource, Date.class));
// elevation
IModel elevation = new MetadataMapModel(metadata, ResourceInfo.ELEVATION,
DimensionInfo.class);
if (elevation.getObject() == null) {
elevation.setObject(new DimensionInfoImpl());
}
add(new DimensionEditor("elevation", elevation, resource, Number.class));
// handle raster data custom dimensions
final List<RasterDimensionModel> customDimensionModels = new ArrayList<RasterDimensionModel>();