Package org.apache.axiom.om
Class OMCloneOptions
java.lang.Object
org.apache.axiom.om.OMCloneOptions
- Direct Known Subclasses:
SOAPCloneOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Determine whetherOMSourcedElement
nodes should be cloned asOMSourcedElement
nodes by copying the correspondingOMDataSource
objects.boolean
boolean
Determine whether domain specific extensions to the object model should be preserved.void
setCopyOMDataSources
(boolean copyOMDataSources) Specify whetherOMSourcedElement
nodes should be cloned asOMSourcedElement
nodes by copying the correspondingOMDataSource
objects.void
setFetchBlobs
(boolean fetchBlobs) void
setPreserveModel
(boolean preserveModel) Specify whether domain specific extensions to the object model should be preserved.
-
Constructor Details
-
OMCloneOptions
public OMCloneOptions()
-
-
Method Details
-
isFetchBlobs
public boolean isFetchBlobs()Determine whetherBlob
objects should be fetched when cloningOMText
nodes. SeesetFetchBlobs(boolean)
for more information about this option.- Returns:
- the current value of this option
-
setFetchBlobs
public void setFetchBlobs(boolean fetchBlobs) Specify whetherBlob
objects should be fetched when cloningOMText
nodes. If this option is set tofalse
(default) then anOMText
node backed by aBlobProvider
will be cloned by copying the reference to thatBlobProvider
to the clonedOMText
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 totrue
, thenBlobProvider
references will be replaced byBlob
references. In addition, the necessary actions are taken to ensure that the content of theseBlob
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 whetherOMSourcedElement
nodes should be cloned asOMSourcedElement
nodes by copying the correspondingOMDataSource
objects. SeesetCopyOMDataSources(boolean)
for more information about this option.- Returns:
- the current value of this option
-
setCopyOMDataSources
public void setCopyOMDataSources(boolean copyOMDataSources) Specify whetherOMSourcedElement
nodes should be cloned asOMSourcedElement
nodes by copying the correspondingOMDataSource
objects. If this option is set tofalse
(default), then allOMSourcedElement
nodes will be cloned as simpleOMElement
instances, which implies that the originalOMSourcedElement
nodes will be expanded. If this option is set totrue
, then an attempt is made to cloneOMSourcedElement
nodes asOMSourcedElement
nodes by copying the correspondingOMDataSource
instances. Note that there are several cases where this is not possible:- There is no
OMDataSource
set. - The
OMDataSource
is destructive (or doesn't implementOMDataSourceExt
. - The
OMSourcedElement
is expanded.
In these cases,
OMSourcedElement
nodes will always be cloned as simpleOMElement
instances.- Parameters:
copyOMDataSources
- the value to set for this option
- There is no
-
isPreserveModel
public boolean isPreserveModel()Determine whether domain specific extensions to the object model should be preserved. SeesetPreserveModel(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 tofalse
(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 totrue
, then domain specific extensions are preserved.- Parameters:
preserveModel
- the value to set for this option
-