code: public static String escapeRuleId(Rule rule) {
          return rule != null ? rule.getId().replaceAll("\\:", "_") : null;
      }
docs: Escape the id of the given rule in a way such that it can be used as file
  name.
  
  @param rule
  The rule.
  @return The escaped name.