Package org.apache.axiom.om
Interface OMMetaFactory
-
- All Known Implementing Classes:
AbstractOMMetaFactory
public interface OMMetaFactoryObject model meta factory. This interface encapsulates a particular object model and provides instances for plain XML, SOAP 1.1 and SOAP 1.2 object model factories for the given object model implementation. Currently the two OM implementations provided by Axiom are LLOM (linked list) and DOM.The factories returned by
getOMFactory(),getSOAP11Factory()andgetSOAP12Factory()might be stateless (and thread safe) or not. In the former case the implementation should return the same instance on every invocation, i.e. instantiate the factory for each OM type only once. In the latter case, the implementation must return a new instance on every invocation. In order to work with any OM implementation, code using an implementation of this class must call the relevant method once and only once for every document processed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OMXMLParserWrappercreateOMBuilder(OMFactory omFactory, StAXParserConfiguration configuration, InputSource is)Create an object model builder for plain XML that reads a document from the provided input source.OMXMLParserWrappercreateSOAPModelBuilder(StAXParserConfiguration configuration, InputSource is)Create an object model builder for SOAP that reads a message from the provided input source.OMXMLParserWrappercreateStAXOMBuilder(OMFactory omFactory, XMLStreamReader parser)Create an object model builder for plain XML that pulls events from a StAX stream reader.OMXMLParserWrappercreateStAXSOAPModelBuilder(XMLStreamReader parser)Create an object model builder for SOAP that pulls events from a StAX stream reader.OMFactorygetOMFactory()Get an OM factory instance for the XML infoset model.SOAPFactorygetSOAP11Factory()Get an OM factory instance for the SOAP 1.1 infoset model.SOAPFactorygetSOAP12Factory()Get an OM factory instance for the SOAP 1.2 infoset model.
-
-
-
Method Detail
-
getOMFactory
OMFactory getOMFactory()
Get an OM factory instance for the XML infoset model.- Returns:
- the OM factory instance
-
getSOAP11Factory
SOAPFactory getSOAP11Factory()
Get an OM factory instance for the SOAP 1.1 infoset model.- Returns:
- the OM factory instance
-
getSOAP12Factory
SOAPFactory getSOAP12Factory()
Get an OM factory instance for the SOAP 1.2 infoset model.- Returns:
- the OM factory instance
-
createStAXOMBuilder
OMXMLParserWrapper createStAXOMBuilder(OMFactory omFactory, XMLStreamReader parser)
Create an object model builder for plain XML that pulls events from a StAX stream reader.- Parameters:
omFactory- The object model factory to use. This factory must be obtained from the sameOMMetaFactoryinstance as the one used to invoke this method. In general the factory will be retrieved fromgetOMFactory()), but in some cases it may be necessary to pass aSOAPFactoryinstance, although this method will never produce a SOAP infoset.parser- the stream reader to read the XML data from- Returns:
- the builder
-
createOMBuilder
OMXMLParserWrapper createOMBuilder(OMFactory omFactory, StAXParserConfiguration configuration, InputSource is)
Create an object model builder for plain XML that reads a document from the provided input source.- Parameters:
omFactory- The object model factory to use. This factory must be obtained from the sameOMMetaFactoryinstance as the one used to invoke this method. In general the factory will be retrieved fromgetOMFactory()), but in some cases it may be necessary to pass aSOAPFactoryinstance, although this method will never produce a SOAP infoset.configuration- the parser configuration to useis- the source of the XML document- Returns:
- the builder
-
createStAXSOAPModelBuilder
OMXMLParserWrapper createStAXSOAPModelBuilder(XMLStreamReader parser)
Create an object model builder for SOAP that pulls events from a StAX stream reader. The implementation will select the appropriateSOAPFactorybased on the namespace URI of the SOAP envelope.- Parameters:
parser- the stream reader to read the SOAP message from- Returns:
- the builder
-
createSOAPModelBuilder
OMXMLParserWrapper createSOAPModelBuilder(StAXParserConfiguration configuration, InputSource is)
Create an object model builder for SOAP that reads a message from the provided input source. The implementation will select the appropriateSOAPFactorybased on the namespace URI of the SOAP envelope.- Parameters:
configuration- the parser configuration to use; for security reasons, this should in general beStAXParserConfiguration.SOAPis- the source of the SOAP message- Returns:
- the builder
-
-