code: protected boolean setKey(String uri, int line, int col, boolean encode) {
          if (key == null) {
              key = new DocumentURIWithSourceInfo(uri, srcId);
          }
          // apply prefix, suffix and replace for URI
          if (uri != null && !uri.isEmpty()) {
              uri = URIUtil.applyUriReplace(uri, conf);
              key.setSkipReason("");
              if (encode) {
                  try {
                      URI uriObj = new URI(null, null, null, 0, uri, null, null);
                      uri = uriObj.toString();
                  } catch (URISyntaxException e) {
                      uri = null;
                      key.setSkipReason(e.getMessage());
                  }
              }
              uri = URIUtil.applyPrefixSuffix(uri, conf);
          } else {
              key.setSkipReason("empty uri value");
          }
          key.setUri(uri);   
          key.setSrcId(srcId);
          key.setSubId(subId);
          key.setColNumber(col);
          key.setLineNumber(line);     
      
          if (LOG.isTraceEnabled()) {
              LOG.trace("Set key: " + key);
          }     
          return key.isSkip();
      }
docs: Apply URI replace option, encode URI if specified, apply URI prefix and
  suffix configuration options and set the result as DocumentURI key.
  
  @param uri Source string of document URI.
  @param line Line number in the source if applicable; 0 otherwise.
  @param col Column number in the source if applicable; 0 otherwise.
  @param encode Encode uri if set to true.
  
  @return true if key indicates the record is to be skipped; false
  otherwise.