Package org.apache.axiom.om
Class OMCloneOptions
- java.lang.Object
-
- org.apache.axiom.om.OMCloneOptions
-
- Direct Known Subclasses:
SOAPCloneOptions
public class OMCloneOptions extends Object
-
-
Constructor Summary
Constructors Constructor Description OMCloneOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisCopyOMDataSources()Determine whetherOMSourcedElementnodes should be cloned asOMSourcedElementnodes by copying the correspondingOMDataSourceobjects.booleanisFetchDataHandlers()Determine whetherDataHandlerobjects should be fetched when cloningOMTextnodes.booleanisPreserveModel()Determine whether domain specific extensions to the object model should be preserved.voidsetCopyOMDataSources(boolean copyOMDataSources)Specify whetherOMSourcedElementnodes should be cloned asOMSourcedElementnodes by copying the correspondingOMDataSourceobjects.voidsetFetchDataHandlers(boolean fetchDataHandlers)Specify whetherDataHandlerobjects should be fetched when cloningOMTextnodes.voidsetPreserveModel(boolean preserveModel)Specify whether domain specific extensions to the object model should be preserved.
-
-
-
Method Detail
-
isFetchDataHandlers
public boolean isFetchDataHandlers()
Determine whetherDataHandlerobjects should be fetched when cloningOMTextnodes. SeesetFetchDataHandlers(boolean)for more information about this option.- Returns:
- the current value of this option
-
setFetchDataHandlers
public void setFetchDataHandlers(boolean fetchDataHandlers)
Specify whetherDataHandlerobjects should be fetched when cloningOMTextnodes. If this option is set tofalse(default) then anOMTextnode backed by aDataHandlerProviderwill be cloned by copying the reference to thatDataHandlerProviderto 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, thenDataHandlerProviderreferences will be replaced byDataHandlerreferences. In addition, the necessary actions are taken to ensure that the content of theseDataHandlerinstances is fetched into memory or temporary storage, so that the clones remain usable even after the underlying stream is closed.- Parameters:
fetchDataHandlers- 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
-
-