code: static String encode(String pid, String dsId, String dsVersionId) {
          if (dsId == null) return encodePart(pid);
          return encodePart(pid) + '+' + encodePart(dsId) + '+' +
                  encodePart(dsVersionId);
      }
docs: dsId and dsVersionId may be null