Modifier and Type | Class and Description |
---|---|
protected static class |
SosHelper.Configuration
Class to encapsulate all calls to the
Configurator . |
Modifier and Type | Field and Description |
---|---|
private static SosHelper.Configuration |
config |
private static int |
KILO_BYTE |
private static int |
KILO_BYTES_256 |
private static org.slf4j.Logger |
LOGGER |
AMPERSAND_CHAR, AMPERSAND_STRING, BACKSLASH_CHAR, BACKSLASH_STRING, BLANK_CHAR, BLANK_STRING, CLOSE_BRACE_CHAR, CLOSE_BRACE_STRING, COLON_CHAR, COLON_STRING, COMMA_CHAR, COMMA_SPACE_STRING, COMMA_STRING, CSV_BLOCK_SEPARATOR, CSV_TOKEN_SEPARATOR, DASH_CHAR, DASH_STRING, DEFAULT_ENCODING, DOLLAR_CHAR, DOLLAR_STRING, DOT_CHAR, DOT_STRING, DOUBLE_COLON_STRING, EMPTY_STRING, EPSG_WGS84, EPSG_WGS84_3D, EQUAL_SIGN_CHAR, EQUAL_SIGN_STRING, GREATER_THAN_SIGN_STRING, HASH_CODE_13, HASH_CODE_17, HASH_CODE_19, HASH_CODE_23, HASH_CODE_29, HASH_CODE_3, HASH_CODE_31, HASH_CODE_37, HASH_CODE_41, HASH_CODE_43, HASH_CODE_47, HASH_CODE_5, HASH_CODE_7, HTTP, INT_0, INT_1, INT_2, INT_3, INT_4, INVERTED_COMMA_CHAR, INVERTED_COMMA_STRING, LESS_THAN_SIGN_STRING, LINE_SEPARATOR_CHAR, LINE_SEPARATOR_STRING, MINUS_CHAR, MINUS_STRING, NUMBER_SIGN_CHAR, NUMBER_SIGN_STRING, OPEN_BRACE_CHAR, OPEN_BRACE_STRING, PERCENT_CHAR, PERCENT_STRING, PLUS_CHAR, PLUS_STRING, QUERSTIONMARK_CHAR, QUERSTIONMARK_STRING, SEMICOLON_CHAR, SEMICOLON_STRING, SLASH_CHAR, SLASH_STRING, SPACE_CHAR, SPACE_STRING, UNDERSCORE_CHAR, UNDERSCORE_STRING, URN
Modifier | Constructor and Description |
---|---|
protected |
SosHelper()
Hide utility constructor
|
Modifier and Type | Method and Description |
---|---|
static String |
addKVPCrsParameterToRequest(String request,
String crs) |
static String |
addKVPLanguageParameterToRequest(String request,
String language) |
static String |
addKVPOfferingParameterToRequest(String request,
String offering) |
static com.vividsolutions.jts.geom.Envelope |
checkEnvelope(com.vividsolutions.jts.geom.Envelope envelope,
com.vividsolutions.jts.geom.Geometry geometry)
Returns an Envelope that contains the Geometry
|
static boolean |
checkFeatureOfInterestIdentifierForSosV2(String featureOfInterestIdentifier,
String version)
Checks if the FOI identifier was generated by SOS
|
private static void |
checkFormat(String format,
ServiceOperatorKey serviceOperatorKey,
Enum<?> parameter)
checks whether the value of procedure format parameter is valid
|
static void |
checkFreeMemory()
Checks the free memory size.
|
static void |
checkHref(String href,
String parameterName) |
static void |
checkOutputFormat(String checkOutputFormat,
String service,
String version)
checks whether the value of outputFormat parameter is valid
|
static void |
checkProcedureDescriptionFormat(String procedureDescriptionFormat,
String service,
String version)
checks whether the value of procedureDescriptionFormat parameter is valid
|
static void |
checkResponseFormat(String responseFormat,
String service,
String version)
help method to check the result format parameter.
|
static void |
checkSection(List<String> sections)
Deprecated.
|
static List<CodeType> |
createCodeTypeListFromCSV(String csv) |
static String |
createCSVFromCodeTypeList(List<CodeType> values) |
static String |
createFoiGetUrl(String foiId,
String version,
String serviceURL,
String urlPattern)
Creates a HTTP-Get URL from FOI identifier and service URL for SOS
version
|
static OmObservableProperty |
createSosOberavablePropertyFromSosSMLIo(SmlIo<?> output) |
private static String |
getBaseGetUrl(String serviceURL,
String urlPattern) |
protected static SosHelper.Configuration |
getConfiguration() |
static String |
getDescribeSensorUrl(String version,
String serviceURL,
String procedureId,
String urlPattern,
String procedureDescriptionFormat)
creates a HTTP-GET string for DescribeSensor.
|
static Collection<String> |
getFeatureIDs(Collection<String> featureIDs,
String version)
Get valid FOI identifiers for SOS 2.0
|
static String |
getFoiGetUrl(String version,
String serviceURL,
String urlPattern)
Deprecated.
|
static String |
getGetCapabilitiesKVPRequest() |
static String |
getGetObservationKVPRequest(String version) |
static Set<String> |
getHierarchy(Map<String,Set<String>> hierarchy,
Set<String> keys,
boolean fullHierarchy,
boolean includeStartKeys)
get collection of hierarchy values for a set of keys
|
static Set<String> |
getHierarchy(Map<String,Set<String>> hierarchy,
String key,
boolean fullHierarchy,
boolean includeStartKey)
get collection of hierarchy values for a key
|
static MinMax<String> |
getMinMaxFromEnvelope(com.vividsolutions.jts.geom.Envelope envelope)
Creates the minimum and maximum values of this envelope in the default
EPSG.
|
static MinMax<List<String>> |
getMinMaxFromEnvelopeAsList(com.vividsolutions.jts.geom.Envelope envelope)
Creates the minimum and maximum values of this envelope in the default
EPSG as list.
|
static Map<String,String> |
getNcNameResolvedOfferings(Collection<String> offerings) |
private static String |
getParameter(String name,
String value) |
private static String |
getRequest(String requestName) |
private static String |
getServiceParam() |
private static String |
getVersionParam(String version) |
static String |
parseHttpPostBodyWithParameter(Enumeration<?> paramNames,
Map<?,?> parameterMap)
Parses the HTTP-Post body with a parameter
|
static int |
parseSrsName(String srsName)
Parse the srsName to integer value
|
protected static void |
setConfiguration(SosHelper.Configuration config) |
private static SosHelper.Configuration config
private static final org.slf4j.Logger LOGGER
private static final int KILO_BYTE
private static final int KILO_BYTES_256
protected static SosHelper.Configuration getConfiguration()
protected static void setConfiguration(SosHelper.Configuration config)
private static String getServiceParam()
@Deprecated public static String getFoiGetUrl(String version, String serviceURL, String urlPattern)
createFoiGetUrl(String, String, String, String)
version
- SOS versionserviceURL
- Service URLpublic static String createFoiGetUrl(String foiId, String version, String serviceURL, String urlPattern)
foiId
- FeatureOfInterst identifierversion
- SOS versionserviceURL
- Service URLpublic static String getDescribeSensorUrl(String version, String serviceURL, String procedureId, String urlPattern, String procedureDescriptionFormat) throws UnsupportedEncodingException
version
- the version of the requestserviceURL
- the service urlprocedureId
- The procedureId for the DescribeSensor requestprocedureDescriptionFormat
- The procedureDescriptionFormat for the DescribeSensor requesturlPattern
- the url pattern (e.g. /kvp)UnsupportedEncodingException
public static String addKVPOfferingParameterToRequest(String request, String offering)
public static String addKVPLanguageParameterToRequest(String request, String language)
public static String addKVPCrsParameterToRequest(String request, String crs)
public static String getGetCapabilitiesKVPRequest()
public static int parseSrsName(String srsName) throws OwsExceptionReport
srsName
- the srsName to parseOwsExceptionReport
- If the srsName can not be parsedpublic static void checkFreeMemory() throws OwsExceptionReport
OwsExceptionReport
- If no free memory size.public static com.vividsolutions.jts.geom.Envelope checkEnvelope(com.vividsolutions.jts.geom.Envelope envelope, com.vividsolutions.jts.geom.Geometry geometry)
envelope
- Current envelopegeometry
- Geometry to includepublic static String parseHttpPostBodyWithParameter(Enumeration<?> paramNames, Map<?,?> parameterMap) throws OwsExceptionReport
paramNames
- Parameter namesparameterMap
- Parameter mapOwsExceptionReport
- * If the parameter is not supported by this SOS.public static boolean checkFeatureOfInterestIdentifierForSosV2(String featureOfInterestIdentifier, String version)
featureOfInterestIdentifier
- FOI identifier from databaseversion
- SOS versionpublic static Set<String> getHierarchy(Map<String,Set<String>> hierarchy, String key, boolean fullHierarchy, boolean includeStartKey)
hierarchy
- map to examplekey
- start keyfullHierarchy
- whether to traverse down the full hierarchyincludeStartKey
- whether to include the passed key in the result collectionpublic static Set<String> getHierarchy(Map<String,Set<String>> hierarchy, Set<String> keys, boolean fullHierarchy, boolean includeStartKeys)
hierarchy
- map to examplekeys
- start keyfullHierarchy
- whether to traverse down the full hierarchyincludeStartKeys
- whether to include the passed keys in the result collectionpublic static void checkResponseFormat(String responseFormat, String service, String version) throws OwsExceptionReport
responseFormat
- String containing the value of the result format parameterservice
- version
- OwsExceptionReport
- * if the parameter value is incorrectpublic static void checkProcedureDescriptionFormat(String procedureDescriptionFormat, String service, String version) throws OwsExceptionReport
procedureDescriptionFormat
- the procedureDecriptionFormat parameter which should be
checkedservice
- Serviceversion
- Service versionOwsExceptionReport
- if the value of the procedureDecriptionFormat is incorrectpublic static void checkOutputFormat(String checkOutputFormat, String service, String version) throws OwsExceptionReport
checkOutputFormat
- the outputFormat parameter which should be checkedservice
- Serviceversion
- Service versionOwsExceptionReport
- if the value of the outputFormat is incorrectprivate static void checkFormat(String format, ServiceOperatorKey serviceOperatorKey, Enum<?> parameter) throws OwsExceptionReport
format
- the procedure format parameter which should be checkedserviceOperatorKey
- Service and versionparameter
- name of the checked parameterOwsExceptionReport
- if the value of the procedure format is incorrectpublic static Collection<String> getFeatureIDs(Collection<String> featureIDs, String version)
featureIDs
- FOI identifiers to testversion
- SOS versionpublic static MinMax<String> getMinMaxFromEnvelope(com.vividsolutions.jts.geom.Envelope envelope)
envelope
- the envelope
MinMax
describing the envelope
public static MinMax<List<String>> getMinMaxFromEnvelopeAsList(com.vividsolutions.jts.geom.Envelope envelope)
envelope
- the envelope
MinMax
describing the envelope
public static OmObservableProperty createSosOberavablePropertyFromSosSMLIo(SmlIo<?> output)
public static void checkHref(String href, String parameterName) throws OwsExceptionReport
OwsExceptionReport
@Deprecated public static void checkSection(List<String> sections) throws CodedException
CodedException
public static Map<String,String> getNcNameResolvedOfferings(Collection<String> offerings)
Copyright © 2012-2015 52north.org. All Rights Reserved.