|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.editor.textEditor.TextPieceInfoImpl
public class TextPieceInfoImpl
Info about text piece from textual node identified by nodeID.
Constructor Summary | |
---|---|
TextPieceInfoImpl(ITextPieceKeeper keeper,
String nodeID,
int renderedOffset)
Constructor. |
Method Summary | |
---|---|
static String |
buildID(String nodeID,
int offset,
int length)
Deprecated. |
DomPointer |
getDomPointer(int charGapIndex,
XMLAccess xmlAccess)
Returns pointer to original document specified by node assoc with this keeper and charGapIndex. |
String |
getID()
Deprecated. |
ITextPieceKeeper |
getKeeper()
Returns associated text piece keeper. |
int |
getLastIndex()
Returns last index in rendered text. |
static int |
getLength(String id)
Deprecated. |
String |
getNodeID()
Identification of node in original document(not XSLT-transformed) holding the text (text node, cdata node). |
static String |
getNodeID(String id)
Deprecated. |
static int |
getOffset(String id)
Deprecated. |
int |
getRenderedOffset()
Index of the first character of this text piece in whole rendered text of textual node. |
String |
getRenderedText()
Returns rendered keeper's text. |
static boolean |
isTextPieceId(String id)
Deprecated. |
int |
resolveRenderedIndex(int indexInRenderedText,
XMLAccess xmlAccess)
Resolves index in this rendered text to index in associated DOM node's(not XSLT - transformed) original text . |
static void |
tidyUpIds(List<String> ids)
Deprecated. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TextPieceInfoImpl(ITextPieceKeeper keeper, String nodeID, int renderedOffset)
nodeID
- id of text node of text pieceoffset
- of first character in rendered text of text noderenderedText
- rendered textMethod Detail |
---|
public String getID()
public String getNodeID()
ITextPieceInfo
getNodeID
in interface ITextPieceInfo
public static String getNodeID(String id)
id
- some id
public static int getOffset(String id)
id
- id of text piece
public static int getLength(String id)
id
- id of text piece
public static boolean isTextPieceId(String id)
id
- to examine
public static final String buildID(String nodeID, int offset, int length)
nodeID
- id of node of text pieceoffset
- of first character in text of text nodelength
- of text to identify
public static void tidyUpIds(List<String> ids)
ids
- text piece ids to tidy uppublic int getRenderedOffset()
ITextPieceInfo
getRenderedOffset
in interface ITextPieceInfo
public String getRenderedText()
ITextPieceInfo
getRenderedText
in interface ITextPieceInfo
public int resolveRenderedIndex(int indexInRenderedText, XMLAccess xmlAccess)
ITextPieceInfo
resolveRenderedIndex
in interface ITextPieceInfo
indexInRenderedText
- index in this's rendered text (0 to text.length-1)or
index one behind the text(for example when index is
character gap index, can be text lenght)
public int getLastIndex()
ITextPieceInfo
getLastIndex
in interface ITextPieceInfo
public String toString()
toString
in class Object
public ITextPieceKeeper getKeeper()
ITextPieceInfo
getKeeper
in interface ITextPieceInfo
public DomPointer getDomPointer(int charGapIndex, XMLAccess xmlAccess)
ITextPieceInfo
getDomPointer
in interface ITextPieceInfo
charGapIndex
- index of character gap in this's rendered text
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |