Class SDOXMLHelperDelegator

  • All Implemented Interfaces:
    commonj.sdo.helper.XMLHelper, SDOXMLHelper

    public class SDOXMLHelperDelegator
    extends AbstractHelperDelegator
    implements SDOXMLHelper

    Purpose: Helper to XML documents into DataObects and DataObjects into XML documents.

    Responsibilities:

    • Finds the appropriate SDOXMLHelperDelegate for the classLoader/application name and delegates work to that
    • Load methods create commonj.sdo.XMLDocument objects from XML (unmarshal)
    • Save methods create XML from commonj.sdo.XMLDocument and commonj.sdo.DataObject objects (marshal)
    • Field Summary

      • Fields inherited from interface commonj.sdo.helper.XMLHelper

        INSTANCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addDescriptors​(java.util.List descriptors)
      INTERNAL:
      commonj.sdo.helper.XMLDocument createDocument​(commonj.sdo.DataObject dataObject, java.lang.String rootElementURI, java.lang.String rootElementName)  
      SDOClassLoader getLoader()
      INTERNAL:
      Project getTopLinkProject()
      INTERNAL:
      XMLContext getXmlContext()
      INTERNAL:
      org.eclipse.persistence.internal.oxm.XMLConversionManager getXmlConversionManager()
      INTERNAL:
      SDOXMLHelperDelegate getXMLHelperDelegate()  
      XMLMarshaller getXmlMarshaller()
      INTERNAL:
      XMLUnmarshaller getXmlUnmarshaller()
      INTERNAL:
      void initializeDescriptor​(XMLDescriptor descriptor)  
      commonj.sdo.helper.XMLDocument load​(java.io.InputStream inputStream)  
      commonj.sdo.helper.XMLDocument load​(java.io.InputStream inputStream, java.lang.String locationURI, java.lang.Object options)  
      commonj.sdo.helper.XMLDocument load​(java.io.Reader inputReader, java.lang.String locationURI, java.lang.Object options)  
      commonj.sdo.helper.XMLDocument load​(java.lang.String inputString)  
      commonj.sdo.helper.XMLDocument load​(javax.xml.transform.Source source, java.lang.String locationURI, java.lang.Object options)  
      commonj.sdo.helper.XMLDocument load​(org.xml.sax.InputSource inputSource, java.lang.String locationURI, java.lang.Object options)
      INTERNAL:
      void reset()
      INTERNAL:
      java.lang.String save​(commonj.sdo.DataObject dataObject, java.lang.String rootElementURI, java.lang.String rootElementName)  
      void save​(commonj.sdo.DataObject dataObject, java.lang.String rootElementURI, java.lang.String rootElementName, java.io.OutputStream outputStream)  
      void save​(commonj.sdo.helper.XMLDocument xmlDocument, java.io.OutputStream outputStream, java.lang.Object options)  
      void save​(commonj.sdo.helper.XMLDocument xmlDocument, java.io.Writer outputWriter, java.lang.Object options)  
      void save​(commonj.sdo.helper.XMLDocument xmlDocument, javax.xml.transform.Result result, java.lang.Object options)  
      void serialize​(commonj.sdo.helper.XMLDocument xmlDocument, java.io.OutputStream outputStream, java.lang.Object options)  
      void setLoader​(SDOClassLoader loader)
      INTERNAL:
      void setTimeZone​(java.util.TimeZone timeZone)
      The specified TimeZone will be used for all String to date object conversions.
      void setTimeZoneQualified​(boolean timeZoneQualified)
      By setting this flag to true the marshalled date objects marshalled to the XML schema types time and dateTime will be qualified by a time zone.
      void setTopLinkProject​(Project toplinkProject)
      INTERNAL:
      void setXmlContext​(XMLContext xmlContext)
      INTERNAL:
      void setXmlMarshaller​(XMLMarshaller xmlMarshaller)
      INTERNAL:
      void setXmlUnmarshaller​(XMLUnmarshaller xmlUnmarshaller)
      INTERNAL:
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SDOXMLHelperDelegator

        public SDOXMLHelperDelegator()
      • SDOXMLHelperDelegator

        public SDOXMLHelperDelegator​(commonj.sdo.helper.HelperContext aContext)
    • Method Detail

      • setTimeZone

        public void setTimeZone​(java.util.TimeZone timeZone)
        The specified TimeZone will be used for all String to date object conversions. By default the TimeZone from the JVM is used.
        Specified by:
        setTimeZone in interface SDOXMLHelper
      • setTimeZoneQualified

        public void setTimeZoneQualified​(boolean timeZoneQualified)
        By setting this flag to true the marshalled date objects marshalled to the XML schema types time and dateTime will be qualified by a time zone. By default time information is not time zone qualified.
        Specified by:
        setTimeZoneQualified in interface SDOXMLHelper
      • load

        public commonj.sdo.helper.XMLDocument load​(java.lang.String inputString)
        Specified by:
        load in interface commonj.sdo.helper.XMLHelper
      • load

        public commonj.sdo.helper.XMLDocument load​(java.io.InputStream inputStream)
                                            throws java.io.IOException
        Specified by:
        load in interface commonj.sdo.helper.XMLHelper
        Throws:
        java.io.IOException
      • load

        public commonj.sdo.helper.XMLDocument load​(java.io.InputStream inputStream,
                                                   java.lang.String locationURI,
                                                   java.lang.Object options)
                                            throws java.io.IOException
        Specified by:
        load in interface commonj.sdo.helper.XMLHelper
        Throws:
        java.io.IOException
      • load

        public commonj.sdo.helper.XMLDocument load​(org.xml.sax.InputSource inputSource,
                                                   java.lang.String locationURI,
                                                   java.lang.Object options)
                                            throws java.io.IOException
        Description copied from interface: SDOXMLHelper
        INTERNAL:
        Specified by:
        load in interface SDOXMLHelper
        Returns:
        Throws:
        java.io.IOException
      • load

        public commonj.sdo.helper.XMLDocument load​(java.io.Reader inputReader,
                                                   java.lang.String locationURI,
                                                   java.lang.Object options)
                                            throws java.io.IOException
        Specified by:
        load in interface commonj.sdo.helper.XMLHelper
        Throws:
        java.io.IOException
      • load

        public commonj.sdo.helper.XMLDocument load​(javax.xml.transform.Source source,
                                                   java.lang.String locationURI,
                                                   java.lang.Object options)
                                            throws java.io.IOException
        Specified by:
        load in interface commonj.sdo.helper.XMLHelper
        Throws:
        java.io.IOException
      • save

        public java.lang.String save​(commonj.sdo.DataObject dataObject,
                                     java.lang.String rootElementURI,
                                     java.lang.String rootElementName)
        Specified by:
        save in interface commonj.sdo.helper.XMLHelper
      • save

        public void save​(commonj.sdo.DataObject dataObject,
                         java.lang.String rootElementURI,
                         java.lang.String rootElementName,
                         java.io.OutputStream outputStream)
                  throws java.io.IOException
        Specified by:
        save in interface commonj.sdo.helper.XMLHelper
        Throws:
        java.io.IOException
      • save

        public void save​(commonj.sdo.helper.XMLDocument xmlDocument,
                         java.io.OutputStream outputStream,
                         java.lang.Object options)
                  throws java.io.IOException
        Specified by:
        save in interface commonj.sdo.helper.XMLHelper
        Throws:
        java.io.IOException
      • save

        public void save​(commonj.sdo.helper.XMLDocument xmlDocument,
                         java.io.Writer outputWriter,
                         java.lang.Object options)
                  throws java.io.IOException
        Specified by:
        save in interface commonj.sdo.helper.XMLHelper
        Throws:
        java.io.IOException
      • save

        public void save​(commonj.sdo.helper.XMLDocument xmlDocument,
                         javax.xml.transform.Result result,
                         java.lang.Object options)
                  throws java.io.IOException
        Specified by:
        save in interface commonj.sdo.helper.XMLHelper
        Throws:
        java.io.IOException
      • serialize

        public void serialize​(commonj.sdo.helper.XMLDocument xmlDocument,
                              java.io.OutputStream outputStream,
                              java.lang.Object options)
                       throws java.io.IOException
        Specified by:
        serialize in interface SDOXMLHelper
        Throws:
        java.io.IOException
      • createDocument

        public commonj.sdo.helper.XMLDocument createDocument​(commonj.sdo.DataObject dataObject,
                                                             java.lang.String rootElementURI,
                                                             java.lang.String rootElementName)
        Specified by:
        createDocument in interface commonj.sdo.helper.XMLHelper
      • addDescriptors

        public void addDescriptors​(java.util.List descriptors)
        Description copied from interface: SDOXMLHelper
        INTERNAL:
        Specified by:
        addDescriptors in interface SDOXMLHelper
      • getXmlConversionManager

        public org.eclipse.persistence.internal.oxm.XMLConversionManager getXmlConversionManager()
        Description copied from interface: SDOXMLHelper
        INTERNAL:
        Specified by:
        getXmlConversionManager in interface SDOXMLHelper