Class Part

java.lang.Object
org.docx4j.xmlPackage.Part

public class Part extends 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 Details

    • xmlData

      protected XmlData xmlData
    • binaryData

      protected byte[] binaryData
    • name

      protected String name
    • contentType

      protected String contentType
    • compression

      protected String compression
    • padding

      protected Long padding
  • Constructor Details

    • Part

      public Part()
  • Method Details

    • getXmlData

      public XmlData getXmlData()
      Gets the value of the xmlData property.
      Returns:
      possible object is XmlData
    • setXmlData

      public void setXmlData(XmlData value)
      Sets the value of the xmlData property.
      Parameters:
      value - allowed object is XmlData
    • 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 String getName()
      Gets the value of the name property.
      Returns:
      possible object is String
    • setName

      public void setName(String value)
      Sets the value of the name property.
      Parameters:
      value - allowed object is String
    • getContentType

      public String getContentType()
      Gets the value of the contentType property.
      Returns:
      possible object is String
    • setContentType

      public void setContentType(String value)
      Sets the value of the contentType property.
      Parameters:
      value - allowed object is String
    • getCompression

      public String getCompression()
      Gets the value of the compression property.
      Returns:
      possible object is String
    • setCompression

      public void setCompression(String value)
      Sets the value of the compression property.
      Parameters:
      value - allowed object is String
    • getPadding

      public long getPadding()
      Gets the value of the padding property.
      Returns:
      possible object is Long
    • setPadding

      public void setPadding(Long value)
      Sets the value of the padding property.
      Parameters:
      value - allowed object is Long