Class PartialDeepCopy

java.lang.Object
org.docx4j.convert.out.common.preprocess.PartialDeepCopy

public class PartialDeepCopy
extends java.lang.Object
Create a partial deep copy of the document. All the parts are copied, as they may have some references to other parts. The data in the parts is only copied if the relationship type of the part is contained in the passed relationshipTypes otherwise the new part contains a reference to the data of the old part.
If the passed relationship types is null, then it will do a complete deep copy. This is probably faster than storing and reading the document but it is restricted to Parts of the types: BinaryPart, JaxbXmlPart, CustomXmlDataStoragePart, XmlPart.
If the passed relationship types is empty, then the passed Package is returned.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected static org.slf4j.Logger log  
  • Constructor Summary

    Constructors 
    Constructor Description
    PartialDeepCopy()  
  • Method Summary

    Modifier and Type Method Description
    protected static Part copyPart​(Part part, OpcPackage targetPackage, boolean deepCopy)  
    protected static OpcPackage createPackage​(OpcPackage opcPackage)  
    protected static void deepCopyContent​(Part source, Part destination)  
    protected static Part deepCopyPart​(OpcPackage opcPackage, Base targetParent, Part sourcePart, java.util.Set<java.lang.String> relationshipTypes)  
    protected static void deepCopyRelationships​(OpcPackage opcPackage, Base sourcePart, Base targetPart, java.util.Set<java.lang.String> relationshipTypes)  
    static OpcPackage process​(OpcPackage opcPackage, java.util.Set<java.lang.String> relationshipTypes)  
    protected static void shallowCopyContent​(Part source, Part destination)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait