| Modifier and Type | Field and Description |
|---|---|
protected XWPFComments |
comments |
protected org.openxmlformats.schemas.wordprocessingml.x2006.main.CTComment |
ctComment |
protected XWPFDocument |
document |
| Constructor and Description |
|---|
XWPFComment(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTComment ctComment,
XWPFComments comments) |
| Modifier and Type | Method and Description |
|---|---|
XWPFParagraph |
createParagraph() |
XWPFTable |
createTable(int rows,
int cols) |
java.lang.String |
getAuthor()
Get the author of the current comment
|
java.util.List<IBodyElement> |
getBodyElements()
Gets the body elements (
IBodyElement) of the comment. |
XWPFComments |
getComments()
The owning object for this comment
|
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTComment |
getCtComment()
Gets the underlying CTComment object for the comment.
|
java.util.Calendar |
getDate()
Get the date information of the current comment
|
java.lang.String |
getId()
Get a unique identifier for the current comment.
|
java.lang.String |
getInitials()
Get the initials of the author of the current comment
|
XWPFParagraph |
getParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP p)
Returns the paragraph corresponding to the provided
CTP. |
XWPFParagraph |
getParagraphArray(int pos)
Returns the paragraph that of position pos
|
java.util.List<XWPFParagraph> |
getParagraphs()
Returns the paragraph(s) that holds the text of the comment.
|
POIXMLDocumentPart |
getPart()
Get the Part to which the comment belongs, which you need for adding
relationships to other parts
|
BodyType |
getPartType()
Get the part type
BodyType of the comment. |
XWPFTable |
getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl ctTable)
|
XWPFTable |
getTableArray(int pos)
Returns the table at position pos
|
XWPFTableCell |
getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
returns the TableCell to which the Table belongs
|
java.util.List<XWPFTable> |
getTables()
Get the list of
XWPFTables in the comment. |
java.lang.String |
getText() |
XWPFDocument |
getXWPFDocument()
Get the
XWPFDocument the comment is part of. |
protected void |
init() |
XWPFParagraph |
insertNewParagraph(org.apache.xmlbeans.XmlCursor cursor)
inserts a new paragraph at position of the cursor
|
XWPFTable |
insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)
inserts a new Table at the cursor position.
|
void |
insertTable(int pos,
XWPFTable table)
inserts a new Table at position pos
|
void |
removeParagraph(XWPFParagraph paragraph) |
void |
removeTable(XWPFTable table) |
void |
setAuthor(java.lang.String author)
Specifies the author for the current comment If this attribute is
omitted, then no author shall be associated with the parent annotation
type.
|
void |
setDate(java.util.Calendar date)
Specifies the date information for the current comment.
|
void |
setInitials(java.lang.String initials)
Specifies the initials of the author of the current comment
|
protected org.openxmlformats.schemas.wordprocessingml.x2006.main.CTComment ctComment
protected XWPFComments comments
protected XWPFDocument document
public XWPFComment(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTComment ctComment,
XWPFComments comments)
protected void init()
public POIXMLDocumentPart getPart()
getPart in interface IBodyPOIXMLDocumentPart that contains the comment.IBody.getPart()public BodyType getPartType()
BodyType of the comment.getPartType in interface IBodyBodyType value.IBody.getPartType()public java.util.List<IBodyElement> getBodyElements()
IBodyElement) of the comment.getBodyElements in interface IBodypublic java.util.List<XWPFParagraph> getParagraphs()
getParagraphs in interface IBodypublic XWPFParagraph getParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP p)
IBodyCTP.getParagraph in interface IBodyp - is instance of CTP and is searching for an XWPFParagraphCTP, or null if there is no corresponding paragraph in
this body.public XWPFTable getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl ctTable)
IBodypublic XWPFParagraph getParagraphArray(int pos)
IBodygetParagraphArray in interface IBodypublic XWPFTable getTableArray(int pos)
IBodygetTableArray in interface IBodypublic XWPFParagraph insertNewParagraph(org.apache.xmlbeans.XmlCursor cursor)
IBodyinsertNewParagraph in interface IBodypublic XWPFTable insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)
IBodyinsertNewTbl in interface IBodypublic void insertTable(int pos,
XWPFTable table)
IBodyinsertTable in interface IBodypublic XWPFTableCell getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
IBodygetTableCell in interface IBodypublic XWPFDocument getXWPFDocument()
XWPFDocument the comment is part of.getXWPFDocument in interface IBodyIBody.getXWPFDocument()public java.lang.String getText()
public XWPFParagraph createParagraph()
public void removeParagraph(XWPFParagraph paragraph)
public void removeTable(XWPFTable table)
public XWPFTable createTable(int rows, int cols)
public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTComment getCtComment()
public XWPFComments getComments()
XWPFComments object that contains this comment.public java.lang.String getId()
public java.lang.String getAuthor()
public void setAuthor(java.lang.String author)
author - author of the current commentpublic java.lang.String getInitials()
public void setInitials(java.lang.String initials)
initials - the initials of the author of the current commentpublic java.util.Calendar getDate()
public void setDate(java.util.Calendar date)
date - the date information for the current comment.Copyright 2022 The Apache Software Foundation or its licensors, as applicable.