public abstract class AbstractOmEncoderv20 extends AbstractXmlEncoder<Object> implements ObservationEncoder<org.apache.xmlbeans.XmlObject,Object>, StreamingEncoder<org.apache.xmlbeans.XmlObject,Object>
Constructor and Description |
---|
AbstractOmEncoderv20() |
Modifier and Type | Method and Description |
---|---|
private org.apache.xmlbeans.XmlObject |
addFeatureOfInterest(AbstractFeature feature)
Method to add the featureOfInterest to the XML observation object
|
void |
addNamespacePrefixToMap(Map<String,String> nameSpacePrefixMap)
|
protected abstract void |
addObservationType(net.opengis.om.x20.OMObservationType xbObservation,
String observationType)
Method to add the observation type to the om:Observation.
|
private void |
addParameter(net.opengis.om.x20.OMObservationType xbObservation,
Collection<NamedValue<?>> parameter) |
private void |
addPhenomenonTime(net.opengis.om.x20.TimeObjectPropertyType timeObjectPropertyType,
Time time)
Method to add the phenomenon time to the XML observation object
|
private void |
addProcedure(net.opengis.om.x20.OMProcessPropertyType procedure,
SosProcedureDescription procedureDescription,
String observationID)
Method that adds the procedure as reference or as encoded object to the
XML observation object
|
private void |
addResultQualities(net.opengis.om.x20.OMObservationType xbObservation,
OmObservation sosObservation) |
private void |
addResultQualities(net.opengis.om.x20.OMObservationType xbObservation,
Set<OmResultQuality> resultQuality) |
private void |
addResultTime(net.opengis.om.x20.OMObservationType xbObs,
OmObservation sosObservation)
Method to add the result time to the XML observation object
|
private void |
addResultTime(net.opengis.om.x20.OMObservationType xbObs,
TimeInstant time)
Method to add the result time to the XML observation object
|
private boolean |
checkEncodProcedureForEncoderKeys()
Method to check whether the procedure should be encoded
|
protected abstract boolean |
convertEncodedProcedure()
Indicator whether the procedure is to be encoded
|
protected net.opengis.om.x20.NamedValueType |
createNamedValue(NamedValue<?> sosNamedValue)
Method to encode a SOS NamedValue to an XmlBeans representation
|
protected org.apache.xmlbeans.XmlObject |
createOmObservation(OmObservation sosObservation,
Map<SosConstants.HelperValues,String> additionalValues)
Method to create an O&M 2.0 observation XmlBeans object
|
protected abstract org.apache.xmlbeans.XmlObject |
createResult(OmObservation sosObservation)
Method to create the om:result element content
|
org.apache.xmlbeans.XmlObject |
encode(Object element,
Map<SosConstants.HelperValues,String> additionalValues)
Encodes the specified object with the specified SosConstants.HelperValues
.
|
void |
encode(Object objectToEncode,
OutputStream outputStream) |
void |
encode(Object objectToEncode,
OutputStream outputStream,
EncodingValues encodingValues) |
private org.apache.xmlbeans.XmlObject |
encodeProcedureDescription(SosProcedureDescription procedureDescription) |
protected abstract org.apache.xmlbeans.XmlObject |
encodeResult(ObservationValue<?> observationValue) |
boolean |
forceStreaming() |
abstract String |
getDefaultFeatureEncodingNamespace()
Get the default encoding Namespace for FeatureOfInterest
|
protected abstract String |
getDefaultProcedureEncodingNamspace()
Get the default encoding Namespace for Procedures
|
private org.apache.xmlbeans.XmlObject |
getNamedValueValue(Value<?> value)
Get the XmlBeans object for SOS value
|
encode, getConformanceClasses, getContentType, getSchemaLocations, getSupportedTypes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSupportedResponseFormats, isObservationAndMeasurmentV20Type, shouldObservationsWithSameXBeMerged, supportsResultStreamingForMergedValues
encode, getContentType, getEncoderKeyType, getSchemaLocations, getSupportedTypes
getConformanceClasses
protected abstract org.apache.xmlbeans.XmlObject createResult(OmObservation sosObservation) throws OwsExceptionReport
sosObservation
- SosObservation to be encodedOwsExceptionReport
- if an error occursprotected abstract org.apache.xmlbeans.XmlObject encodeResult(ObservationValue<?> observationValue) throws OwsExceptionReport
OwsExceptionReport
protected abstract void addObservationType(net.opengis.om.x20.OMObservationType xbObservation, String observationType)
xbObservation
- XmlBeans object of observationobservationType
- Observation typepublic abstract String getDefaultFeatureEncodingNamespace()
protected abstract String getDefaultProcedureEncodingNamspace()
protected abstract boolean convertEncodedProcedure()
public boolean forceStreaming()
forceStreaming
in interface StreamingEncoder<org.apache.xmlbeans.XmlObject,Object>
public org.apache.xmlbeans.XmlObject encode(Object element, Map<SosConstants.HelperValues,String> additionalValues) throws OwsExceptionReport, UnsupportedEncoderInputException
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 encoderpublic void encode(Object objectToEncode, OutputStream outputStream) throws OwsExceptionReport
encode
in interface StreamingEncoder<org.apache.xmlbeans.XmlObject,Object>
OwsExceptionReport
public void encode(Object objectToEncode, OutputStream outputStream, EncodingValues encodingValues) throws OwsExceptionReport
encode
in interface StreamingEncoder<org.apache.xmlbeans.XmlObject,Object>
OwsExceptionReport
public void addNamespacePrefixToMap(Map<String,String> nameSpacePrefixMap)
Encoder
addNamespacePrefixToMap
in interface Encoder<org.apache.xmlbeans.XmlObject,Object>
addNamespacePrefixToMap
in class AbstractXmlEncoder<Object>
protected org.apache.xmlbeans.XmlObject createOmObservation(OmObservation sosObservation, Map<SosConstants.HelperValues,String> additionalValues) throws OwsExceptionReport
sosObservation
- SosObservation to be encodedadditionalValues
- Additional values which are used during the encodingOwsExceptionReport
- If an error occursprivate void addResultQualities(net.opengis.om.x20.OMObservationType xbObservation, OmObservation sosObservation) throws OwsExceptionReport
OwsExceptionReport
private void addResultQualities(net.opengis.om.x20.OMObservationType xbObservation, Set<OmResultQuality> resultQuality) throws OwsExceptionReport
OwsExceptionReport
private org.apache.xmlbeans.XmlObject encodeProcedureDescription(SosProcedureDescription procedureDescription) throws OwsExceptionReport
OwsExceptionReport
private void addProcedure(net.opengis.om.x20.OMProcessPropertyType procedure, SosProcedureDescription procedureDescription, String observationID) throws OwsExceptionReport
procedure
- XML process typeprocedureDescription
- SosProcedureDescription to be encodedobservationID
- GML observation id.OwsExceptionReport
- If an error occursprivate boolean checkEncodProcedureForEncoderKeys()
private void addPhenomenonTime(net.opengis.om.x20.TimeObjectPropertyType timeObjectPropertyType, Time time) throws OwsExceptionReport
timeObjectPropertyType
- XML time object from XML observation objecttime
- SOS phenomenon time representationOwsExceptionReport
- If an error occursprivate void addResultTime(net.opengis.om.x20.OMObservationType xbObs, OmObservation sosObservation) throws OwsExceptionReport
xbObs
- XML observation objectsosObservation
- SOS observation objectOwsExceptionReport
- If an error occurs.private void addResultTime(net.opengis.om.x20.OMObservationType xbObs, TimeInstant time) throws OwsExceptionReport
xbObs
- XML observation objecttime
- SOS result time representationOwsExceptionReport
- If an error occurs.private void addParameter(net.opengis.om.x20.OMObservationType xbObservation, Collection<NamedValue<?>> parameter) throws OwsExceptionReport
OwsExceptionReport
private org.apache.xmlbeans.XmlObject addFeatureOfInterest(AbstractFeature feature) throws OwsExceptionReport
feature
- SOS feature representationOwsExceptionReport
- If an error occurs.protected net.opengis.om.x20.NamedValueType createNamedValue(NamedValue<?> sosNamedValue) throws OwsExceptionReport
sosNamedValue
- SOS NamedValueOwsExceptionReport
- If an error occurs.private org.apache.xmlbeans.XmlObject getNamedValueValue(Value<?> value) throws OwsExceptionReport
value
- SOS value objectOwsExceptionReport
- If an error occurs.Copyright © 2012-2015 52north.org. All Rights Reserved.