public class LinkDatum extends Object implements org.apache.hadoop.io.Writable
Constructor and 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) |
Modifier and Type | Method and Description |
---|---|
String |
getAnchor() |
byte |
getLinkType() |
float |
getScore() |
long |
getTimestamp() |
String |
getUrl() |
void |
readFields(DataInput in) |
void |
setAnchor(String anchor) |
void |
setLinkType(byte linkType) |
void |
setScore(float score) |
void |
setTimestamp(long timestamp) |
void |
setUrl(String url) |
String |
toString() |
void |
write(DataOutput out) |
public static final byte INLINK
public static final byte OUTLINK
public LinkDatum()
public LinkDatum(String url)
url
- The link url.public LinkDatum(String url, String anchor)
url
- The link url.anchor
- The link anchor text.public String getUrl()
public String getAnchor()
public void setAnchor(String anchor)
public float getScore()
public void setScore(float score)
public void setUrl(String url)
public long getTimestamp()
public void setTimestamp(long timestamp)
public byte getLinkType()
public void setLinkType(byte linkType)
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2014 The Apache Software Foundation