EclipseLink 1.1.4, build 'v20100812-r7860' API Reference

org.eclipse.persistence.sdo.helper.jaxb
Class JAXBXMLHelper

java.lang.Object
  extended by org.eclipse.persistence.sdo.helper.delegates.SDOXMLHelperDelegate
      extended by org.eclipse.persistence.sdo.helper.jaxb.JAXBXMLHelper
All Implemented Interfaces:
XMLHelper, SDOXMLHelper

public class JAXBXMLHelper
extends SDOXMLHelperDelegate

This implementation of commonj.sdo.helper.XMLHelper is responsible for ensuring that newly unmarshalled DataObjects are assigned a JAXB aware value store.

 XMLHelper xmlHelper = jaxbHelperContext.getXMLHelper();
 XMLDocument xmlDocument = xmlHelper.load(xml);
 DataObject customerDO = xmlDocument.getRootObject();
 
 Customer customer = jaxbHelperContext.unwrap(customerDO);
 


Field Summary
 
Fields inherited from interface commonj.sdo.helper.XMLHelper
INSTANCE
 
Constructor Summary
JAXBXMLHelper(HelperContext helperContext)
          Create a new instance of JAXBXMLHelper
JAXBXMLHelper(HelperContext helperContext, java.lang.ClassLoader classLoader)
          Create a new instance of JAXBXMLHelper
 
Method Summary
 JAXBHelperContext getHelperContext()
          INTERNAL: Return the helperContext that this instance is associated with.
 XMLDocument load(org.xml.sax.InputSource inputSource, java.lang.String locationURI, java.lang.Object options)
          Creates and returns an XMLDocument from the inputSource.
 XMLDocument load(java.io.InputStream inputStream)
          Creates and returns an XMLDocument from the inputStream.
 XMLDocument load(java.io.InputStream inputStream, java.lang.String locationURI, java.lang.Object options)
          Creates and returns an XMLDocument from the inputStream.
 XMLDocument load(java.io.Reader inputReader, java.lang.String locationURI, java.lang.Object options)
          Creates and returns an XMLDocument from the inputReader.
 XMLDocument load(javax.xml.transform.Source source, java.lang.String locationURI, java.lang.Object options)
          Creates and returns an XMLDocument from the inputSource.
 XMLDocument load(java.lang.String inputString)
          Creates and returns an XMLDocument from the input String.
 
Methods inherited from class org.eclipse.persistence.sdo.helper.delegates.SDOXMLHelperDelegate
addDescriptors, createDocument, getLoader, getTopLinkProject, getXmlContext, getXmlConversionManager, getXmlMarshaller, getXmlUnmarshaller, initializeDescriptor, reset, save, save, save, save, save, setHelperContext, setLoader, setTimeZone, setTimeZoneQualified, setTopLinkProject, setXmlContext, setXmlMarshaller, setXmlUnmarshaller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAXBXMLHelper

public JAXBXMLHelper(HelperContext helperContext)
Create a new instance of JAXBXMLHelper

Parameters:
helperContext - - The HelperContext used to get this XMLHelper.

JAXBXMLHelper

public JAXBXMLHelper(HelperContext helperContext,
                     java.lang.ClassLoader classLoader)
Create a new instance of JAXBXMLHelper

Parameters:
helperContext - - The HelperContext used to get this XMLHelper.
classLoader - - The ClassLoader containing the generated SDO classes/interfaces (if any).
Method Detail

getHelperContext

public JAXBHelperContext getHelperContext()
Description copied from interface: SDOXMLHelper
INTERNAL: Return the helperContext that this instance is associated with.

Specified by:
getHelperContext in interface SDOXMLHelper
Overrides:
getHelperContext in class SDOXMLHelperDelegate
Returns:

load

public XMLDocument load(org.xml.sax.InputSource inputSource,
                        java.lang.String locationURI,
                        java.lang.Object options)
                 throws java.io.IOException
Description copied from class: SDOXMLHelperDelegate
Creates and returns an XMLDocument from the inputSource. The InputSource will be closed after reading. By default does not perform XSD validation.

Specified by:
load in interface SDOXMLHelper
Overrides:
load in class SDOXMLHelperDelegate
Parameters:
inputSource - specifies the InputSource to read from
locationURI - specifies the URI of the document for relative schema locations
options - implementation-specific options.
Returns:
the new XMLDocument loaded
Throws:
java.io.IOException - for stream exceptions.

load

public XMLDocument load(java.io.InputStream inputStream,
                        java.lang.String locationURI,
                        java.lang.Object options)
                 throws java.io.IOException
Description copied from class: SDOXMLHelperDelegate
Creates and returns an XMLDocument from the inputStream. The InputStream will be closed after reading. By default does not perform XSD validation.

Specified by:
load in interface XMLHelper
Overrides:
load in class SDOXMLHelperDelegate
Parameters:
inputStream - specifies the InputStream to read from
locationURI - specifies the URI of the document for relative schema locations
options - implementation-specific options.
Returns:
the new XMLDocument loaded
Throws:
java.io.IOException - for stream exceptions.

load

public XMLDocument load(java.io.InputStream inputStream)
                 throws java.io.IOException
Description copied from class: SDOXMLHelperDelegate
Creates and returns an XMLDocument from the inputStream. The InputStream will be closed after reading. By default does not perform XSD validation. Same as load(inputStream, null, null);

Specified by:
load in interface XMLHelper
Overrides:
load in class SDOXMLHelperDelegate
Parameters:
inputStream - specifies the InputStream to read from
Returns:
the new XMLDocument loaded
Throws:
java.io.IOException - for stream exceptions.

load

public XMLDocument load(java.io.Reader inputReader,
                        java.lang.String locationURI,
                        java.lang.Object options)
                 throws java.io.IOException
Description copied from class: SDOXMLHelperDelegate
Creates and returns an XMLDocument from the inputReader. The InputStream will be closed after reading. By default does not perform XSD validation.

Specified by:
load in interface XMLHelper
Overrides:
load in class SDOXMLHelperDelegate
Parameters:
inputReader - specifies the Reader to read from
locationURI - specifies the URI of the document for relative schema locations
options - implementation-specific options.
Returns:
the new XMLDocument loaded
Throws:
java.io.IOException - for stream exceptions.

load

public XMLDocument load(javax.xml.transform.Source source,
                        java.lang.String locationURI,
                        java.lang.Object options)
                 throws java.io.IOException
Description copied from interface: XMLHelper
Creates and returns an XMLDocument from the inputSource. The InputSource will be closed after reading. By default does not perform XSD validation.

Specified by:
load in interface XMLHelper
Overrides:
load in class SDOXMLHelperDelegate
Parameters:
source - specifies the Source to read from
locationURI - specifies the URI of the document for relative schema locations
options - implementation-specific options.
Returns:
the new XMLDocument loaded
Throws:
java.io.IOException - for stream exceptions.

load

public XMLDocument load(java.lang.String inputString)
Description copied from class: SDOXMLHelperDelegate
Creates and returns an XMLDocument from the input String. By default does not perform XSD validation. Same as load(new StringReader(inputString), null, null);

Specified by:
load in interface XMLHelper
Overrides:
load in class SDOXMLHelperDelegate
Parameters:
inputString - specifies the String to read from
Returns:
the new XMLDocument loaded

EclipseLink 1.1.4, build 'v20100812-r7860' API Reference