|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxsmeral.semnet.crawler.model.URLEntry
public class URLEntry
The main entity used by URLManager
.
Contains:
Field Summary | |
---|---|
static int |
DAY_SEC
Number of seconds in a day. |
static int |
DEF_ENTITY_UPDATE
Default update frequency for entity URLs. |
static int |
DEF_SOURCE_UPDATE
Default update frequency for source URLs. |
static short |
SCORE_MIN
The lower bound of score. |
static int |
UPDATE_DAY
Daily update frequency. |
static int |
UPDATE_MONTH
Monthly (30 days) update frequency. |
static int |
UPDATE_WEEK
Weekly update frequency. |
static int |
UPDATE_YEAR
Yearly (365 days) update frequency. |
Constructor Summary | |
---|---|
URLEntry()
|
|
URLEntry(int id,
String host,
String path,
Date lastVisited,
int visitCount,
int updateFreq,
boolean entity,
String pattern,
boolean working,
short score)
This constructor is meant to be called only by URLManager, which populates it with values from DB. |
|
URLEntry(String host,
String path,
Date lastVisited,
int visitCount,
int updateFreq,
boolean entity,
String pattern,
boolean working,
short score)
This constructor is used to create instances that are to be added to DB using URLManager. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getHost()
Returns host path of the URL. |
int |
getId()
Returns ID (generated by DB). |
Date |
getLastVisited()
Returns Date indicating when this URL has been last visited by the crawler. |
String |
getPath()
Returns path part of the URL, relative to the host name. |
String |
getPattern()
Returns a regex pattern (as a string) that matches path of this URL and identifies the corresponding EntityDescriptor. |
short |
getScore()
Returns a number indicating likelihood of the URL to work. |
int |
getUpdateFreq()
Returns update frequency in seconds. |
String |
getUrl()
Returns the full URL. |
int |
getVisitCount()
Returns number of times this URL has been visited by the crawler. |
int |
hashCode()
|
boolean |
isEntity()
Indicates whether this URL represents an entity or a source URL. |
boolean |
isWorking()
Indicates whether this URL is working (whether there were any errors during last visit by crawler). |
void |
setEntity(boolean entity)
|
void |
setHost(String host)
|
void |
setId(int id)
|
void |
setLastVisited(Date lastVisited)
|
void |
setPath(String path)
|
void |
setPattern(String pattern)
|
void |
setScore(short score)
|
void |
setUpdateFreq(int updateFreq)
|
void |
setVisitCount(int visitCount)
|
void |
setWorking(boolean working)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEF_ENTITY_UPDATE
public static final int DEF_SOURCE_UPDATE
public static final int DAY_SEC
public static final int UPDATE_DAY
public static final int UPDATE_WEEK
public static final int UPDATE_MONTH
public static final int UPDATE_YEAR
public static final short SCORE_MIN
Constructor Detail |
---|
public URLEntry()
public URLEntry(int id, String host, String path, Date lastVisited, int visitCount, int updateFreq, boolean entity, String pattern, boolean working, short score)
URLManager
public URLEntry(String host, String path, Date lastVisited, int visitCount, int updateFreq, boolean entity, String pattern, boolean working, short score)
URLManager
Method Detail |
---|
public int getId()
URLManager
public void setId(int id)
public Date getLastVisited()
public void setLastVisited(Date lastVisited)
public int getUpdateFreq()
public void setUpdateFreq(int updateFreq)
public String getUrl()
public String getHost()
public void setHost(String host)
public String getPath()
public void setPath(String path)
public int getVisitCount()
public void setVisitCount(int visitCount)
public boolean isEntity()
public void setEntity(boolean entity)
public String getPattern()
EntityDescriptor
public void setPattern(String pattern)
public boolean isWorking()
public void setWorking(boolean working)
public short getScore()
public void setScore(short score)
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |