public class OMUtils extends Object
Provides Helper methods to read and write O&M observations in a version agnostic manner.
| Modifier and Type | Field and Description |
|---|---|
static String |
OBSERVATION |
static String |
OM |
static String |
V2_0 |
| Modifier and Type | Method and Description |
|---|---|
String |
getVersion(DOMHelper dom,
Element omElt)
Logic to guess O&M version from namespace
|
static void |
loadRegistry() |
IObservation |
readObservation(DOMHelper dom,
Element obsElt)
Read an O&M observation object from a DOM element
|
IObservation |
readObservation(InputStream inputStream)
Reads an O&M observation object from an InputStream
|
IObservation |
readObservationSeries(InputStream inputStream) |
Element |
writeObservation(DOMHelper dom,
IObservation obs,
String version)
Builds a DOM Element from the content of the IObservation object
|
void |
writeObservation(OutputStream outputStream,
IObservation obs,
String version)
Writes XML for an Observation of selected version in the specified OutputStream
|
public static final String OM
public static final String V2_0
public static final String OBSERVATION
public OMUtils(String version)
public static void loadRegistry()
public IObservation readObservation(DOMHelper dom, Element obsElt) throws XMLReaderException
dom - DOMHelper to use to read the element contentobsElt - DOM element corresponding to the ObservationXMLReaderExceptionpublic IObservation readObservation(InputStream inputStream) throws XMLReaderException
inputStream - input stream to read fromXMLReaderExceptionpublic IObservation readObservationSeries(InputStream inputStream) throws XMLReaderException
XMLReaderExceptionpublic Element writeObservation(DOMHelper dom, IObservation obs, String version) throws XMLWriterException
dom - DOMHelper used to generate the elementobs - Observation instance whose content will be serializedversion - Version of O&M schema to useXMLWriterExceptionpublic void writeObservation(OutputStream outputStream, IObservation obs, String version) throws XMLWriterException, IOException
outputStream - Outputstream to write the XML intoobs - Observation instance whose content will be serializedversion - Version of O&M schema to useXMLWriterExceptionIOExceptionCopyright © 2016 VAST Team / Sensia Software LLC. All rights reserved.