@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public class AuthorDocumentFragment
extends java.lang.Object
AuthorDocumentController
.
accounting<person><name>John W.</name><email>john@gmail.com</email></person><person><name>Mary B.</name><email>mary@msn.com</email></person>
Constructor and Description |
---|
AuthorDocumentFragment(Content content,
java.util.List<AuthorNode> elements,
int leftSplits,
int righSplits)
Constructor.
|
AuthorDocumentFragment(Content content,
java.util.List<AuthorNode> elements,
int leftSplits,
int righSplits,
java.util.List<AuthorPersistentHighlight> changeMarkers,
java.util.List<AuthorPersistentHighlight> commentMarkers)
Constructor.
|
AuthorDocumentFragment(Content content,
java.util.List<AuthorNode> elements,
int leftSplits,
int righSplits,
java.util.List<AuthorPersistentHighlight> changeMarkers,
java.util.List<AuthorPersistentHighlight> commentMarkers,
java.util.Map<AuthorElement,java.util.LinkedHashMap<java.lang.String,AuthorPersistentHighlight>> attributesChanges)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsSimpleText()
Check if an author document fragment content contains simple text.
|
int |
getAcceptedLength() |
java.util.Map<AuthorElement,java.util.LinkedHashMap<java.lang.String,AuthorPersistentHighlight>> |
getAttributesChangeHighlights()
Get the map of attribute changes in the fragment.
|
java.util.List<AuthorPersistentHighlight> |
getChangeHighlights()
Returns the list with the fragment change tracking highlights.
|
java.util.List<AuthorPersistentHighlight> |
getCommentsAndCustomHighlights()
Returns the list with the fragment comment highlights or custom highlights.
|
Content |
getContent() |
java.util.List<AuthorNode> |
getContentNodes()
Get the list of the first-level nodes contained in this Author document fragment.
|
int |
getLeftSplits()
This method is intended for internal use only.
|
int |
getLength() |
int |
getRightSplits()
This method is intended for internal use only.
|
boolean |
isEmpty() |
void |
setAttributesChanges(java.util.Map<AuthorElement,java.util.LinkedHashMap<java.lang.String,AuthorPersistentHighlight>> attributesChanges)
Set the map of element to attribute changes.
|
void |
setChangeHighlights(java.util.List<AuthorPersistentHighlight> markers)
This class is intended for internal use only.
Set the list with the change tracking highlights. |
void |
setCommentAndCustomHighlights(java.util.List<AuthorPersistentHighlight> highlights)
This class is intended for internal use only.
Set the list with the fragment comment highlights or custom highlights. |
void |
setLeftSplits(int leftSplits)
This method is intended for internal use only.
Set the number of the elements the fragment splits to the left. |
void |
setRighSplits(int righSplits)
This method is intended for internal use only.
Set the number of the elements the fragment splits to the right. |
java.lang.String |
toString() |
public AuthorDocumentFragment(Content content, java.util.List<AuthorNode> elements, int leftSplits, int righSplits)
content
- The Content
holding the fragment's content.elements
- Elements that make up this fragment.leftSplits
- Number of elements it splits to the left.righSplits
- Number of elements it splits to the right.public AuthorDocumentFragment(Content content, java.util.List<AuthorNode> elements, int leftSplits, int righSplits, java.util.List<AuthorPersistentHighlight> changeMarkers, java.util.List<AuthorPersistentHighlight> commentMarkers)
content
- The Content
holding the fragment's content.elements
- Elements that make up this fragment.leftSplits
- Number of elements it splits to the left.righSplits
- Number of elements it splits to the right.changeMarkers
- The list of change markerscommentMarkers
- Comment markerspublic AuthorDocumentFragment(Content content, java.util.List<AuthorNode> elements, int leftSplits, int righSplits, java.util.List<AuthorPersistentHighlight> changeMarkers, java.util.List<AuthorPersistentHighlight> commentMarkers, java.util.Map<AuthorElement,java.util.LinkedHashMap<java.lang.String,AuthorPersistentHighlight>> attributesChanges)
content
- The Content
holding the fragment's content.elements
- Elements that make up this fragment.leftSplits
- Number of elements it splits to the left.righSplits
- Number of elements it splits to the right.changeMarkers
- The list of change markerscommentMarkers
- Comment markersattributesChanges
- The map of attribute changes.public int getAcceptedLength()
public int getLength()
public java.util.List<AuthorNode> getContentNodes()
AuthorNode
can contain another nodes (the Author nodes model
is similar with the DOM model).public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int getLeftSplits()
public int getRightSplits()
public void setLeftSplits(int leftSplits)
leftSplits
- The left splits count.public void setRighSplits(int righSplits)
righSplits
- The right splits count.public java.util.List<AuthorPersistentHighlight> getChangeHighlights()
NULL
).
ChangeTrackingController.getChangeHighlights()
method.AuthorPersistentHighlight.PersistentHighlightType.CHANGE_INSERT
or
AuthorPersistentHighlight.PersistentHighlightType.CHANGE_DELETE
public java.util.Map<AuthorElement,java.util.LinkedHashMap<java.lang.String,AuthorPersistentHighlight>> getAttributesChangeHighlights()
null
.
Each element can have one or more attribute changes.public java.util.List<AuthorPersistentHighlight> getCommentsAndCustomHighlights()
AuthorReviewController.getCommentHighlights()
and
AuthorPersistentHighlighter.getHighlights()
methods.AuthorPersistentHighlight
can be AuthorPersistentHighlight.PersistentHighlightType.COMMENT
or AuthorPersistentHighlight.PersistentHighlightType.CUSTOM_HIGHLIGHT
. The custom highlights
can be inserted and managed by using the AuthorPersistentHighlighter
.public void setCommentAndCustomHighlights(java.util.List<AuthorPersistentHighlight> highlights)
highlights
- The comment highlights or custom highlights list.public void setChangeHighlights(java.util.List<AuthorPersistentHighlight> markers)
markers
- The change tracking highlights list.public void setAttributesChanges(java.util.Map<AuthorElement,java.util.LinkedHashMap<java.lang.String,AuthorPersistentHighlight>> attributesChanges)
attributesChanges
- The map between element and attribute changespublic boolean isEmpty()
true
If the fragment is empty.public boolean containsSimpleText()
True
if the content of the given author document fragment contains
simple text (the whitespaces are ignored).© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.