Package org.n52.shetland.ogc.om
Class OmObservation
- java.lang.Object
-
- org.n52.shetland.ogc.gml.AbstractGML
-
- org.n52.shetland.ogc.gml.AbstractFeature
-
- org.n52.shetland.ogc.om.OmObservation
-
- All Implemented Interfaces:
HasDefaultEncoding<AbstractFeature>,ObservationParameterHelper<OmObservation>
- Direct Known Subclasses:
AbstractInspireObservation
public class OmObservation extends AbstractFeature implements ObservationParameterHelper<OmObservation>
Class represents a SOS/O&M observation- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description OmObservation()constructor.OmObservation(String identifier)constructor.OmObservation(CodeWithAuthority identifier)constructor.OmObservation(CodeWithAuthority identifier, String gmlId)constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OmObservationaddParameter(NamedValue<?> namedValue)Add parameterOmObservationaddRelatedObservation(OmObservationContext relatedObservation)Add a related observationOmObservationaddRelatedObservations(Collection<OmObservationContext> relatedObservations)Add related observationsOmObservationaddResultQuality(Collection<OmResultQuality> qualityList)OmObservationaddResultQuality(OmResultQuality qualityList)OmObservationaddSpatialFilteringProfileParameter(org.locationtech.jts.geom.Geometry samplingGeometry)Add sampling geometry to observationbooleancheckForMerge(OmObservation observation)booleancheckForMerge(OmObservation observation, ObservationMergeIndicator indicator)OmObservationcloneTemplate()OmObservationcloneTemplate(boolean withIdentifierNameDesription)protected OmObservationcloneTemplate(OmObservation clone)TVPValueconvertSingleValueToMultiValue(SingleObservationValue<?> singleValue)ConvertSingleObservationValuetoTVPValue.OmObservationcopyTo(OmObservation copyOf)StringgetAdditionalMergeIndicator()StringgetDecimalSeparator()Get decimal separator.NamedValue<BigDecimal>getDepthParameter()Get depth parameterStringgetGmlId()Get GML idNamedValue<BigDecimal>getHeightDepthParameter()NamedValue<BigDecimal>getHeightParameter()Get height parameterStringgetNoDataValue()Get noData value.OmObservationConstellationgetObservationConstellation()Get the observation constellation.StringgetObservationID()Get observation ID.Collection<NamedValue<?>>getParameter()Get parameterParameterHoldergetParameterHolder()TimegetPhenomenonTime()Get phenomenon time.Set<OmObservationContext>getRelatedObservations()Get related observationsSet<OmResultQuality>getResultQuality()Get result quality.TimeInstantgetResultTime()Get result time.StringgetResultType()Get result type.NamedValue<org.locationtech.jts.geom.Geometry>getSpatialFilteringProfileParameter()Get spatial filtering profile parameterStringgetTokenSeparator()Get token separator.StringgetTupleSeparator()Get tuple separator.TimePeriodgetValidTime()Get valid time.ObservationValue<?>getValue()Get observation values.booleanisSetAdditionalMergeIndicator()booleanisSetDecimalSeparator()Check whether decimal separator is set.booleanisSetDepthParameter()Check whether depth parameter is set.booleanisSetHeightDepthParameter()booleanisSetHeightParameter()Check whether height parameter is setbooleanisSetObservationID()Check whether observation id is set.booleanisSetParameter()Check whether parameter is setbooleanisSetPhenomenonTime()booleanisSetRelatedObservations()Check if related observations are setbooleanisSetResultQuality()booleanisSetResultTime()Check whether result time is set.booleanisSetResultType()Check whether result type is set.booleanisSetSpatialFilteringProfileParameter()Check whether spatial filtering profile parameter is setbooleanisSetTokenSeparator()Check whether token separator is set.booleanisSetTupleSeparator()Check whether tuple separator is set.booleanisSetValidTime()Check whether valid time is set.booleanisSetValue()booleanisTemplateResultTime()Check whether result time is template is set.protected booleanmergeValues(ObservationValue<?> observationValue)Merge observation values with passed observation values.OmObservationmergeWithObservation(ObservationValue<?> observationValue)Merge this observation with passed observation.OmObservationmergeWithObservation(OmObservation sosObservation)Merge this observation with passed observation.voidremoveSpatialFilteringProfileParameter()Remove spatial filtering profile parameterOmObservationsetAdditionalMergeIndicator(String additionalMergeIndicator)OmObservationsetDecimalSeparator(String decimalSeparator)Set decimal separator.OmObservationsetNoDataValue(String noDataValue)Set noData value.OmObservationsetObservationConstellation(OmObservationConstellation observationConstellation)Set the observation constellation.OmObservationsetObservationID(String observationID)Set observation ID.OmObservationsetParameter(Collection<NamedValue<?>> parameter)Set parameterOmObservationsetRelatedObservations(Collection<OmObservationContext> relatedObservations)Set related observationsOmObservationsetResultQuality(Collection<OmResultQuality> qualityList)Set result quality.OmObservationsetResultTime(TimeInstant resultTime)Set result time.OmObservationsetResultType(String resultType)Set result type.OmObservationsetTokenSeparator(String tokenSeparator)Set token separator.OmObservationsetTupleSeparator(String tupleSeparator)Set tuple separator.OmObservationsetValidTime(TimePeriod validTime)Set valid time.OmObservationsetValue(ObservationValue<?> value)Set observation values.-
Methods inherited from class org.n52.shetland.ogc.gml.AbstractFeature
accept, copyTo, getDefaultElementEncoding, getXml, isEncoded, isSetDefaultElementEncoding, isSetXml, setDefaultElementEncoding, setXml, wasEncoded
-
Methods inherited from class org.n52.shetland.ogc.gml.AbstractGML
addMetaDataProperty, addMetaDataProperty, addName, addName, addName, copyTo, equals, getDescription, getFirstName, getHumanReadableIdentifier, getHumanReadableIdentifierCodeWithAuthority, getIdentifier, getIdentifierCodeWithAuthority, getMetaDataProperty, getName, getOriginalIdentifier, getOriginalIdentifierCodeWithAuthority, hashCode, isReferenced, isSetDescription, isSetGmlID, isSetHumanReadableIdentifier, isSetIdentifier, isSetMetaDataProperty, isSetName, isSetOriginalIdentifier, setDescription, setGmlId, setHumanReadableIdentifier, setHumanReadableIdentifier, setHumanReadableIdentifierAsIdentifier, setIdentifier, setIdentifier, setMetaDataProperty, setName, setName
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.n52.shetland.ogc.om.ObservationParameterHelper
addCategoryParameter, addCategoryParameter, addCategoryParameter, addPlatformParameter, addPlatformParameter, addPlatformParameter, getCategoryParameter, getPlatformParameter, isSetCategoryParameter, isSetPlatformParameter, removeCategoryParameter, removeParameter, removePlatformParameter
-
-
-
-
Constructor Detail
-
OmObservation
public OmObservation()
constructor.
-
OmObservation
public OmObservation(String identifier)
constructor.- Parameters:
identifier- Feature identifier
-
OmObservation
public OmObservation(CodeWithAuthority identifier)
constructor.- Parameters:
identifier- Feature identifier
-
OmObservation
public OmObservation(CodeWithAuthority identifier, String gmlId)
constructor.- Parameters:
identifier- Feature identifiergmlId- GML id
-
-
Method Detail
-
getObservationConstellation
public OmObservationConstellation getObservationConstellation()
Get the observation constellation.- Returns:
- the observationConstellation
-
setObservationConstellation
public OmObservation setObservationConstellation(OmObservationConstellation observationConstellation)
Set the observation constellation.- Parameters:
observationConstellation- the observationConstellation to set
-
getObservationID
public String getObservationID()
Get observation ID.- Returns:
- the observationID
-
setObservationID
public OmObservation setObservationID(String observationID)
Set observation ID.- Parameters:
observationID- the observationID to set- Returns:
- this
-
getPhenomenonTime
public Time getPhenomenonTime()
Get phenomenon time.- Returns:
- the phenomenonTime
-
isSetPhenomenonTime
public boolean isSetPhenomenonTime()
-
getResultTime
public TimeInstant getResultTime()
Get result time.- Returns:
- the resultTime
-
setResultTime
public OmObservation setResultTime(TimeInstant resultTime)
Set result time.- Parameters:
resultTime- the resultTime to set- Returns:
- this
-
getValidTime
public TimePeriod getValidTime()
Get valid time.- Returns:
- the validTime
-
setValidTime
public OmObservation setValidTime(TimePeriod validTime)
Set valid time.- Parameters:
validTime- the validTime to set- Returns:
- this
-
getResultType
public String getResultType()
Get result type.- Returns:
- the resultType
-
setResultType
public OmObservation setResultType(String resultType)
Set result type.- Parameters:
resultType- the resultType to set- Returns:
- this
-
getTokenSeparator
public String getTokenSeparator()
Get token separator.- Returns:
- the tokenSeparator
-
setTokenSeparator
public OmObservation setTokenSeparator(String tokenSeparator)
Set token separator.- Parameters:
tokenSeparator- the tokenSeparator to set- Returns:
- this
-
getNoDataValue
public String getNoDataValue()
Get noData value.- Returns:
- the noDataValue
-
setNoDataValue
public OmObservation setNoDataValue(String noDataValue)
Set noData value.- Parameters:
noDataValue- the noDataValue to set- Returns:
- this
-
getTupleSeparator
public String getTupleSeparator()
Get tuple separator.- Returns:
- the tupleSeparator
-
setTupleSeparator
public OmObservation setTupleSeparator(String tupleSeparator)
Set tuple separator.- Parameters:
tupleSeparator- the tupleSeparator to set- Returns:
- this
-
getDecimalSeparator
public String getDecimalSeparator()
Get decimal separator.- Returns:
- the decimalSeparator
-
setDecimalSeparator
public OmObservation setDecimalSeparator(String decimalSeparator)
Set decimal separator.- Parameters:
decimalSeparator- the decimalSeparator to set- Returns:
- this
-
getValue
public ObservationValue<?> getValue()
Get observation values.- Returns:
- the values
-
setValue
public OmObservation setValue(ObservationValue<?> value)
Set observation values.- Parameters:
value- the values to set- Returns:
- this
-
isSetValue
public boolean isSetValue()
-
mergeWithObservation
public OmObservation mergeWithObservation(OmObservation sosObservation)
Merge this observation with passed observation.- Parameters:
sosObservation- Observation to merge- Returns:
- this
-
mergeWithObservation
public OmObservation mergeWithObservation(ObservationValue<?> observationValue)
Merge this observation with passed observation.- Parameters:
observationValue- Observation to merge- Returns:
- this
-
mergeValues
protected boolean mergeValues(ObservationValue<?> observationValue)
Merge observation values with passed observation values.- Parameters:
observationValue- Observation to merge
-
convertSingleValueToMultiValue
public TVPValue convertSingleValueToMultiValue(SingleObservationValue<?> singleValue)
ConvertSingleObservationValuetoTVPValue.- Parameters:
singleValue- Single observation value- Returns:
- Converted TVPValue value
-
isSetObservationID
public boolean isSetObservationID()
Check whether observation id is set.- Returns:
true, if observation id is set
-
isSetTupleSeparator
public boolean isSetTupleSeparator()
Check whether tuple separator is set.- Returns:
true, if tuple separator is set
-
isSetTokenSeparator
public boolean isSetTokenSeparator()
Check whether token separator is set.- Returns:
true, if token separator is set
-
isSetDecimalSeparator
public boolean isSetDecimalSeparator()
Check whether decimal separator is set.- Returns:
true, if decimal separator is set
-
isSetResultTime
public boolean isSetResultTime()
Check whether result time is set.- Returns:
true, if result time is set
-
isTemplateResultTime
public boolean isTemplateResultTime()
Check whether result time is template is set.- Returns:
true, if result time is template is set
-
isSetResultType
public boolean isSetResultType()
Check whether result type is set.- Returns:
true, if result type is set
-
isSetValidTime
public boolean isSetValidTime()
Check whether valid time is set.- Returns:
true, if valid time is set
-
getParameter
public Collection<NamedValue<?>> getParameter()
Get parameter- Returns:
- the parameter
-
setParameter
public OmObservation setParameter(Collection<NamedValue<?>> parameter)
Set parameter- Parameters:
parameter- the parameter to set- Returns:
- this
-
addParameter
public OmObservation addParameter(NamedValue<?> namedValue)
Add parameter- Parameters:
namedValue- the namedValue to add to parameter- Returns:
- this
-
getParameterHolder
public ParameterHolder getParameterHolder()
- Specified by:
getParameterHolderin interfaceObservationParameterHelper<OmObservation>
-
isSetParameter
public boolean isSetParameter()
Check whether parameter is set- Returns:
true, if parameter is set
-
isSetSpatialFilteringProfileParameter
public boolean isSetSpatialFilteringProfileParameter()
Check whether spatial filtering profile parameter is set- Returns:
true, if spatial filtering profile parameter is set
-
removeSpatialFilteringProfileParameter
public void removeSpatialFilteringProfileParameter()
Remove spatial filtering profile parameter
-
addSpatialFilteringProfileParameter
public OmObservation addSpatialFilteringProfileParameter(org.locationtech.jts.geom.Geometry samplingGeometry)
Add sampling geometry to observation- Parameters:
samplingGeometry- The sampling geometry to set- Returns:
- this
-
getSpatialFilteringProfileParameter
public NamedValue<org.locationtech.jts.geom.Geometry> getSpatialFilteringProfileParameter()
Get spatial filtering profile parameter- Returns:
- Spatial filtering profile parameter
-
isSetHeightParameter
public boolean isSetHeightParameter()
Check whether height parameter is set- Returns:
true, if height parameter is set
-
getHeightParameter
public NamedValue<BigDecimal> getHeightParameter()
Get height parameter- Returns:
- Height parameter
-
isSetDepthParameter
public boolean isSetDepthParameter()
Check whether depth parameter is set.- Returns:
true, if depth parameter is set
-
getDepthParameter
public NamedValue<BigDecimal> getDepthParameter()
Get depth parameter- Returns:
- Depth parameter
-
isSetHeightDepthParameter
public boolean isSetHeightDepthParameter()
-
getHeightDepthParameter
public NamedValue<BigDecimal> getHeightDepthParameter()
-
cloneTemplate
public OmObservation cloneTemplate()
-
cloneTemplate
public OmObservation cloneTemplate(boolean withIdentifierNameDesription)
-
cloneTemplate
protected OmObservation cloneTemplate(OmObservation clone)
-
copyTo
public OmObservation copyTo(OmObservation copyOf)
-
getGmlId
public String getGmlId()
Description copied from class:AbstractGMLGet GML id- Overrides:
getGmlIdin classAbstractGML- Returns:
- GML id
-
setResultQuality
public OmObservation setResultQuality(Collection<OmResultQuality> qualityList)
Set result quality.- Parameters:
qualityList- Result quality to set- Returns:
this
-
addResultQuality
public OmObservation addResultQuality(Collection<OmResultQuality> qualityList)
-
addResultQuality
public OmObservation addResultQuality(OmResultQuality qualityList)
-
getResultQuality
public Set<OmResultQuality> getResultQuality()
Get result quality.- Returns:
- Result quality
-
isSetResultQuality
public boolean isSetResultQuality()
-
getRelatedObservations
public Set<OmObservationContext> getRelatedObservations()
Get related observations- Returns:
- the relatedObservations
-
setRelatedObservations
public OmObservation setRelatedObservations(Collection<OmObservationContext> relatedObservations)
Set related observations- Parameters:
relatedObservations- the relatedObservations to set- Returns:
- this
-
addRelatedObservations
public OmObservation addRelatedObservations(Collection<OmObservationContext> relatedObservations)
Add related observations- Parameters:
relatedObservations- the relatedObservations to set- Returns:
- this
-
addRelatedObservation
public OmObservation addRelatedObservation(OmObservationContext relatedObservation)
Add a related observation- Parameters:
relatedObservation- the relatedObservation to add- Returns:
- this
-
isSetRelatedObservations
public boolean isSetRelatedObservations()
Check if related observations are set- Returns:
true, if related observations are set
-
setAdditionalMergeIndicator
public OmObservation setAdditionalMergeIndicator(String additionalMergeIndicator)
-
getAdditionalMergeIndicator
public String getAdditionalMergeIndicator()
-
isSetAdditionalMergeIndicator
public boolean isSetAdditionalMergeIndicator()
-
checkForMerge
public boolean checkForMerge(OmObservation observation)
-
checkForMerge
public boolean checkForMerge(OmObservation observation, ObservationMergeIndicator indicator)
-
-