|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.gml.GMLStreamReader
public class GMLStreamReader
Stream-based reader for GML instance documents or GML fragments.
Instances of this class are not thread-safe.
GMLObject,
GMLInputFactory| Method Summary | |
|---|---|
void |
close()
Closes the underlying XML stream. |
GMLDictionaryReader |
getDictionaryReader()
Returns a configured GMLDictionaryReader instance for calling specific dictionary parsing methods. |
GMLFeatureReader |
getFeatureReader()
Returns a configured GMLFeatureReader instance for calling specific feature parsing methods. |
GMLGeometryReader |
getGeometryReader()
Returns a configured GMLGeometryReader instance for calling specific geometry parsing methods. |
GMLDocumentIdContext |
getIdContext()
Returns the GMLDocumentIdContext that keeps track of objects, identifiers and references. |
javax.xml.stream.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)
Sets the GMLReferenceResolver that the generated GMLReferences will use for resolving themselves. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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 nullpublic 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 (with respect to it's gml version).public boolean isGeometryOrEnvelopeElement()
XMLStreamConstants.START_ELEMENT && the current element's name
is a known geometry (with respect to it's gml version).public void setResolver(GMLReferenceResolver resolver)
GMLReferenceResolver that the generated GMLReferences will use for resolving themselves.
resolver -
public GMLObject read()
throws javax.xml.stream.XMLStreamException,
XMLParsingException,
UnknownCRSException
null
javax.xml.stream.XMLStreamException
UnknownCRSException
XMLParsingException
public Feature readFeature()
throws javax.xml.stream.XMLStreamException,
XMLParsingException,
UnknownCRSException
null
javax.xml.stream.XMLStreamException
XMLParsingException
UnknownCRSException
public FeatureCollection readFeatureCollection()
throws javax.xml.stream.XMLStreamException,
XMLParsingException,
UnknownCRSException
Please note that readStreamFeatureCollection() should be preferred (especially for large feature
collections), because it does not build and store all features in memory at once.
null
javax.xml.stream.XMLStreamException
XMLParsingException
UnknownCRSException
public StreamFeatureCollection readStreamFeatureCollection()
throws javax.xml.stream.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
javax.xml.stream.XMLStreamException
XMLParsingException
UnknownCRSException
public Geometry readGeometryOrEnvelope()
throws javax.xml.stream.XMLStreamException,
XMLParsingException,
UnknownCRSException
null
javax.xml.stream.XMLStreamException
XMLParsingException
UnknownCRSException
public Geometry readGeometry()
throws javax.xml.stream.XMLStreamException,
XMLParsingException,
UnknownCRSException
null
javax.xml.stream.XMLStreamException
XMLParsingException
UnknownCRSException
public Dictionary readDictionary()
throws javax.xml.stream.XMLStreamException
null
javax.xml.stream.XMLStreamException
public CRS readCRS()
throws javax.xml.stream.XMLStreamException
null
javax.xml.stream.XMLStreamExceptionpublic GMLDocumentIdContext getIdContext()
GMLDocumentIdContext that keeps track of objects, identifiers and references.
GMLDocumentIdContext, never nullpublic javax.xml.stream.XMLStreamReader getXMLReader()
XMLStreamReader.
XMLStreamReader, never null
public void close()
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamExceptionpublic GMLFeatureReader getFeatureReader()
GMLFeatureReader instance for calling specific feature parsing methods.
GMLFeatureReader instance, never nullpublic GMLGeometryReader getGeometryReader()
GMLGeometryReader instance for calling specific geometry parsing methods.
GMLGeometryReader instance, never nullpublic GMLDictionaryReader getDictionaryReader()
GMLDictionaryReader instance for calling specific dictionary parsing methods.
GMLDictionaryReader instance, never null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||