public abstract class SWEReader extends Object implements InputStreamProvider
Abstract class for all CDM readers. This class provides methods to parse any XML document containing CDM data structure, encoding and stream sections. The class has getters to get this info after it has been parsed. Concrete derived classes are actually responsible for finding the XML content for each of these sections and using the corresponding parsers to parse it out. This class also has a helper method that constructs the DataParser suited for a given encoding.
Modifier and Type | Field and Description |
---|---|
protected DataComponent |
dataComponents |
protected DataEncoding |
dataEncoding |
protected DataHandler |
dataHandler |
protected DataStreamParser |
dataParser |
protected String |
valuesUri |
Constructor and Description |
---|
SWEReader() |
Modifier and Type | Method and Description |
---|---|
protected DataStreamParser |
createDataParser() |
DataComponent |
getDataComponents() |
DataEncoding |
getDataEncoding() |
DataStreamParser |
getDataParser() |
abstract InputStream |
getDataStream() |
void |
parse(InputStream inputStream) |
abstract void |
parse(InputStream inputStream,
DataHandler handler) |
void |
setDataComponents(DataComponent dataComponents) |
void |
setDataEncoding(DataEncoding dataEncoding) |
protected DataEncoding dataEncoding
protected DataComponent dataComponents
protected DataStreamParser dataParser
protected DataHandler dataHandler
protected String valuesUri
public abstract void parse(InputStream inputStream, DataHandler handler) throws IOException
IOException
public abstract InputStream getDataStream() throws IOException
getDataStream
in interface InputStreamProvider
IOException
public void setDataComponents(DataComponent dataComponents)
public void setDataEncoding(DataEncoding dataEncoding)
public void parse(InputStream inputStream) throws IOException
IOException
public DataComponent getDataComponents()
public DataEncoding getDataEncoding()
public DataStreamParser getDataParser()
protected DataStreamParser createDataParser() throws IOException
IOException
Copyright © 2016 Sensia Software LLC. All rights reserved.