|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.unimi.dico.islab.idbs2.kc.Term
public class Term
Representation of a keyword of a KnowledgeChunk
with associated relevance and frequency.
This is in fact an association between a keyword and a knowledge chunk from which the keyword has been extracted.
The same keyword could appear in more than one Term
instance, every time connected with different
KnowledgeChunk
s and, possibly, different frequency and relevance.
KnowledgeChunk
Constructor Summary | |
---|---|
protected |
Term()
Only Hibernate and KnowledgeChunk are able to instantiate this object. |
protected |
Term(KnowledgeChunk kc,
String value,
double relevance,
Integer frequency)
Direct use of this constructor is discouraged. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
Integer |
getFrequency()
Getter for the frequency field. |
Integer |
getId()
Getter for the identifier of this object in the linked database. |
KnowledgeChunk |
getKc()
Getter for the kc field. |
Double |
getRelevance()
Getter for the relevance field. |
String |
getValue()
Getter for the keyword value. |
int |
hashCode()
|
void |
setFrequency(Integer frequency)
Setter for the frequency field. |
protected void |
setId(Integer id)
Method used by Hibernate to import database objects. |
void |
setKc(KnowledgeChunk kc)
Setter for the kc field. |
void |
setRelevance(Double relevance)
Setter for the relevance field. |
protected void |
setValue(String termValue)
Setter for the keyword value. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Term()
protected Term(KnowledgeChunk kc, String value, double relevance, Integer frequency)
Direct use of this constructor is discouraged. Use KnowledgeChunk.addTerm
instead.
kc
- the belonging KnowledgeChunk
value
- the real term in string representation.relevance
- the relevance of this keyword(term) for kc
frequency
- the frequency of this keyword(term) for kc
KnowledgeChunk.addTerm(String, Double, Integer)
Method Detail |
---|
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String getValue()
Getter for the keyword value.
Term
instance.protected void setValue(String termValue)
Setter for the keyword value.
termValue
- a string representing the keyword wrapped by this Term
instance.public Integer getId()
Getter for the identifier of this object in the linked database.
protected void setId(Integer id)
Method used by Hibernate to import database objects. Direct use is discouraged.
id
- public Integer getFrequency()
Getter for the frequency
field.
kc
.public void setFrequency(Integer frequency)
Setter for the frequency
field.
frequency
- the frequency of this term wrapper as the number of its occurrences in kc
.public KnowledgeChunk getKc()
Getter for the kc
field.
value
keyword.public void setKc(KnowledgeChunk kc)
Setter for the kc
field.
kc
- the kc owner of the value
keyword.public void setRelevance(Double relevance)
Setter for the relevance
field.
relevance
- the relevance of the wrapped term for the kc
.public Double getRelevance()
Getter for the relevance
field.
kc
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |