public class GetObservationResponseXmlStreamWriter extends XmlStreamWriter<GetObservationResponse> implements StreamingDataEncoder
XmlStreamWriter
for GetObservationResponse
Modifier and Type | Field and Description |
---|---|
private GetObservationResponse |
response |
indent, out, XML_FRAGMENT, XML_VERSION
Constructor and Description |
---|
GetObservationResponseXmlStreamWriter()
constructor
|
GetObservationResponseXmlStreamWriter(GetObservationResponse response)
constructor
|
Modifier and Type | Method and Description |
---|---|
private ObservationEncoder<org.apache.xmlbeans.XmlObject,OmObservation> |
findObservationEncoder(String responseFormat)
Finds a O&Mv2 compatible
ObservationEncoder |
protected GetObservationResponse |
getResponse()
Get the
GetObservationResponse to write to stream |
private Set<SchemaLocation> |
getSchemaLocation(EncodingValues encodingValue,
ObservationEncoder<org.apache.xmlbeans.XmlObject,OmObservation> encoder) |
protected void |
setResponse(GetObservationResponse response)
Set the
GetObservationResponse to be written to stream |
void |
write(GetObservationResponse response,
OutputStream out)
Encode and write the elementToStream to the
OutputStream |
void |
write(GetObservationResponse response,
OutputStream out,
EncodingValues encodingValues)
Encode and write the elementToStream to the
OutputStream |
void |
write(OutputStream out)
Encode and write element to the
OutputStream |
void |
write(OutputStream out,
EncodingValues encodingValues)
Encode and write element to the
OutputStream |
private void |
writeGetObservationResponseDoc(GetObservationResponse response,
EncodingValues encodingValues) |
private void |
writeObservationData(OmObservation observation,
ObservationEncoder<org.apache.xmlbeans.XmlObject,OmObservation> encoder,
EncodingValues encodingValues) |
attr, attr, attr, chars, chars, empty, end, end, endInline, finish, flush, getXmlWriter, init, namespace, start, start
addXlinkHrefAttr, addXlinkTitleAttr, getOutputStream, getReplacement, getXmlOutputFactory, init, init, init, rawText, schemaLocation, time, time, writeIndent, writeNewLine, writeXmlObject
private GetObservationResponse response
public GetObservationResponseXmlStreamWriter()
public GetObservationResponseXmlStreamWriter(GetObservationResponse response)
response
- GetObservationResponse
to write to streampublic void write(OutputStream out) throws XMLStreamException, OwsExceptionReport
XmlWriter
OutputStream
write
in class XmlWriter<XMLStreamWriter,GetObservationResponse>
out
- OutputStream to write the encoded elementXMLStreamException
- If an error occurs when writing to OutputStream
OwsExceptionReport
- If an encoding error occurspublic void write(OutputStream out, EncodingValues encodingValues) throws XMLStreamException, OwsExceptionReport
XmlWriter
OutputStream
write
in class XmlWriter<XMLStreamWriter,GetObservationResponse>
out
- OutputStream to write the encoded elementencodingValues
- EncodingValues
with additional informationXMLStreamException
- If an error occurs when writing to OutputStream
OwsExceptionReport
- If an encoding error occurspublic void write(GetObservationResponse response, OutputStream out) throws XMLStreamException, OwsExceptionReport
XmlWriter
OutputStream
write
in class XmlWriter<XMLStreamWriter,GetObservationResponse>
response
- Element to encode and write to streamout
- OutputStream to write the encoded elementXMLStreamException
- If an error occurs when writing to OutputStream
OwsExceptionReport
- If an encoding error occurspublic void write(GetObservationResponse response, OutputStream out, EncodingValues encodingValues) throws XMLStreamException, OwsExceptionReport
XmlWriter
OutputStream
write
in class XmlWriter<XMLStreamWriter,GetObservationResponse>
response
- Element to encode and write to streamout
- OutputStream to write the encoded elementencodingValues
- EncodingValues
with additional informationXMLStreamException
- If an error occurs when writing to OutputStream
OwsExceptionReport
- If an encoding error occursprotected void setResponse(GetObservationResponse response)
GetObservationResponse
to be written to streamresponse
- GetObservationResponse
to write to streamprotected GetObservationResponse getResponse()
GetObservationResponse
to write to streamGetObservationResponse
to writeprivate void writeGetObservationResponseDoc(GetObservationResponse response, EncodingValues encodingValues) throws XMLStreamException, OwsExceptionReport
XMLStreamException
OwsExceptionReport
private Set<SchemaLocation> getSchemaLocation(EncodingValues encodingValue, ObservationEncoder<org.apache.xmlbeans.XmlObject,OmObservation> encoder)
private void writeObservationData(OmObservation observation, ObservationEncoder<org.apache.xmlbeans.XmlObject,OmObservation> encoder, EncodingValues encodingValues) throws XMLStreamException, OwsExceptionReport
XMLStreamException
OwsExceptionReport
private ObservationEncoder<org.apache.xmlbeans.XmlObject,OmObservation> findObservationEncoder(String responseFormat) throws OwsExceptionReport
ObservationEncoder
responseFormat
- the response formatnull
if none is foundOwsExceptionReport
- if the found encoder is not a ObservationEncoderCopyright © 2012-2015 52north.org. All Rights Reserved.