Class Document

java.lang.Object
org.docx4j.wml.Document
All Implemented Interfaces:
ContentAccessor, Child

public class Document extends Object implements Child, ContentAccessor

Java class for anonymous complex type.

The following schema fragment specifies the expected content contained within this class.

 <complexType>
   <complexContent>
     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
       <sequence>
         <element name="background" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_Background" minOccurs="0"/>
         <element ref="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}body" minOccurs="0"/>
       </sequence>
       <attribute ref="{http://schemas.openxmlformats.org/markup-compatibility/2006}Ignorable"/>
     </restriction>
   </complexContent>
 </complexType>
 
  • Field Details

    • background

      protected CTBackground background
    • body

      protected Body body
    • ignorable

      protected String ignorable
  • Constructor Details

    • Document

      public Document()
  • Method Details

    • getBackground

      public CTBackground getBackground()
      Gets the value of the background property.
      Returns:
      possible object is CTBackground
    • setBackground

      public void setBackground(CTBackground value)
      Sets the value of the background property.
      Parameters:
      value - allowed object is CTBackground
    • getBody

      public Body getBody()
      Gets the value of the body property.
      Returns:
      possible object is Body
    • getContent

      public List<Object> getContent()
      Convenience method to getBody().getContent()
      Specified by:
      getContent in interface ContentAccessor
      Since:
      2.7
    • setBody

      public void setBody(Body value)
      Sets the value of the body property.
      Parameters:
      value - allowed object is Body
    • getIgnorable

      public String getIgnorable()
      Gets the value of the ignorable property.
      Returns:
      possible object is String
    • setIgnorable

      public void setIgnorable(String value)
      Sets the value of the ignorable property.
      Parameters:
      value - allowed object is String
    • getParent

      public Object getParent()
      Gets the parent object in the object tree representing the unmarshalled xml document.
      Specified by:
      getParent in interface Child
      Returns:
      The parent object.
    • setParent

      public void setParent(Object parent)
      Specified by:
      setParent in interface Child
    • afterUnmarshal

      public void afterUnmarshal(jakarta.xml.bind.Unmarshaller unmarshaller, Object parent)
      This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
      Parameters:
      parent - The parent object in the object tree.
      unmarshaller - The unmarshaller that generated the instance.