code: public static PID fromFilename(String filenameString)
              throws MalformedPIDException {
          String decoded = filenameString.replaceFirst("_", ":");
          if (decoded.endsWith("%")) {
              decoded = decoded.substring(0, decoded.length() - 1) + ".";
          }
          return new PID(decoded);
      }
docs: Construct a PID given a filename of the form produced by toFilename(),
  throwing a MalformedPIDException if it's not well-formed.
  @param filenameString default translation of PID to filename
  @return PID the PID producing the input filename
  @throws MalformedPIDException