|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.archive.crawler.extractor.Link
public class Link
Link represents one discovered "edge" of the web graph: the source URI, the destination URI, and the type of reference (represented by the context in which it was found). As such, it is a suitably generic item to returned from generic link-extraction utility code.
Field Summary | |
---|---|
static char |
EMBED_HOP
embedded links necessary to render the page, like IMG/@SRC |
static java.lang.String |
EMBED_MISC
stand-in value for embeds without other context |
static java.lang.String |
JS_MISC
stand-in value for js-discovered urls without other context |
static char |
NAVLINK_HOP
navigation links, like A/@HREF |
static java.lang.String |
NAVLINK_MISC
stand-in value for navlink urls without other context |
static char |
PREREQ_HOP
implied prerequisite links, like dns or robots |
static java.lang.String |
PREREQ_MISC
stand-in value for prerequisite without other context |
static char |
REFER_HOP
referral/redirect links, like header 'Location:' on a 301/302 response |
static char |
SPECULATIVE_HOP
speculative/aggressively extracted links, perhaps embed or nav, as in javascript |
static java.lang.String |
SPECULATIVE_MISC
stand-in value for speculative/aggressively extracted urls without other context |
Constructor Summary | |
---|---|
Link(java.lang.CharSequence source,
java.lang.CharSequence destination,
java.lang.CharSequence context,
char hopType)
Create a Link with the given fields. |
Method Summary | |
---|---|
static java.lang.CharSequence |
elementContext(java.lang.CharSequence element,
java.lang.CharSequence attribute)
Create a suitable XPath-like context from an element name and optional attribute name. |
java.lang.CharSequence |
getContext()
|
java.lang.CharSequence |
getDestination()
|
char |
getHopType()
|
java.lang.CharSequence |
getSource()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String EMBED_MISC
public static final java.lang.String JS_MISC
public static final java.lang.String NAVLINK_MISC
public static final java.lang.String SPECULATIVE_MISC
public static final java.lang.String PREREQ_MISC
public static final char NAVLINK_HOP
public static final char PREREQ_HOP
public static final char EMBED_HOP
public static final char SPECULATIVE_HOP
public static final char REFER_HOP
Constructor Detail |
---|
public Link(java.lang.CharSequence source, java.lang.CharSequence destination, java.lang.CharSequence context, char hopType)
source
- destination
- context
- hopType
- Method Detail |
---|
public java.lang.CharSequence getContext()
public java.lang.CharSequence getDestination()
public java.lang.CharSequence getSource()
public char getHopType()
public static java.lang.CharSequence elementContext(java.lang.CharSequence element, java.lang.CharSequence attribute)
element
- attribute
-
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |