public static String getUriWithOutputDir ( DocumentURI key , String outputDir ) { String uri = key . getUri ( ) ; if ( outputDir != null && ! outputDir . isEmpty ( ) ) { uri = outputDir . endsWith ( "/" ) || uri . startsWith ( "/" ) ? outputDir + uri : outputDir + ' ' + uri ; key . setUri ( uri ) ; key . validate ( ) ; } return uri ; }
If outputDir is available and valid modify DocumentURI and return uri in string