public class OMCloneOptions extends Object
Constructor and Description |
---|
OMCloneOptions() |
Modifier and Type | Method and Description |
---|---|
boolean |
isCopyOMDataSources()
Determine whether
OMSourcedElement nodes should be cloned as OMSourcedElement
nodes by copying the corresponding OMDataSource objects. |
boolean |
isFetchDataHandlers()
Determine whether
DataHandler objects should be fetched when cloning OMText
nodes. |
boolean |
isPreserveModel()
Determine whether domain specific extensions to the object model should be preserved.
|
void |
setCopyOMDataSources(boolean copyOMDataSources)
Specify whether
OMSourcedElement nodes should be cloned as OMSourcedElement
nodes by copying the corresponding OMDataSource objects. |
void |
setFetchDataHandlers(boolean fetchDataHandlers)
Specify whether
DataHandler objects should be fetched when cloning OMText
nodes. |
void |
setPreserveModel(boolean preserveModel)
Specify whether domain specific extensions to the object model should be preserved.
|
public boolean isFetchDataHandlers()
DataHandler
objects should be fetched when cloning OMText
nodes. See setFetchDataHandlers(boolean)
for more information about this option.public void setFetchDataHandlers(boolean fetchDataHandlers)
DataHandler
objects should be fetched when cloning OMText
nodes. If this option is set to false
(default) then an OMText
node
backed by a DataHandlerProvider
will be cloned by copying the reference to that
DataHandlerProvider
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
DataHandlerProvider
references will be replaced by DataHandler
references. In
addition, the necessary actions are taken to ensure that the content of these
DataHandler
instances is fetched into memory or temporary storage, so that the clones
remain usable even after the underlying stream is closed.fetchDataHandlers
- the value to set for this optionpublic boolean isCopyOMDataSources()
OMSourcedElement
nodes should be cloned as OMSourcedElement
nodes by copying the corresponding OMDataSource
objects. See
setCopyOMDataSources(boolean)
for more information about this option.public void setCopyOMDataSources(boolean copyOMDataSources)
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:
OMDataSource
set.
OMDataSource
is destructive (or doesn't implement OMDataSourceExt
.
OMSourcedElement
is expanded.
In these cases, OMSourcedElement
nodes will always be cloned as simple
OMElement
instances.
copyOMDataSources
- the value to set for this optionpublic boolean isPreserveModel()
setPreserveModel(boolean)
for more information about this option.public void setPreserveModel(boolean preserveModel)
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.preserveModel
- the value to set for this optionCopyright © 2004–2022 The Apache Software Foundation. All rights reserved.