org.apache.cxf.jaxb
Class JAXBDataBinding

java.lang.Object
  extended by org.apache.cxf.databinding.AbstractDataBinding
      extended by org.apache.cxf.jaxb.JAXBDataBinding
All Implemented Interfaces:
org.apache.cxf.databinding.DataBinding

public final class JAXBDataBinding
extends org.apache.cxf.databinding.AbstractDataBinding


Field Summary
static java.lang.String MTOM_THRESHOLD
           
static java.lang.String SCHEMA_RESOURCE
           
static java.lang.String UNWRAP_JAXB_ELEMENT
           
static java.lang.String USE_JAXB_BRIDGE
           
 
Fields inherited from class org.apache.cxf.databinding.AbstractDataBinding
mtomThreshold
 
Constructor Summary
JAXBDataBinding()
           
JAXBDataBinding(boolean q)
           
JAXBDataBinding(java.lang.Class<?>... classes)
           
JAXBDataBinding(javax.xml.bind.JAXBContext context)
           
 
Method Summary
 boolean addJaxbObjectFactory(javax.xml.bind.JAXBException e1)
           
static void clearCaches()
           
 javax.xml.bind.JAXBContext createJAXBContext(java.util.Set<java.lang.Class<?>> classes)
           
 javax.xml.bind.JAXBContext createJAXBContext(java.util.Set<java.lang.Class<?>> classes, java.lang.String defaultNs)
           
 org.apache.cxf.jaxb.JAXBDataBinding.CachedContextAndSchemas createJAXBContextAndSchemas(java.util.Set<java.lang.Class<?>> classes, java.lang.String defaultNs)
           
<T> org.apache.cxf.databinding.DataReader<T>
createReader(java.lang.Class<T> c)
           
<T> org.apache.cxf.databinding.DataWriter<T>
createWriter(java.lang.Class<T> c)
           
 javax.xml.bind.JAXBContext getContext()
           
 java.util.Set<java.lang.Class<?>> getContextClasses()
           
 java.util.Map<java.lang.String,java.lang.Object> getContextProperties()
          Return a map of properties.
 java.lang.Class[] getExtraClass()
           
 javax.xml.bind.Marshaller.Listener getMarshallerListener()
          Returns the Marshaller.Listener that will be registered on the Marshallers
 java.util.Map<java.lang.String,java.lang.Object> getMarshallerProperties()
          Return a map of properties.
 com.sun.xml.bind.marshaller.NamespacePrefixMapper getNamespacePrefixMapper()
           
 java.lang.Class<?>[] getSupportedReaderFormats()
           
 java.lang.Class<?>[] getSupportedWriterFormats()
           
 javax.xml.bind.Unmarshaller.Listener getUnmarshallerListener()
          Returns the Unmarshaller.Listener that will be registered on the Unmarshallers
 java.util.Map<java.lang.String,java.lang.Object> getUnmarshallerProperties()
          Return a map of properties.
 void initialize(org.apache.cxf.service.Service aservice)
           
 void setContext(javax.xml.bind.JAXBContext ctx)
           
 void setContextProperties(java.util.Map<java.lang.String,java.lang.Object> contextProperties)
          Set a map of JAXB context properties.
 void setExtraClass(java.lang.Class[] userExtraClass)
           
 void setMarshallerListener(javax.xml.bind.Marshaller.Listener marshallerListener)
          Sets the Marshaller.Listener that will be registered on the Marshallers
 void setMarshallerProperties(java.util.Map<java.lang.String,java.lang.Object> marshallerProperties)
          Set a map of JAXB marshaller properties.
 void setUnmarshallerListener(javax.xml.bind.Unmarshaller.Listener unmarshallerListener)
          Sets the Unmarshaller.Listener that will be registered on the Unmarshallers
 void setUnmarshallerProperties(java.util.Map<java.lang.String,java.lang.Object> unmarshallerProperties)
          Set a map of JAXB unmarshaller properties.
 
Methods inherited from class org.apache.cxf.databinding.AbstractDataBinding
addSchemaDocument, checkNamespaceMap, getDeclaredNamespaceMappings, getMtomThreshold, getNamespaceMap, getSchemas, setMtomThreshold, setNamespaceMap, setSchemas, updateSchemaLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCHEMA_RESOURCE

public static final java.lang.String SCHEMA_RESOURCE
See Also:
Constant Field Values

MTOM_THRESHOLD

public static final java.lang.String MTOM_THRESHOLD
See Also:
Constant Field Values

UNWRAP_JAXB_ELEMENT

public static final java.lang.String UNWRAP_JAXB_ELEMENT
See Also:
Constant Field Values

USE_JAXB_BRIDGE

public static final java.lang.String USE_JAXB_BRIDGE
See Also:
Constant Field Values
Constructor Detail

JAXBDataBinding

