Class LinkDatum
- java.lang.Object
-
- org.apache.nutch.scoring.webgraph.LinkDatum
-
-
Constructor Summary
Constructors Constructor Description LinkDatum()Default constructor, no url, timestamp, score, or link type.LinkDatum(String url)Creates a LinkDatum with a given url.LinkDatum(String url, String anchor)Creates a LinkDatum with a url and an anchor text.LinkDatum(String url, String anchor, long timestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAnchor()bytegetLinkType()floatgetScore()longgetTimestamp()StringgetUrl()voidreadFields(DataInput in)voidsetAnchor(String anchor)voidsetLinkType(byte linkType)voidsetScore(float score)voidsetTimestamp(long timestamp)voidsetUrl(String url)StringtoString()voidwrite(DataOutput out)
-
-
-
Field Detail
-
INLINK
public static final byte INLINK
- See Also:
- Constant Field Values
-
OUTLINK
public static final byte OUTLINK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LinkDatum
public LinkDatum()
Default constructor, no url, timestamp, score, or link type.
-
LinkDatum
public LinkDatum(String url)
Creates a LinkDatum with a given url. Timestamp is set to current time.- Parameters:
url- The link url.
-
LinkDatum
public LinkDatum(String url, String anchor)
Creates a LinkDatum with a url and an anchor text. Timestamp is set to current time.- Parameters:
url- The link url.anchor- The link anchor text.
-
-
Method Detail
-
getUrl
public String getUrl()
-
getAnchor
public String getAnchor()
-
setAnchor
public void setAnchor(String anchor)
-
getScore
public float getScore()
-
setScore
public void setScore(float score)
-
setUrl
public void setUrl(String url)
-
getTimestamp
public long getTimestamp()
-
setTimestamp
public void setTimestamp(long timestamp)
-
getLinkType
public byte getLinkType()
-
setLinkType
public void setLinkType(byte linkType)
-
readFields
public void readFields(DataInput in) throws IOException
- Specified by:
readFieldsin interfaceWritable- Throws:
IOException
-
write
public void write(DataOutput out) throws IOException
- Specified by:
writein interfaceWritable- Throws:
IOException
-
-