code: protected String getFedoraResourceURI(String res) {
          // strip off info URI part if present
          String strippedRes;
          if (res.startsWith(Constants.FEDORA.uri)) {
              strippedRes = res.substring(Constants.FEDORA.uri.length());
          } else {
              strippedRes = res;
          }
          // split into pid + datastream (if present), validate PID and then recombine datastream back in using URI form of PID
          String parts[] = strippedRes.split("/");
          PID pid;
          try {
              pid = new PID(parts[0]);
          } catch (MalformedPIDException e1) {
              logger.warn("Invalid Fedora resource identifier: {}. PID part of URI is malformed", res);
              return null;
          }
  
          String resURI;
          if (parts.length == 1) {
              resURI = pid.toURI();
          } else if (parts.length == 2) {
              resURI = pid.toURI() + "/" + parts[1]; // add datastream ID back
          } else {
              logger.warn("Invalid Fedora resource identifier: {}. Should be pid or datastream (URI form optional", res);
              return null;
          }
          return resURI;
      }
docs: given either a ns:pid/ds identifier or an info:fedora/ URI form of the same
  return the URI form, validating the PID part.  Returns null if the argument
  was invalid/could not be validated/converted
  
  @param res identifier for fedora resource
  @return URI form