code: private String getPID(String name) throws PolicyStoreException {
  
          String pid;
          // only bootstrap policies specify the PID namespace, all others follow the config
          if (name.startsWith(FESL_BOOTSTRAP_POLICY_NAMESPACE + ":")) {
              pid = name;
          } else {
              // TODO: would be nice to have the PID class contain a method for this
              // (could be used as a generic method instead of the from-filename etc methods)
  
              // name might contain non-legal PID characters so encode them
              StringBuffer out = new StringBuffer();
              for (int i = 0; i < name.length(); i++) {
                  char c = name.charAt(i);
                  // valid pid characters
                  if (isAlphaNum(c) || c == '-' || c == '.' || c == '~'
                      || c == '_') {
                  out.append(c);
                  } else {
                      // do each byte
                      // FIXME: percent-encoding causing various issues
                      // (not least with web admin client)
                      out.append("_");
                      /*
                      byte[] bytes;
                      try {
                          bytes = Character.toString(c).getBytes("UTF-8");
                      } catch (UnsupportedEncodingException e) {
                          // should never happen
                          throw new RuntimeException(e);
                      }
                      for (byte b : bytes ) {
                          // percent-encode the byte
                          out.append("%");
                          out.append(hexChar[(b >>> 4) & 0xf]);
                          out.append(hexChar[b & 0xf]);
                      }
                      */
                  }
              }
              pid = pidNamespace + ":" + out.toString();
          }
  
          try {
              // just in case...
              return PID.normalize(pid);
          } catch (MalformedPIDException e) {
              throw new PolicyStoreException("Invalid policy name '" + name
                                                   + "'.  Could not create a valid PID from this name: " + e.getMessage(), e);
          }
  
      }
docs: Given a policy name (corresponds to Policy identifier in XACML), generate a PID
  
  If the name already contains a pid namespace, use that, otherwise use the default
  
  @param name
  @return normalized name (a PID)
  @throws PolicyStoreException
  @throws MalformedPIDException