protected static boolean contains(Set<String> ids, String propertyId) {
    boolean contains = ids.contains(propertyId);

    if (!contains) {
      String category = PropertyHelper.getPropertyCategory(propertyId);
      while (category != null && !contains) {
        contains = ids.contains(category);
        category = PropertyHelper.getPropertyCategory(category);
      }
    }
    return contains;
  }
Check to see if the given set contains a property or category id that matches the given property id.

@param ids         the set of property/category ids
@param propertyId  the property id

@return true if the given set contains a property id or category that matches the given property id
contrib/ambari-scom/ambari-scom-server/src/main/java/org/apache/ambari/msi/AbstractResourceProvider.java