edu.umd.cloud9.webgraph.data
Class IndexableAnchorText

java.lang.Object
  extended by edu.umd.cloud9.collection.Indexable
      extended by 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

Constructor Summary
IndexableAnchorText()
           
IndexableAnchorText(String docid, ArrayListWritable<AnchorText> anchors)
           
IndexableAnchorText(String docid, ArrayListWritable<AnchorText> anchors, int maxContentLength)
           
 
Method Summary
 void clear()
           
 void concatenateAnchors(ArrayListWritable<AnchorText> anchors)
           
 void concatenateAnchors(ArrayListWritable<AnchorText> anchors, int maxContentLength)
           
 void createHTML(ArrayListWritable<AnchorText> anchors)
           
 String getContent()
          Returns the content of the document.
 String getDisplayContentType()
          Returns the type of the display content, per IANA MIME Media Type (e.g., "text/html").
 String getDocid()
          Returns the globally-unique String identifier of the document within the collection.
 void readFields(DataInput in)
           
 void setDocid(String docid)
           
 String toString()
           
 void write(DataOutput out)
           
 
Methods inherited from class edu.umd.cloud9.collection.Indexable
getDisplayContent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexableAnchorText

public IndexableAnchorText()

IndexableAnchorText

public IndexableAnchorText(String docid,
                           ArrayListWritable<AnchorText> anchors)

IndexableAnchorText

public IndexableAnchorText(String docid,
                           ArrayListWritable<AnchorText> anchors,
                           int maxContentLength)
Method Detail

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