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 TypeMethodDescriptionbooleanDetermine whetherOMSourcedElementnodes should be cloned asOMSourcedElementnodes by copying the correspondingOMDataSourceobjects.booleanbooleanDetermine whether domain specific extensions to the object model should be preserved.voidsetCopyOMDataSources(boolean copyOMDataSources) Specify whetherOMSourcedElementnodes should be cloned asOMSourcedElementnodes by copying the correspondingOMDataSourceobjects.voidsetFetchBlobs(boolean fetchBlobs) voidsetPreserveModel(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 whetherBlobobjects should be fetched when cloningOMTextnodes. SeesetFetchBlobs(boolean)for more information about this option.- Returns:
- the current value of this option
-
setFetchBlobs
public void setFetchBlobs(boolean fetchBlobs) Specify whetherBlobobjects should be fetched when cloningOMTextnodes. If this option is set tofalse(default) then anOMTextnode backed by aBlobProviderwill be cloned by copying the reference to thatBlobProviderto the clonedOMTextnode. 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, thenBlobProviderreferences will be replaced byBlobreferences. In addition, the necessary actions are taken to ensure that the content of theseBlobinstances 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 whetherOMSourcedElementnodes should be cloned asOMSourcedElementnodes by copying the correspondingOMDataSourceobjects. SeesetCopyOMDataSources(boolean)for more information about this option.- Returns:
- the current value of this option
-
setCopyOMDataSources
public void setCopyOMDataSources(boolean copyOMDataSources) Specify whetherOMSourcedElementnodes should be cloned asOMSourcedElementnodes by copying the correspondingOMDataSourceobjects. If this option is set tofalse(default), then allOMSourcedElementnodes will be cloned as simpleOMElementinstances, which implies that the originalOMSourcedElementnodes will be expanded. If this option is set totrue, then an attempt is made to cloneOMSourcedElementnodes asOMSourcedElementnodes by copying the correspondingOMDataSourceinstances. Note that there are several cases where this is not possible:- There is no
OMDataSourceset. - The
OMDataSourceis destructive (or doesn't implementOMDataSourceExt. - The
OMSourcedElementis expanded.
In these cases,
OMSourcedElementnodes will always be cloned as simpleOMElementinstances.- 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
-