Package org.docx4j.convert.in
Class FlatOpcXmlImporter
java.lang.Object
org.docx4j.convert.in.FlatOpcXmlImporter
public class FlatOpcXmlImporter
extends java.lang.Object
Create a Package object from an
XmlPackage object.
Microsoft Word and Powerpoint both support
saving to this format. Excel doesn't, but you
can still have a spreadsheet in this format if you want to.
"
(@padding is only on rels)
(@compression is only on binary parts)
- Author:
- jharrop
-
Field Summary
Fields Modifier and Type Field Description protected java.util.HashMap<java.lang.String,java.lang.String>handledThis HashMap is intended to prevent loops. -
Constructor Summary
Constructors Constructor Description FlatOpcXmlImporter(java.io.InputStream is)FlatOpcXmlImporter(Package flatOpcXml) -
Method Summary
Modifier and Type Method Description OpcPackageget()PartgetRawPart(ContentTypeManager ctm, java.lang.String resolvedPartUri, Relationship rel)static PartgetRawPart(ContentTypeManager ctm, Part pkgPart, Relationship rel)Get a Part (except a relationships part), but not its relationships part or related parts.RelationshipsPartgetRelationshipsPart(Part part)Get the Relationships Part (if there is one) for a given Part.static RelationshipsPartpopulateRelationshipsPart(RelationshipsPart rp, org.w3c.dom.Element el)
-
Field Details
-
handled
protected java.util.HashMap<java.lang.String,java.lang.String> handledThis HashMap is intended to prevent loops.
-
-
Constructor Details
-
FlatOpcXmlImporter
public FlatOpcXmlImporter(java.io.InputStream is) throws javax.xml.bind.JAXBException- Throws:
javax.xml.bind.JAXBException
-
FlatOpcXmlImporter
-
-
Method Details
-
get
- Throws:
Docx4JException
-
populateRelationshipsPart
public static RelationshipsPart populateRelationshipsPart(RelationshipsPart rp, org.w3c.dom.Element el) throws InvalidFormatException, javax.xml.bind.JAXBException- Throws:
InvalidFormatExceptionjavax.xml.bind.JAXBException
-
getRelationshipsPart
public RelationshipsPart getRelationshipsPart(Part part) throws Docx4JException, InvalidFormatExceptionGet the Relationships Part (if there is one) for a given Part. Otherwise return null.- Parameters:
zf-part-- Returns:
- Throws:
InvalidFormatExceptionDocx4JException
-
getRawPart
public Part getRawPart(ContentTypeManager ctm, java.lang.String resolvedPartUri, Relationship rel) throws Docx4JException- Throws:
Docx4JException
-
getRawPart
public static Part getRawPart(ContentTypeManager ctm, Part pkgPart, Relationship rel) throws Docx4JExceptionGet 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:
zf-resolvedPartUri-- Returns:
- Throws:
java.net.URISyntaxExceptionInvalidFormatExceptionDocx4JException- See Also:
get a Part and all its related parts, and add all to a package, use getPart.
-