public static boolean checkURIs ( URI [ ] uriFiles , URI [ ] uriArchives ) { if ( ( uriFiles == null ) && ( uriArchives == null ) ) { return true ; } if ( uriFiles != null ) { for ( int i = 0 ; i < uriFiles . length ; i ++ ) { String frag1 = uriFiles [ i ] . getFragment ( ) ; if ( frag1 == null ) return false ; for ( int j = i + 1 ; j < uriFiles . length ; j ++ ) { String frag2 = uriFiles [ j ] . getFragment ( ) ; if ( frag2 == null ) return false ; if ( frag1 . equalsIgnoreCase ( frag2 ) ) return false ; } if ( uriArchives != null ) { for ( int j = 0 ; j < uriArchives . length ; j ++ ) { String frag2 = uriArchives [ j ] . getFragment ( ) ; if ( frag2 == null ) { return false ; } if ( frag1 . equalsIgnoreCase ( frag2 ) ) return false ; for ( int k = j + 1 ; k < uriArchives . length ; k ++ ) { String frag3 = uriArchives [ k ] . getFragment ( ) ; if ( frag3 == null ) return false ; if ( frag2 . equalsIgnoreCase ( frag3 ) ) return false ; } } } } } return true ; }
This method checks if there is a conflict in the fragment names of the uris . Also makes sure that each uri has a fragment . It is only to be called if you want to create symlinks for the various archives and files .