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 boolean
isCopyOMDataSources()
Determine whetherOMSourcedElement
nodes should be cloned asOMSourcedElement
nodes by copying the correspondingOMDataSource
objects.boolean
isFetchDataHandlers()
Determine whetherDataHandler
objects should be fetched when cloningOMText
nodes.boolean
isPreserveModel()
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
setFetchDataHandlers(boolean fetchDataHandlers)
Specify whetherDataHandler
objects should be fetched when cloningOMText
nodes.void
setPreserveModel(boolean preserveModel)
Specify whether domain specific extensions to the object model should be preserved.
-
-
-
Method Detail
-
isFetchDataHandlers
public boolean isFetchDataHandlers()
Determine whetherDataHandler
objects should be fetched when cloningOMText
nodes. SeesetFetchDataHandlers(boolean)
for more information about this option.- Returns:
- the current value of this option
-
setFetchDataHandlers
public void setFetchDataHandlers(boolean fetchDataHandlers)
Specify whetherDataHandler
objects should be fetched when cloningOMText
nodes. If this option is set tofalse
(default) then anOMText
node backed by aDataHandlerProvider
will be cloned by copying the reference to thatDataHandlerProvider
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
, thenDataHandlerProvider
references will be replaced byDataHandler
references. In addition, the necessary actions are taken to ensure that the content of theseDataHandler
instances 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 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
-
-