public class AnnotatedSpan
extends java.lang.Object
MTag object or a derived object).
The span my exist across several parts (segments or ignorables).
| Constructor and Description |
|---|
AnnotatedSpan(MTag marker,
Part startPart,
int start)
Creates a new
AnnotatedSpan object. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
append(java.lang.String chunk)
Appends a chunk of coded text to the coded text of this span.
|
java.lang.String |
getCodedText()
Gets the coded text of the content for this span.
|
int |
getEnd()
Gets the end position in the coded text of the end part of this span.
|
Part |
getEndPart()
Gets the
Part object where this span ends. |
java.lang.String |
getId()
Gets the id of the marker for this span.
|
MTag |
getMarker()
Gets the
MTag object associated with this span. |
int |
getPartCount()
Gets the number of parts where this span exists.
|
java.lang.String |
getPlainText()
Gets the plain text version of the content for this span.
|
int |
getStart()
Gets the start position in the coded text of the start part of this span.
|
Part |
getStartPart()
Gets the
Part object where this span starts. |
java.lang.String |
getType()
Gets the type of the marker for this span.
|
boolean |
isFullContent()
Indicates if this span covers the entire content of the
part or parts where it exists.
|
void |
setEnd(int end)
Sets the end position in the coded text of the end part of this span.
|
void |
setEndPart(Part endPart)
Sets the part/segment where this span ends.
|
void |
setFullContent(boolean fullContent)
Sets the flag indicating if this span covers the entire content of the
part or parts where it exists.
|
void |
setPartCount(int partCount)
Sets the number of parts where this span exists.
|
public AnnotatedSpan(MTag marker, Part startPart, int start)
AnnotatedSpan object.marker - the marker associated to this span.startPart - the Part where this span starts.public MTag getMarker()
MTag object associated with this span.public Part getStartPart()
Part object where this span starts.public Part getEndPart()
Part object where this span ends.public void setEndPart(Part endPart)
endPart - the part/segment where this span ends.public java.lang.String getType()
public java.lang.String getId()
public int getStart()
getEnd(),
getStartPart()protected void append(java.lang.String chunk)
chunk - the chunk to append.public java.lang.String getCodedText()
IMPORTANT: This coded text can go across parts (segments or ignorables).
public java.lang.String getPlainText()
IMPORTANT: This text can go across parts (segments or ignorables).
public void setEnd(int end)
end - the end position of this span.public int getEnd()
getStart(),
getEndPart()public void setPartCount(int partCount)
partCount - the new number of parts where this span occurs.public int getPartCount()
public void setFullContent(boolean fullContent)
fullContent - true if the span content is the full content of the part(s).public boolean isFullContent()
Note that annotation markers are not counted as part of the "content" in this context.