public boolean checkForParams(final ParsedURL purl) {
    if (params != null) {
      HashMap<String, String> purlParams = purl.extractParams(true);
      for (MetaMetadataSelectorParam param : params) {
        String paramName = param.getName();
        String paramValue = param.getValue();
        String paramValueIsNot = param.getValueIsNot();
        String actualValue = purlParams == null ? null : purlParams.get(paramName);
        if (actualValue == null) {
          actualValue = "";
        }

        if (paramValue != null && paramValue.length() > 0) {

          boolean allowEmptyAndIsEmpty = param.isAllowEmptyValue() && actualValue.length() == 0;
          if (!allowEmptyAndIsEmpty && !paramValue.equals(actualValue)) {
            return false;
          }
        }

        if (paramValueIsNot != null && paramValueIsNot.length() > 0) {
          if (paramValueIsNot.equals(actualValue)) {
            return false;
          }
        }
      }
    }
    return true;
  }
 void addParam(MetaMetadataSelectorParam param) {
   if (params == null) params = new HashMapArrayList<String, MetaMetadataSelectorParam>();
   params.put(param.getName(), param);
 }