java.lang.Object | ||
↳ | org.xml.sax.helpers.DefaultHandler | |
↳ | com.microstrategy.web.app.maps.kml.KMLContentHandler |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected Locator | locator | ||||||||||
protected int | validationErrorCount |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
KMLContentHandler()
Default constructor which takes a "location" string (may be null) and a
MessageRouter object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
characters(char[] ch, int start, int length)
Callback to indicate that characters have been found.
| ||||||||||
void |
endDocument()
What to do when the end of document is encountered.
| ||||||||||
void |
endElement(String uri, String localName, String qName)
Callback to indicate the end of an XML element.
| ||||||||||
String |
generateErrorMessage(String message)
Formats an error message supplied by the user.
| ||||||||||
ArrayList<KMLObject> |
getMapObjects()
Get the array of map objects from parsed KML file
| ||||||||||
void |
incrementValidationErrorCount()
Increment the number of validation errors.
| ||||||||||
void |
resetData()
Reset the data variables to initial status.
| ||||||||||
void |
setDocumentLocator(Locator locator)
Callback method to record the document locator.
| ||||||||||
void | setPath(Map<String, String> pathin) | ||||||||||
void | startDocument() | ||||||||||
void |
startElement(String uri, String localName, String qName, Attributes attributes)
Callback invoked when a new element is encountered.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
clearChars()
Resets the characters collected.
| ||||||||||
String |
getCharacters()
Returns the last text area that was encountered.
| ||||||||||
int |
getCurrentLineNumber()
Returns the current line number (if we can determine it) or -1.
| ||||||||||
void |
internalError(String message)
Throws an internal SAXException error formatted with the supplied error
message.
| ||||||||||
void |
validationError(String message)
Reports a validation error.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Default constructor which takes a "location" string (may be null) and a MessageRouter object.
Callback to indicate that characters have been found.
ch | The character array. |
---|---|
start | The starting index of the character encountered. |
length | The number of characters seen in this particular callback. |
SAXException | If the characters encountered were unexpected or some other internal error. |
---|
What to do when the end of document is encountered. By default, it will check whether any validation errors have occurred. If so, it throws an exception.
SAXException | If validation errors have occurred. |
---|
Callback to indicate the end of an XML element.
uri | The URI of the element. |
---|---|
localName | The local name of the element. |
qName | The qualified name of the element. |
SAXException | If an unexpected element was encountered. |
---|
Formats an error message supplied by the user. The error message includes file name and line number information.
message | The underlying message to display |
---|
Get the array of map objects from parsed KML file
KMLObject
Increment the number of validation errors. This is only to be used by the org.xml.sax.ErrorHandler object (which reports DTD validation errors).
Reset the data variables to initial status.
Callback method to record the document locator.
locator | The Locator object created by the XML Reader. |
---|
SAXException |
---|
Callback invoked when a new element is encountered.
uri | The URI of the element. |
---|---|
localName | The local name of the element. |
qName | The qualified name of the element. |
attributes | The attributes associated with the element. |
SAXException | If an unexpected element appears in the configuration file. |
---|
Resets the characters collected. This is normally done when a new element is started.
Returns the last text area that was encountered. This includes all characters encountered between the most previous startElement and invocation of endElement.
Returns the current line number (if we can determine it) or -1.
Throws an internal SAXException error formatted with the supplied error message.
message | The message that contains the internal error. |
---|
SAXException | This is used to get out of the current SAX parsing call. |
---|
Reports a validation error. The supplied string is formatted and logged (as an error) with the associated MessageRouter.
message | The validation error message (used in a call to generateErrorMessage(String) ).
|
---|