Class OMCloneOptions

java.lang.Object
org.apache.axiom.om.OMCloneOptions
Direct Known Subclasses:
SOAPCloneOptions

public class OMCloneOptions extends Object
  • Constructor Details

    • OMCloneOptions

      public OMCloneOptions()
  • Method Details

    • isFetchBlobs

      public boolean isFetchBlobs()
      Determine whether Blob objects should be fetched when cloning OMText nodes. See setFetchBlobs(boolean) for more information about this option.
      Returns:
      the current value of this option
    • setFetchBlobs

      public void setFetchBlobs(boolean fetchBlobs)
      Specify whether Blob objects should be fetched when cloning OMText nodes. If this option is set to false (default) then an OMText node backed by a BlobProvider will be cloned by copying the reference to that BlobProvider to the cloned OMText node. This implies that if the original tree was constructed from an XOP encoded stream, then the clone may become unusable if that stream is closed. If this option is set to true, then BlobProvider references will be replaced by Blob references. In addition, the necessary actions are taken to ensure that the content of these Blob instances is fetched into memory or temporary storage, so that the clones remain usable even after the underlying stream is closed.
      Parameters:
      fetchBlobs - the value to set for this option
    • isCopyOMDataSources

      public boolean isCopyOMDataSources()
      Determine whether OMSourcedElement nodes should be cloned as OMSourcedElement nodes by copying the corresponding OMDataSource objects. See setCopyOMDataSources(boolean) for more information about this option.
      Returns:
      the current value of this option
    • setCopyOMDataSources

      public void setCopyOMDataSources(boolean copyOMDataSources)
      Specify whether OMSourcedElement nodes should be cloned as OMSourcedElement nodes by copying the corresponding OMDataSource objects. If this option is set to false (default), then all OMSourcedElement nodes will be cloned as simple OMElement instances, which implies that the original OMSourcedElement nodes will be expanded. If this option is set to true, then an attempt is made to clone OMSourcedElement nodes as OMSourcedElement nodes by copying the corresponding OMDataSource instances. Note that there are several cases where this is not possible:

      In these cases, OMSourcedElement nodes will always be cloned as simple OMElement instances.

      Parameters:
      copyOMDataSources - the value to set for this option
    • isPreserveModel

      public boolean isPreserveModel()
      Determine whether domain specific extensions to the object model should be preserved. See setPreserveModel(boolean) for more information about this option.
      Returns:
      the current value of this option
    • setPreserveModel

      public void setPreserveModel(boolean preserveModel)
      Specify whether domain specific extensions to the object model should be preserved. If this option is set to false (default), then the object model is always cloned as plain XML even if the original uses domain specific extensions such as SOAP. If this option is set to true, then domain specific extensions are preserved.
      Parameters:
      preserveModel - the value to set for this option