public class OmEncoderv100 extends AbstractXmlEncoder<Object> implements ObservationEncoder<org.apache.xmlbeans.XmlObject,Object>
Modifier and Type | Field and Description |
---|---|
private static Set<String> |
CONFORMANCE_CLASSES |
private static Set<EncoderKey> |
ENCODER_KEYS |
private static org.slf4j.Logger |
LOGGER |
private static Map<String,Map<String,Set<String>>> |
SUPPORTED_RESPONSE_FORMATS |
private static Map<ServiceConstants.SupportedTypeKey,Set<String>> |
SUPPORTED_TYPES |
Constructor and Description |
---|
OmEncoderv100() |
Modifier and Type | Method and Description |
---|---|
private void |
addFeatureOfInterest(net.opengis.om.x10.ObservationType observation,
AbstractFeature feature)
Encodes a SosAbstractFeature to an SpatialSamplingFeature under
consideration of duplicated SpatialSamplingFeature in the XML document.
|
private void |
addMultiObservationValueToResult(org.apache.xmlbeans.XmlObject xbResult,
OmObservation sosObservation) |
void |
addNamespacePrefixToMap(Map<String,String> nameSpacePrefixMap)
|
private void |
addResultTime(net.opengis.om.x10.ObservationType xbObs,
OmObservation sosObservation) |
private void |
addResultTime(net.opengis.om.x10.ObservationType xbObs,
TimeInstant iTime) |
private void |
addResultToObservation(org.apache.xmlbeans.XmlObject xbResult,
OmObservation sosObservation,
List<OmObservableProperty> phenComponents) |
private void |
addSamplingTime(net.opengis.om.x10.ObservationType xbObservation,
Time iTime) |
private void |
addSingleObservationToResult(org.apache.xmlbeans.XmlObject xbResult,
OmObservation sosObservation) |
private List<OmObservableProperty> |
addValuesToObservation(net.opengis.om.x10.ObservationType xbObs,
OmObservation sosObservation,
Map<SosConstants.HelperValues,String> additionalValues) |
private String |
checkObservationType(OmObservation sosObservation) |
private org.apache.xmlbeans.XmlObject |
createCategoryObservation(OmObservation sosObservation,
Map<SosConstants.HelperValues,String> additionalValues) |
private org.apache.xmlbeans.XmlObject |
createCompositePhenomenon(String compPhenId,
Collection<String> phenComponents) |
private org.apache.xmlbeans.XmlObject |
createCountObservation(OmObservation sosObservation,
Map<SosConstants.HelperValues,String> additionalValues) |
private org.apache.xmlbeans.XmlObject |
createGeometryObservation(OmObservation sosObservation,
Map<SosConstants.HelperValues,String> additionalValues) |
private org.apache.xmlbeans.XmlObject |
createMeasurement(OmObservation sosObservation,
Map<SosConstants.HelperValues,String> additionalValues) |
private org.apache.xmlbeans.XmlObject |
createObservation(OmObservation sosObservation,
Map<SosConstants.HelperValues,String> additionalValues) |
private org.apache.xmlbeans.XmlObject |
createObservationCollection(List<OmObservation> sosObservationCollection,
String resultModel) |
private org.apache.xmlbeans.XmlObject |
createOmObservation(OmObservation sosObservation,
Map<SosConstants.HelperValues,String> additionalValues) |
private org.apache.xmlbeans.XmlObject |
createTruthObservation(OmObservation sosObservation,
Map<SosConstants.HelperValues,String> additionalValues) |
org.apache.xmlbeans.XmlObject |
encode(Object element,
Map<SosConstants.HelperValues,String> additionalValues)
Encodes the specified object with the specified SosConstants.HelperValues
.
|
Set<String> |
getConformanceClasses() |
MediaType |
getContentType() |
Set<EncoderKey> |
getEncoderKeyType() |
private SosEnvelope |
getEnvelope(List<OmObservation> sosObservationCollection) |
Set<SchemaLocation> |
getSchemaLocations() |
Set<String> |
getSupportedResponseFormats(String service,
String version)
Get the supported response formats for this
ObservationEncoder and the specified service and version.
|
Map<ServiceConstants.SupportedTypeKey,Set<String>> |
getSupportedTypes()
|
boolean |
isObservationAndMeasurmentV20Type()
Indicator whether the ObservationEncoder of type or subtype
Observation&Measurement 2.0
|
boolean |
shouldObservationsWithSameXBeMerged()
Indicator whether the single observations with the same procedure,
observableProperty and featureOfInterest should be merged to one
observation.
|
boolean |
supportsResultStreamingForMergedValues() |
encode
private static final org.slf4j.Logger LOGGER
private static final Map<ServiceConstants.SupportedTypeKey,Set<String>> SUPPORTED_TYPES
private static final Map<String,Map<String,Set<String>>> SUPPORTED_RESPONSE_FORMATS
private static final Set<EncoderKey> ENCODER_KEYS
public Set<EncoderKey> getEncoderKeyType()
getEncoderKeyType
in interface Encoder<org.apache.xmlbeans.XmlObject,Object>
EncoderKey
)public Map<ServiceConstants.SupportedTypeKey,Set<String>> getSupportedTypes()
Encoder
getSupportedTypes
in interface Encoder<org.apache.xmlbeans.XmlObject,Object>
getSupportedTypes
in class AbstractXmlEncoder<Object>
public Set<String> getConformanceClasses()
getConformanceClasses
in interface ConformanceClass
getConformanceClasses
in class AbstractXmlEncoder<Object>
public void addNamespacePrefixToMap(Map<String,String> nameSpacePrefixMap)
Encoder
addNamespacePrefixToMap
in interface Encoder<org.apache.xmlbeans.XmlObject,Object>
addNamespacePrefixToMap
in class AbstractXmlEncoder<Object>
public boolean isObservationAndMeasurmentV20Type()
ObservationEncoder
isObservationAndMeasurmentV20Type
in interface ObservationEncoder<org.apache.xmlbeans.XmlObject,Object>
public Set<String> getSupportedResponseFormats(String service, String version)
ObservationEncoder
getSupportedResponseFormats
in interface ObservationEncoder<org.apache.xmlbeans.XmlObject,Object>
service
- the serviceversion
- the versionpublic boolean shouldObservationsWithSameXBeMerged()
ObservationEncoder
shouldObservationsWithSameXBeMerged
in interface ObservationEncoder<org.apache.xmlbeans.XmlObject,Object>
public boolean supportsResultStreamingForMergedValues()
supportsResultStreamingForMergedValues
in interface ObservationEncoder<org.apache.xmlbeans.XmlObject,Object>
public MediaType getContentType()
getContentType
in interface Encoder<org.apache.xmlbeans.XmlObject,Object>
getContentType
in class AbstractXmlEncoder<Object>
public Set<SchemaLocation> getSchemaLocations()
getSchemaLocations
in interface Encoder<org.apache.xmlbeans.XmlObject,Object>
getSchemaLocations
in class AbstractXmlEncoder<Object>
public org.apache.xmlbeans.XmlObject encode(Object element, Map<SosConstants.HelperValues,String> additionalValues) throws OwsExceptionReport
Encoder
encode
in interface Encoder<org.apache.xmlbeans.XmlObject,Object>
element
- the object to encodeadditionalValues
- the helper valuesOwsExceptionReport
- if an error occursUnsupportedEncoderInputException
- if the supplied object (or any of it's contents) is not
supported by this encoderprivate org.apache.xmlbeans.XmlObject createObservation(OmObservation sosObservation, Map<SosConstants.HelperValues,String> additionalValues) throws OwsExceptionReport
OwsExceptionReport
private String checkObservationType(OmObservation sosObservation)
private org.apache.xmlbeans.XmlObject createObservationCollection(List<OmObservation> sosObservationCollection, String resultModel) throws OwsExceptionReport
OwsExceptionReport
private SosEnvelope getEnvelope(List<OmObservation> sosObservationCollection)
private org.apache.xmlbeans.XmlObject createMeasurement(OmObservation sosObservation, Map<SosConstants.HelperValues,String> additionalValues) throws OwsExceptionReport
OwsExceptionReport
private org.apache.xmlbeans.XmlObject createCategoryObservation(OmObservation sosObservation, Map<SosConstants.HelperValues,String> additionalValues) throws OwsExceptionReport
OwsExceptionReport
private org.apache.xmlbeans.XmlObject createCountObservation(OmObservation sosObservation, Map<SosConstants.HelperValues,String> additionalValues) throws OwsExceptionReport
OwsExceptionReport
private org.apache.xmlbeans.XmlObject createTruthObservation(OmObservation sosObservation, Map<SosConstants.HelperValues,String> additionalValues) throws OwsExceptionReport
OwsExceptionReport
private org.apache.xmlbeans.XmlObject createGeometryObservation(OmObservation sosObservation, Map<SosConstants.HelperValues,String> additionalValues) throws OwsExceptionReport
OwsExceptionReport
private org.apache.xmlbeans.XmlObject createOmObservation(OmObservation sosObservation, Map<SosConstants.HelperValues,String> additionalValues) throws OwsExceptionReport
OwsExceptionReport
private List<OmObservableProperty> addValuesToObservation(net.opengis.om.x10.ObservationType xbObs, OmObservation sosObservation, Map<SosConstants.HelperValues,String> additionalValues) throws OwsExceptionReport
OwsExceptionReport
private void addSamplingTime(net.opengis.om.x10.ObservationType xbObservation, Time iTime) throws OwsExceptionReport
OwsExceptionReport
private void addResultTime(net.opengis.om.x10.ObservationType xbObs, OmObservation sosObservation) throws OwsExceptionReport
OwsExceptionReport
private void addResultTime(net.opengis.om.x10.ObservationType xbObs, TimeInstant iTime) throws OwsExceptionReport
OwsExceptionReport
private org.apache.xmlbeans.XmlObject createCompositePhenomenon(String compPhenId, Collection<String> phenComponents)
private void addResultToObservation(org.apache.xmlbeans.XmlObject xbResult, OmObservation sosObservation, List<OmObservableProperty> phenComponents) throws OwsExceptionReport
OwsExceptionReport
private void addSingleObservationToResult(org.apache.xmlbeans.XmlObject xbResult, OmObservation sosObservation) throws OwsExceptionReport
OwsExceptionReport
private void addMultiObservationValueToResult(org.apache.xmlbeans.XmlObject xbResult, OmObservation sosObservation) throws OwsExceptionReport
OwsExceptionReport
private void addFeatureOfInterest(net.opengis.om.x10.ObservationType observation, AbstractFeature feature) throws OwsExceptionReport
observation
- XmlObject O&M observationfeature
- SOS observationOwsExceptionReport
Copyright © 2012-2015 52north.org. All Rights Reserved.