|
Oxygen XML Editor 12.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ro.sync.ecss.extensions.api.node.AuthorDocumentFragment
public class AuthorDocumentFragment
Represents a fragment of an XML document. It holds a copy of the content of a document fragment.
A changes in the fragment does not change the edited document. For changing the edited document
use insert methods of AuthorDocumentController
.
For the following XML code fragment:
<chapter>content text content<sect1>text content<sect11>text content</sect11>text</sect1>text<sect2>text content</sect2>text content text content</chapter>
the corresponding document fragment structure can be represented as:
The image represents the content of the fragment and the red markers represent special control characters which are used
to point to the start and the end offsets of the fragment containing nodes.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
boolean |
containsSimpleText()
Check if an author document fragment content contains simple text. |
int |
getAcceptedLength()
|
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()
|
int |
getLeftSplits()
|
int |
getLength()
|
int |
getRightSplits()
|
boolean |
isEmpty()
|
void |
setChangeHighlights(java.util.List<AuthorPersistentHighlight> markers)
Set the list with the change tracking highlights. |
void |
setCommentAndCustomHighlights(java.util.List<AuthorPersistentHighlight> highlights)
Set the list with the fragment comment highlights or custom highlights. |
void |
setLeftSplits(int leftSplits)
Set the number of the elements the fragment splits to the left. |
void |
setRighSplits(int righSplits)
Set the number of the elements the fragment splits to the right. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 markersMethod Detail |
---|
public Content getContent()
Content
object holding this fragment's content.public int getAcceptedLength()
public int getLength()
public java.util.List<AuthorNode> getContentNodes()
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
).
AuthorChangeTrackingController.getChangeHighlights()
method.
AuthorPersistentHighlight.PersistentHighlightType.CHANGE_INSERT
or
AuthorPersistentHighlight.PersistentHighlightType.CHANGE_DELETE
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 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).
|
Oxygen XML Editor 12.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |