org.apache.axiom.om
Class OMCloneOptions

java.lang.Object
  extended by org.apache.axiom.om.OMCloneOptions
Direct Known Subclasses:
SOAPCloneOptions

public class OMCloneOptions
extends Object


Constructor Summary
OMCloneOptions()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OMCloneOptions

public OMCloneOptions()
Method Detail

isFetchDataHandlers

public boolean isFetchDataHandlers()
Determine whether DataHandler objects should be fetched when cloning OMText nodes. See setFetchDataHandlers(boolean) for more information about this option.

Returns:
the current value of this option

setFetchDataHandlers

public void setFetchDataHandlers(boolean fetchDataHandlers)
Specify whether 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.

Parameters:
fetchDataHandlers - the value to set for this option

isCopyOMDataSources

public boolean isCopyOMDataSources()
Determine whether OMSourcedElement nodes should be cloned as OMSourcedElement nodes by copying the corresponding OMDataSource objects. See setCopyOMDataSources(boolean) for more information about this option.

Returns:
the current value of this option

setCopyOMDataSources

public void setCopyOMDataSources(boolean copyOMDataSources)
Specify whether 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:

In these cases, OMSourcedElement nodes will always be cloned as simple OMElement instances.

Parameters:
copyOMDataSources - the value to set for this option

isPreserveModel

public boolean isPreserveModel()
Determine whether domain specific extensions to the object model should be preserved. See setPreserveModel(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 to 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.

Parameters:
preserveModel - the value to set for this option


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.