Class JsonXMLRootProvider
- java.lang.Object
-
- org.apache.synapse.commons.staxon.core.json.jaxb.JsonXMLRootProvider
-
public class JsonXMLRootProvider extends Object
Root name/element provider.
-
-
Constructor Summary
Constructors Constructor Description JsonXMLRootProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JAXBElement<?>
createElement(Class<?> type, Object value)
Create root element for an@XmlRootElement
or@XmlType
-annotaed type.QName
getName(Class<?> type)
Calculate root element name for an@XmlRootElement
or@XmlType
-annotaed type.protected String
getNamespaceURI(XmlElementDecl xmlElementDecl, XmlSchema xmlSchema)
protected String
getNamespaceURI(XmlRootElement xmlRootElement, XmlSchema xmlSchema)
protected String
getNamespaceURI(XmlType xmlType, XmlSchema xmlSchema)
protected String
getPrefix(String namespaceURI, XmlSchema xmlSchema)
protected Method
getXmlElementDeclMethod(Class<?> type)
Determine@XmlElementDecl
-annotated factory method to createJAXBElement
for an@XmlType
-annotated typeprotected QName
getXmlRootElementName(Class<?> type)
Calculate root element name for an@XmlRootElement
-annotated type.protected QName
getXmlTypeName(Class<?> type)
Calculate root element name for an@XmlType
-annotated type.
-
-
-
Method Detail
-
getNamespaceURI
protected String getNamespaceURI(XmlRootElement xmlRootElement, XmlSchema xmlSchema)
-
getNamespaceURI
protected String getNamespaceURI(XmlElementDecl xmlElementDecl, XmlSchema xmlSchema)
-
getXmlRootElementName
protected QName getXmlRootElementName(Class<?> type)
Calculate root element name for an@XmlRootElement
-annotated type.- Parameters:
type
-- Returns:
- element name
-
getXmlTypeName
protected QName getXmlTypeName(Class<?> type)
Calculate root element name for an@XmlType
-annotated type.- Parameters:
type
-- Returns:
- element name
-
getXmlElementDeclMethod
protected Method getXmlElementDeclMethod(Class<?> type)
Determine@XmlElementDecl
-annotated factory method to createJAXBElement
for an@XmlType
-annotated type- Parameters:
type
-- Returns:
- element
-
getName
public QName getName(Class<?> type)
Calculate root element name for an@XmlRootElement
or@XmlType
-annotaed type.- Parameters:
type
-- Returns:
- name or
null
-
createElement
public JAXBElement<?> createElement(Class<?> type, Object value) throws JAXBException
Create root element for an@XmlRootElement
or@XmlType
-annotaed type.- Parameters:
type
-value
-- Returns:
- root element (or
null
) - Throws:
JAXBException
-
-