public abstract class CommentsTableBase
extends org.apache.poi.ooxml.POIXMLDocumentPart
implements org.apache.poi.xssf.model.Comments, java.lang.AutoCloseable
The comments table contains all the necessary information for displaying the string: the text, formatting properties, and phonetic properties (for East Asian languages).
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.ConcurrentMap<java.lang.Integer,java.lang.String> |
authors |
protected java.util.concurrent.ConcurrentMap<java.lang.String,com.github.pjfanning.poi.xssf.streaming.SerializableComment> |
comments |
protected boolean |
fullFormat |
protected boolean |
ignoreDrawing |
protected org.apache.poi.ss.usermodel.Sheet |
sheet |
| Modifier | Constructor and Description |
|---|---|
protected |
CommentsTableBase(boolean fullFormat) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.util.Iterator<java.lang.Integer> |
authorsKeyIterator() |
protected abstract java.util.Iterator<java.lang.String> |
commentsKeyIterator() |
void |
commentUpdated(org.apache.poi.xssf.usermodel.XSSFComment comment) |
protected void |
commit() |
org.apache.poi.xssf.usermodel.XSSFComment |
createNewComment(org.apache.poi.ss.usermodel.ClientAnchor clientAnchor) |
int |
findAuthor(java.lang.String author) |
org.apache.poi.xssf.usermodel.XSSFComment |
findCellComment(org.apache.poi.ss.util.CellAddress cellAddress) |
java.lang.String |
getAuthor(long authorId) |
java.util.Iterator<org.apache.poi.ss.util.CellAddress> |
getCellAddresses() |
protected abstract org.slf4j.Logger |
getLogger() |
int |
getNumberOfAuthors() |
int |
getNumberOfComments() |
boolean |
isIgnoreDrawing() |
void |
readFrom(java.io.InputStream is)
Read this comments table from an XML file.
|
void |
referenceUpdated(org.apache.poi.ss.util.CellAddress oldReference,
org.apache.poi.xssf.usermodel.XSSFComment comment) |
boolean |
removeComment(org.apache.poi.ss.util.CellAddress cellRef) |
void |
setIgnoreDrawing(boolean ignoreDrawing) |
void |
setSheet(org.apache.poi.ss.usermodel.Sheet sheet) |
void |
writeTo(java.io.OutputStream out)
Write this table out as XML.
|
_invokeOnDocumentRead, addRelation, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, getTargetPart, isCommitted, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, prepareForCommit, read, rebase, removeRelation, removeRelation, removeRelation, setCommitted, toStringprotected org.apache.poi.ss.usermodel.Sheet sheet
protected boolean ignoreDrawing
protected final boolean fullFormat
protected java.util.concurrent.ConcurrentMap<java.lang.String,com.github.pjfanning.poi.xssf.streaming.SerializableComment> comments
protected java.util.concurrent.ConcurrentMap<java.lang.Integer,java.lang.String> authors
protected abstract org.slf4j.Logger getLogger()
protected abstract java.util.Iterator<java.lang.Integer> authorsKeyIterator()
protected abstract java.util.Iterator<java.lang.String> commentsKeyIterator()
public void setIgnoreDrawing(boolean ignoreDrawing)
ignoreDrawing - set to true if you don't need the drawing/shape data on the comments
(default is false) - ignoring the drawing/shape data can save memorypublic boolean isIgnoreDrawing()
@Internal public void setSheet(org.apache.poi.ss.usermodel.Sheet sheet)
setSheet in interface org.apache.poi.xssf.model.Commentsprotected void commit()
throws java.io.IOException
commit in class org.apache.poi.ooxml.POIXMLDocumentPartjava.io.IOExceptionpublic void readFrom(java.io.InputStream is)
throws java.io.IOException
is - The input stream containing the XML document.java.io.IOException - if an error occurs while reading.public int getNumberOfComments()
getNumberOfComments in interface org.apache.poi.xssf.model.Commentspublic int getNumberOfAuthors()
getNumberOfAuthors in interface org.apache.poi.xssf.model.Commentspublic java.lang.String getAuthor(long authorId)
getAuthor in interface org.apache.poi.xssf.model.Commentspublic int findAuthor(java.lang.String author)
findAuthor in interface org.apache.poi.xssf.model.Commentspublic org.apache.poi.xssf.usermodel.XSSFComment findCellComment(org.apache.poi.ss.util.CellAddress cellAddress)
findCellComment in interface org.apache.poi.xssf.model.Commentspublic boolean removeComment(org.apache.poi.ss.util.CellAddress cellRef)
removeComment in interface org.apache.poi.xssf.model.Commentspublic java.util.Iterator<org.apache.poi.ss.util.CellAddress> getCellAddresses()
getCellAddresses in interface org.apache.poi.xssf.model.Commentspublic org.apache.poi.xssf.usermodel.XSSFComment createNewComment(org.apache.poi.ss.usermodel.ClientAnchor clientAnchor)
createNewComment in interface org.apache.poi.xssf.model.Commentspublic void referenceUpdated(org.apache.poi.ss.util.CellAddress oldReference,
org.apache.poi.xssf.usermodel.XSSFComment comment)
referenceUpdated in interface org.apache.poi.xssf.model.Commentspublic void commentUpdated(org.apache.poi.xssf.usermodel.XSSFComment comment)
commentUpdated in interface org.apache.poi.xssf.model.Commentspublic void writeTo(java.io.OutputStream out)
throws java.io.IOException
out - The stream to write to.java.io.IOException - if an error occurs while writing.