|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.commons.xml.XMLAdapter
org.deegree.gml.feature.GMLFeatureReader
public class GMLFeatureReader
Stream-based reader for GML-encoded features and feature collections.
Field Summary |
---|
Fields inherited from class org.deegree.commons.xml.XMLAdapter |
---|
DEFAULT_URL, nsContext, rootElement, XLN_NS |
Constructor Summary | |
---|---|
GMLFeatureReader(GMLVersion version,
AppSchema schema,
GMLDocumentIdContext idContext,
int defaultCoordDim,
org.deegree.commons.tom.gml.GMLReferenceResolver resolver)
Creates a new GMLFeatureReader instance that is configured for building features with the specified
feature types. |
Method Summary | |
---|---|
AppSchema |
getAppSchema()
Returns the associated AppSchema that describes the structure of the feature types. |
GMLDocumentIdContext |
getDocumentIdContext()
Returns the GMLDocumentIdContext that keeps track of objects, identifiers and references. |
StreamFeatureCollection |
getFeatureStream(org.deegree.commons.xml.stax.XMLStreamReaderWrapper xmlStream,
org.deegree.cs.coordinatesystems.ICRS crs)
Returns a StreamFeatureCollection that allows stream-based access to the members of the feature
collection that the cursor of the given XMLStreamReader points at. |
Feature |
parseFeature(org.deegree.commons.xml.stax.XMLStreamReaderWrapper xmlStream,
org.deegree.cs.coordinatesystems.ICRS crs)
Returns the object representation for the feature (or feature collection) element event that the cursor of the given XMLStreamReader points at. |
protected String |
parseFeatureId(org.deegree.commons.xml.stax.XMLStreamReaderWrapper xmlReader)
Parses the feature id attribute from the feature START_ELEMENT event that the given
XMLStreamReader points to. |
Property |
parseProperty(org.deegree.commons.xml.stax.XMLStreamReaderWrapper xmlStream,
PropertyType propDecl,
org.deegree.cs.coordinatesystems.ICRS crs,
int occurence)
Returns the object representation for the given property element. |
void |
setGeometryReader(GMLGeometryReader geomReader)
|
Methods inherited from class org.deegree.commons.xml.XMLAdapter |
---|
evaluateXPath, getElement, getElements, getNamespaceContext, getNode, getNodeAsBigInt, getNodeAsBoolean, getNodeAsDouble, getNodeAsFloat, getNodeAsInt, getNodeAsQName, getNodeAsString, getNodeAsURL, getNodeAsVersion, getNodes, getNodesAsQNames, getNodesAsStrings, getRequiredElement, getRequiredElements, getRequiredNode, getRequiredNodeAsBoolean, getRequiredNodeAsDouble, getRequiredNodeAsFloat, getRequiredNodeAsInteger, getRequiredNodeAsQName, getRequiredNodeAsString, getRequiredNodeAsURL, getRequiredNodeAsVersion, getRequiredNodes, getRootElement, getSchemas, getSystemId, hasSchemas, load, load, load, load, load, load, load, maybeWriteElement, maybeWriteElementNS, parseBoolean, parseDouble, parseFloat, parseInt, parseQName, parseSimpleLink, parseURL, resolve, setRootElement, setSystemId, toString, writeElement, writeElement, writeElement, writeElement, writeElement, writeOptionalAttribute, writeOptionalElement, writeOptionalNSAttribute |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GMLFeatureReader(GMLVersion version, AppSchema schema, GMLDocumentIdContext idContext, int defaultCoordDim, org.deegree.commons.tom.gml.GMLReferenceResolver resolver)
GMLFeatureReader
instance that is configured for building features with the specified
feature types.
version
- GML version, must not be null
schema
- application schema that defines the feature types, can be null
. If null
, the
xsi:schemaLocation
attribute is used to construct the schema. If this doesn't exist
either, the parser falls back to dynamic feature type generation from the input GML.idContext
- id context to be used for registering gml:ids (features and geometries) and resolving local xlinks,
can be null
defaultCoordDim
- defaultValue for coordinate dimension, only used when a gml:posList is parsed and no dimension
information from CRS is available (unknown CRS)resolver
- used for resolving xlink-references, can be null
Method Detail |
---|
public void setGeometryReader(GMLGeometryReader geomReader)
geomReader
- public AppSchema getAppSchema()
AppSchema
that describes the structure of the feature types.
AppSchema
public GMLDocumentIdContext getDocumentIdContext()
GMLDocumentIdContext
that keeps track of objects, identifiers and references.
GMLDocumentIdContext
, never null
public Feature parseFeature(org.deegree.commons.xml.stax.XMLStreamReaderWrapper xmlStream, org.deegree.cs.coordinatesystems.ICRS crs) throws XMLStreamException, org.deegree.commons.xml.XMLParsingException, org.deegree.cs.exceptions.UnknownCRSException
XMLStreamReader
points at.
xmlStream
- cursor must point at the START_ELEMENT
event of the feature element, afterwards points at
the next event after the END_ELEMENT
event of the feature elementcrs
- default CRS for all descendant geometry properties
XMLStreamException
org.deegree.cs.exceptions.UnknownCRSException
org.deegree.commons.xml.XMLParsingException
public StreamFeatureCollection getFeatureStream(org.deegree.commons.xml.stax.XMLStreamReaderWrapper xmlStream, org.deegree.cs.coordinatesystems.ICRS crs) throws XMLStreamException
StreamFeatureCollection
that allows stream-based access to the members of the feature
collection that the cursor of the given XMLStreamReader
points at.
xmlStream
- cursor must point at the START_ELEMENT
event of a feature collection elementcrs
-
XMLStreamException
public Property parseProperty(org.deegree.commons.xml.stax.XMLStreamReaderWrapper xmlStream, PropertyType propDecl, org.deegree.cs.coordinatesystems.ICRS crs, int occurence) throws org.deegree.commons.xml.XMLParsingException, XMLStreamException, org.deegree.cs.exceptions.UnknownCRSException
xmlStream
- cursor must point at the START_ELEMENT
event of the property, afterwards points at the
next event after the END_ELEMENT
of the propertypropDecl
- property declarationcrs
- default SRS for all a descendant geometry propertiesoccurence
-
org.deegree.commons.xml.XMLParsingException
XMLStreamException
org.deegree.cs.exceptions.UnknownCRSException
protected String parseFeatureId(org.deegree.commons.xml.stax.XMLStreamReaderWrapper xmlReader)
START_ELEMENT
event that the given
XMLStreamReader
points to.
Looks after 'gml:id' (GML 3) first, if no such attribute is present, the 'fid' (GML 2) attribute is used.
xmlReader
- must point to the START_ELEMENT
event of the feature
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |