org.openmrs
Class ConceptNameTag

java.lang.Object
  extended by org.openmrs.BaseOpenmrsObject
      extended by org.openmrs.ConceptNameTag
All Implemented Interfaces:
java.io.Serializable, Auditable, OpenmrsObject, Voidable

public class ConceptNameTag
extends BaseOpenmrsObject
implements Auditable, Voidable, java.io.Serializable

ConceptNameTag is a textual tag which can be applied to a ConceptName.

See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT
          Name to use when nothing else is available.
static java.lang.String PREFERRED
          Preferred name for a language.
static long serialVersionUID
           
static java.lang.String SHORT
          Short name for a concept.
static java.lang.String SYNONYM
          A different word with similar meaning.
 
Constructor Summary
ConceptNameTag()
          Default constructor.
ConceptNameTag(java.lang.String tag, java.lang.String description)
          Public constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 User getChangedBy()
          Not currently used.
 java.lang.Integer getConceptNameTagId()
           
 User getCreator()
           
 java.util.Date getDateChanged()
          Not currently used.
 java.util.Date getDateCreated()
           
 java.util.Date getDateVoided()
          Returns the Date this ConceptName was voided.
 java.lang.String getDescription()
          Returns the description of this tag.
 java.lang.Integer getId()
           
 java.lang.String getTag()
          Returns the textual representation of this ConceptNameTag.
 java.lang.Boolean getVoided()
          Returns whether the ConceptName has been voided.
 User getVoidedBy()
          Returns the User who voided this ConceptName.
 java.lang.String getVoidReason()
          Returns the reason this ConceptName was voided.
 int hashCode()
           
 java.lang.Boolean isVoided()
          Returns whether the ConceptName has been voided.
static ConceptNameTag preferredCountryTagFor(java.util.Locale locale)
          A factory method which generates a preferred country tag from the country-code portion of a locale.
static ConceptNameTag preferredCountryTagFor(java.lang.String country)
          A factory method that generates strings for preferred country tags.
static ConceptNameTag preferredLanguageTagFor(java.util.Locale locale)
          A factory method for generating a tag which indicates that a name is the preferred term within a particular language.
static ConceptNameTag preferredLanguageTagFor(java.lang.String language)
          A factory method that generates strings for preferred language tags.
 void setChangedBy(User changedBy)
          Not currently used.
 void setConceptNameTagId(java.lang.Integer conceptNameTagId)
           
 void setCreator(User creator)
           
 void setDateChanged(java.util.Date dateChanged)
          Not currently used.
 void setDateCreated(java.util.Date dateCreated)
           
 void setDateVoided(java.util.Date dateVoided)
          Sets the Data this ConceptName was voided.
 void setDescription(java.lang.String description)
          Sets the description of this tag.
 void setId(java.lang.Integer id)
           
 void setTag(java.lang.String tag)
          Sets the textual representation of this ConceptNametag.
 void setVoided(java.lang.Boolean voided)
          Sets the voided status of the ConceptName.
 void setVoidedBy(User voidedBy)
          Sets the User who voided this ConceptName.
 void setVoidReason(java.lang.String voidReason)
          Sets the reason this ConceptName was voided.
static ConceptNameTag shortCountryTagFor(java.util.Locale locale)
          Method that generates a concept name tag based on a specified locale's country code.
static ConceptNameTag shortCountryTagFor(java.lang.String country)
          A factory method that generates strings for short country tags.
static ConceptNameTag shortLanguageTagFor(java.util.Locale locale)
          Method that generates a concept name tag based on a specific locale's language.
static ConceptNameTag shortLanguageTagFor(java.lang.String language)
          A factory method that generates strings for short language tags.
 java.lang.String toString()
           
 
Methods inherited from class org.openmrs.BaseOpenmrsObject
getUuid, setUuid
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openmrs.OpenmrsObject
getUuid, setUuid
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

DEFAULT

public static final java.lang.String DEFAULT
Name to use when nothing else is available.

See Also:
Constant Field Values

SHORT

public static final java.lang.String SHORT
Short name for a concept. Does not indicate any preference for the name.

See Also:
Constant Field Values

SYNONYM

public static final java.lang.String SYNONYM
A different word with similar meaning.

See Also:
Constant Field Values

PREFERRED

public static final java.lang.String PREFERRED
Preferred name for a language. Can be applied to only one name within the set of names within a language.

See Also:
Constant Field Values
Constructor Detail

ConceptNameTag

public ConceptNameTag()
Default constructor.


ConceptNameTag

public ConceptNameTag(java.lang.String tag,
                      java.lang.String description)
Public constructor. Use factory methods to obtain copies of the desired tags.

Parameters:
tag -
description -
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getTag

public java.lang.String getTag()
Returns the textual representation of this ConceptNameTag.

Returns:
the textual representation of this ConceptNameTag.

setTag

public void setTag(java.lang.String tag)
Sets the textual representation of this ConceptNametag.

Parameters:
tag - the textual representation

getDescription

public java.lang.String getDescription()
Returns the description of this tag.

Returns:
the description of this tag

setDescription

public void setDescription(java.lang.String description)
Sets the description of this tag.

Parameters:
description -

getCreator

public User getCreator()
Specified by:
getCreator in interface Auditable
Returns:
Returns the creator.

setCreator

public void setCreator(User creator)
Specified by:
setCreator in interface Auditable
Parameters:
creator - The creator to set.

getDateCreated

public java.util.Date getDateCreated()
Specified by:
getDateCreated in interface Auditable
Returns:
Returns the dateCreated.

setDateCreated

public void setDateCreated(java.util.Date dateCreated)
Specified by:
setDateCreated in interface Auditable
Parameters:
dateCreated - The dateCreated to set.

