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
XWPFTable s 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 IBody
POIXMLDocumentPart
that contains the comment.IBody.getPart()
public BodyType getPartType()
BodyType
of the comment.getPartType
in interface IBody
BodyType
value.IBody.getPartType()
public java.util.List<IBodyElement> getBodyElements()
IBodyElement
) of the comment.getBodyElements
in interface IBody
public java.util.List<XWPFParagraph> getParagraphs()
getParagraphs
in interface IBody
public XWPFParagraph getParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP p)
IBody
CTP
.getParagraph
in interface IBody
p
- 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)
IBody
public XWPFParagraph getParagraphArray(int pos)
IBody
getParagraphArray
in interface IBody
public XWPFTable getTableArray(int pos)
IBody
getTableArray
in interface IBody
public XWPFParagraph insertNewParagraph(org.apache.xmlbeans.XmlCursor cursor)
IBody
insertNewParagraph
in interface IBody
public XWPFTable insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)
IBody
insertNewTbl
in interface IBody
public void insertTable(int pos, XWPFTable table)
IBody
insertTable
in interface IBody
public XWPFTableCell getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
IBody
getTableCell
in interface IBody
public XWPFDocument getXWPFDocument()
XWPFDocument
the comment is part of.getXWPFDocument
in interface IBody
IBody.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.