public static boolean isResourceLocalToServer ( URI resourceUri , URI serverUri ) { URI relativeUri = serverUri . relativize ( resourceUri ) ; return ! relativeUri . isAbsolute ( ) ; }
Figure out whether the URI is actually local to the server . That is it tells whether the resouce is controlled by the server .