Package org.docx4j.xmlPackage
Class Part
java.lang.Object
org.docx4j.xmlPackage.Part
public class Part
extends java.lang.Object
Defines a part of a package using open package
conventions. A part with contentType containing xml
requires xmlData. All other contentType values use
binaryData.
Java class for CT_Part complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="CT_Part">
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<choice>
<element name="xmlData" type="{http://schemas.microsoft.com/office/2006/xmlPackage}CT_XmlData"/>
<element name="binaryData" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
</choice>
<attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
<attribute name="contentType">
<simpleType>
<restriction base="{http://www.w3.org/2001/XMLSchema}string">
<pattern value="text/xml"/>
<pattern value="application/xml"/>
<pattern value="application/.+\+xml"/>
<pattern value=".+"/>
</restriction>
</simpleType>
</attribute>
<attribute name="compression" default="deflateSuperFast">
<simpleType>
<restriction base="{http://www.w3.org/2001/XMLSchema}string">
<enumeration value="store"/>
<enumeration value="deflateSuperFast"/>
<enumeration value="deflateFast"/>
<enumeration value="deflateNormal"/>
<enumeration value="deflateMaximum"/>
</restriction>
</simpleType>
</attribute>
<attribute name="padding" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" default="0" />
</restriction>
</complexContent>
</complexType>
-
Field Summary
Fields Modifier and Type Field Description protected byte[]binaryDataprotected java.lang.Stringcompressionprotected java.lang.StringcontentTypeprotected java.lang.Stringnameprotected java.lang.Longpaddingprotected XmlDataxmlData -
Constructor Summary
Constructors Constructor Description Part() -
Method Summary
Modifier and Type Method Description byte[]getBinaryData()Gets the value of the binaryData property.java.lang.StringgetCompression()Gets the value of the compression property.java.lang.StringgetContentType()Gets the value of the contentType property.java.lang.StringgetName()Gets the value of the name property.longgetPadding()Gets the value of the padding property.XmlDatagetXmlData()Gets the value of the xmlData property.voidsetBinaryData(byte[] value)Sets the value of the binaryData property.voidsetCompression(java.lang.String value)Sets the value of the compression property.voidsetContentType(java.lang.String value)Sets the value of the contentType property.voidsetName(java.lang.String value)Sets the value of the name property.voidsetPadding(java.lang.Long value)Sets the value of the padding property.voidsetXmlData(XmlData value)Sets the value of the xmlData property.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
xmlData
-
binaryData
protected byte[] binaryData -
name
protected java.lang.String name -
contentType
protected java.lang.String contentType -
compression
protected java.lang.String compression -
padding
protected java.lang.Long padding
-
-
Constructor Details
-
Part
public Part()
-
-
Method Details
-
getXmlData
Gets the value of the xmlData property.- Returns:
- possible object is
XmlData
-
setXmlData
Sets the value of the xmlData property.- Parameters:
value- allowed object isXmlData
-
getBinaryData
public byte[] getBinaryData()Gets the value of the binaryData property.- Returns:
- possible object is byte[]
-
setBinaryData
public void setBinaryData(byte[] value)Sets the value of the binaryData property.- Parameters:
value- allowed object is byte[]
-
getName
public java.lang.String getName()Gets the value of the name property.- Returns:
- possible object is
String
-
setName
public void setName(java.lang.String value)Sets the value of the name property.- Parameters:
value- allowed object isString
-
getContentType
public java.lang.String getContentType()Gets the value of the contentType property.- Returns:
- possible object is
String
-
setContentType
public void setContentType(java.lang.String value)Sets the value of the contentType property.- Parameters:
value- allowed object isString
-
getCompression
public java.lang.String getCompression()Gets the value of the compression property.- Returns:
- possible object is
String
-
setCompression
public void setCompression(java.lang.String value)Sets the value of the compression property.- Parameters:
value- allowed object isString
-
getPadding
public long getPadding()Gets the value of the padding property.- Returns:
- possible object is
Long
-
setPadding
public void setPadding(java.lang.Long value)Sets the value of the padding property.- Parameters:
value- allowed object isLong
-