@Indexed @AnalyzerDef(name="ConceptNameAnalyzer",tokenizer=@TokenizerDef(factory=org.apache.lucene.analysis.standard.StandardTokenizerFactory.class),filters={@TokenFilterDef(factory=org.apache.lucene.analysis.standard.StandardFilterFactory.class),@TokenFilterDef(factory=org.apache.lucene.analysis.core.LowerCaseFilterFactory.class),@TokenFilterDef(factory=org.apache.lucene.analysis.miscellaneous.ASCIIFoldingFilterFactory.class)}) @Analyzer(definition="ConceptNameAnalyzer") public class ConceptName extends BaseOpenmrsObject implements Auditable, Voidable, Serializable
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
Constructor and Description |
---|
ConceptName()
default constructor
|
ConceptName(Integer conceptNameId)
Convenience constructor to create a ConceptName object by primary key
|
ConceptName(String name,
Locale locale) |
Modifier and Type | Method and Description |
---|---|
void |
addTag(ConceptNameTag tag)
Attaches a tag to the concept name.
|
void |
addTag(String tag)
Adds a tag to the concept name.
|
void |
addTag(String tag,
String description)
Adds a tag to the concept name.
|
User |
getChangedBy() |
Concept |
getConcept() |
Integer |
getConceptNameId() |
ConceptNameType |
getConceptNameType() |
User |
getCreator() |
Date |
getDateChanged() |
Date |
getDateCreated() |
Date |
getDateVoided()
Returns the Date this ConceptName was voided.
|
Integer |
getId() |
Locale |
getLocale() |
Boolean |
getLocalePreferred() |
String |
getName() |
Collection<ConceptNameTag> |
getTags()
Returns the tags which have been attached to this ConceptName.
|
Boolean |
getVoided()
Returns whether the ConceptName has been voided.
|
User |
getVoidedBy()
Returns the User who voided this ConceptName.
|
String |
getVoidReason()
Returns the reason this ConceptName was voided.
|
Boolean |
hasTag(ConceptNameTag tagToFind)
Checks whether the name has a particular tag.
|
Boolean |
hasTag(String tagToFind)
Checks whether the name has a particular tag.
|
Boolean |
isFullySpecifiedName()
Checks whether the concept name is explicitly marked as fully specified
|
Boolean |
isIndexTerm()
Convenience method for checking whether this is an index Term.
|
Boolean |
isIndexTermInLocale(Locale locale)
Convenience method for determining whether this is an index Term for a given locale.
|
Boolean |
isLocalePreferred()
Deprecated.
as of 2.0, use
getLocalePreferred() |
Boolean |
isPreferred()
Checks whether the name is explicitly marked as preferred for any locale.
|
Boolean |
isPreferredForLocale(Locale locale)
Checks whether the name is explicitly marked as preferred for the given locale
|
Boolean |
isPreferredInCountry(String country)
Checks whether the name is explicitly marked as preferred in a locale with a matching country
code E.g 'fr_RW' and 'en_RW' for country RW
|
Boolean |
isPreferredInLanguage(String language)
Checks whether the name is explicitly marked as preferred in a locale with a matching
language.
|
Boolean |
isShort()
Convenience method for determining whether this is a short name.
|
Boolean |
isSynonym()
Convenience method for checking whether this is a a synonym.
|
Boolean |
isSynonymInLocale(Locale locale)
Convenience method for determining whether this is a synonym in a given locale.
|
Boolean |
isVoided()
Deprecated.
as of 2.0, use
getVoided() |
void |
removeTag(ConceptNameTag tag)
Removes a tag from the concept name.
|
void |
setChangedBy(User changedBy) |
void |
setConcept(Concept concept) |
void |
setConceptNameId(Integer conceptNameId) |
void |
setConceptNameType(ConceptNameType conceptNameType) |
void |
setCreator(User creator) |
void |
setDateChanged(Date dateChanged) |
void |
setDateCreated(Date dateCreated) |
void |
setDateVoided(Date dateVoided)
Sets the Data this ConceptName was voided.
|
void |
setId(Integer id) |
void |
setLocale(Locale locale) |
void |
setLocalePreferred(Boolean localePreferred) |
void |
setName(String name) |
void |
setTags(Collection<ConceptNameTag> tags)
Set the tags which are attached to this ConceptName.
|
void |
setVoided(Boolean voided)
Sets the voided status of this ConceptName.
|
void |
setVoidedBy(User voidedBy)
Sets the User who voided this ConceptName.
|
void |
setVoidReason(String voidReason)
Sets the reason this ConceptName was voided.
|
String |
toString()
Returns a string equal to the value of: ClassName{hashCode=...,
uuid=...}
|
equals, getUuid, hashCode, setUuid
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getUuid, setUuid
public static final long serialVersionUID
public ConceptName()
public ConceptName(Integer conceptNameId)
conceptNameId
- public Integer getConceptNameId()
public void setConceptNameId(Integer conceptNameId)
conceptNameId
- The conceptId to set.public Concept getConcept()
public void setConcept(Concept concept)
public String getName()
public void setName(String name)
public Locale getLocale()
public void setLocale(Locale locale)
public User getCreator()
getCreator
in interface Creatable
public void setCreator(User creator)
setCreator
in interface Creatable
creator
- The creator to set.public Date getDateCreated()
getDateCreated
in interface Creatable
public void setDateCreated(Date dateCreated)
setDateCreated
in interface Creatable
dateCreated
- The dateCreated to set.@Deprecated public Boolean isVoided()
getVoided()
public Boolean getVoided()
public void setVoided(Boolean voided)
public User getVoidedBy()
getVoidedBy
in interface Voidable
public void setVoidedBy(User voidedBy)
setVoidedBy
in interface Voidable
voidedBy
- the user who voided this ConceptName.public Date getDateVoided()
getDateVoided
in interface Voidable
public void setDateVoided(Date dateVoided)
setDateVoided
in interface Voidable
dateVoided
- the date the ConceptName was voided.public String getVoidReason()
getVoidReason
in interface Voidable
public void setVoidReason(String voidReason)
setVoidReason
in interface Voidable
voidReason
- the reason this ConceptName was voidedpublic Collection<ConceptNameTag> getTags()
public void setTags(Collection<ConceptNameTag> tags)
tags
- the tags to set.Concept.setPreferredName(ConceptName)
,
Concept.setFullySpecifiedName(ConceptName)
,
Concept.setShortName(ConceptName)
public ConceptNameType getConceptNameType()
public void setConceptNameType(ConceptNameType conceptNameType)
conceptNameType
- the conceptNameType to set@Deprecated public Boolean isLocalePreferred()
getLocalePreferred()
public Boolean getLocalePreferred()
public void setLocalePreferred(Boolean localePreferred)
localePreferred
- the localePreferred to setpublic void addTag(String tag)
tag
- human-readable text string for the tagConcept.setPreferredName(ConceptName)
,
Concept.setFullySpecifiedName(ConceptName)
,
Concept.setShortName(ConceptName)
public void addTag(String tag, String description)
tag
- human-readable text string for the tagdescription
- description of the tag's purposeConcept.setPreferredName(ConceptName)
,
Concept.setFullySpecifiedName(ConceptName)
,
Concept.setShortName(ConceptName)
public void addTag(ConceptNameTag tag)
tag
- the tag to addConcept.setPreferredName(ConceptName)
,
Concept.setFullySpecifiedName(ConceptName)
,
Concept.setShortName(ConceptName)
public void removeTag(ConceptNameTag tag)
tag
- the tag to removeConcept.setPreferredName(ConceptName)
,
Concept.setFullySpecifiedName(ConceptName)
,
Concept.setShortName(ConceptName)
public Boolean hasTag(ConceptNameTag tagToFind)
tagToFind
- the tag for which to checkisPreferred()
,
isFullySpecifiedName()
,
isIndexTerm()
,
isSynonym()
,
isShort()
public Boolean hasTag(String tagToFind)
tagToFind
- the string of the tag for which to checkisPreferred()
,
isFullySpecifiedName()
,
isIndexTerm()
,
isSynonym()
,
isShort()
public Boolean isPreferredInLanguage(String language)
language
- ISO 639 2-letter code for a languageisPreferredForLocale(Locale)
public Boolean isPreferredInCountry(String country)
country
- ISO 3166 2-letter code for a countryisPreferredForLocale(Locale)
public Boolean isPreferred()
isPreferredForLocale(Locale)
in that it checks if the given
name is marked as preferred irrespective of the locale in which it is preferred.isPreferredForLocale(Locale)
public Boolean isPreferredForLocale(Locale locale)
locale
- the locale in which the name is preferredpublic Boolean isFullySpecifiedName()
public Boolean isShort()
public Boolean isIndexTerm()
public Boolean isIndexTermInLocale(Locale locale)
locale
- The locale in which this concept name should belong as an index termpublic Boolean isSynonymInLocale(Locale locale)
locale
- The locale in which this synonym should belongpublic Boolean isSynonym()
public String toString()
BaseOpenmrsObject
ClassName{hashCode=..., uuid=...}
If the uuid
field is null
, it returns:
ClassName{hashCode=...}Should include hashCode if uuid is null Should include uuid if not null
toString
in class BaseOpenmrsObject
Object.toString()
public Integer getId()
getId
in interface OpenmrsObject
OpenmrsObject.getId()
public void setId(Integer id)
setId
in interface OpenmrsObject
id
- - The unique Identifier for the objectOpenmrsObject.setId(java.lang.Integer)
public User getChangedBy()
getChangedBy
in interface Changeable
public void setChangedBy(User changedBy)
setChangedBy
in interface Changeable
changedBy
- The user that changed this objectpublic Date getDateChanged()
getDateChanged
in interface Changeable
public void setDateChanged(Date dateChanged)
setDateChanged
in interface Changeable
dateChanged
- The date this object was changedCopyright © 2024 OpenMRS Inc.. All rights reserved.