Class CharacteristicUtils


  • public class CharacteristicUtils
    extends Object
    • Constructor Detail

      • CharacteristicUtils

        public CharacteristicUtils()
    • Method Detail

      • getCategory

        public static Characteristic getCategory​(Characteristic t)
        Create a new characteristic that represents the category of a given characteristic.
      • isUncategorized

        public static boolean isUncategorized​(Characteristic c)
        Check if the given characteristic is uncategorized.
      • isFreeTextCategory

        public static boolean isFreeTextCategory​(Characteristic c)
        Check if the given characteristic has or is a free-text category.
      • isFreeText

        public static boolean isFreeText​(Characteristic c)
        Check if the given characteristic is a free-text value.
      • equals

        public static boolean equals​(String a,
                                     String aUri,
                                     String b,
                                     String bUri)
        Compare a pair of ontology terms.
      • compareTerm

        public static int compareTerm​(String a,
                                      @Nullable
                                      String aUri,
                                      String b,
                                      @Nullable
                                      String bUri)
        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.