Package org.n52.svalbard.util
Class SweHelper
java.lang.Object
org.n52.svalbard.util.SweHelper
SWE helper class.
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSosSweDataArray(AbstractObservationValue<?> observationValue) CreateSweDataArrayfromAbstractObservationValuecreateSosSweDataArray(OmObservation sosObservation) CreateSweDataArrayfromOmObservationcreateSweQuantity(Object value, String axis, String uom) Create aSweQuantityfrom parametercreateTextEncoding(String tuple, String token, String decimal) Create a TextEncoding object for token and tuple separators.Create a TextEncoding object for token and tuple separators from SosObservation.booleanhasAltitudeName(String... names) Check if altitude names contains namebooleanhasEastingName(String... names) Check if easting names contains namebooleanhasNorthingName(String... names) Check if northing names contains namevoidsetAltitudeNames(String altitudeNames) voidsetDecimalSeparator(String separator) voidsetEastingNames(String eastingNames) voidsetNorthingNames(String northingNames) voidsetTokenSeparator(String separator) voidsetTupleSeparator(String separator)
-
Constructor Details
-
SweHelper
public SweHelper()
-
-
Method Details
-
setTokenSeparator
@Setting(value="coding.tokenSeparator", required=false) public void setTokenSeparator(String separator) throws ConfigurationError - Throws:
ConfigurationError
-
setTupleSeparator
@Setting(value="coding.tupleSeparator", required=false) public void setTupleSeparator(String separator) throws ConfigurationError - Throws:
ConfigurationError
-
setDecimalSeparator
@Setting(value="coding.decimalSeparator", required=false) public void setDecimalSeparator(String separator) throws ConfigurationError - Throws:
ConfigurationError
-
createSosSweDataArray
CreateSweDataArrayfromOmObservation- Parameters:
sosObservation- TheOmObservationto createSweDataArrayfrom- Returns:
- Created
SweDataArray - Throws:
EncodingException- If the service does not support theSweDataArraycreation from value ofOmObservation
-
createSosSweDataArray
public SweDataArray createSosSweDataArray(AbstractObservationValue<?> observationValue) throws EncodingException CreateSweDataArrayfromAbstractObservationValue- Parameters:
observationValue- TheAbstractObservationValueto createSweDataArrayfrom- Returns:
- Created
SweDataArray - Throws:
EncodingException- If the service does not support theSweDataArraycreation fromAbstractObservationValue
-
createTextEncoding
Create a TextEncoding object for token and tuple separators from SosObservation. If separators not set, definitions from Configurator are used.- Parameters:
o- SosObservation with token and tuple separator- Returns:
- TextEncoding
-
createTextEncoding
Create a TextEncoding object for token and tuple separators.- Parameters:
tuple- Token separatortoken- Tuple separatordecimal- Decimal separator- Returns:
- TextEncoding
-
createDefaultTextEncoding
-
createSweQuantity
Create aSweQuantityfrom parameter- Parameters:
value- theSweQuantityvalueaxis- theSweQuantityaxis iduom- theSweQuantityunit of measure- Returns:
- the
SweQuantityfrom parameter
-
getNorthingNames
- Returns:
- the northingNames
-
setNorthingNames
@Setting(value="swe.coordinate.northing", required=false) public void setNorthingNames(String northingNames) - Parameters:
northingNames- the northingNames to set
-
hasNorthingName
Check if northing names contains name- Parameters:
names- Names to check- Returns:
true, if the name is defined.
-
getEastingNames
- Returns:
- the eastingNames
-
setEastingNames
@Setting(value="swe.coordinate.easting", required=false) public void setEastingNames(String eastingNames) - Parameters:
eastingNames- the eastingNames to set
-
hasEastingName
Check if easting names contains name- Parameters:
names- Names to check- Returns:
true, if the name is defined.
-
getAltitudeNames
- Returns:
- the altitudeNames
-
setAltitudeNames
@Setting(value="swe.coordinate.altitude", required=false) public void setAltitudeNames(String altitudeNames) - Parameters:
altitudeNames- the altitudeNames to set
-
hasAltitudeName
Check if altitude names contains name- Parameters:
names- Names to check- Returns:
true, if the name is defined.
-