public class NaturalNotationEventProvider extends XmlEventProvider
XmlEventProvider
for JSON in natural notation.Constructor and Description |
---|
NaturalNotationEventProvider(org.codehaus.jackson.JsonParser parser,
JSONConfiguration configuration,
String rootName,
JAXBContext jaxbContext,
Class<?> expectedType) |
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 QName |
getAttributeQName(String jsonFieldName)
Returns the attribute qualified name which is determined from the given
jsonFieldName and configuration of the
underlying implementation. |
protected QName |
getElementQName(String jsonFieldName)
Returns the element qualified name which is determined from the given
jsonFieldName and configuration of the
underlying implementation. |
protected boolean |
isAttribute(String jsonFieldName)
Determines whether the given json field name represents an attribute name.
|
getJsonConfiguration
public NaturalNotationEventProvider(org.codehaus.jackson.JsonParser parser, JSONConfiguration configuration, String rootName, JAXBContext jaxbContext, Class<?> expectedType) throws XMLStreamException
XMLStreamException
protected String getAttributeName(String jsonFieldName)
XmlEventProvider
getAttributeName
in class XmlEventProvider
jsonFieldName
- field name representing the attribute name.protected QName getAttributeQName(String jsonFieldName)
XmlEventProvider
jsonFieldName
and configuration of the
underlying implementation.getAttributeQName
in class XmlEventProvider
jsonFieldName
- name of the json field to obtain the qualified name for.protected QName getElementQName(String jsonFieldName)
XmlEventProvider
jsonFieldName
and configuration of the
underlying implementation.getElementQName
in class XmlEventProvider
jsonFieldName
- name of the json field to obtain the qualified name for.protected boolean isAttribute(String jsonFieldName)
XmlEventProvider
isAttribute
in class XmlEventProvider
jsonFieldName
- json field name to be examined.true
if the given name represents an attribute, false
otherwise.protected com.sun.jersey.json.impl.reader.JsonXmlEvent createEndElementEvent(QName elementName, Location location)
XmlEventProvider
EndElementEvent
.createEndElementEvent
in class XmlEventProvider
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)
XmlEventProvider
StartElementEvent
.createStartElementEvent
in class XmlEventProvider
elementName
- name of element for which the start element should be created.location
- location of this start element in the JSON stream.Copyright © 2013 Oracle Corporation. All rights reserved.