org.apache.maven.doxia.sink
Class StructureSink
java.lang.Object
org.apache.maven.doxia.sink.StructureSink
public class StructureSink
- extends Object
Utility methods for Sinks.
Method Summary |
static boolean |
isExternalLink(String link)
Checks if the given string corresponds to an external URI,
ie is not a link within the same document. |
static String |
linkToKey(String text)
Transforms the given text such that it can be used as a link. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StructureSink
public StructureSink()
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.
- Parameters:
link
- The link to check.
- Returns:
- True if the link (ignoring case) starts with either of the
following: "http:/", "https:/", "ftp:/", "mailto:", "file:/",
"../" or "./". Note that Windows style separators "\" are not allowed
for URIs, see http://www.ietf.org/rfc/rfc2396.txt , section 2.4.3.
linkToKey
public static String linkToKey(String text)
- Transforms the given text such that it can be used as a link.
- Parameters:
text
- The text to transform.
- Returns:
- A text with escaped special characters.
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.