org.jbox.dao
Class Word

java.lang.Object
  extended by org.jbox.dao.Word

public class Word
extends java.lang.Object

A class represents a word.

The data mapping details refer to "Word.hbm.xml".

Version:
1.0
Author:
YiBin.H
See Also:
WordHome

Constructor Summary
Word()
          Constructs a new Word.
 
Method Summary
 void addLocation(int loc)
          Add a location to Word.
 long getId()
          Return id of Word in data base.
 java.lang.String getIndex()
          Return index of a word.
 java.util.Collection<java.lang.Integer> getLocations()
          Return locations of Word in a Page.
 double getTf()
          Return TF of Word in a page.
 java.lang.String getWordStr()
          Return String of Word.
 void setId(long id)
          Set id of Word.
 void setIndex(java.lang.String index)
          Set index of Word.
 void setTf(double tf)
          Set TF of Word.
 void setWordStr(java.lang.String wordStr)
          Set String of Word.
 java.lang.String toString()
          Return a string representing Word.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Word

public Word()
Constructs a new Word.

Method Detail

getIndex

public java.lang.String getIndex()
Return index of a word.

Returns:
String representing index of Word.

setIndex

public void setIndex(java.lang.String index)
Set index of Word.

Parameters:
index - String representing index of Word.

getTf

public double getTf()
Return TF of Word in a page.

Returns:
double value representing TF of a Word in a page.

setTf

public void setTf(double tf)
Set TF of Word.

Parameters:
tf - double value representing TF of Word.

getWordStr

public java.lang.String getWordStr()
Return String of Word. This method is the same with toString().

Returns:
a string representing Word.

setWordStr

public void setWordStr(java.lang.String wordStr)
Set String of Word.

Parameters:
wordStr - string representing a Word.

getLocations

public java.util.Collection<java.lang.Integer> getLocations()
Return locations of Word in a Page.

Returns:
Integer collection representing locations of the word in a Page

addLocation

public void addLocation(int loc)
Add a location to Word.

Parameters:
loc - integer value representing locations of the word in a Page.

toString

public java.lang.String toString()
Return a string representing Word.

Overrides:
toString in class java.lang.Object
Returns:
String representing Word.

getId

public long getId()
Return id of Word in data base.

Returns:
long value representing id of Word in data base.

setId

public void setId(long id)
Set id of Word.

Parameters:
id - long value representing id of Word.