Class Characteristic
- java.lang.Object
-
- ubic.gemma.model.common.AbstractDescribable
-
- ubic.gemma.model.common.description.Characteristic
-
- All Implemented Interfaces:
Serializable
,Describable
,Identifiable
@Indexed public class Characteristic extends AbstractDescribable implements Serializable
Instances of this are used to describe other entities. This base class is just a characteristic that is simply a 'tag' of free text.Characteristics can have an associated URI from an ontology from
getCategoryUri()
andgetValueUri()
, but not necessarily since there might not be an adequate term to represent the conveyed concept. These properties are marked withNullable
and should always be handled with care.- Author:
- Paul
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Characteristic.Factory
-
Constructor Summary
Constructors Constructor Description Characteristic()
No-arg constructor added to satisfy javabean contract
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
Returnstrue
if the argument is an Describable instance and all identifiers for this entity equal the identifiers of the argument entity.static Comparator<Characteristic>
getByCategoryAndValueComparator()
Obtain a comparator to order terms by value URI (or value if null) in a case-insensitive manner.static Comparator<Characteristic>
getByCategoryComparator()
Obtain a comparator to compare terms by category URI (or category if null) in a case-insensitive manner.String
getCategory()
String
getCategoryUri()
GOEvidenceCode
getEvidenceCode()
Long
getId()
String
getOriginalValue()
String
getValue()
String
getValueUri()
int
hashCode()
Returns a hash code based on this entity's identifiers.void
setCategory(String category)
void
setCategoryUri(String categoryUri)
void
setEvidenceCode(GOEvidenceCode evidenceCode)
void
setOriginalValue(String originalValue)
void
setValue(String value)
void
setValueUri(String uri)
String
toString()
-
Methods inherited from class ubic.gemma.model.common.AbstractDescribable
getDescription, getName, setDescription, setId, setName
-
-
-
-
Method Detail
-
getByCategoryComparator
public static Comparator<Characteristic> getByCategoryComparator()
Obtain a comparator to compare terms by category URI (or category if null) in a case-insensitive manner.
-
getByCategoryAndValueComparator
public static Comparator<Characteristic> getByCategoryAndValueComparator()
Obtain a comparator to order terms by value URI (or value if null) in a case-insensitive manner.
-
getId
@DocumentId public Long getId()
- Specified by:
getId
in interfaceIdentifiable
- Overrides:
getId
in classAbstractDescribable
-
getCategory
@Field public String getCategory()
- Returns:
- either the human readable form of the classUri or a free text version if no classUri exists
-
setCategory
public void setCategory(String category)
-
getCategoryUri
@Nullable @Field(analyze=NO) public String getCategoryUri()
- Returns:
- The URI of the class that this is an instance of. Will only be different from the termUri when the class is effectively abstract, and this is a concrete instance. By putting the abstract class URI in the object we can more readily group together Characteristics that are instances of the same class. For example: If the classUri is "Sex", then the termUri might be "male" or "female" for various instances. Otherwise, the classUri and the termUri can be the same; for example, for "Age", if the "Age" is defined through its properties declared as associations with this.
-
getEvidenceCode
public GOEvidenceCode getEvidenceCode()
-
setEvidenceCode
public void setEvidenceCode(GOEvidenceCode evidenceCode)
-
getOriginalValue
public String getOriginalValue()
- Returns:
- the originalValue
-
setOriginalValue
public void setOriginalValue(String originalValue)
-
getValue
@Field public String getValue()
- Returns:
- The human-readable term (e.g., "OrganismPart"; "kinase")
-
setValue
public void setValue(String value)
-
getValueUri
@Nullable @Field(analyze=NO) public String getValueUri()
- Returns:
- This can be a URI to any resources that describes the characteristic. Often it might be a URI to an OWL ontology term. If the URI is an instance of an abstract class, the classUri should be filled in with the URI for the abstract class.
-
hashCode
public int hashCode()
Description copied from class:AbstractDescribable
Returns a hash code based on this entity's identifiers.- Overrides:
hashCode
in classAbstractDescribable
-
equals
public boolean equals(Object object)
Description copied from class:AbstractDescribable
Returnstrue
if the argument is an Describable instance and all identifiers for this entity equal the identifiers of the argument entity. Returnsfalse
otherwise.- Overrides:
equals
in classAbstractDescribable
-
toString
public String toString()
- Overrides:
toString
in classAbstractDescribable
- See Also:
AbstractDescribable.toString()
-
-