ir.webutils
Class ScoredAnchoredLink

java.lang.Object
  extended by ir.webutils.Link
      extended by ir.webutils.AnchoredLink
          extended by ir.webutils.ScoredAnchoredLink
All Implemented Interfaces:
java.lang.Comparable<Link>

public class ScoredAnchoredLink
extends AnchoredLink

An AnchoredLink that can be used in heuristic web search where links are scored for their promise. ScoredAnchoredLink's can be compared where HIGHER scores are preferable (appear earlier in a sort).


Field Summary
 double pageScore
          The heuristic score assigned to the page to which this link points
 double score
          The heuristic score assigned to this link
 
Constructor Summary
ScoredAnchoredLink(java.lang.String urlName)
          Construct a link with specified URL string
ScoredAnchoredLink(java.net.URL url, Link backLink, int startPosition)
          Constructs a link with specified URL and backLink
ScoredAnchoredLink(java.net.URL url, java.lang.String anchorText, Link backLink, int startPosition)
          Constructs a link with specified URL and anchor text and backLink
 
Method Summary
 ScoredAnchoredLink getBackLink()
          Return backLink for link
 int getEndPosition()
          Return endPosition for link
 double getScore()
           
 int getStartPosition()
          Return startPosition for link
 void setEndPosition(int endPosition)
          Set endPosition for link
 
Methods inherited from class ir.webutils.AnchoredLink
getAnchorText, setAnchorText, toString
 
Methods inherited from class ir.webutils.Link
cleanURL, compareTo, equals, getURL, hashCode, main, removeEndSlash, removeRef
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

score

public double score
The heuristic score assigned to this link


pageScore

public double pageScore
The heuristic score assigned to the page to which this link points

Constructor Detail

ScoredAnchoredLink

public ScoredAnchoredLink(java.net.URL url,
                          java.lang.String anchorText,
                          Link backLink,
                          int startPosition)
Constructs a link with specified URL and anchor text and backLink


ScoredAnchoredLink

public ScoredAnchoredLink(java.net.URL url,
                          Link backLink,
                          int startPosition)
Constructs a link with specified URL and backLink


ScoredAnchoredLink

public ScoredAnchoredLink(java.lang.String urlName)
Construct a link with specified URL string

Method Detail

getBackLink

public ScoredAnchoredLink getBackLink()
Return backLink for link


getStartPosition

public int getStartPosition()
Return startPosition for link


getEndPosition

public int getEndPosition()
Return endPosition for link


setEndPosition

public void setEndPosition(int endPosition)
Set endPosition for link


getScore

public double getScore()
Overrides:
getScore in class AnchoredLink