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
public static final Pattern PATTERN
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)
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.