Class P

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

public class P 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="pPr" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_PPr" minOccurs="0"/>
         <group ref="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}EG_PContent" maxOccurs="unbounded" minOccurs="0"/>
       </sequence>
       <attGroup ref="{http://schemas.microsoft.com/office/word/2010/wordml}AG_Parids"/>
       <attribute name="rsidRPr" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_LongHexNumber" />
       <attribute name="rsidR" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_LongHexNumber" />
       <attribute name="rsidDel" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_LongHexNumber" />
       <attribute name="rsidP" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_LongHexNumber" />
       <attribute name="rsidRDefault" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}ST_LongHexNumber" />
     </restriction>
   </complexContent>
 </complexType>
 
  • Field Details

    • pPr

      protected PPr pPr
    • content

      protected List<Object> content
    • rsidRPr

      protected String rsidRPr
    • rsidR

      protected String rsidR
    • rsidDel

      protected String rsidDel
    • rsidP

      protected String rsidP
    • rsidRDefault

      protected String rsidRDefault
    • paraId

      protected String paraId
    • textId

      protected String textId
  • Constructor Details

    • P

      public P()
  • Method Details

    • getPPr

      public PPr getPPr()
      Gets the value of the pPr property.
      Returns:
      possible object is PPr
    • setPPr

      public void setPPr(PPr value)
      Sets the value of the pPr property.
      Parameters:
      value - allowed object is PPr
    • getContent

      public List<Object> getContent()
      Gets the value of the content property.

      This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the content property.

      For example, to add a new item, do as follows:

          getContent().add(newItem);
       

      Objects of the following type(s) are allowed in the list JAXBElement<CTMarkup> RunIns JAXBElement<CTMarkup> JAXBElement<CTRel> JAXBElement<CTMoveBookmark> JAXBElement<CTMarkup> JAXBElement<RunTrackChange> JAXBElement<CTTrackChange> JAXBElement<CTTrackChange> JAXBElement<CTSimpleField> JAXBElement<RangePermissionStart> JAXBElement<RunTrackChange> JAXBElement<CTMoveToRangeEnd> JAXBElement<CTTrackChange> ProofErr CommentRangeEnd JAXBElement<CTMoveBookmark> R RunDel JAXBElement<CTMarkupRange> JAXBElement<CTSmartTagRun> JAXBElement<CTOMathPara> JAXBElement<CTPerm> CommentRangeStart JAXBElement<CTMoveFromRangeEnd> JAXBElement<CTOMath> JAXBElement<CTCustomXmlRun> JAXBElement<CTTrackChange> JAXBElement<CTMarkup> JAXBElement<SdtRun> JAXBElement<P.Hyperlink> JAXBElement<CTBookmark> JAXBElement<P.Bdo> JAXBElement<P.Dir>

      Specified by:
      getContent in interface ContentAccessor
    • getParagraphContent

      @Deprecated public List<Object> getParagraphContent()
      Deprecated.
    • getRsidRPr

      public String getRsidRPr()
      Gets the value of the rsidRPr property.
      Returns:
      possible object is String
    • setRsidRPr

      public void setRsidRPr(String value)
      Sets the value of the rsidRPr property.
      Parameters:
      value - allowed object is String
    • getRsidR

      public String getRsidR()
      Gets the value of the rsidR property.
      Returns:
      possible object is String
    • setRsidR

      public void setRsidR(String value)
      Sets the value of the rsidR property.
      Parameters:
      value - allowed object is String
    • getRsidDel

      public String getRsidDel()
      Gets the value of the rsidDel property.
      Returns:
      possible object is String
    • setRsidDel

      public void setRsidDel(String value)
      Sets the value of the rsidDel property.
      Parameters:
      value - allowed object is String
    • getRsidP

      public String getRsidP()
      Gets the value of the rsidP property.
      Returns:
      possible object is String
    • setRsidP

      public void setRsidP(String value)
      Sets the value of the rsidP property.
      Parameters:
      value - allowed object is String
    • getRsidRDefault

      public String getRsidRDefault()
      Gets the value of the rsidRDefault property.
      Returns:
      possible object is String
    • setRsidRDefault

      public void setRsidRDefault(String value)
      Sets the value of the rsidRDefault property.
      Parameters:
      value - allowed object is String
    • getParaId

      public String getParaId()
      Gets the value of the paraId property. From [MS-DOCX], "an identifier for a paragraph that is unique within the document part (as specified by [ISO/IEC29500-1:2011] section 11.3), with the exception that it need not be unique across the choices or fallback of an Alternate Content block (as specified by [ISO/IEC29500-1:2011] section 17.17.3). Values MUST be greater than 0 and less than 0x80000000. Any element having this attribute MUST also have the textId attribute"
      Returns:
      possible object is String
    • setParaId

      public void setParaId(String value)
      Sets the value of the paraId property.
      Parameters:
      value - allowed object is String
    • getTextId

      public String getTextId()
      Gets the value of the textId property. From [MS-DOCX], "a version identifier for a paragraph. Values MUST be greater than 0 and less than 0x80000000. Any element having this attribute MUST also have the paraId attribute. If two documents have the same docId, then if two paragraphs within the same respective document part (as specified by [ISO/IEC29500-1:2011] section 11.3) that have the same paraId and textId SHOULD contain identical text, although formatting could differ."
      Returns:
      possible object is String
    • setTextId

      public void setTextId(String value)
      Sets the value of the textId 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.
    • toString

      @Deprecated public String toString()
      Deprecated.
      Get the text content of all runs in the P. WARNING: this only gets ./w:r/w:t. That is incomplete. Try org.docx4j.TextUtils.extractText instead.
      Overrides:
      toString in class Object
    • replaceElement

      public void replaceElement(Object current, List insertions)