|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Mixed content text and Origin elements.
This interface provides a base for specialized text (possibly) containing mixed content: text mixed in with Origin subelements that can be made into hyperlinks. It is still possible to treat this as simple text, but this interface exposes the Origin subelements for applications that need them.
Field Summary | |
static int |
ORIGIN
Constant: a chunk is an origin element. |
static int |
TEXT
Constant: a chunk contains text. |
Method Summary | |
int |
getChunkCount()
Get the number of separate content chunks. |
int |
getChunkType(int index)
Get the type of a chunk. |
String |
getData(int index)
Get a chunk as plain text. |
Origin |
getOrigin(int index)
Get a chunk as an Origin subelement. |
Methods inherited from interface org.newsml.toolkit.Text |
setBoolean, setInt, setString, toBoolean, toInt, toString |
Methods inherited from interface org.newsml.toolkit.BaseNode |
getAttr, getChild, getChild, getChild, getChild, getChildCount, getChildCount, getParent, getPath, getSession, getXMLName, getXPath, insertAfter, insertAfter, insertAfter, insertAfter, insertAfterDuid, insertAfterDuid, insertBefore, insertBefore, insertBefore, insertBefore, insertBeforeDuid, insertBeforeDuid, insertChild, insertChild, insertFirst, insertFirst, insertLast, insertLast, removeChild, removeChild, removeSelf, replaceChild, replaceChild, replaceChild, replaceChild, replaceChild, replaceChild, setAttr, setAttr, toXML, toXML, unsetAttr, unsetAttr, writeXML, writeXML |
Methods inherited from interface org.newsml.toolkit.IdNode |
getDuid, getEuid |
Field Detail |
public static final int TEXT
public static final int ORIGIN
Method Detail |
public int getChunkCount()
Note that text may be broken down into an arbitrary number of chunks by the DOM implementation: it is not safe to assume that all contiguous text will appear in the same chunk.
public int getChunkType(int index)
index
- The index of the chunk.TEXT
or ORIGIN
, representing
the chunk's type, or -1 if the index is out of range.public String getData(int index)
For any index, only one of this method and getOrigin(int)
may return non-null
index
- The index of the chunk.getOrigin(int)
public Origin getOrigin(int index)
index
- The index of the chunk.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |