|
Twease | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.cornell.med.icb.synonyms.entities.Synonym
public class Synonym
The Synonym object, for persistence via JPA. Defining the Table-name annotation is important because Oracle cannot create a table named "Synonym".
| Field Summary | |
|---|---|
static String |
APPLIES_TO_ALL
AppliesTo field value when a synonym applies to all. |
static String[] |
CREATE_INDEX_COMMANDS
Commands required to index this data. |
static String[] |
DROP_INDEX_COMMANDS
Commands required to remove the indexes for this data. |
| Constructor Summary | |
|---|---|
Synonym(String dictionaryWordVal,
String synonymWordVal,
double scoreVal,
String appliesToVal,
String sourceVal)
General constructor for creating a new synonym. |
|
| Method Summary | |
|---|---|
String |
getAppliesTo()
Getter for AppliesTo. |
String |
getDictionaryWord()
Getter for DictionaryWord. |
Long |
getId()
Getter for Id. |
Date |
getImportDate()
Getter for ImportDate. |
double |
getScore()
Getter for Score. |
String |
getSource()
Getter for Source. |
String |
getSynonymWord()
Getter for SynonymWord. |
boolean |
isEquivalent(Synonym synonym)
Returns true if this synonym and the suggested on are the same, ignoring the id and the import date. |
static boolean |
listContainsSynonym(List<Synonym> synonyms,
Synonym toFind)
Searches a list of synonyms. |
String |
toString()
Human readable version of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String APPLIES_TO_ALL
public static final String[] DROP_INDEX_COMMANDS
public static final String[] CREATE_INDEX_COMMANDS
| Constructor Detail |
|---|
public Synonym(String dictionaryWordVal,
String synonymWordVal,
double scoreVal,
String appliesToVal,
String sourceVal)
dictionaryWordVal - the dictionary word it applies tosynonymWordVal - the sysnonym for the dictionary wordscoreVal - the scoring (how well the synonym applies)appliesToVal - which application this synonym applies to, or "*" if
it apples to any applicationsourceVal - the source of the synonym| Method Detail |
|---|
public Long getId()
public String getDictionaryWord()
public String getSynonymWord()
public double getScore()
public String getAppliesTo()
public String getSource()
public Date getImportDate()
public boolean isEquivalent(Synonym synonym)
synonym - the Synonym to compare to
public static boolean listContainsSynonym(List<Synonym> synonyms,
Synonym toFind)
synonyms - the list of synonyms to searchtoFind - the synonym to look for in the list
public String toString()
toString in class Object
|
Twease | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||