|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jbox.dao.Page
org.jbox.searcher.simpleSearcher.PageProxy
public class PageProxy
A proxy of Page.
This class is used to change the behavior of Page.getText().
It will return an introduction instead of returning
the whole text of page.
object.
Page,
SimpleSearcher,
Serialized Form| Constructor Summary | |
|---|---|
PageProxy()
Constructs a new PageProxy object. |
|
| Method Summary | |
|---|---|
void |
addLocation(java.util.Set<java.lang.Integer> location)
Add locations of words in relative <@link Page> object. |
java.util.Set<java.lang.Integer> |
getLocation()
Get locations of words in relative <@link Page> object. |
Page |
getPage()
Return relative <@link Page> object. |
long |
getPageId()
Get id of the relative <@link Page Page> object. |
java.lang.String |
getText()
Return an introduction of page instead of returning a whole text of page. |
double |
getTFIDF()
Get TFIDF of relative <@link Page> object. |
java.lang.String |
getTitle()
Return title of relative <@link Page> object. |
java.lang.String |
getUrl()
Return the URL of relative <@link Page> object. |
long |
getUrlId()
Return id of relative <@link Page> object. |
int |
getWordNum()
Return the words number of relative page. |
java.util.Collection<Word> |
getWords()
Return a collection containing Word objects of Page. |
void |
setLocation(java.util.Set<java.lang.Integer> location)
Set location of words to relative <@link Page> object. |
void |
setPage(Page page)
Set a <@link Page> object to this PageProxy. |
void |
setPageId(long pageId)
Set id of relative <@link Page> object. |
void |
setText(java.lang.String text)
Set text to the relative <@link Page> object. |
void |
setTfidf(double tfidf)
Set TFIDF of relative <@link Page> object. |
void |
setTitle(java.lang.String title)
Set title to relative <@link Page> object. |
void |
setUrl(java.lang.String url)
Set a URL to relative <@link Page> object. |
void |
setUrlId(long urlId)
Set id to relative <@link Page> object. |
void |
setWordNum(int wordNum)
Set words number to relative <@link Page> object. |
void |
setWords(java.util.Collection<Word> words)
Set a collection containing Word object. |
java.lang.String |
toString()
Return URL of relative <@link Page> object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PageProxy()
PageProxy object.
| Method Detail |
|---|
public void setLocation(java.util.Set<java.lang.Integer> location)
location - locations of words in relative<@link Page> object.public java.util.Set<java.lang.Integer> getLocation()
public void addLocation(java.util.Set<java.lang.Integer> location)
public long getPageId()
public void setPageId(long pageId)
pageId - id of relative <@link Page> object.public double getTFIDF()
public void setTfidf(double tfidf)
tfidf - TFIDF of relative <@link Page> object.public java.lang.String getText()
Page.getText().
For example, suppose that the text of relative <@link Page> object is:
"She has a dog. I have a dog too. John hasn't. He doesn't like dog.".
Locations of word "dog" in the text is {0,1,3}, so the introduction is:
"She has a dog...I have a dog too...He doesn't like dog...".
If the size of locations is bigger than 3, it will just return the first
three sentences in the text with locations.
getText in class Pagepublic Page getPage()
public void setPage(Page page)
PageProxy.
page - <@link Page Page> object.public java.lang.String getTitle()
getTitle in class Pagepublic void setTitle(java.lang.String title)
setTitle in class Pagetitle - Stringpublic java.lang.String getUrl()
getUrl in class Pagepublic void setUrl(java.lang.String url)
setUrl in class Pageurl - String representing a URL.public void setText(java.lang.String text)
setText in class Pagetext - String.public int getWordNum()
getWordNum in class Pagepublic void setWordNum(int wordNum)
setWordNum in class PagewordNum - Integerpublic long getUrlId()
getUrlId in class Pagepublic void setUrlId(long urlId)
setUrlId in class PageurlId - long value.public java.util.Collection<Word> getWords()
Word objects of Page.
getWords in class PageWord objects.public void setWords(java.util.Collection<Word> words)
Word object.
It should be noticed that the collection isn't updated to database
when invoking PageHome.savePage(Page).
setWords in class Pagewords - Collection containing Word objects.public java.lang.String toString()
toString in class Page
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||