public interface XMLEventParserContext extends AVList
| Modifier and Type | Field and Description | 
|---|---|
static String | 
UNRECOGNIZED_ELEMENT_PARSER
Identifies the name of the parser handling unrecognized elements. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addBooleanIntegerParsers(String namespace,
                        String[] booleanIntegerFields)
Add boolean integer parsers for a list of element types and qualified for a specified namespace. 
 | 
void | 
addBooleanParsers(String namespace,
                 String[] booleanFields)
Add boolean parsers for a list of element types and qualified for a specified namespace. 
 | 
void | 
addDoubleParsers(String namespace,
                String[] doubleFields)
Add double parsers for a list of element types and qualified for a specified namespace. 
 | 
void | 
addId(String id,
     Object o)
Adds a mapping of an id attribute to its associated KML object. 
 | 
void | 
addIntegerParsers(String namespace,
                 String[] integerFields)
Add integer parsers for a list of element types and qualified for a specified namespace. 
 | 
void | 
addStringParsers(String namespace,
                String[] stringFields)
Add string list parsers for a list of element types and qualified for a specified namespace. 
 | 
XMLEventParser | 
allocate(XMLEvent event)
Create a parser for a specified event's element name, if a parser for that name is registered with the context. 
 | 
XMLEventParser | 
allocate(XMLEvent event,
        XMLEventParser defaultParser)
Create a parser for a specified event's element name, if a parser for that name is registered with the context. 
 | 
BooleanIntegerXMLEventParser | 
getBooleanIntegerParser()
Returns the default parser for a simple boolean integer (0 or 1). 
 | 
BooleanXMLEventParser | 
getBooleanParser()
Returns the default parser for a simple boolean. 
 | 
String | 
getCharacters(XMLEvent event)
Returns the text associated with the event. 
 | 
String | 
getDefaultNamespaceURI()
Returns the context's default namespace URI. 
 | 
DoubleXMLEventParser | 
getDoubleParser()
Returns a parser for a simple double. 
 | 
XMLEventReader | 
getEventReader()
Returns the event reader associated with the context. 
 | 
Map<String,Object> | 
getIdTable()
Returns the table associating objects with their id attribute as specified in the object's KML file. 
 | 
IntegerXMLEventParser | 
getIntegerParser()
Returns the default parser for a simple  integer. 
 | 
XMLEventParser | 
getParser(QName eventName)
Returns a new parser for a specified element name. 
 | 
XMLEventParser | 
getParser(XMLEvent event)
Returns a new parser for a specified event. 
 | 
StringXMLEventParser | 
getStringParser()
Returns the default parser for a simple string. 
 | 
XMLEventParser | 
getUnrecognizedElementParser()
Returns a parser to handle unrecognized elements. 
 | 
boolean | 
hasNext()
Indicates whether the event stream associated with this context contains another event. 
 | 
boolean | 
isDefaultNamespace(String namespaceURI)
Indicates whether the specified namespace URI is the default namespace URI used by this parser context. 
 | 
boolean | 
isEndElement(XMLEvent event,
            XMLEvent startElement)
Determines whether an event is the corresponding end element for a specified start event. 
 | 
boolean | 
isSameAttributeName(QName qa,
                   QName qb)
Determines whether two fully qualified attribute names are the same. 
 | 
boolean | 
isSameName(QName qa,
          QName qb)
Determines whether two element names are the same. 
 | 
boolean | 
isStartElement(XMLEvent event,
              QName elementName)
Determines whether an event is a start event for a specific event type. 
 | 
boolean | 
isStartElement(XMLEvent event,
              String elementName)
Determines whether an event is a start event for a specific event type indicated by its local name. 
 | 
XMLEvent | 
nextEvent()
Returns the next event in the event stream associated with this context. 
 | 
void | 
registerParser(QName elementName,
              XMLEventParser parser)
Registers a parser for a specified element name. 
 | 
void | 
setDefaultNamespaceURI(String defaultNamespaceURI)
Specifies the context's default namespace URI. 
 | 
void | 
setNotificationListener(XMLParserNotificationListener listener)
Specify the object to receive notifications, which are sent when exceptions occur during parsing and when
 unrecognized element types are encountered. 
 | 
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesstatic final String UNRECOGNIZED_ELEMENT_PARSER
void addBooleanIntegerParsers(String namespace, String[] booleanIntegerFields)
namespace - the namespace URI.booleanIntegerFields - the string parser.void addBooleanParsers(String namespace, String[] booleanFields)
namespace - the namespace URI.booleanFields - the string parsers.void addDoubleParsers(String namespace, String[] doubleFields)
namespace - the namespace URI.doubleFields - the string parsers.void addId(String id, Object o)
id - the object id. If null, this method returns without creating a mapping.o - the object to associate with the id.void addIntegerParsers(String namespace, String[] integerFields)
namespace - the namespace URI.integerFields - the string parsers.void addStringParsers(String namespace, String[] stringFields)
namespace - the namespace URI.stringFields - the string list parser names.XMLEventParser allocate(XMLEvent event)
event - the event whose element name identifies the parser to create.XMLEventParser allocate(XMLEvent event, XMLEventParser defaultParser)
event - the event whose element name identifies the parser to create.defaultParser - a parser to return if no parser is registered for the specified name. May be null.BooleanIntegerXMLEventParser getBooleanIntegerParser()
BooleanXMLEventParser getBooleanParser()
String getCharacters(XMLEvent event)
event - the event of interest.String getDefaultNamespaceURI()
setDefaultNamespaceURI(String)DoubleXMLEventParser getDoubleParser()
XMLEventReader getEventReader()
Map<String,Object> getIdTable()
IntegerXMLEventParser getIntegerParser()
XMLEventParser getParser(QName eventName)
eventName - indicates the element name for which a parser is created.XMLEventParser getParser(XMLEvent event)
event - indicates the element name for which a parser is created.StringXMLEventParser getStringParser()
XMLEventParser getUnrecognizedElementParser()
UnrecognizedXMLEventParser.boolean hasNext()
XMLEventReader.hasNext()boolean isDefaultNamespace(String namespaceURI)
namespaceURI - the namespace URI to check.boolean isEndElement(XMLEvent event, XMLEvent startElement)
event - the event of interest.startElement - the start event associated with the potential end event.boolean isSameAttributeName(QName qa, QName qb)
qa - the first attribute name.qb - the second attribute name.boolean isSameName(QName qa, QName qb)
qa - first element nameqb - second element nameboolean isStartElement(XMLEvent event, QName elementName)
event - an event identifying the event type of interest.elementName - the event name.boolean isStartElement(XMLEvent event, String elementName)
event - an event identifying the event type of interest.elementName - the local part of the event name to match.XMLEvent nextEvent() throws XMLStreamException
XMLStreamException - if there is an error with the underlying XML.XMLEventReader.nextEvent()void registerParser(QName elementName, XMLEventParser parser)
getParser(javax.xml.stream.events.XMLEvent) is called for the same element name.elementName - the element name for which to return a parser.parser - the parser to register.void setDefaultNamespaceURI(String defaultNamespaceURI)
defaultNamespaceURI - the default namespace URI.getDefaultNamespaceURI(), 
isSameName(javax.xml.namespace.QName, javax.xml.namespace.QName)void setNotificationListener(XMLParserNotificationListener listener)
XMLParserNotification for
 more information.
 
 The parser context may have only one notification listener. That listener may be changed at any time.listener - the object to receive notification events.