|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.XMLFilterImpl org.geotools.gml.GMLFilterGeometry
LEVEL2 saxGML4j GML filter: translates coordinates and GML events into OGC simple types.
This filter simply reads in the events and coordinates passed to it by its GMLFilterDocument child and converts them into JTS objects. Note that it passes through anything not specifically sent to it by GMLFilterDocument (i.e. more or less everything not in geometry.xsd). The parent of this filter must implement GMLHandlerJTS in order to receive the JTS objects passed by this filter.
Constructor Summary | |
GMLFilterGeometry(GMLHandlerJTS parent)
Constructor with parent, which must implement GMLHandlerJTS. |
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
Reads the only internal characters read by pure GML parsers, which are coordinates. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
Checks for GML element end and - if not a coordinates element - sends it directly on down the chain to the appropriate parent handler. |
void |
geometryEnd(java.lang.String localName)
Manages the end of a new main or sub geometry. |
void |
geometryStart(java.lang.String localName,
org.xml.sax.Attributes atts)
Manages the start of a new main or sub geometry. |
void |
geometrySub(java.lang.String localName)
Manages a sub geometry, which simply means always pass it to the current content handler as a sub. |
void |
gmlCoordinates(double x,
double y)
Gets a coordinate from the child and passes it to the current handler as an add request. |
void |
gmlCoordinates(double x,
double y,
double z)
Gets a coordinate from the child and passes it to the current handler as an add request. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
Checks for GML element start and - if not a coordinates element - sends it directly on down the chain to the appropriate parent handler. |
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl |
endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xml.sax.ContentHandler |
endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping |
Constructor Detail |
public GMLFilterGeometry(GMLHandlerJTS parent)
parent
- The parent of this filter.Method Detail |
public void geometryStart(java.lang.String localName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
geometryStart
in interface GMLHandlerGeometry
localName
- The local name of the geometry, which corresponds to an
OGC simple feature type.atts
- The attributes of the geometry, including SRID, etc.
org.xml.sax.SAXException
- parser error.public void geometryEnd(java.lang.String localName) throws org.xml.sax.SAXException
geometryEnd
in interface GMLHandlerGeometry
localName
- The local name of the geometry, which corresponds to an
OGC simple feature type.
org.xml.sax.SAXException
- parser error.public void geometrySub(java.lang.String localName) throws org.xml.sax.SAXException
geometrySub
in interface GMLHandlerGeometry
localName
- The local name of the geometry, which corresponds to an
OGC simple feature type.
org.xml.sax.SAXException
- parser error.public void gmlCoordinates(double x, double y) throws org.xml.sax.SAXException
gmlCoordinates
in interface GMLHandlerGeometry
x
- The X coordinate of the received coordinate.y
- The Y coordinate of the received coordinate.
org.xml.sax.SAXException
- parser error.public void gmlCoordinates(double x, double y, double z) throws org.xml.sax.SAXException
gmlCoordinates
in interface GMLHandlerGeometry
x
- The X coordinate of the received coordinate.y
- The Y coordinate of the received coordinate.z
- The Z coordinate of the received coordinate.
org.xml.sax.SAXException
- parser error.public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
namespaceURI
- The namespace of the element.localName
- The local name of the element.qName
- The full name of the element, including namespace prefix.atts
- The element attributes.
org.xml.sax.SAXException
- Some parsing error occurred while reading
coordinates.public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
ch
- Raw coordinate string from the GML document.start
- Beginning character position of raw coordinate string.length
- Length of the character string.
org.xml.sax.SAXException
- Some parsing error occurred while reading
coordinates.public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
namespaceURI
- The namespace of the element.localName
- The local name of the element.qName
- The full name of the element, including namespace prefix.
org.xml.sax.SAXException
- Some parsing error occurred while reading
coordinates.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |