SemanticTags { @SuppressWarnings("unchecked") public static @Nullable Class<? extends Property> getProperty(Item item) { Set<String> tags = item.getTags(); for (String tag : tags) { Class<? extends Tag> type = getById(tag); if (type != null && Property.class.isAssignableFrom(type)) { return (Class<? extends Property>) type; } } return null; }  static @Nullable Class<? extends Tag> getById(String tagId); static @Nullable Class<? extends Tag> getByLabel(String tagLabel, Locale locale); static List<Class<? extends Tag>> getByLabelOrSynonym(String tagLabelOrSynonym, Locale locale); static List<String> getLabelAndSynonyms(Class<? extends Tag> tag, Locale locale); static String getLabel(Class<? extends Tag> tag, Locale locale); static @Nullable Class<? extends Tag> getSemanticType(Item item); @SuppressWarnings("unchecked") static @Nullable Class<? extends Property> getProperty(Item item);  }
@Test public void testGetProperty() { assertEquals(Temperature.class, SemanticTags.getProperty(pointItem)); }