public class Link extends Object implements Serializable, Comparable<Link>
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
data
Flexible dynamic attributes list.
|
Constructor and Description |
---|
Link(CharSequence source,
CharSequence destination,
LinkContext context,
Hop hop)
Create a Link with the given fields.
|
Modifier and Type | Method and Description |
---|---|
static void |
add(CrawlURI uri,
int max,
String newUri,
LinkContext context,
Hop hop) |
static void |
addRelativeToBase(CrawlURI uri,
int max,
String newUri,
LinkContext context,
Hop hop) |
static void |
addRelativeToVia(CrawlURI uri,
int max,
String newUri,
LinkContext context,
Hop hop) |
int |
compareTo(Link o) |
boolean |
equals(Object o) |
LinkContext |
getContext() |
Map<String,Object> |
getData()
Attribute list
|
CharSequence |
getDestination() |
Hop |
getHopType() |
CharSequence |
getSource() |
boolean |
hasData() |
int |
hashCode() |
String |
toString() |
public Link(CharSequence source, CharSequence destination, LinkContext context, Hop hop)
source
- destination
- context
- hopType
- public LinkContext getContext()
public CharSequence getDestination()
public CharSequence getSource()
public Hop getHopType()
public Map<String,Object> getData()
By convention the attribute list is keyed by constants found in the
CoreAttributeConstants
interface. Use this list to carry
data or state produced by custom processors rather change the
classes CrawlURI
or this class, CrawlURI.
This list becomes CrawlURI.getData()
when the Link is promoted to CrawlURI via
CrawlURI.createCrawlURI(UURI, Link)
If the list is null when this method is invoked, a new instance will be created and returned.
public boolean hasData()
public static void addRelativeToBase(CrawlURI uri, int max, String newUri, LinkContext context, Hop hop) throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIException
public static void addRelativeToVia(CrawlURI uri, int max, String newUri, LinkContext context, Hop hop) throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIException
public static void add(CrawlURI uri, int max, String newUri, LinkContext context, Hop hop) throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIException
public int compareTo(Link o)
compareTo
in interface Comparable<Link>
Copyright © 2003-2014 Internet Archive. All Rights Reserved.