public class ConceptWord extends Object implements Serializable, Comparable<ConceptWord>
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
Constructor and Description |
---|
ConceptWord()
default constructor
|
ConceptWord(Concept c,
ConceptName conceptName) |
ConceptWord(String word,
Concept concept,
ConceptName conceptName,
Locale locale)
Convenience constructor
|
ConceptWord(String word,
Concept concept,
ConceptName conceptName,
Locale locale,
String synonym)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ConceptWord word) |
boolean |
equals(Object obj) |
Concept |
getConcept() |
ConceptName |
getConceptName() |
Integer |
getConceptWordId()
Get the unique internal database identifier for this concept word
|
Locale |
getLocale() |
String |
getSynonym()
Deprecated.
this value is not stored anymore
|
static List<String> |
getUniqueWords(String phrase)
Split the given phrase on words and remove unique and stop words
|
Double |
getWeight() |
String |
getWord() |
int |
hashCode() |
void |
increaseWeight(Double i)
Increment the weight by i
|
static Set<ConceptWord> |
makeConceptWords(Concept concept) |
void |
setConcept(Concept concept) |
void |
setConceptName(ConceptName conceptName)
Sets the concept name associated with this word.
|
void |
setConceptWordId(Integer conceptWordId)
Set the unique identifier for this concept word
|
void |
setLocale(Locale locale) |
void |
setSynonym(String synonym)
Deprecated.
this value is not stored anymore
|
void |
setWeight(Double weight) |
void |
setWord(String word) |
static String[] |
splitPhrase(String phrase)
Split words according to OpenmrsConstants.REGEXes, newlines, and spaces
|
String |
toString() |
public static final long serialVersionUID
public ConceptWord()
public ConceptWord(String word, Concept concept, ConceptName conceptName, Locale locale)
word
- the single word that will be matched to search termsconcept
- the concept that is being matched toconceptName
- the specific name that will be matchedlocale
- the locale that is being pulled from@Deprecated public ConceptWord(String word, Concept concept, ConceptName conceptName, Locale locale, String synonym)
ConceptWord(String, Concept, ConceptName, Locale)
public ConceptWord(Concept c, ConceptName conceptName)
public Integer getConceptWordId()
public void setConceptWordId(Integer conceptWordId)
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public Locale getLocale()
public void setLocale(Locale locale)
locale
- The locale to set.@Deprecated public String getSynonym()
@Deprecated public void setSynonym(String synonym)
synonym
- The synonym to set.public String getWord()
public void setWord(String word)
word
- The word to set.public Concept getConcept()
public void setConcept(Concept concept)
concept
- The concept to set.public void setConceptName(ConceptName conceptName)
conceptName
- public ConceptName getConceptName()
public Double getWeight()
public void setWeight(Double weight)
weight
- The weight to set.public void increaseWeight(Double i)
i
- public static Set<ConceptWord> makeConceptWords(Concept concept)
concept
- The concept from which to make the list of concept words.public static List<String> getUniqueWords(String phrase)
phrase
- public static String[] splitPhrase(String phrase)
phrase
- public String toString()
toString
in class Object
Object.toString()
public int compareTo(ConceptWord word)
compareTo
in interface Comparable<ConceptWord>
Comparable.compareTo(java.lang.Object)
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.