public static String applyPrefixSuffix(String uriSource,Configuration conf){
  if (uriSource == null)   return null;
  String prefix=conf.get(OUTPUT_URI_PREFIX);
  String suffix=conf.get(OUTPUT_URI_SUFFIX);
  if (prefix == null && suffix == null) {
    return uriSource;
  }
  int len=uriSource.length() + (prefix != null ? prefix.length() : 0) + (suffix != null ? suffix.length() : 0);
  StringBuilder uriBuf=new StringBuilder(len);
  if (prefix != null) {
    uriBuf.append(prefix);
  }
  uriBuf.append(uriSource);
  if (suffix != null) {
    uriBuf.append(suffix);
  }
  return uriBuf.toString();
}

public static String applyPrefixSuffix ( String uriSource , Configuration conf ) { if ( uriSource == null ) return null ; String prefix = conf . get ( OUTPUT_URI_PREFIX ) ; String suffix = conf . get ( OUTPUT_URI_SUFFIX ) ; if ( prefix == null && suffix == null ) { return uriSource ; } int len = uriSource . length ( ) + ( prefix != null ? prefix . length ( ) : 0 ) + ( suffix != null ? suffix . length ( ) : 0 ) ; StringBuilder uriBuf = new StringBuilder ( len ) ; if ( prefix != null ) { uriBuf . append ( prefix ) ; } uriBuf . append ( uriSource ) ; if ( suffix != null ) { uriBuf . append ( suffix ) ; } return uriBuf . toString ( ) ; }
apply uri prefix and suffix configuration option to a uri source string .