public JAXBDataBinding()

JAXBDataBinding

public JAXBDataBinding(boolean q)

JAXBDataBinding

public JAXBDataBinding(java.lang.Class<?>... classes)
                throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

JAXBDataBinding

public JAXBDataBinding(javax.xml.bind.JAXBContext context)
Method Detail

getContext

public javax.xml.bind.JAXBContext getContext()

setContext

public void setContext(javax.xml.bind.JAXBContext ctx)

getNamespacePrefixMapper

public com.sun.xml.bind.marshaller.NamespacePrefixMapper getNamespacePrefixMapper()

createWriter

public <T> org.apache.cxf.databinding.DataWriter<T> createWriter(java.lang.Class<T> c)

getSupportedWriterFormats

public java.lang.Class<?>[] getSupportedWriterFormats()

createReader

public <T> org.apache.cxf.databinding.DataReader<T> createReader(java.lang.Class<T> c)

getSupportedReaderFormats

public java.lang.Class<?>[] getSupportedReaderFormats()

initialize

public void initialize(org.apache.cxf.service.Service aservice)

setExtraClass

public void setExtraClass(java.lang.Class[] userExtraClass)

getExtraClass

public java.lang.Class[] getExtraClass()

createJAXBContext

public javax.xml.bind.JAXBContext createJAXBContext(java.util.Set<java.lang.Class<?>> classes)
                                             throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

createJAXBContext

public javax.xml.bind.JAXBContext createJAXBContext(java.util.Set<java.lang.Class<?>> classes,
                                                    java.lang.String defaultNs)
                                             throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

createJAXBContextAndSchemas

public org.apache.cxf.jaxb.JAXBDataBinding.CachedContextAndSchemas createJAXBContextAndSchemas(java.util.Set<java.lang.Class<?>> classes,
                                                                                               java.lang.String defaultNs)
                                                                                        throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

getContextClasses

public java.util.Set<java.lang.Class<?>> getContextClasses()

addJaxbObjectFactory

public boolean addJaxbObjectFactory(javax.xml.bind.JAXBException e1)

getContextProperties

public java.util.Map<java.lang.String,java.lang.Object> getContextProperties()
Return a map of properties. These properties are passed to JAXBContext.newInstance when this object creates a context.

Returns:
the map of JAXB context properties.

setContextProperties

public void setContextProperties(java.util.Map<java.lang.String,java.lang.Object> contextProperties)
Set a map of JAXB context properties. These properties are passed to JAXBContext.newInstance when this object creates a context. Note that if you create a JAXB context elsewhere, you will not respect these properties unless you handle it manually.

Parameters:
contextProperties - map of properties.

getMarshallerProperties

public java.util.Map<java.lang.String,java.lang.Object> getMarshallerProperties()
Return a map of properties. These properties are set into the JAXB Marshaller (via Marshaller.setProperty(...) when the marshaller is created.

Returns:
the map of JAXB marshaller properties.

setMarshallerProperties

public void setMarshallerProperties(java.util.Map<java.lang.String,java.lang.Object> marshallerProperties)
Set a map of JAXB marshaller properties. These properties are set into the JAXB Marshaller (via Marshaller.setProperty(...) when the marshaller is created.

Parameters:
marshallerProperties - map of properties.

getUnmarshallerProperties

public java.util.Map<java.lang.String,java.lang.Object> getUnmarshallerProperties()
Return a map of properties. These properties are set into the JAXB Unmarshaller (via Unmarshaller.setProperty(...) when the unmarshaller is created.

Returns:
the map of JAXB unmarshaller properties.

setUnmarshallerProperties

public void setUnmarshallerProperties(java.util.Map<java.lang.String,java.lang.Object> unmarshallerProperties)
Set a map of JAXB unmarshaller properties. These properties are set into the JAXB Unmarshaller (via Unmarshaller.setProperty(...) when the unmarshaller is created.

Parameters:
unmarshallerProperties - map of properties.

getUnmarshallerListener

public javax.xml.bind.Unmarshaller.Listener getUnmarshallerListener()
Returns the Unmarshaller.Listener that will be registered on the Unmarshallers

Returns:

setUnmarshallerListener

public void setUnmarshallerListener(javax.xml.bind.Unmarshaller.Listener unmarshallerListener)
Sets the Unmarshaller.Listener that will be registered on the Unmarshallers

Parameters:
unmarshallerListener -

getMarshallerListener

public javax.xml.bind.Marshaller.Listener getMarshallerListener()
Returns the Marshaller.Listener that will be registered on the Marshallers

Returns:

setMarshallerListener

public void setMarshallerListener(javax.xml.bind.Marshaller.Listener marshallerListener)
Sets the Marshaller.Listener that will be registered on the Marshallers

Parameters:
marshallerListener -

clearCaches

public static void clearCaches()


Apache CXF