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