Package org.docx4j.xmlPackage
Class Part
java.lang.Object
org.docx4j.xmlPackage.Part
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Gets the value of the binaryData property.Gets the value of the compression property.Gets the value of the contentType property.getName()Gets the value of the name property.longGets the value of the padding property.Gets the value of the xmlData property.voidsetBinaryData(byte[] value) Sets the value of the binaryData property.voidsetCompression(String value) Sets the value of the compression property.voidsetContentType(String value) Sets the value of the contentType property.voidSets the value of the name property.voidsetPadding(Long value) Sets the value of the padding property.voidsetXmlData(XmlData value) Sets the value of the xmlData property.
-
Field Details
-
xmlData
-
binaryData
protected byte[] binaryData -
name
-
contentType
-
compression
-
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
Gets the value of the name property.- Returns:
- possible object is
String
-
setName
Sets the value of the name property.- Parameters:
value- allowed object isString
-
getContentType
Gets the value of the contentType property.- Returns:
- possible object is
String
-
setContentType
Sets the value of the contentType property.- Parameters:
value- allowed object isString
-
getCompression
Gets the value of the compression property.- Returns:
- possible object is
String
-
setCompression
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
Sets the value of the padding property.- Parameters:
value- allowed object isLong
-