@DefaultKey(value="uriTool") public class URITool extends Object
public static String relativizeLink(String baseDirUri, String link)
Relativizes only absolute links, if the link has the same scheme, host and port as the base, it is made into a relative link as viewed from the base.
This is the same method that's used to relativize project links in Maven site.
baseDirUri
- URI that will serve as the base to calculate the relative onelink
- The link to relativize (make it relative to the base URI if possible)Copyright © 2012–2014 Andrius Velykis. All rights reserved.