isVoided

public java.lang.Boolean isVoided()
Returns whether the ConceptName has been voided.

Specified by:
isVoided in interface Voidable
Returns:
true if the ConceptName has been voided, false otherwise.

getVoided

public java.lang.Boolean getVoided()
Returns whether the ConceptName has been voided.

Returns:
true if the ConceptName has been voided, false otherwise.

setVoided

public void setVoided(java.lang.Boolean voided)
Sets the voided status of the ConceptName.

Specified by:
setVoided in interface Voidable
Parameters:
voided - the voided status to set.

getVoidedBy

public User getVoidedBy()
Returns the User who voided this ConceptName.

Specified by:
getVoidedBy in interface Voidable
Returns:
the User who voided this ConceptName, or null if not set

setVoidedBy

public void setVoidedBy(User voidedBy)
Sets the User who voided this ConceptName.

Specified by:
setVoidedBy in interface Voidable
Parameters:
voidedBy - the user who voided this ConceptName.

getDateVoided

public java.util.Date getDateVoided()
Returns the Date this ConceptName was voided.

Specified by:
getDateVoided in interface Voidable
Returns:
the Date this ConceptName was voided.

setDateVoided

public void setDateVoided(java.util.Date dateVoided)
Sets the Data this ConceptName was voided.

Specified by:
setDateVoided in interface Voidable
Parameters:
dateVoided - the date the ConceptName was voided.

getVoidReason

public java.lang.String getVoidReason()
Returns the reason this ConceptName was voided.

Specified by:
getVoidReason in interface Voidable
Returns:
the reason this ConceptName was voided

setVoidReason

public void setVoidReason(java.lang.String voidReason)
Sets the reason this ConceptName was voided.

Specified by:
setVoidReason in interface Voidable
Parameters:
voidReason - the reason this ConceptName was voided

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getConceptNameTagId

public java.lang.Integer getConceptNameTagId()
Returns:
the conceptNameTagId

setConceptNameTagId

public void setConceptNameTagId(java.lang.Integer conceptNameTagId)
Parameters:
conceptNameTagId - the conceptNameTagId to set

preferredLanguageTagFor

public static ConceptNameTag preferredLanguageTagFor(java.util.Locale locale)
A factory method for generating a tag which indicates that a name is the preferred term within a particular language.

Parameters:
locale - locale from which the language component will be used
Returns:
concept-name-tag

preferredCountryTagFor

public static ConceptNameTag preferredCountryTagFor(java.util.Locale locale)
A factory method which generates a preferred country tag from the country-code portion of a locale.

Parameters:
locale - locale from which the country-code will be used
Returns:
concept-name-tag for country, or null if country component wasn't specified in locale

preferredCountryTagFor

public static ConceptNameTag preferredCountryTagFor(java.lang.String country)
A factory method that generates strings for preferred country tags.

Parameters:
country - ISO-3166 two letter country code
Returns:
Returns the ConceptNameTag for the specified country.

preferredLanguageTagFor

public static ConceptNameTag preferredLanguageTagFor(java.lang.String language)
A factory method that generates strings for preferred language tags. The tag will have no description.

Parameters:
language - ISO-639 two letter language code
Returns:
Returns the ConceptNameTag for the specified language.

shortLanguageTagFor

public static ConceptNameTag shortLanguageTagFor(java.util.Locale locale)
Method that generates a concept name tag based on a specific locale's language.

Parameters:
locale -
Returns:
Returns the short language tag for the specified locale's language.

shortCountryTagFor

public static ConceptNameTag shortCountryTagFor(java.util.Locale locale)
Method that generates a concept name tag based on a specified locale's country code.

Parameters:
locale -
Returns:
Returns the short country Name tag for the specified locale's country.

shortCountryTagFor

public static ConceptNameTag shortCountryTagFor(java.lang.String country)
A factory method that generates strings for short country tags.

Parameters:
country - ISO-3166 two letter country code
Returns:
Returns the Name Tag for the specified country code.

shortLanguageTagFor

public static ConceptNameTag shortLanguageTagFor(java.lang.String language)
A factory method that generates strings for short language tags.

Parameters:
language - ISO-639 two letter language code
Returns:
Returns the short language tag for the specified language.

getId

public java.lang.Integer getId()
Specified by:
getId in interface OpenmrsObject
Returns:
id - The unique Identifier for the object
Since:
1.5
See Also:
OpenmrsObject.getId()

setId

public void setId(java.lang.Integer id)
Specified by:
setId in interface OpenmrsObject
Parameters:
id - - The unique Identifier for the object
Since:
1.5
See Also:
OpenmrsObject.setId(java.lang.Integer)

getChangedBy

public User getChangedBy()
Not currently used. Always returns null.

Specified by:
getChangedBy in interface Auditable
Returns:
User - the user who last changed the object
See Also:
Auditable.getChangedBy()

getDateChanged

public java.util.Date getDateChanged()
Not currently used. Always returns null.

Specified by:
getDateChanged in interface Auditable
Returns:
Date - the date the object was last changed
See Also:
Auditable.getDateChanged()

setChangedBy

public void setChangedBy(User changedBy)
Not currently used.

Specified by:
setChangedBy in interface Auditable
Parameters:
changedBy - - the user who last changed the object
See Also:
Auditable.setChangedBy(org.openmrs.User)

setDateChanged

public void setDateChanged(java.util.Date dateChanged)
Not currently used.

Specified by:
setDateChanged in interface Auditable
Parameters:
dateChanged - - the date the object was last changed
See Also:
Auditable.setDateChanged(java.util.Date)

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change