|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.gml.GMLStreamReader
public class GMLStreamReader
Stream-based reader for all kinds of GML objects supported by deegree.
Instances of this class are not thread-safe.
GMLObject
,
GMLInputFactory
Constructor Summary | |
---|---|
GMLStreamReader(GMLVersion version,
XMLStreamReaderWrapper xmlStream)
Creates a new GMLStreamReader instance. |
Method Summary | |
---|---|
void |
close()
Closes the underlying XML stream. |
GMLDocumentIdContext |
getIdContext()
Returns the GMLDocumentIdContext that keeps track of objects, identifiers and references. |
XMLStreamReader |
getXMLReader()
Returns the underlying XMLStreamReader . |
boolean |
isGeometryElement()
|
boolean |
isGeometryOrEnvelopeElement()
|
GMLObject |
read()
Returns the deegree model representation for the GML object element event that the cursor of the underlying xml stream points to. |
CRS |
readCRS()
Returns the deegree model representation for the GML crs element event that the cursor of the underlying xml stream points to. |
Dictionary |
readDictionary()
Returns the deegree model representation for the GML dictionary element event that the cursor of the underlying xml stream points to. |
Feature |
readFeature()
Returns the deegree model representation for the GML feature element event that the cursor of the underlying xml stream points to. |
FeatureCollection |
readFeatureCollection()
Returns the deegree model representation for the GML feature collection element event that the cursor of the underlying xml stream points to. |
Geometry |
readGeometry()
Returns the deegree model representation for the GML geometry element event that the cursor of the underlying xml stream points to. |
Geometry |
readGeometryOrEnvelope()
Returns the deegree model representation for the GML geometry element event that the cursor of the underlying xml stream points to. |
StreamFeatureCollection |
readStreamFeatureCollection()
Returns the deegree model representation for the GML feature collection element event that the cursor of the underlying xml stream points to. |
void |
setApplicationSchema(ApplicationSchema schema)
Controls the application schema that is assumed when features or feature collections are parsed. |
void |
setDefaultCRS(CRS defaultCRS)
Controls the default CRS that is assumed when GML objects (especially geometries) without SRS information are parsed. |
void |
setGeometryFactory(GeometryFactory geomFac)
Controls the GeometryFactory instance to be used for creating geometries. |
void |
setResolver(GMLReferenceResolver resolver)
Controls the GMLReferenceResolver that the generated GMLReference s shall use for resolving
themselves. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
GMLStreamReader(GMLVersion version, XMLStreamReaderWrapper xmlStream)
GMLStreamReader
instance.
version
- GML version of the input, must not be null
xmlStream
- XML stream used to read the input, must not be null
Method Detail |
---|
public void setApplicationSchema(ApplicationSchema schema)
schema
- application schema, can be null
(use xsi:schemaLocation attribute to build the
application schema)public void setDefaultCRS(CRS defaultCRS)
defaultCRS
- default CRS, can be null
public void setGeometryFactory(GeometryFactory geomFac)
GeometryFactory
instance to be used for creating geometries.
geomFac
- geometry factory, can be null
(use a default factory)public boolean isGeometryElement()
XMLStreamConstants.START_ELEMENT
&& the current element's name
is a known geometry (in respect to it's gml version).public boolean isGeometryOrEnvelopeElement()
XMLStreamConstants.START_ELEMENT
&& the current element's name
is a known geometry (in respect to it's gml version).public void setResolver(GMLReferenceResolver resolver)
GMLReferenceResolver
that the generated GMLReference
s shall use for resolving
themselves.
resolver
- public GMLObject read() throws XMLStreamException, XMLParsingException, UnknownCRSException
null
XMLStreamException
UnknownCRSException
XMLParsingException
public Feature readFeature() throws XMLStreamException, XMLParsingException, UnknownCRSException
null
XMLStreamException
XMLParsingException
UnknownCRSException
public FeatureCollection readFeatureCollection() throws XMLStreamException, XMLParsingException, UnknownCRSException
Please note that readStreamFeatureCollection()
should be preferred (especially for large feature
collections), because it does not need to built and store all features in memory at once.
null
XMLStreamException
XMLParsingException
UnknownCRSException
public StreamFeatureCollection readStreamFeatureCollection() throws XMLStreamException, XMLParsingException, UnknownCRSException
This method does not automatically consume all events from the underlying XML stream. Instead, it allows the caller to control the consumption by iterating over the features in the returned collection.
null
XMLStreamException
XMLParsingException
UnknownCRSException
public Geometry readGeometryOrEnvelope() throws XMLStreamException, XMLParsingException, UnknownCRSException
null
XMLStreamException
XMLParsingException
UnknownCRSException
public Geometry readGeometry() throws XMLStreamException, XMLParsingException, UnknownCRSException
null
XMLStreamException
XMLParsingException
UnknownCRSException
public Dictionary readDictionary() throws XMLStreamException
null
XMLStreamException
public CRS readCRS() throws XMLStreamException
null
XMLStreamException
public GMLDocumentIdContext getIdContext()
GMLDocumentIdContext
that keeps track of objects, identifiers and references.
GMLDocumentIdContext
, never null
public XMLStreamReader getXMLReader()
XMLStreamReader
.
XMLStreamReader
, never null
public void close() throws XMLStreamException
XMLStreamException
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |