Class Load3

java.lang.Object
org.docx4j.openpackaging.io.Load
org.docx4j.openpackaging.io3.Load3

public class Load3
extends Load
Create a Package object using a PartLoader. This class doesn't care how the parts are physically stored (that is PartLoader's problem). What this class knows how to do is to traverse the opc, via its relationships. It would be possible/interesting to have a design which lazily followed the rels, but we don't do that. All rel parts are unmarshalled and traversed when invoked.
Author:
jharrop
  • Constructor Details

    • Load3

      public Load3​(PartStore partLoader)
    • Load3

      public Load3()
  • Method Details

    • reuseExistingOpcPackage

      public void reuseExistingOpcPackage​(OpcPackage existingPkg)
      By setting this, you can load the contents into this existing package (ie instead of returning a new one).
      Parameters:
      existingPkg -
      Since:
      3.3.7
    • get

      public OpcPackage get() throws Docx4JException
      Throws:
      Docx4JException
    • getRelationshipsPart

      public RelationshipsPart getRelationshipsPart​(Part part) throws Docx4JException, InvalidFormatException
      Get the Relationships Part (if there is one) for a given Part. Otherwise return null.
      Parameters:
      zf -
      part -
      Returns:
      Throws:
      InvalidFormatException
      Docx4JException
    • getRawPart

      public Part getRawPart​(ContentTypeManager ctm, java.lang.String resolvedPartUri, Relationship rel, RelationshipsPart rp) throws Docx4JException
      Get a Part (except a relationships part), but not its relationships part or related parts. Useful if you need quick access to just this part. This can be called directly from outside the library, in which case the Part will not be owned by a Package until the calling code makes it so.
      Parameters:
      partByteArrays -
      ctm -
      resolvedPartUri -
      rel -
      Returns:
      Throws:
      Docx4JException - including if result is null
      See Also:
      get a Part and all its related parts, and add all to a package, use getPart.
    • getBinaryPart

      public Part getBinaryPart​(ContentTypeManager ctm, java.lang.String resolvedPartUri) throws Docx4JException
      Throws:
      Docx4JException