public class TrecDocument extends WebDocument
| Modifier and Type | Field and Description |
|---|---|
static String |
XML_END_TAG
End delimiter of the document, which is <
/DOC>. |
static String |
XML_START_TAG
Start delimiter of the document, which is <
DOC>. |
| Constructor and Description |
|---|
TrecDocument()
Creates an empty
TrecDocument object. |
| Modifier and Type | Method and Description |
|---|---|
String |
getContent()
Returns the content of the document.
|
String |
getDocid()
Returns the globally-unique String identifier of the document within the collection (e.g.,
LA123190-0134). |
String |
getURL() |
static void |
readDocument(TrecDocument doc,
String s)
Reads a raw XML string into a
TrecDocument object. |
void |
readFields(DataInput in)
Serializes this object.
|
void |
write(DataOutput out)
Deserializes this object.
|
getDisplayContent, getDisplayContentTypepublic static final String XML_START_TAG
DOC>.public static final String XML_END_TAG
/DOC>.public void write(DataOutput out) throws IOException
IOExceptionpublic void readFields(DataInput in) throws IOException
IOExceptionpublic String getDocid()
LA123190-0134).public String getContent()
getContent in class Indexablepublic static void readDocument(TrecDocument doc, String s)
TrecDocument object.doc - the TrecDocument objects - raw XML stringpublic String getURL()
getURL in class WebDocumentCopyright © 2015. All rights reserved.