|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.doxia.module.apt.AptUtils
public class AptUtils
A collection of utility methods for dealing with APT documents.
| Method Summary | |
|---|---|
static String |
encodeAnchor(String id)
Construct a valid anchor. |
static String |
encodeFragment(String text)
Deprecated. This method was used for the original apt format, which removed all non alphanumeric characters from anchors. Use encodeAnchor(String) instead. |
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. |
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. |
static boolean |
isLocalLink(String link)
Checks if the given string corresponds to a relative link to another document within the same site. |
static String |
linkToKey(String text)
Deprecated. This method was used for the original apt format, which removed all non alphanumeric characters from anchors. Use encodeAnchor(String) instead. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static String encodeFragment(String text)
encodeAnchor(String) instead.
AptTools.encodeFragment( null ) = null AptTools.encodeFragment( "" ) = "" AptTools.encodeFragment( "http://www.google.com" ) = "httpwwwgooglecom"
text - the String to check, may be null.
public static boolean isExternalLink(String link)
DoxiaUtils.isExternalLink(String).
link - The link to check.
DoxiaUtils.isExternalLink(String),
isInternalLink(String),
isLocalLink(String)public static boolean isInternalLink(String link)
link - The link to check.
external
nor a local link.DoxiaUtils.isInternalLink(String),
isExternalLink(String),
isLocalLink(String)public static boolean isLocalLink(String link)
link - The link to check.
DoxiaUtils.isLocalLink(String),
isExternalLink(String),
isInternalLink(String)public static String linkToKey(String text)
encodeAnchor(String) instead.
text - The text to transform.
public static String encodeAnchor(String id)
DoxiaUtils.encodeId(String)
to ensure the anchor is a valid Doxia id.
The procedure is identical to the one in
HtmlTools.encodeId(String):
id - The id to be encoded.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||