|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--infofilter.NewsArticle
The NewsArticle
class defines all the information about a
single news article or web page source.
Field Summary | |
protected java.lang.String |
body
|
protected int |
clusterId
|
protected double |
clusterScore
|
protected int[] |
counts
|
protected java.lang.String |
id
|
protected int |
keywordScore
|
protected double |
predictedRating
|
protected double |
rating
|
protected double |
score
|
protected java.lang.String |
subject
|
protected java.lang.String |
userRating
|
Constructor Summary | |
(package private) |
NewsArticle(java.lang.String id)
Constructs a news article object with specified ID. |
Method Summary | |
java.lang.String |
getBody()
Retrieves the body of this news article. |
int |
getClusterId()
Retrieves the cluster id. |
double |
getClusterScore()
Retrieves the cluster score for this article. |
int |
getKeywordScore()
Retrieves the keyword score for this article. |
double |
getPredictedRating()
Retrieves the predicted rating for this article. |
(package private) java.lang.String |
getProfileString()
Retrieves the profile data, including the raw keyword counts and the numeric user rating, as a string. |
double |
getRating()
Retrieves the rating for this article. |
double |
getScore(int filterType)
Retrieves the current score for the given filter type. |
java.lang.String |
getSubject()
Retrieves the subject of this news article. |
java.lang.String |
getUserRating()
Retrieves the user rating for this article. |
(package private) void |
readArticle(java.lang.String fileName)
Reads a news article from the given file. |
void |
setBody(java.lang.String body)
Sets the body of this news article to the given string. |
void |
setClusterId(int clusterId)
Sets the cluster id for this article. |
void |
setClusterScore(double clusterScore)
Sets the cluster score for this article. |
void |
setKeywordScore(int keywordScore)
Sets the keyword score for this article. |
void |
setPredictedRating(double predictedRating)
Sets the predicted rating for this article. |
void |
setSubject(java.lang.String subject)
Sets the subject of this news article to the given string. |
void |
setUserRating(java.lang.String userRating)
Sets the user rating and the associated rating for this article. |
(package private) void |
writeArticle(java.lang.String fileName)
Writes a news article to the given file. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.lang.String id
protected java.lang.String subject
protected java.lang.String body
protected int[] counts
protected int keywordScore
protected double predictedRating
protected java.lang.String userRating
protected double rating
protected double score
protected int clusterId
protected double clusterScore
Constructor Detail |
NewsArticle(java.lang.String id)
id
- the String object that contains the identifier of the news
articleMethod Detail |
void readArticle(java.lang.String fileName)
fileName
- the String object that contains the name of the filevoid writeArticle(java.lang.String fileName)
fileName
- the String object that contains the name of the filepublic java.lang.String getSubject()
public void setSubject(java.lang.String subject)
subject
- the String object that contains the new subjectpublic java.lang.String getBody()
public void setBody(java.lang.String body)
body
- the String object that contains the new bodypublic int getKeywordScore()
public void setKeywordScore(int keywordScore)
public double getScore(int filterType)
filterType
- the integer that represents the filter typepublic java.lang.String getUserRating()
public double getRating()
public void setClusterScore(double clusterScore)
clusterScore
- the double value for the scorepublic double getClusterScore()
public void setClusterId(int clusterId)
clusterId
- the integer value for the cluster idpublic int getClusterId()
public double getPredictedRating()
public void setPredictedRating(double predictedRating)
the
- double value that is the predicted ratingpublic void setUserRating(java.lang.String userRating)
userRating
- the String object that contains the user ratingjava.lang.String getProfileString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |