/** * Extracts the custom domain lowest value (using String sorting) * * @throws IOException */ public String getCustomDomainDefaultValue(String name) throws IOException { Utilities.ensureNonNull("name", name); // see if we have an optimize way to get the minimum String minimum = reader.getMetadataValue(name.toUpperCase() + "_DOMAIN_MINIMUM"); if (minimum != null) { return minimum; } // ok, get the full domain then List<String> domain = getDomain(name); if (domain.isEmpty()) { return null; } else { return domain.get(0); } }
public List<String> getDomain(final String domainName) throws IOException { return accessor.getDomain(domainName); }
throws IOException { String candidate = null; List<String> domain = dimAccessor.getDomain(dimensionName);
} else { List<String> domain = dimAccessor.getDomain(custDimName);
List<String> domain = dimAccessor.getDomain(custDimName);
private void checkCustomDomainIntersection( GridCoverage2DReader reader, GridCoverageRequest request, ReaderDimensionsAccessor accessor) throws IOException { Set<ParameterDescriptor<List>> dynamicParameters = reader.getDynamicParameters(); for (ParameterDescriptor<List> dynamicParameter : dynamicParameters) { String name = dynamicParameter.getName().getCode(); List<Object> requestedValues = request.getDimensionsSubset().get(name); if (requestedValues != null && !requestedValues.isEmpty()) { List<String> actualValues = accessor.getDomain(name); if (Collections.disjoint(actualValues, requestedValues)) { throw new WCS20Exception( "Requested " + name + " subset does not intersect the available values " + actualValues, WCS20ExceptionCode.InvalidSubsetting, "subset"); } } } }
private void handleCustomDimensionRaster( CoverageInfo cvInfo, String dimName, DimensionInfo dimension, ReaderDimensionsAccessor dimAccessor) throws IOException { final List<String> values = dimAccessor.getDomain(dimName); String metadata = getCustomDomainRepresentation(dimension, values); String defaultValue = wms.getDefaultCustomDimensionValue(dimName, cvInfo, String.class); writeCustomDimension( dimName, metadata, defaultValue, dimension.getUnits(), dimension.getUnitSymbol()); }