public final class IoParameters extends Object implements Parameters
Parameters.HttpHeaderBASE_64, BBOX, BOM, CATEGORIES, CATEGORY, COMPLEX_PARENT, CRS, DATASETS, DEFAULT_BASE_64, DEFAULT_EXPANDED, DEFAULT_FORCE_LATEST_VALUE, DEFAULT_FORCE_XY, DEFAULT_FORMAT, DEFAULT_GENERALIZE, DEFAULT_GRID, DEFAULT_HEIGHT, DEFAULT_LEGEND, DEFAULT_LIMIT, DEFAULT_LOCALE, DEFAULT_MATCH_DOMAIN_IDS, DEFAULT_OFFSET, DEFAULT_OUTPUT_TIMEZONE, DEFAULT_RENDERING_HINTS, DEFAULT_RENDERING_TRIGGER, DEFAULT_SHOW_TIME_INTERVALS, DEFAULT_SHOW_VERTICAL_INTERVALS, DEFAULT_STATUS_INTERVALS, DEFAULT_TIME_FORMAT, DEFAULT_WIDTH, EXPANDED, FEATURE, FEATURES, FILTER_FIELDS, FILTER_OBSERVED_GEOMETRIES, FILTER_PLATFORM_GEOMETRIES, FILTER_PLATFORM_TYPES, FILTER_VALUE_TYPES, FORCE_LATEST_VALUE, FORCE_XY, FORMAT, GENERALIZE, GEOMETRY_TYPES, GRID, HANDLE_AS_VALUE_TYPE, HEIGHT, HREF_BASE, LANGUAGE, LEGEND, LIMIT, LOCALE, MATCH_DOMAIN_IDS, NEAR, ODATA_FILTER, OFFERING, OFFERINGS, OFFSET, OUTPUT_TIMEZONE, PHENOMENA, PHENOMENON, PLATFORMS, PROCEDURE, PROCEDURES, RAW_FORMAT, RENDERING_HINTS, RENDERING_TRIGGER, RESULT_TIMES_VALUE_ALL, RESULTTIME, RESULTTIMES, SEARCH_TERM, SERIES, SERVICE, SERVICES, SHOW_TIME_INTERVALS, SHOW_VERTICAL_INTERVALS, STATION, STATIONS, STATUS_INTERVALS, STYLE, STYLES, TIME_FORMAT, TIMESERIES, TIMESPAN, TOKEN_SEPARATOR, WIDTH, ZIP| Modifier | Constructor and Description |
|---|---|
protected |
IoParameters() |
protected |
IoParameters(IoParameters other) |
protected |
IoParameters(Map<String,com.fasterxml.jackson.databind.JsonNode> queryParameters) |
protected |
IoParameters(Map<String,com.fasterxml.jackson.databind.JsonNode> queryParameters,
File defaults) |
protected |
IoParameters(org.springframework.util.MultiValueMap<String,com.fasterxml.jackson.databind.JsonNode> queryParameters) |
protected |
IoParameters(org.springframework.util.MultiValueMap<String,com.fasterxml.jackson.databind.JsonNode> queryParameters,
File defaults) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsParameter(String parameter) |
protected static org.springframework.util.MultiValueMap<String,com.fasterxml.jackson.databind.JsonNode> |
convertToJsonNodes(org.springframework.util.MultiValueMap<String,String> queryParameters) |
protected static Map<String,com.fasterxml.jackson.databind.JsonNode> |
convertValuesToJsonNodes(Map<String,String> queryParameters) |
static IoParameters |
createDefaults() |
(package private) static IoParameters |
createDefaults(File defaultConfig) |
static IntervalWithTimeZone |
createDefaultTimespan() |
static IoParameters |
createFromMultiValueMap(org.springframework.util.MultiValueMap<String,String> query) |
(package private) static IoParameters |
createFromSingleJsonValueMap(Map<String,com.fasterxml.jackson.databind.JsonNode> query) |
static IoParameters |
createFromSingleValueMap(Map<String,String> query) |
IoParameters |
extendWith(String key,
String... values)
Creates a new instance based on the current one and adds parameter with the given values.
|
boolean |
getAsBoolean(String parameter) |
boolean |
getAsBoolean(String parameter,
boolean defaultValue) |
int |
getAsInteger(String parameter) |
int |
getAsInteger(String parameter,
int defaultValue) |
String |
getAsString(String parameter) |
String |
getAsString(String parameter,
String defaultValue) |
Set<String> |
getCategories() |
String |
getCategory()
Deprecated.
use
getCategories() |
String |
getCrs() |
Set<String> |
getDatasets() |
String |
getFeature()
Deprecated.
use
getFeatures() |
Set<String> |
getFeatures() |
Set<String> |
getFields() |
FilterResolver |
getFilterResolver() |
String |
getFormat() |
Set<String> |
getGeometryTypes() |
int |
getHeight()
Returns the requested chart height in pixels.
|
String |
getHrefBase() |
static com.fasterxml.jackson.databind.JsonNode |
getJsonNodeFrom(Object object) |
int |
getLimit() |
String |
getLocale() |
protected String |
getNormalizedTimespan(org.joda.time.format.DateTimeFormatter dateFormat) |
Set<String> |
getObservedGeometryTypes() |
Optional<org.n52.shetland.ogc.filter.Filter<?>> |
getODataFilter() |
String |
getOffering()
Deprecated.
use
getOfferings() |
Set<String> |
getOfferings() |
int |
getOffset() |
String |
getOther(String parameter) |
String |
getOutputTimezone() |
Set<String> |
getPhenomena() |
String |
getPhenomenon()
Deprecated.
use
getPhenomena() |
Set<String> |
getPlatformGeometryTypes() |
Set<String> |
getPlatforms() |
Set<String> |
getPlatformTypes() |
String |
getProcedure()
Deprecated.
use
getProcedures() |
Set<String> |
getProcedures() |
String |
getRawFormat() |
Map<String,StyleProperties> |
getReferencedStyles() |
org.joda.time.Instant |
getResultTime() |
Set<String> |
getResultTimes()
parses csv parameter
Parameters.RESULTTIMES to a set of values. |
Set<String> |
getSearchTerms() |
Set<String> |
getSeries() |
String |
getService()
Deprecated.
use
getServices() |
Set<String> |
getServices() |
StyleProperties |
getSingleStyle() |
BoundingBox |
getSpatialFilter()
Creates a
BoundingBox instance from given spatial request parameters. |
String |
getStation()
Deprecated.
|
Set<String> |
getStations() |
String |
getTimeFormat() |
Set<String> |
getTimeseries() |
IntervalWithTimeZone |
getTimespan() |
(package private) Set<String> |
getValuesOf(String parameterName) |
Set<String> |
getValueTypes() |
int |
getWidth() |
boolean |
hasStyles() |
boolean |
isAllResultTimes() |
boolean |
isBase64()
Indicates if rendered chart shall be returned as Base64 encoded string.
|
boolean |
isExpanded() |
boolean |
isForceLatestValueRequests() |
boolean |
isForceXY() |
boolean |
isGeneralize() |
boolean |
isGrid() |
boolean |
isLegend() |
boolean |
isMatchDomainIds() |
boolean |
isPureStationaryInsituQuery() |
boolean |
isRenderingHintsRequests()
Deprecated.
since v2.0 covered by extras endpoint
|
boolean |
isSetRawFormat() |
boolean |
isShowTimeIntervals() |
boolean |
isShowVerticalIntervals() |
boolean |
isStatusIntervalsRequests()
Deprecated.
since v2.0 covered by extras endpoint
|
protected Map<String,com.fasterxml.jackson.databind.JsonNode> |
mergeToLowerCasedKeys(Map<String,com.fasterxml.jackson.databind.JsonNode> parameters) |
protected org.springframework.util.MultiValueMap<String,com.fasterxml.jackson.databind.JsonNode> |
mergeToLowerCasedKeys(org.springframework.util.MultiValueMap<String,com.fasterxml.jackson.databind.JsonNode> parameters) |
IoParameters |
removeAllOf(String key)
Creates a new instance based on the current one and removes given parameter with the all its values.
|
IoParameters |
replaceWith(String key,
String... values) |
IoParameters |
respectBackwardsCompatibility() |
IoParameters |
setParseExceptionHandle(BiConsumer<String,IoParseException> handle) |
boolean |
shallBehaveBackwardsCompatible() |
boolean |
shallClassifyByResultTimes() |
String |
toString() |
protected IoParameters()
protected IoParameters(IoParameters other)
protected IoParameters(Map<String,com.fasterxml.jackson.databind.JsonNode> queryParameters)
protected IoParameters(Map<String,com.fasterxml.jackson.databind.JsonNode> queryParameters, File defaults)
protected IoParameters(org.springframework.util.MultiValueMap<String,com.fasterxml.jackson.databind.JsonNode> queryParameters)
public boolean shallBehaveBackwardsCompatible()
public IoParameters setParseExceptionHandle(BiConsumer<String,IoParseException> handle)
public int getOffset()
IoParseException - if parameter could not be parsed.public int getLimit()
IoParseException - if parameter could not be parsed.public int getWidth()
IoParseException - if parsing parameter fails.public int getHeight()
IoParseException - if parsing parameter fails.public boolean isBase64()
IoParseException - if parsing parameter fails.public boolean isGrid()
true if timeseries chart shall include a background grid.IoParseException - if parsing parameter fails.public boolean isGeneralize()
true if timeseries data shall be generalized.IoParseException - if parsing parameter fails.public boolean isLegend()
true if a legend shall be included when rendering a chart, false
otherwise.IoParseException - if parsing parameter fails.public String getLocale()
IoParseException - if parsing parameter fails.public StyleProperties getSingleStyle()
IoParseException - if parsing parameter fails.public Map<String,StyleProperties> getReferencedStyles()
IoParseException - if parsing parameter fails.public boolean hasStyles()
public String getFormat()
public boolean isSetRawFormat()
public String getRawFormat()
public String getTimeFormat()
public IntervalWithTimeZone getTimespan()
IoParseException - if timespan could not be parsed.protected String getNormalizedTimespan(org.joda.time.format.DateTimeFormatter dateFormat)
public static IntervalWithTimeZone createDefaultTimespan()
public String getOutputTimezone()
public org.joda.time.Instant getResultTime()
public boolean shallClassifyByResultTimes()
public boolean isAllResultTimes()
public Set<String> getResultTimes()
Parameters.RESULTTIMES to a set of values. Validates each result time
value after removing special value all. Use isAllResultTimes() to check if client
requests all result times available.public Optional<org.n52.shetland.ogc.filter.Filter<?>> getODataFilter()
@Deprecated public String getCategory()
getCategories()@Deprecated public String getService()
getServices()@Deprecated public String getOffering()
getOfferings()@Deprecated public String getFeature()
getFeatures()@Deprecated public String getProcedure()
getProcedures()@Deprecated public String getPhenomenon()
getPhenomena()@Deprecated public String getStation()
public FilterResolver getFilterResolver()
public BoundingBox getSpatialFilter()
BoundingBox instance from given spatial request parameters. The resulting bounding
box is the merged extent of all spatial filters given. For example if and
exist, the returned bounding box includes both extents.IoParseException - if parsing parameters fails, or if a requested object could not be created.public String getCrs()
public boolean isForceXY()
public boolean isMatchDomainIds()
public boolean isExpanded()
IoParseException - if parameter could not be parsed.public boolean isForceLatestValueRequests()
@Deprecated public boolean isStatusIntervalsRequests()
IoParseException - if parameter could not be parsed.@Deprecated public boolean isRenderingHintsRequests()
IoParseException - if parameter could not be parsed.public String getHrefBase()
public boolean isShowTimeIntervals()
public boolean isShowVerticalIntervals()
public boolean containsParameter(String parameter)
public int getAsInteger(String parameter, int defaultValue)
public int getAsInteger(String parameter)
parameter - the parameter to parse to an int value.IoParseException - if parsing to int fails.public boolean getAsBoolean(String parameter, boolean defaultValue)
public boolean getAsBoolean(String parameter)
parameter - the parameter to parse to boolean.true or false as boolean.IoParseException - if parsing to boolean fails.public static com.fasterxml.jackson.databind.JsonNode getJsonNodeFrom(Object object)
public IoParameters removeAllOf(String key)
key - the name of the parameter to remove all its valuespublic IoParameters extendWith(String key, String... values)
key - the parameter namevalues - the parameter valuespublic IoParameters replaceWith(String key, String... values)
protected static Map<String,com.fasterxml.jackson.databind.JsonNode> convertValuesToJsonNodes(Map<String,String> queryParameters)
protected static org.springframework.util.MultiValueMap<String,com.fasterxml.jackson.databind.JsonNode> convertToJsonNodes(org.springframework.util.MultiValueMap<String,String> queryParameters)
protected Map<String,com.fasterxml.jackson.databind.JsonNode> mergeToLowerCasedKeys(Map<String,com.fasterxml.jackson.databind.JsonNode> parameters)
protected org.springframework.util.MultiValueMap<String,com.fasterxml.jackson.databind.JsonNode> mergeToLowerCasedKeys(org.springframework.util.MultiValueMap<String,com.fasterxml.jackson.databind.JsonNode> parameters)
public static IoParameters createDefaults()
static IoParameters createDefaults(File defaultConfig)
public static IoParameters createFromMultiValueMap(org.springframework.util.MultiValueMap<String,String> query)
public static IoParameters createFromSingleValueMap(Map<String,String> query)
static IoParameters createFromSingleJsonValueMap(Map<String,com.fasterxml.jackson.databind.JsonNode> query)
public IoParameters respectBackwardsCompatibility()
public boolean isPureStationaryInsituQuery()
Copyright © 2013–2019 52North Initiative for Geospatial Open Source Software GmbH. All rights reserved.