|
Oxygen XML Editor 11.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.
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,
List<AuthorNode> elements,
int leftSplits,
int righSplits)
Constructor. |
|
AuthorDocumentFragment(Content content,
List<AuthorNode> elements,
int leftSplits,
int righSplits,
List<ChangeMarker> changeMarkers)
Constructor. |
Method Summary | |
---|---|
boolean |
containsSimpleText()
Check if an author document fragment content contains simple text. |
int |
getAcceptedLength()
|
List<ChangeMarker> |
getChangeMarks()
Returns the list with the change marks. |
Content |
getContent()
|
List<AuthorNode> |
getContentNodes()
|
int |
getLeftSplits()
|
int |
getLength()
|
int |
getRightSplits()
|
boolean |
isEmpty()
|
void |
setChangeMarks(List<ChangeMarker> markers)
Set the list with the change markers. |
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. |
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, 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, List<AuthorNode> elements, int leftSplits, int righSplits, List<ChangeMarker> changeMarkers)
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 markersMethod Detail |
---|
public Content getContent()
Content
object holding this fragment's content.public int getAcceptedLength()
public int getLength()
public List<AuthorNode> getContentNodes()
public String toString()
toString
in class 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 List<ChangeMarker> getChangeMarks()
ChangeMarker
.public void setChangeMarks(List<ChangeMarker> markers)
markers
- The change markers 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 11.2 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |