|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
com.vividsolutions.jts.io.gml2.GMLHandler
A SAX DefaultHandler
which builds Geometry
s
from GML2-formatted geometries.
An XML parser can delegate SAX events to this handler
to parse and building Geometrys.
This handler currently ignores both namespaces and prefixes. Hints:
GeometryStrategies.findStrategy(String, String)
to help check for applicability
DefaultHandler
Constructor Summary | |
GMLHandler(GeometryFactory gf,
org.xml.sax.ErrorHandler delegate)
Creates a new handler. |
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
|
void |
error(org.xml.sax.SAXParseException e)
|
void |
fatalError(org.xml.sax.SAXParseException e)
|
protected org.xml.sax.Locator |
getDocumentLocator()
|
Geometry |
getGeometry()
Gets the geometry parsed by this handler. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
boolean |
isGeometryComplete()
Tests whether this handler has completed parsing a geometry. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
|
void |
warning(org.xml.sax.SAXParseException e)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GMLHandler(GeometryFactory gf, org.xml.sax.ErrorHandler delegate)
gf
- Geometry Factorydelegate
- NullableErrorHandler
,
ContentHandler
,
ContentHandler.setDocumentLocator(org.xml.sax.Locator)
,
Locator
Method Detail |
public boolean isGeometryComplete()
getGeometry()
can be called
to get the value of the parsed geometry.
public Geometry getGeometry()
java.lang.IllegalStateException
- if called before the parse is completepublic void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
org.xml.sax.SAXException
DefaultHandler.characters(char[], int, int)
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
org.xml.sax.SAXException
DefaultHandler.ignorableWhitespace(char[], int, int)
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
org.xml.sax.SAXException
DefaultHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException
org.xml.sax.SAXException
DefaultHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void setDocumentLocator(org.xml.sax.Locator locator)
DefaultHandler.setDocumentLocator(org.xml.sax.Locator)
protected org.xml.sax.Locator getDocumentLocator()
public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
org.xml.sax.SAXException
DefaultHandler.fatalError(org.xml.sax.SAXParseException)
public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
org.xml.sax.SAXException
DefaultHandler.error(org.xml.sax.SAXParseException)
public void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException
org.xml.sax.SAXException
DefaultHandler.warning(org.xml.sax.SAXParseException)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |