public abstract class XmlEventProvider extends Object
JsonXmlEvent instances from JsonParser. Extensions of this class should
adjust their behaviour according to the JSON notation they are supporting.| Modifier | Constructor and Description |
|---|---|
protected |
XmlEventProvider(com.fasterxml.jackson.core.JsonParser parser,
JSONConfiguration configuration,
String rootName) |
| Modifier and Type | Method and Description |
|---|---|
protected com.sun.jersey.json.impl.reader.JsonXmlEvent |
createEndElementEvent(QName elementName,
Location location)
Creates an
EndElementEvent. |
protected com.sun.jersey.json.impl.reader.JsonXmlEvent |
createStartElementEvent(QName elementName,
Location location)
Creates an
StartElementEvent. |
protected String |
getAttributeName(String jsonFieldName)
Returns the name of an attribute from the given field name without the leading '@' character if present.
|
protected abstract QName |
getAttributeQName(String jsonFieldName)
Returns the attribute qualified name which is determined from the given
jsonFieldName and configuration of the
underlying implementation. |
protected abstract QName |
getElementQName(String jsonFieldName)
Returns the element qualified name which is determined from the given
jsonFieldName and configuration of the
underlying implementation. |
protected JSONConfiguration |
getJsonConfiguration() |
protected abstract boolean |
isAttribute(String jsonFieldName)
Determines whether the given json field name represents an attribute name.
|
protected XmlEventProvider(com.fasterxml.jackson.core.JsonParser parser,
JSONConfiguration configuration,
String rootName)
throws XMLStreamException
XMLStreamExceptionprotected com.sun.jersey.json.impl.reader.JsonXmlEvent createEndElementEvent(QName elementName, Location location)
EndElementEvent.elementName - name of element for which the end element should be created.location - location of this end element in the JSON stream.protected com.sun.jersey.json.impl.reader.JsonXmlEvent createStartElementEvent(QName elementName, Location location)
StartElementEvent.elementName - name of element for which the start element should be created.location - location of this start element in the JSON stream.protected String getAttributeName(String jsonFieldName)
jsonFieldName - field name representing the attribute name.protected abstract QName getAttributeQName(String jsonFieldName)
jsonFieldName and configuration of the
underlying implementation.jsonFieldName - name of the json field to obtain the qualified name for.protected abstract QName getElementQName(String jsonFieldName)
jsonFieldName and configuration of the
underlying implementation.jsonFieldName - name of the json field to obtain the qualified name for.protected JSONConfiguration getJsonConfiguration()
protected abstract boolean isAttribute(String jsonFieldName)
jsonFieldName - json field name to be examined.true if the given name represents an attribute, false otherwise.Copyright © 2022. All rights reserved.