Class OMXMLBuilderFactory


  • public class OMXMLBuilderFactory
    extends Object
    Provides static factory methods to create various kinds of object model builders from different types of input sources. The methods defined by this class are the starting point to parse XML documents into Axiom trees.
    • Method Detail

      • createStAXOMBuilder

        public static OMXMLParserWrapper createStAXOMBuilder​(OMFactory omFactory,
                                                             XMLStreamReader parser)
        Create an object model builder that pulls events from a StAX stream reader using a specified object model factory.

        See createStAXOMBuilder(XMLStreamReader) for more information about the behavior of the returned builder.

        Parameters:
        omFactory - the object model factory to use
        parser - the stream reader to read the XML data from
        Returns:
        the builder
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(InputStream in)
        Create an object model builder that reads a plain XML document from the provided input stream with the default parser configuration defined by StAXParserConfiguration.DEFAULT.
        Parameters:
        in - the input stream representing the XML document
        Returns:
        the builder
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(InputStream in,
                                                         String encoding)
        Create an object model builder that reads a plain XML document from the provided input stream with the default parser configuration defined by StAXParserConfiguration.DEFAULT.
        Parameters:
        in - the input stream representing the XML document
        encoding - the charset encoding of the XML document or null if the parser should determine the charset encoding
        Returns:
        the builder
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(StAXParserConfiguration configuration,
                                                         InputStream in)
        Create an object model builder that reads a plain XML document from the provided input stream with a given parser configuration.
        Parameters:
        configuration - the parser configuration to use
        in - the input stream representing the XML document
        Returns:
        the builder
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(StAXParserConfiguration configuration,
                                                         InputStream in,
                                                         String encoding)
        Create an object model builder that reads a plain XML document from the provided input stream with a given parser configuration.
        Parameters:
        configuration - the parser configuration to use
        in - the input stream representing the XML document
        encoding - the charset encoding of the XML document or null if the parser should determine the charset encoding
        Returns:
        the builder
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(OMFactory omFactory,
                                                         InputStream in)
        Create an object model builder that reads an XML document from the provided input stream using a specified object model factory and with the default parser configuration defined by StAXParserConfiguration.DEFAULT.
        Parameters:
        omFactory - the object model factory to use
        in - the input stream representing the XML document
        Returns:
        the builder
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(OMFactory omFactory,
                                                         InputStream in,
                                                         String encoding)
        Create an object model builder that reads an XML document from the provided input stream using a specified object model factory and with the default parser configuration defined by StAXParserConfiguration.DEFAULT.
        Parameters:
        omFactory - the object model factory to use
        in - the input stream representing the XML document
        encoding - the charset encoding of the XML document or null if the parser should determine the charset encoding
        Returns:
        the builder
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(OMFactory omFactory,
                                                         StAXParserConfiguration configuration,
                                                         InputStream in)
        Create an object model builder that reads an XML document from the provided input stream using a specified object model factory and with a given parser configuration.
        Parameters:
        omFactory - the object model factory to use
        configuration - the parser configuration to use
        in - the input stream representing the XML document
        Returns:
        the builder
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(OMFactory omFactory,
                                                         StAXParserConfiguration configuration,
                                                         InputStream in,
                                                         String encoding)
        Create an object model builder that reads an XML document from the provided input stream using a specified object model factory and with a given parser configuration.
        Parameters:
        omFactory - the object model factory to use
        configuration - the parser configuration to use
        in - the input stream representing the XML document
        encoding - the charset encoding of the XML document or null if the parser should determine the charset encoding
        Returns:
        the builder
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(Reader in)
        Create an object model builder that reads a plain XML document from the provided character stream with the default parser configuration defined by StAXParserConfiguration.DEFAULT.
        Parameters:
        in - the character stream representing the XML document
        Returns:
        the builder
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(StAXParserConfiguration configuration,
                                                         Reader in)
        Create an object model builder that reads a plain XML document from the provided character stream with a given parser configuration.
        Parameters:
        configuration - the parser configuration to use
        in - the character stream representing the XML document
        Returns:
        the builder
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(OMFactory omFactory,
                                                         Reader in)
        Create an object model builder that reads an XML document from the provided character stream using a specified object model factory and with the default parser configuration defined by StAXParserConfiguration.DEFAULT.
        Parameters:
        omFactory - the object model factory to use
        in - the character stream representing the XML document
        Returns:
        the builder
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(OMFactory omFactory,
                                                         StAXParserConfiguration configuration,
                                                         Reader in)
        Create an object model builder that reads an XML document from the provided character stream using a specified object model factory and with a given parser configuration.
        Parameters:
        omFactory - the object model factory to use
        configuration - the parser configuration to use
        in - the character stream representing the XML document
        Returns:
        the builder
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(OMFactory omFactory,
                                                         Node node,
                                                         boolean expandEntityReferences)
        Create an object model builder that reads an XML document from the provided DOM tree using a specified object model factory.
        Parameters:
        omFactory - the object model factory to use
        node - the DOM node; must be a Node.DOCUMENT_NODE or Node.ELEMENT_NODE
        expandEntityReferences - Determines how EntityReference nodes are handled:
        Returns:
        the builder
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(StAXParserConfiguration configuration,
                                                         MultipartBody message)
        Create an XOP aware model builder from the provided MultipartBody object and with a given parser configuration.
        Parameters:
        configuration - the parser configuration to use
        message - the MIME message
        Returns:
        the builder
        Throws:
        OMException - if an error occurs while processing the content type information from the MultipartBody object
      • createOMBuilder

        public static OMXMLParserWrapper createOMBuilder​(OMFactory omFactory,
                                                         StAXParserConfiguration configuration,
                                                         MultipartBody message)
        Create an XOP aware model builder from the provided MultipartBody object using a specified object model factory and with a given parser configuration.
        Parameters:
        omFactory - the object model factory to use
        configuration - the parser configuration to use
        message - the MIME message
        Returns:
        the builder
        Throws:
        OMException - if an error occurs while processing the content type information from the MultipartBody object
      • createStAXSOAPModelBuilder

        public static SOAPModelBuilder createStAXSOAPModelBuilder​(OMMetaFactory metaFactory,
                                                                  XMLStreamReader parser)
        Create an object model builder for SOAP that pulls events from a StAX stream reader and that uses a particular Axiom implementation. The method will select the appropriate SOAPFactory based on the namespace URI of the SOAP envelope.

        See createStAXOMBuilder(XMLStreamReader) for more information about the behavior of the returned builder.

        Parameters:
        metaFactory - the meta factory for the Axiom implementation to use
        parser - the stream reader to read the XML data from
        Returns:
        the builder
      • createStAXSOAPModelBuilder

        public static SOAPModelBuilder createStAXSOAPModelBuilder​(XMLStreamReader parser)
        Create an object model builder for SOAP that pulls events from a StAX stream reader. The method will select the appropriate SOAPFactory based on the namespace URI of the SOAP envelope.

        See createStAXOMBuilder(XMLStreamReader) for more information about the behavior of the returned builder.

        Parameters:
        parser - the stream reader to read the XML data from
        Returns:
        the builder
      • createSOAPModelBuilder

        public static SOAPModelBuilder createSOAPModelBuilder​(InputStream in,
                                                              String encoding)
        Create an object model builder for SOAP that reads a message from the provided input stream, using a given charset encoding. The method will select the appropriate SOAPFactory based on the namespace URI of the SOAP envelope. It will configure the underlying parser as specified by StAXParserConfiguration.SOAP.
        Parameters:
        in - the input stream containing the SOAP message
        encoding - the charset encoding of the SOAP message or null if the parser should determine the charset encoding
        Returns:
        the builder
      • createSOAPModelBuilder

        public static SOAPModelBuilder createSOAPModelBuilder​(OMMetaFactory metaFactory,
                                                              InputStream in,
                                                              String encoding)
        Create an object model builder for SOAP that reads a message from the provided input stream, using a particular Axiom implementation and a given charset encoding. The method will select the appropriate SOAPFactory based on the namespace URI of the SOAP envelope. It will configure the underlying parser as specified by StAXParserConfiguration.SOAP.
        Parameters:
        metaFactory - the meta factory for the Axiom implementation to use
        in - the input stream containing the SOAP message
        encoding - the charset encoding of the SOAP message or null if the parser should determine the charset encoding
        Returns:
        the builder
      • createSOAPModelBuilder

        public static SOAPModelBuilder createSOAPModelBuilder​(Reader in)
        Create an object model builder for SOAP that reads a message from the provided character stream. The method will select the appropriate SOAPFactory based on the namespace URI of the SOAP envelope. It will configure the underlying parser as specified by StAXParserConfiguration.SOAP.
        Parameters:
        in - the character stream containing the SOAP message
        Returns:
        the builder
      • createSOAPModelBuilder

        public static SOAPModelBuilder createSOAPModelBuilder​(OMMetaFactory metaFactory,
                                                              Reader in)
        Create an object model builder for SOAP that reads a message from the provided character stream using a particular Axiom implementation. The method will select the appropriate SOAPFactory based on the namespace URI of the SOAP envelope. It will configure the underlying parser as specified by StAXParserConfiguration.SOAP.
        Parameters:
        metaFactory - the meta factory for the Axiom implementation to use
        in - the character stream containing the SOAP message
        Returns:
        the builder
      • createSOAPModelBuilder

        public static SOAPModelBuilder createSOAPModelBuilder​(Source source)
        Create an object model builder for SOAP that reads a message from the provided Source. The method will select the appropriate SOAPFactory based on the namespace URI of the SOAP envelope.
        Parameters:
        source - the source of the SOAP message
        Returns:
        the builder
      • createSOAPModelBuilder

        public static SOAPModelBuilder createSOAPModelBuilder​(OMMetaFactory metaFactory,
                                                              Source source)
        Create an object model builder for SOAP that reads a message from the provided Source using a particular Axiom implementation. The method will select the appropriate SOAPFactory based on the namespace URI of the SOAP envelope.
        Parameters:
        metaFactory - the meta factory for the Axiom implementation to use
        source - the source of the SOAP message
        Returns:
        the builder
      • createSOAPModelBuilder

        public static SOAPModelBuilder createSOAPModelBuilder​(MultipartBody message)
        Create an MTOM aware model builder from the provided MultipartBody object. The method will determine the SOAP version based on the content type information from the MultipartBody object. It will configure the underlying parser as specified by StAXParserConfiguration.SOAP.
        Parameters:
        message - the MIME message
        Returns:
        the builder
        Throws:
        OMException - if an error occurs while processing the content type information from the MultipartBody object
      • createSOAPModelBuilder

        public static SOAPModelBuilder createSOAPModelBuilder​(OMMetaFactory metaFactory,
                                                              MultipartBody message)
        Create an MTOM aware model builder from the provided MultipartBody object using a particular Axiom implementation. The method will determine the SOAP version based on the content type information from the MultipartBody object. It will configure the underlying parser as specified by StAXParserConfiguration.SOAP.
        Parameters:
        metaFactory - the meta factory for the Axiom implementation to use
        message - the MIME message
        Returns:
        the builder
        Throws:
        OMException - if an error occurs while processing the content type information from the MultipartBody object