|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gate.corpora.DocumentContentImpl
Represents the commonalities between all sorts of document contents.
Field Summary | |
(package private) String |
content
Just for now - later we have to cater for different types of content. |
private static boolean |
DEBUG
Debug flag |
(package private) static long |
serialVersionUID
Freeze the serialization UID. |
Constructor Summary | |
DocumentContentImpl()
Default construction |
|
DocumentContentImpl(String s)
For ranges |
|
DocumentContentImpl(URL u,
String encoding,
Long start,
Long end)
Contruction from URL and offsets. |
Method Summary | |
(package private) void |
edit(Long start,
Long end,
DocumentContent replacement)
Propagate changes to the document content. |
boolean |
equals(Object other)
|
DocumentContent |
getContent(Long start,
Long end)
The contents under a particular span. |
int |
hashCode()
|
(package private) boolean |
isValidOffset(Long offset)
Check that an offset is valid |
(package private) boolean |
isValidOffsetRange(Long start,
Long end)
Check that both start and end are valid offsets and that they constitute a valid offset range |
Long |
size()
The size of this content (e.g. |
String |
toString()
Returns the String representing the content in case of a textual document. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private static final boolean DEBUG
String content
static final long serialVersionUID
Constructor Detail |
public DocumentContentImpl()
public DocumentContentImpl(URL u, String encoding, Long start, Long end) throws IOException
public DocumentContentImpl(String s)
Method Detail |
void edit(Long start, Long end, DocumentContent replacement)
public DocumentContent getContent(Long start, Long end) throws InvalidOffsetException
getContent
in interface DocumentContent
public String toString()
toString
in class Object
public Long size()
size
in interface DocumentContent
boolean isValidOffset(Long offset)
boolean isValidOffsetRange(Long start, Long end)
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |