Package org.n52.svalbard.encode
Class OmEncoderv20
java.lang.Object
org.n52.svalbard.encode.AbstractDelegatingEncoder<org.apache.xmlbeans.XmlObject,Object>
org.n52.svalbard.encode.AbstractXmlEncoder<org.apache.xmlbeans.XmlObject,Object>
org.n52.svalbard.encode.AbstractOmEncoderv20
org.n52.svalbard.encode.OmEncoderv20
- All Implemented Interfaces:
Component<EncoderKey>,Keyed<EncoderKey>,ConformanceClass,Encoder<org.apache.xmlbeans.XmlObject,,Object> ObservationEncoder<org.apache.xmlbeans.XmlObject,,Object> SchemaAwareEncoder<org.apache.xmlbeans.XmlObject,,Object> StreamingEncoder<org.apache.xmlbeans.XmlObject,Object>
- Direct Known Subclasses:
GWGeologyLogObservationTypeEncoder,GwmlEncoderv22
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAddtitionalInformation(net.opengis.om.x20.OMObservationType omot, OmObservation observation) protected voidaddObservationType(net.opengis.om.x20.OMObservationType xbObservation, String observationType) Method to add the observation type to the om:Observation.protected booleanIndicator whether the procedure is to be encodedprotected net.opengis.om.x20.OMObservationTypeprotected org.apache.xmlbeans.XmlObjectcreateResult(OmObservation sosObservation) Method to create the om:result element contentprotected org.apache.xmlbeans.XmlBooleanprotected org.apache.xmlbeans.XmlIntegerprotected org.apache.xmlbeans.XmlStringvoidencode(Object objectToEncode, OutputStream outputStream, EncodingContext ctx) org.apache.xmlbeans.XmlObjectencode(Object element, EncodingContext additionalValues) protected org.apache.xmlbeans.XmlObjectencodeResult(ObservationValue<?> observationValue) protected org.apache.xmlbeans.XmlObjectprotected org.apache.xmlbeans.XmlObjectencodeSWE(Object o, EncodingContext additionalValues) getConformanceClasses(String service, String version) Get the default encoding Namespace for FeatureOfInterestprotected StringGet the default encoding Namespace for ProceduresgetKeys()getSupportedResponseFormats(String service, String version) booleanvoidsetSweHelper(SweHelper sweHelper) booleanbooleanMethods inherited from class org.n52.svalbard.encode.AbstractOmEncoderv20
addNamespacePrefixToMap, createNamedValue, encodeGML, encodeGML, encodeGWML, encodeGWML, encodeOmObservation, encodeSweCommon, encodeSweCommon, encodeXLINK, encodeXLINK, setObservationTypeMethods inherited from class org.n52.svalbard.encode.AbstractXmlEncoder
encode, encodeObjectToXml, encodeObjectToXml, encodeObjectToXmlDocument, encodeObjectToXmlDocument, encodeObjectToXmlPropertyType, encodeObjectToXmlPropertyType, encodeObjectToXmlText, encodeObjectToXmlText, getAndCheck, getDocumentEncoder, getDocumentEncoder, getDocumentEncoderKey, getDocumentEncoderKey, getEncoder, getEncoder, getEncoderKey, getEncoderKey, getPropertyTypeEncoder, getPropertyTypeEncoder, getPropertyTypeEncoderKey, getPropertyTypeEncoderKey, getXmlOptions, setXmlOptions, substituteMethods inherited from class org.n52.svalbard.encode.AbstractDelegatingEncoder
getEncoder, getEncoderRepository, setEncoderRepositoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.n52.svalbard.encode.ObservationEncoder
getProcedureEncodingNamspace, getSupportedResponseFormatsMethods inherited from interface org.n52.svalbard.encode.StreamingEncoder
encode
-
Constructor Details
-
OmEncoderv20
public OmEncoderv20()
-
-
Method Details
-
setSweHelper
-
getKeys
-
getSupportedTypes
-
getSupportedResponseFormatObservationTypes
-
getConformanceClasses
-
isObservationAndMeasurmentV20Type
public boolean isObservationAndMeasurmentV20Type() -
getSupportedResponseFormats
-
shouldObservationsWithSameXBeMerged
public boolean shouldObservationsWithSameXBeMerged() -
supportsResultStreamingForMergedValues
public boolean supportsResultStreamingForMergedValues() -
getDefaultFeatureEncodingNamespace
Description copied from class:AbstractOmEncoderv20Get the default encoding Namespace for FeatureOfInterest- Specified by:
getDefaultFeatureEncodingNamespacein classAbstractOmEncoderv20- Returns:
- Encoding namespace
-
getContentType
- Specified by:
getContentTypein interfaceEncoder<org.apache.xmlbeans.XmlObject,Object> - Overrides:
getContentTypein classAbstractXmlEncoder<org.apache.xmlbeans.XmlObject,Object>
-
getSchemaLocations
-
encode
public org.apache.xmlbeans.XmlObject encode(Object element, EncodingContext additionalValues) throws EncodingException - Specified by:
encodein interfaceEncoder<org.apache.xmlbeans.XmlObject,Object> - Overrides:
encodein classAbstractOmEncoderv20- Throws:
EncodingException
-
encode
public void encode(Object objectToEncode, OutputStream outputStream, EncodingContext ctx) throws EncodingException - Specified by:
encodein interfaceStreamingEncoder<org.apache.xmlbeans.XmlObject,Object> - Overrides:
encodein classAbstractOmEncoderv20- Throws:
EncodingException
-
createOmObservationType
protected net.opengis.om.x20.OMObservationType createOmObservationType()- Specified by:
createOmObservationTypein classAbstractOmEncoderv20
-
createResult
protected org.apache.xmlbeans.XmlObject createResult(OmObservation sosObservation) throws EncodingException Description copied from class:AbstractOmEncoderv20Method to create the om:result element content- Specified by:
createResultin classAbstractOmEncoderv20- Parameters:
sosObservation- SosObservation to be encoded- Returns:
- XML encoded result object, e.g a gml:MeasureType
- Throws:
EncodingException- if an error occurs
-
encodeResult
protected org.apache.xmlbeans.XmlObject encodeResult(ObservationValue<?> observationValue) throws EncodingException - Specified by:
encodeResultin classAbstractOmEncoderv20- Throws:
EncodingException
-
addObservationType
protected void addObservationType(net.opengis.om.x20.OMObservationType xbObservation, String observationType) Description copied from class:AbstractOmEncoderv20Method to add the observation type to the om:Observation. Subclasses should have mappings to set the correct type, e.g. O&M .../Measurement == .../MeasurementTimeseriesTVPObservation in WaterML 2.0- Specified by:
addObservationTypein classAbstractOmEncoderv20- Parameters:
xbObservation- XmlBeans object of observationobservationType- Observation type
-
getDefaultProcedureEncodingNamspace
Description copied from class:AbstractOmEncoderv20Get the default encoding Namespace for Procedures- Specified by:
getDefaultProcedureEncodingNamspacein classAbstractOmEncoderv20- Returns:
- Encoding namespace
-
convertEncodedProcedure
protected boolean convertEncodedProcedure()Description copied from class:AbstractOmEncoderv20Indicator whether the procedure is to be encoded- Specified by:
convertEncodedProcedurein classAbstractOmEncoderv20- Returns:
- Indicator
-
addAddtitionalInformation
protected void addAddtitionalInformation(net.opengis.om.x20.OMObservationType omot, OmObservation observation) throws EncodingException - Specified by:
addAddtitionalInformationin classAbstractOmEncoderv20- Throws:
EncodingException
-
createXmlString
protected org.apache.xmlbeans.XmlString createXmlString() -
createXmlInteger
protected org.apache.xmlbeans.XmlInteger createXmlInteger() -
createXmlBoolean
protected org.apache.xmlbeans.XmlBoolean createXmlBoolean() -
encodeSWE
- Throws:
EncodingException
-
encodeSWE
protected org.apache.xmlbeans.XmlObject encodeSWE(Object o, EncodingContext additionalValues) throws EncodingException - Throws:
EncodingException
-