org.apache.maven.doxia.sink
Class StructureSink

java.lang.Object
  extended by org.apache.maven.doxia.sink.StructureSink

public class StructureSink
extends java.lang.Object

Utility methods for Sinks.


Constructor Summary
StructureSink()
           
 
Method Summary
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.
static java.lang.String linkToKey(java.lang.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
 

Constructor Detail

StructureSink

public StructureSink()
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.

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 java.lang.String linkToKey(java.lang.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 © 2002-2010 Apache Software Foundation. All Rights Reserved.