org.teleal.lemma.anchor
Class AnchorAddress
java.lang.Object
org.teleal.lemma.anchor.AnchorAddress
public class AnchorAddress
- extends Object
Encapsulates parsing of citation anchor URIs.
Two addresses are equal if they have the same scheme and path, and (if not null) fragment.
- Author:
- Christian Bauer
PATTERN_SCHEME
protected static final String PATTERN_SCHEME
- See Also:
- Constant Field Values
PATTERN_PATH
protected static final String PATTERN_PATH
- See Also:
- Constant Field Values
PATTERN_FRAGMENT
protected static final String PATTERN_FRAGMENT
- See Also:
- Constant Field Values
PATTERN
public static final Pattern PATTERN
PATH_THIS
public static final String PATH_THIS
- See Also:
- Constant Field Values
AnchorAddress
public AnchorAddress(Scheme scheme,
String path,
String fragment)
getScheme
public Scheme getScheme()
getPath
public String getPath()
getFragment
public String getFragment()
valueOf
public static AnchorAddress valueOf(String string)
valueOf
public static AnchorAddress valueOf(Scheme scheme,
com.sun.javadoc.SeeTag tag)
valueOf
public static AnchorAddress valueOf(Scheme scheme,
com.sun.javadoc.PackageDoc packageDoc)
valueOf
public static AnchorAddress valueOf(Scheme scheme,
com.sun.javadoc.ClassDoc classDoc,
String fragment)
valueOf
public static AnchorAddress valueOf(Scheme scheme,
com.sun.javadoc.MethodDoc methodDoc)
toFileAddress
public static String toFileAddress(String string)
- Converts a simple file path into a
file:// URI string.
- Parameters:
string - A file path, e.g. "/my/file.txt".
- Returns:
- A URI string, e.g. "file://my/file.txt";
toIdentifierString
public String toIdentifierString()
- Generates an XSD:id typed String that can be used in XML documents as identifier attribute value.
- Returns:
- An XSD:id compatible string representation of this URI.
toString
public String toString()
- Overrides:
toString in class Object
- Returns:
- The complement of the
valueOf(String) operation.
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
Copyright © 2010 Teleal GmbH, Switzerland. All Rights Reserved.