class BaseProvider {

  protected Set<String> getRequestPropertyIds(Request request, Predicate predicate) {
    Set<String> propertyIds  = request.getPropertyIds();

    // if no properties are specified, then return them all
    if (propertyIds == null || propertyIds.isEmpty()) {
      return new HashSet<>(this.propertyIds);
    }

    propertyIds = new HashSet<>(propertyIds);

    if (predicate != null) {
      propertyIds.addAll(PredicateHelper.getPropertyIds(predicate));
    }

    if (!combinedIds.containsAll(propertyIds)) {
      Set<String> keepers = new HashSet<>();
      Set<String> unsupportedPropertyIds = new HashSet<>(propertyIds);
      unsupportedPropertyIds.removeAll(combinedIds);

      for (String unsupportedPropertyId : unsupportedPropertyIds) {
        if (checkCategory(unsupportedPropertyId) || checkRegExp(unsupportedPropertyId)) {
          keepers.add(unsupportedPropertyId);
        }
      }
      propertyIds.retainAll(combinedIds);
      propertyIds.addAll(keepers);
    }
    return propertyIds;
  }

  public  BaseProvider(Set<String> propertyIds);

}