|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.cs.persistence.deegree.d3.parsers.DefinitionParser
public abstract class DefinitionParser
The parent class of all parsers defines convenience methods common to all StAX based crs parsers as well as reading in the locations of the crs components defintions.
Field Summary | |
---|---|
protected DeegreeCRSStore |
store
|
Constructor Summary | |
---|---|
protected |
DefinitionParser(DeegreeCRSStore store,
URL configURL)
|
Method Summary | |
---|---|
protected abstract QName |
expectedRootName()
|
protected XMLStreamReader |
getConfigReader()
Get the configuration reader. |
protected URL |
getConfigURL()
|
DeegreeCRSStore |
getStore()
|
boolean |
moveReaderToNextIdentifiable(XMLStreamReader reader,
QName elementName)
Forwards the stream |
boolean |
moveReaderToNextIdentifiable(XMLStreamReader reader,
Set<QName> allowedElements)
Forwards the stream |
protected CRSResource |
parseIdentifiable(XMLStreamReader reader)
Parses all elements of the identifiable object, it is assumed the reader is on a top level element, the next element will be an id. |
protected double |
parseLatLonType(XMLStreamReader reader,
QName qName,
boolean required,
double defaultValue)
Post: reader will be at XMLStreamConstants.START_ELEMENT of the next element. |
protected Unit |
parseUnit(XMLStreamReader reader,
boolean required)
Parses a unit from the given xml-parent. |
boolean |
readEntireFile()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DeegreeCRSStore store
Constructor Detail |
---|
protected DefinitionParser(DeegreeCRSStore store, URL configURL)
store
- configURL
- Method Detail |
---|
protected abstract QName expectedRootName()
protected XMLStreamReader getConfigReader() throws XMLStreamException
null
if the entire
file was read.
XMLStreamException
protected CRSResource parseIdentifiable(XMLStreamReader reader) throws CRSConfigurationException
reader
- the xml-reader pointing to parent of the first id-element
null
if no id was given.
CRSConfigurationException
protected Unit parseUnit(XMLStreamReader reader, boolean required) throws CRSConfigurationException
reader
- xml-reader to parse the unit from.required
- if the unit is required.
CRSConfigurationException
- if the unit object could not be created.public DeegreeCRSStore getStore()
null
public boolean moveReaderToNextIdentifiable(XMLStreamReader reader, QName elementName) throws XMLStreamException
reader
- to forwardelementName
-
XMLStreamException
protected double parseLatLonType(XMLStreamReader reader, QName qName, boolean required, double defaultValue) throws XMLStreamException
XMLStreamConstants.START_ELEMENT
of the next element.
reader
- to be used.qName
- name of the elementrequired
- if true and the element is missing an exception will be thrown.defaultValue
-
XMLStreamException
public boolean moveReaderToNextIdentifiable(XMLStreamReader reader, Set<QName> allowedElements) throws XMLStreamException
reader
- to forwardallowedElements
-
XMLStreamException
public boolean readEntireFile()
protected URL getConfigURL()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |