/** * Creates a shallow copy of the given Dimension object * * @param info */ public DimensionInfoImpl(DimensionInfo info) { super(); this.enabled = info.isEnabled(); this.attribute = info.getAttribute(); this.endAttribute = info.getEndAttribute(); this.presentation = info.getPresentation(); this.resolution = info.getResolution(); this.units = info.getUnits(); this.unitSymbol = info.getUnitSymbol(); this.defaultValue = info.getDefaultValue(); this.enabled = info.isEnabled(); }
/** Returns the type of presentation for the time dimension */ public DimensionPresentation getPresentation() { return timeDimension.getPresentation(); }
/** * Builds the proper presentation given the specified value domain * * @param dimension * @param values */ String getCustomDomainRepresentation(DimensionInfo dimension, List<String> values) { String metadata = null; final StringBuilder buff = new StringBuilder(); if (DimensionPresentation.LIST == dimension.getPresentation()) { for (String value : values) { buff.append(value.trim()); buff.append(","); } metadata = buff.substring(0, buff.length() - 1); } else if (DimensionPresentation.DISCRETE_INTERVAL == dimension.getPresentation()) { buff.append(values.get(0)); buff.append("/"); buff.append(values.get(0)); buff.append("/"); final BigDecimal resolution = dimension.getResolution(); if (resolution != null) { buff.append(resolution); } metadata = buff.toString(); } return metadata; }
if (DimensionPresentation.LIST == dimension.getPresentation()) { for (Object val : values) { if (val instanceof Double) { .replaceAll("\\]", "") .replaceAll(" ", ""); } else if (DimensionPresentation.CONTINUOUS_INTERVAL == dimension.getPresentation()) { NumberRange<Double> range = getMinMaxZInterval(values); buff.append(range.getMinimum()); } else if (DimensionPresentation.DISCRETE_INTERVAL == dimension.getPresentation()) { NumberRange<Double> range = getMinMaxZInterval(values); buff.append(range.getMinimum());
final ISO8601Formatter df = new ISO8601Formatter(); if (DimensionPresentation.LIST == dimension.getPresentation()) { for (Object date : values) { buff.append(df.format(date)); .replaceAll("\\]", "") .replaceAll(" ", ""); } else if (DimensionPresentation.CONTINUOUS_INTERVAL == dimension.getPresentation()) { DateRange interval = getMinMaxTimeInterval(values); buff.append(df.format(interval.getMinValue())); buff.append("/PT1S"); timeMetadata = buff.toString(); } else if (DimensionPresentation.DISCRETE_INTERVAL == dimension.getPresentation()) { DateRange interval = getMinMaxTimeInterval(values); buff.append(df.format(interval.getMinValue()));
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()); }
TreeSet<Object> elevations = null; try { if (elevInfo.getPresentation() != DimensionPresentation.LIST) { Double minValue = dimensions.getMinElevation(); if (minValue != null) {
SimpleDateFormat timeFormat = dimensions.getTimeFormat(); start("wcs:temporalDomain"); if (timeInfo.getPresentation() == DimensionPresentation.LIST) { for (Object item : dimensions.getTimeDomain()) { if (item instanceof Date) { element("wcs:beginPosition", minTime); element("wcs:endPosition", maxTime); if (timeInfo.getPresentation() == DimensionPresentation.DISCRETE_INTERVAL) { BigDecimal resolution = timeInfo.getResolution(); if (resolution == null) {
if (elevation.getPresentation() == DimensionPresentation.LIST || (elevation.getPresentation() == DimensionPresentation.DISCRETE_INTERVAL && elevation.getResolution() == null)) { final UniqueVisitor visitor = new UniqueVisitor(elevation.getAttribute());
if (time.getPresentation() == DimensionPresentation.LIST) { final UniqueVisitor visitor = new UniqueVisitor(time.getAttribute()); collection.accepts(visitor, null);
DimensionPresentation presentation = timeDimension.getPresentation(); if (!requestedTimeSubset.getMinValue().equals(requestedTimeSubset.getMaxValue()) && (presentation == DimensionPresentation.LIST
if (elevationDimension != null) { start(initStartMetadataTag(TAG.ELEVATION_DOMAIN, null, elevationDimension, helper)); final DimensionPresentation presentation = elevationDimension.getPresentation(); switch (presentation) {
DimensionPresentation presentation = elevationDimension.getPresentation(); if (requestedElevationRange.getMinimum() < requestedElevationRange.getMaximum() && (presentation == DimensionPresentation.LIST
final WebMarkupContainer resolutions = new WebMarkupContainer("resolutions"); resolutions .setVisible(model.getObject().getPresentation() == DimensionPresentation.DISCRETE_INTERVAL); resolutions.setOutputMarkupId(true); resContainer.add(resolutions);
final WebMarkupContainer resolutions = new WebMarkupContainer("resolutions"); resolutions.setVisible( model.getObject().getPresentation() == DimensionPresentation.DISCRETE_INTERVAL); resolutions.setOutputMarkupId(true); resContainer.add(resolutions);
if (timeDimension != null) { start(initStartMetadataTag(TAG.TIME_DOMAIN, null, timeDimension, helper)); final DimensionPresentation presentation = timeDimension.getPresentation(); final String id = helper.getCoverageId(); switch (presentation) {