edu.umd.cloud9.webgraph.data
Class IndexableAnchorText
java.lang.Object
edu.umd.cloud9.collection.Indexable
edu.umd.cloud9.webgraph.data.IndexableAnchorText
- All Implemented Interfaces:
- Writable
public class IndexableAnchorText
- extends Indexable
An Indexable implementation for anchor text/web graph collections, used in generating ForwardIndex.
- Author:
- Nima Asadi
IndexableAnchorText
public IndexableAnchorText()
IndexableAnchorText
public IndexableAnchorText(String docid,
ArrayListWritable<AnchorText> anchors)
IndexableAnchorText
public IndexableAnchorText(String docid,
ArrayListWritable<AnchorText> anchors,
int maxContentLength)
clear
public void clear()
setDocid
public void setDocid(String docid)
concatenateAnchors
public void concatenateAnchors(ArrayListWritable<AnchorText> anchors)
concatenateAnchors
public void concatenateAnchors(ArrayListWritable<AnchorText> anchors,
int maxContentLength)
createHTML
public void createHTML(ArrayListWritable<AnchorText> anchors)
getContent
public String getContent()
- Description copied from class:
Indexable
- Returns the content of the document.
- Specified by:
getContent in class Indexable
- Returns:
- content of the document
getDisplayContentType
public String getDisplayContentType()
- Description copied from class:
Indexable
- Returns the type of the display content, per IANA MIME Media Type (e.g., "text/html").
See
http://www.iana.org/assignments/media-types/index.html
- Overrides:
getDisplayContentType in class Indexable
- Returns:
- IANA MIME Media Type
getDocid
public String getDocid()
- Description copied from class:
Indexable
- Returns the globally-unique String identifier of the document within the collection.
- Specified by:
getDocid in class Indexable
- Returns:
- docid of the document
toString
public String toString()
- Overrides:
toString in class Object
readFields
public void readFields(DataInput in)
throws IOException
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Throws:
IOException