public static String getStem ( String baseURI ) { int idx = baseURI . lastIndexOf ( ' ' ) ; String result = baseURI ; if ( idx != - 1 ) { result = baseURI . substring ( 0 , idx ) ; } return result ; }
Return everything in the path up to the last slash in a URI .