private void handleTimeDimensionRaster( CoverageInfo cvInfo, DimensionInfo timeInfo, ReaderDimensionsAccessor dimension) throws IOException { TreeSet<Object> temporalDomain = null; try { if (timeInfo.getPresentation() != DimensionPresentation.LIST) { Date minValue = dimension.getMinTime(); if (minValue != null) { temporalDomain = new TreeSet<>(); temporalDomain.add(minValue); temporalDomain.add(dimension.getMaxTime()); } } if (temporalDomain == null) { throw new Exception( "The \"List\" presentation of the temporal dimension has been selected"); } } catch (Exception ex) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Dimension has not been extracted. The reason: ", ex); } temporalDomain = dimension.getTimeDomain(); } String timeMetadata = getTemporalDomainRepresentation(timeInfo, temporalDomain); String defaultValue = getDefaultValueRepresentation( cvInfo, ResourceInfo.TIME, DimensionDefaultValueSetting.TIME_CURRENT); writeTimeDimension(timeMetadata, defaultValue, timeInfo.isNearestMatchEnabled()); }
/** * Writes out metadata for the time dimension * * @param typeInfo * @throws IOException */ private void handleTimeDimensionVector(FeatureTypeInfo typeInfo) throws IOException { // build the time dim representation TreeSet<Date> values = wms.getFeatureTypeTimes(typeInfo); String timeMetadata; boolean nearest = false; if (values != null && !values.isEmpty()) { DimensionInfo timeInfo = typeInfo.getMetadata().get(ResourceInfo.TIME, DimensionInfo.class); timeMetadata = getTemporalDomainRepresentation(timeInfo, values); nearest = timeInfo.isNearestMatchEnabled(); } else { timeMetadata = ""; } String defaultValue = getDefaultValueRepresentation( typeInfo, ResourceInfo.TIME, DimensionDefaultValueSetting.TIME_CURRENT); writeTimeDimension(timeMetadata, defaultValue, nearest); }
if (timeInfo.isNearestMatchEnabled()) { List<Object> nearestMatchedTimes = getNearestMatches(typeInfo, timeInfo, defaultedTimes, ResourceInfo.TIME);
if (timeInfo.isNearestMatchEnabled()) { fixedTimes = getNearestMatches(coverage, timeInfo, fixedTimes, ResourceInfo.TIME);
WebMarkupContainer acceptableIntervalEditor = new WebMarkupContainer("acceptableIntervalEditor"); acceptableIntervalEditor.setVisible(model.getObject().isNearestMatchEnabled()); nearestMatchContainer.add(acceptableIntervalEditor); nearestMatch.add(