|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.nutch.db.Link
This is the field in the Link Database.
Each row is a Link: type name description --------------------------------------------------------------- byte VERSION - A byte indicating the version of this entry. 128bit FROM_ID - The MD5 hash of the source of the link. 64bit DOMAIN_ID - The 8-byte MD5Hash of the source's domain. string TO_URL - The URL destination of the link. string ANCHOR - The anchor text of the link. boolean TARGET_HAS_OUTLINK - Whether the target of the link has outlinks.
Nested Class Summary | |
static class |
Link.MD5Comparator
MD5Comparator is the opposite. |
static class |
Link.UrlComparator
URLComparator uses the standard method where, uh, the URL comes first. |
Field Summary | |
static int |
MAX_ANCHOR_LENGTH
|
Constructor Summary | |
Link()
Create the Link with no data |
|
Link(MD5Hash fromID,
long domainID,
String urlString,
String anchorText)
Create the record |
Method Summary | |
int |
compareTo(Object o)
|
UTF8 |
getAnchorText()
|
long |
getDomainID()
|
MD5Hash |
getFromID()
|
UTF8 |
getURL()
|
int |
md5Compare(Object o)
Compare MD5s, then compare URLs. |
static Link |
read(DataInput in)
|
void |
readFields(DataInput in)
Read in fields from a bytestream |
void |
set(Link that)
|
void |
setTargetHasOutlink(boolean targetHasOutlink)
|
boolean |
targetHasOutlink()
|
String |
toString()
Print out the record |
String |
toTabbedString()
Get a tab-delimited version of the text data. |
int |
urlCompare(Object o)
Compare URLs, then compare MD5s. |
void |
write(DataOutput out)
Write bytes out to stream |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int MAX_ANCHOR_LENGTH
Constructor Detail |
public Link()
public Link(MD5Hash fromID, long domainID, String urlString, String anchorText) throws MalformedURLException
Method Detail |
public void readFields(DataInput in) throws IOException
readFields
in interface Writable
IOException
public void set(Link that)
public void write(DataOutput out) throws IOException
write
in interface Writable
IOException
public static Link read(DataInput in) throws IOException
IOException
public MD5Hash getFromID()
public UTF8 getURL()
public long getDomainID()
public UTF8 getAnchorText()
public boolean targetHasOutlink()
public void setTargetHasOutlink(boolean targetHasOutlink)
public String toString()
public String toTabbedString()
public int compareTo(Object o)
compareTo
in interface Comparable
public int urlCompare(Object o)
public int md5Compare(Object o)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |