Class CharacteristicUtils
java.lang.Object
ubic.gemma.model.common.description.CharacteristicUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcompareTerm(String a, String aUri, String b, String bUri) Compare a pair of ontology terms.static booleanCompare a pair of ontology terms.static CategoryCreate a new characteristic that represents the category of a given characteristic.static Characteristicstatic StringgetNormalizedValue(Characteristic characteristic) Normalize a characteristic by value.static booleanhasAnyValue(Characteristic c, Value... values) Check if the given characteristic has any of the specified values.static booleanhasCategory(Characteristic c, Category category) Check if a given characteristics has a specific category.static booleanhasValue(Characteristic c, Value value) Check if the given characteristic has a particular value.static booleanCheck if the given characteristic is a free-text value.static booleanCheck if the given characteristic has or is a free-text category.static booleanCheck if the given characteristic is uncategorized.
-
Constructor Details
-
CharacteristicUtils
public CharacteristicUtils()
-
-
Method Details
-
getNormalizedValue
Normalize a characteristic by value.This is obtained by taking the value URI or value if the former is null and converting it to lowercase.
-
hasCategory
Check if a given characteristics has a specific category.Comparisons are performed as per
equals(String, String, String, String). -
getCategory
Create a new characteristic that represents the category of a given characteristic. -
getCategoryAsCharacteristic
-
hasValue
Check if the given characteristic has a particular value. -
hasAnyValue
Check if the given characteristic has any of the specified values. -
isUncategorized
Check if the given characteristic is uncategorized. -
isFreeTextCategory
Check if the given characteristic has or is a free-text category. -
isFreeText
Check if the given characteristic is a free-text value. -
equals
Compare a pair of ontology terms. -
compareTerm
Compare a pair of ontology terms.Terms are sorted by label and then URI. If two term have an identical URI, this method will return zero regardless of the label.
All URI and label comparisons are case-insensitive.
-