Axiom
  1. Axiom
  2. AXIOM-353

Need a replacement for OMXMLBuilderFactory

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.13
    • Component/s: API
    • Labels:
      None

      Description

      Historically, org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory was used to create Axiom trees from XML documents (and there are still places in Axis2 where this is used). Unfortunately, this class is located in the wrong package and JAR (it is implementation independent but belongs to LLOM). Nowadays, the standard way to create an Axiom tree is to instantiate StAXOMBuilder or one of its subclasses directly. However, this is not optimal for two reasons:

      • It implies the assumption that every implementation of the Axiom API necessarily uses StAXOMBuilder. This means that an implementation doesn't have the freedom to provide its own builder implementation (e.g. in order to implement some special optimizations).
      • StAXOMBuilder belongs to a package which has "impl" in its name. This tends to blur the distinction between the public API and internal implementation classes.

      There should be an abstract API for creating builder instances. It should be defined in terms of interfaces (such as OMXMLParserWrapper). OMMetaFactory is a good candidate for this because it is already used to encapsulate an implementation of the Axiom API (there is one implementation of OMMetaFactory for LLOM and one for DOOM).

        Issue Links

          Activity

          Andreas Veithen made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Andreas Veithen made changes -
          Fix Version/s 1.2.13 [ 12316677 ]
          Fix Version/s 1.2.12 [ 12316132 ]
          Andreas Veithen made changes -
          Fix Version/s 1.2.12 [ 12316132 ]
          Fix Version/s 1.2.11 [ 12315534 ]
          Andreas Veithen made changes -
          Assignee Andreas Veithen [ veithen ]
          Fix Version/s 1.2.11 [ 12315534 ]
          Andreas Veithen made changes -
          Link This issue is required by AXIS2-4902 [ AXIS2-4902 ]
          Andreas Veithen made changes -
          Field Original Value New Value
          Description Historically, org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory was used to create Axiom trees from XML documents (and there are still places in Axis2 where this is used). Unfortunately, this class is located in the wrong package and JAR (it is implementation independent but belongs to LLOM). Nowadays, the standard way to create an Axiom tree is to instantiate StAXOMBuilder or one of its subclasses directly. However, this is not optimal because it implies the assumption that every implementation of the Axiom API necessarily uses StAXOMBuilder. This means that an implementation doesn't have the freedom to provide its own builder implementation (e.g. in order to implement some special optimizations). There should be an abstract API for this. OMMetaFactory is a good candidate because it is already used to encapsulate an implementation of the Axiom API (there is one implementation of OMMetaFactory for LLOM and one for DDOM). Historically, org.apache.axiom.om.impl.llom.factory.OMXMLBuilderFactory was used to create Axiom trees from XML documents (and there are still places in Axis2 where this is used). Unfortunately, this class is located in the wrong package and JAR (it is implementation independent but belongs to LLOM). Nowadays, the standard way to create an Axiom tree is to instantiate StAXOMBuilder or one of its subclasses directly. However, this is not optimal for two reasons:

          * It implies the assumption that every implementation of the Axiom API necessarily uses StAXOMBuilder. This means that an implementation doesn't have the freedom to provide its own builder implementation (e.g. in order to implement some special optimizations).

          * StAXOMBuilder belongs to a package which has "impl" in its name. This tends to blur the distinction between the public API and internal implementation classes.

          There should be an abstract API for creating builder instances. It should be defined in terms of interfaces (such as OMXMLParserWrapper). OMMetaFactory is a good candidate for this because it is already used to encapsulate an implementation of the Axiom API (there is one implementation of OMMetaFactory for LLOM and one for DOOM).
          Andreas Veithen created issue -

            People

            • Assignee:
              Andreas Veithen
              Reporter:
              Andreas Veithen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development