Class P

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

public class P
extends java.lang.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>
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  P.Bdo
    Java class for anonymous complex type.
    static class  P.Dir
    Java class for anonymous complex type.
    static class  P.Hyperlink
    Hyperlink
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected java.util.List<java.lang.Object> content  
    protected java.lang.String paraId  
    protected PPr pPr  
    protected java.lang.String rsidDel  
    protected java.lang.String rsidP  
    protected java.lang.String rsidR  
    protected java.lang.String rsidRDefault  
    protected java.lang.String rsidRPr  
    protected java.lang.String textId  
  • Constructor Summary

    Constructors
    Constructor Description
    P()  
  • Method Summary

    Modifier and Type Method Description
    void afterUnmarshal​(jakarta.xml.bind.Unmarshaller unmarshaller, java.lang.Object parent)
    This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
    java.util.List<java.lang.Object> getContent()
    Gets the value of the content property.
    java.util.List<java.lang.Object> getParagraphContent()
    Deprecated.
    java.lang.String getParaId()
    Gets the value of the paraId property.
    java.lang.Object getParent()
    Gets the parent object in the object tree representing the unmarshalled xml document.
    PPr getPPr()
    Gets the value of the pPr property.
    java.lang.String getRsidDel()
    Gets the value of the rsidDel property.
    java.lang.String getRsidP()
    Gets the value of the rsidP property.
    java.lang.String getRsidR()
    Gets the value of the rsidR property.
    java.lang.String getRsidRDefault()
    Gets the value of the rsidRDefault property.
    java.lang.String getRsidRPr()
    Gets the value of the rsidRPr property.
    java.lang.String getTextId()
    Gets the value of the textId property.
    void replaceElement​(java.lang.Object current, java.util.List insertions)  
    void setParaId​(java.lang.String value)
    Sets the value of the paraId property.
    void setParent​(java.lang.Object parent)  
    void setPPr​(PPr value)
    Sets the value of the pPr property.
    void setRsidDel​(java.lang.String value)
    Sets the value of the rsidDel property.
    void setRsidP​(java.lang.String value)
    Sets the value of the rsidP property.
    void setRsidR​(java.lang.String value)
    Sets the value of the rsidR property.
    void setRsidRDefault​(java.lang.String value)
    Sets the value of the rsidRDefault property.
    void setRsidRPr​(java.lang.String value)
    Sets the value of the rsidRPr property.
    void setTextId​(java.lang.String value)
    Sets the value of the textId property.
    java.lang.String toString()
    Deprecated.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • pPr

      protected PPr pPr
    • content

      protected java.util.List<java.lang.Object> content
    • rsidRPr

      protected java.lang.String rsidRPr
    • rsidR

      protected java.lang.String rsidR
    • rsidDel

      protected java.lang.String rsidDel
    • rsidP

      protected java.lang.String rsidP
    • rsidRDefault

      protected java.lang.String rsidRDefault
    • paraId

      protected java.lang.String paraId
    • textId

      protected java.lang.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 java.util.List<java.lang.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 java.util.List<java.lang.Object> getParagraphContent()
      Deprecated.
    • getRsidRPr

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

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

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

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

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

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

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

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

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

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

      public java.lang.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​(java.lang.String value)
      Sets the value of the paraId property.
      Parameters:
      value - allowed object is String
    • getTextId

      public java.lang.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​(java.lang.String value)
      Sets the value of the textId property.
      Parameters:
      value - allowed object is String
    • getParent

      public java.lang.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​(java.lang.Object parent)
      Specified by:
      setParent in interface Child
    • afterUnmarshal

      public void afterUnmarshal​(jakarta.xml.bind.Unmarshaller unmarshaller, java.lang.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 java.lang.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 java.lang.Object
    • replaceElement

      public void replaceElement​(java.lang.Object current, java.util.List insertions)