Class AptUtils
- java.lang.Object
-
- org.apache.maven.doxia.module.apt.AptUtils
-
public class AptUtils extends java.lang.Object
A collection of utility methods for dealing with APT documents.- Since:
- 1.1
- Author:
- ltheussl
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isExternalLink(java.lang.String link)
Checks if the given string corresponds to an external URI, ie is not a link within the same document nor a link to another document within the same site.static boolean
isInternalLink(java.lang.String link)
Checks if the given string corresponds to an internal link, ie it is a link to an anchor within the same document.static boolean
isLocalLink(java.lang.String link)
Checks if the given string corresponds to a relative link to another document within the same site.
-
-
-
Method Detail
-
isExternalLink
public static boolean isExternalLink(java.lang.String link)
Checks if the given string corresponds to an external URI, ie is not a link within the same document nor a link to another document within the same site. This forwards toDoxiaUtils.isExternalLink(String)
.- Parameters:
link
- The link to check.- Returns:
- True if DoxiaUtils.isExternalLink(link) returns true.
- See Also:
DoxiaUtils.isExternalLink(String)
,isInternalLink(String)
,isLocalLink(String)
-
isInternalLink
public static boolean isInternalLink(java.lang.String link)
Checks if the given string corresponds to an internal link, ie it is a link to an anchor within the same document.- Parameters:
link
- The link to check.- Returns:
- True if link is neither an
external
nor alocal
link. - See Also:
DoxiaUtils.isInternalLink(String)
,isExternalLink(String)
,isLocalLink(String)
-
isLocalLink
public static boolean isLocalLink(java.lang.String link)
Checks if the given string corresponds to a relative link to another document within the same site.- Parameters:
link
- The link to check.- Returns:
- True if the link starts with either "/", "./" or "../".
- See Also:
DoxiaUtils.isLocalLink(String)
,isExternalLink(String)
,isInternalLink(String)
-
-