Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 to DoxiaUtils.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 a local 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)