Class AptUtils

java.lang.Object
org.apache.maven.doxia.module.apt.AptUtils

public class AptUtils extends Object
A collection of utility methods for dealing with APT documents.
Since:
1.1
Author:
ltheussl
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    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
    Checks if the given string corresponds to an internal link, ie it is a link to an anchor within the same document.
    static boolean
    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 Details

    • isExternalLink

      public static boolean isExternalLink(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:
    • isInternalLink

      public static boolean isInternalLink(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:
    • isLocalLink

      public static boolean isLocalLink(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: