public class PodcastParserContext extends Object
| Constructor and Description |
|---|
PodcastParserContext(String rootNamespace,
XMLStreamReader reader)
Constructor
|
PodcastParserContext(String rootNamespace,
XMLStreamReader reader,
Collection<NamespaceCallbackHandler> callbacks)
Constructor
|
PodcastParserContext(String rootNamespace,
XMLStreamReader reader,
Collection<NamespaceCallbackHandler> callbacks,
Collection<ElementFilter> filters)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
beforeProcess()
Process callback before processing
Feed |
void |
beforeProcess(Item item)
Process callback before processing
Item |
String |
getAttribute(String localName) |
Integer |
getAttributeAsInteger(String localName) |
Long |
getAttributeAsLong(String localName) |
String |
getElementText()
Retrieves the element text if currently at a start element.
|
BigDecimal |
getElementTextAsBigDecimal()
Extract and attempt parsing current element text as
BigDecimal, catching any exception |
Integer |
getElementTextAsInteger()
Extract and attempt parsing current element text as
Integer, catching any exception |
Feed |
getFeed() |
XMLStreamReader |
getReader() |
boolean |
isSkip()
Evaluate the current element against the
ElementFilter instances in this
PodcastParserContext. |
void |
log()
Log, non-repeatably, the current element, including its internal hierarchy
|
void |
registerUnhandledElement(ParseLevel level)
Process callback when encountering unknown element
|
void |
registerUnknownNamespace(ParseLevel level)
Process callback when encountering unknown namespace
|
String |
serialize()
Serialize, non-repeatably, the current element, including its internal hierarchy
|
void |
skip()
If called after having processed a
XMLStreamConstants.START_ELEMENT event, will skip
until the end of the newly opened element is reached. |
public PodcastParserContext(String rootNamespace, XMLStreamReader reader)
rootNamespace - String name of the root namespace, not nullreader - XMLStreamReader instance over the XML input, not nullpublic PodcastParserContext(String rootNamespace, XMLStreamReader reader, Collection<NamespaceCallbackHandler> callbacks)
rootNamespace - String name of the root namespace, not nullreader - XMLStreamReader instance over the XML input, not nullcallbacks - Collection of NamespaceCallbackHandler instances, can be nullpublic PodcastParserContext(String rootNamespace, XMLStreamReader reader, Collection<NamespaceCallbackHandler> callbacks, Collection<ElementFilter> filters)
rootNamespace - String name of the root namespace, not nullreader - XMLStreamReader instance over the XML input, not nullcallbacks - Collection of NamespaceCallbackHandler instances, can be nullfilters - Collection of ElementFilter instances, can be nullpublic XMLStreamReader getReader()
XMLStreamReader, never nullpublic void beforeProcess()
throws XMLStreamException
FeedXMLStreamException - if anypublic void beforeProcess(Item item) throws XMLStreamException
Itemitem - Item instance, not nullXMLStreamException - if anypublic void registerUnknownNamespace(ParseLevel level) throws XMLStreamException
level - ParseLevel of current parse process, not nullXMLStreamException - if anypublic void registerUnhandledElement(ParseLevel level) throws XMLStreamException
level - ParseLevel of current parse process, not nullXMLStreamException - if anypublic String getElementText() throws XMLStreamException
String with element text content, or nullXMLStreamException - if anypublic Integer getElementTextAsInteger() throws XMLStreamException
Integer, catching any exceptionInteger or nullXMLStreamException - if anypublic BigDecimal getElementTextAsBigDecimal() throws XMLStreamException
BigDecimal, catching any exceptionBigDecimal or nullXMLStreamException - if anypublic boolean isSkip()
ElementFilter instances in this
PodcastParserContext.true if the current element should be skippedpublic void skip()
throws XMLStreamException
XMLStreamConstants.START_ELEMENT event, will skip
until the end of the newly opened element is reached.XMLStreamException - if anypublic void log()
throws XMLStreamException
XMLStreamException - if anypublic String serialize() throws XMLStreamException
String, not nullXMLStreamException - if anyCopyright © 2018. All rights reserved.