Class JAXBContextWrapper


  • public class JAXBContextWrapper
    extends javax.xml.bind.JAXBContext
    A wrapper class around a JAXBContext that enables additional features to the RESTEasy JAXB-based providers.
    Version:
    $Revision:$
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object mapper
      An optional namespace mapper that is used to apply prefixes to elements with a given namespace.
      private static java.lang.reflect.Constructor mapperConstructor  
      private static java.lang.String NAMESPACE_PREFIX_MAPPER  
      private javax.xml.validation.Schema schema
      The optional Schema that is bound to this context
      private javax.xml.bind.JAXBContext wrappedContext  
      • Fields inherited from class javax.xml.bind.JAXBContext

        JAXB_CONTEXT_FACTORY
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      javax.xml.bind.Binder<org.w3c.dom.Node> createBinder()  
      <T> javax.xml.bind.Binder<T> createBinder​(java.lang.Class<T> domType)  
      javax.xml.bind.JAXBIntrospector createJAXBIntrospector()  
      javax.xml.bind.Marshaller createMarshaller()  
      javax.xml.bind.Unmarshaller createUnmarshaller()  
      javax.xml.bind.Validator createValidator()
      Deprecated.
      See javax.xml.bind.JAXBContext#createValidator().
      void generateSchema​(javax.xml.bind.SchemaOutputResolver outputResolver)  
      javax.xml.validation.Schema getSchema()
      Get the schema.
      private void processConfig​(JAXBConfig config)
      FIXME Comment this
      void setSchema​(javax.xml.validation.Schema schema)
      Set the schema.
      • Methods inherited from class javax.xml.bind.JAXBContext

        newInstance, newInstance, newInstance, newInstance, newInstance
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NAMESPACE_PREFIX_MAPPER

        private static final java.lang.String NAMESPACE_PREFIX_MAPPER
        See Also:
        Constant Field Values
      • mapperConstructor

        private static java.lang.reflect.Constructor mapperConstructor
      • wrappedContext

        private javax.xml.bind.JAXBContext wrappedContext
      • mapper

        private java.lang.Object mapper
        An optional namespace mapper that is used to apply prefixes to elements with a given namespace.
      • schema

        private javax.xml.validation.Schema schema
        The optional Schema that is bound to this context
    • Constructor Detail

      • JAXBContextWrapper

        public JAXBContextWrapper​(javax.xml.bind.JAXBContext wrappedContext,
                                  JAXBConfig config)
                           throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • JAXBContextWrapper

        public JAXBContextWrapper​(java.lang.Class<?>[] classes,
                                  java.util.Map<java.lang.String,​java.lang.Object> properties,
                                  JAXBConfig config)
                           throws javax.xml.bind.JAXBException
        Create a new JAXBContextWrapper.
        Parameters:
        classes -
        properties -
        config -
        Throws:
        javax.xml.bind.JAXBException
      • JAXBContextWrapper

        public JAXBContextWrapper​(java.lang.String contextPath,
                                  JAXBConfig config)
                           throws javax.xml.bind.JAXBException
        Create a new JAXBContextWrapper.
        Parameters:
        contextPath -
        config -
        Throws:
        javax.xml.bind.JAXBException
      • JAXBContextWrapper

        public JAXBContextWrapper​(JAXBConfig config,
                                  java.lang.Class<?>... classes)
                           throws javax.xml.bind.JAXBException
        Create a new JAXBContextWrapper.
        Parameters:
        classes -
        config -
        Throws:
        javax.xml.bind.JAXBException
    • Method Detail

      • processConfig

        private void processConfig​(JAXBConfig config)
                            throws javax.xml.bind.JAXBException
        FIXME Comment this
        Parameters:
        config -
        Throws:
        javax.xml.bind.JAXBException
      • getSchema

        public javax.xml.validation.Schema getSchema()
        Get the schema.
        Returns:
        the schema.
      • setSchema

        public void setSchema​(javax.xml.validation.Schema schema)
        Set the schema.
        Parameters:
        schema - The schema to set.
      • createBinder

        public javax.xml.bind.Binder<org.w3c.dom.Node> createBinder()
        Overrides:
        createBinder in class javax.xml.bind.JAXBContext
        Returns:
        See Also:
        JAXBContext.createBinder()
      • createBinder

        public <T> javax.xml.bind.Binder<T> createBinder​(java.lang.Class<T> domType)
        Overrides:
        createBinder in class javax.xml.bind.JAXBContext
        Type Parameters:
        T -
        Parameters:
        domType -
        Returns:
        See Also:
        JAXBContext.createBinder(java.lang.Class)
      • createJAXBIntrospector

        public javax.xml.bind.JAXBIntrospector createJAXBIntrospector()
        Overrides:
        createJAXBIntrospector in class javax.xml.bind.JAXBContext
        Returns:
        See Also:
        JAXBContext.createJAXBIntrospector()
      • createMarshaller

        public javax.xml.bind.Marshaller createMarshaller()
                                                   throws javax.xml.bind.JAXBException
        Specified by:
        createMarshaller in class javax.xml.bind.JAXBContext
        Returns:
        Throws:
        javax.xml.bind.JAXBException
        See Also:
        JAXBContext.createMarshaller()
      • createUnmarshaller

        public javax.xml.bind.Unmarshaller createUnmarshaller()
                                                       throws javax.xml.bind.JAXBException
        Specified by:
        createUnmarshaller in class javax.xml.bind.JAXBContext
        Returns:
        Throws:
        javax.xml.bind.JAXBException
        See Also:
        JAXBContext.createUnmarshaller()
      • createValidator

        public javax.xml.bind.Validator createValidator()
                                                 throws javax.xml.bind.JAXBException
        Deprecated.
        See javax.xml.bind.JAXBContext#createValidator().
        Specified by:
        createValidator in class javax.xml.bind.JAXBContext
        Returns:
        Throws:
        javax.xml.bind.JAXBException
        See Also:
        JAXBContext.createValidator()
      • generateSchema

        public void generateSchema​(javax.xml.bind.SchemaOutputResolver outputResolver)
                            throws java.io.IOException
        Overrides:
        generateSchema in class javax.xml.bind.JAXBContext
        Parameters:
        outputResolver -
        Throws:
        java.io.IOException
        See Also:
        JAXBContext.generateSchema(javax.xml.bind.SchemaOutputResolver)