Package org.apache.synapse.commons.staxon.core.json.jaxb

# 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

  Modifier and Type
  Method
  Description
  `jakarta.xml.bind.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(jakarta.xml.bind.annotation.XmlElementDecl xmlElementDecl, jakarta.xml.bind.annotation.XmlSchema xmlSchema)`
  `protected String`
  `getNamespaceURI(jakarta.xml.bind.annotation.XmlRootElement xmlRootElement, jakarta.xml.bind.annotation.XmlSchema xmlSchema)`
  `protected String`
  `getNamespaceURI(jakarta.xml.bind.annotation.XmlType xmlType, jakarta.xml.bind.annotation.XmlSchema xmlSchema)`
  `protected String`
  `getPrefix(String namespaceURI, jakarta.xml.bind.annotation.XmlSchema xmlSchema)`
  `protected Method`
  `getXmlElementDeclMethod(Class<?> type)`
  Determine `@XmlElementDecl`-annotated factory method to create `JAXBElement` for an `@XmlType`-annotated type
  `protected 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.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### JsonXMLRootProvider

    public JsonXMLRootProvider()

- ## Method Details

  - ### getNamespaceURI

    protected String getNamespaceURI(jakarta.xml.bind.annotation.XmlType xmlType, jakarta.xml.bind.annotation.XmlSchema xmlSchema)

  - ### getNamespaceURI

    protected String getNamespaceURI(jakarta.xml.bind.annotation.XmlRootElement xmlRootElement, jakarta.xml.bind.annotation.XmlSchema xmlSchema)

  - ### getNamespaceURI

    protected String getNamespaceURI(jakarta.xml.bind.annotation.XmlElementDecl xmlElementDecl, jakarta.xml.bind.annotation.XmlSchema xmlSchema)

  - ### getPrefix

    protected String getPrefix(String namespaceURI, jakarta.xml.bind.annotation.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 create `JAXBElement` 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 jakarta.xml.bind.JAXBElement<?> createElement(Class<?> type, Object value) throws jakarta.xml.bind.JAXBException
    Create root element for an `@XmlRootElement` or `@XmlType`-annotaed type.
    Parameters:
      `type` -
      `value` -
    Returns:
      root element (or `null`)
    Throws:
      `jakarta.xml.bind.JAXBException`