Package net.sf.saxon.om
Class DocumentURI
- java.lang.Object
-
- net.sf.saxon.om.DocumentURI
-
public class DocumentURI extends java.lang.ObjectThis class encapsulates a string used as the value of the document-uri() property of a document, together with a normalized representation of the string used for equality comparisons. The idea is that on Windows systems, document URIs are compared using case-blind comparison, but the original case is retained for display purposes.
-
-
Field Summary
Fields Modifier and Type Field Description static booleanCASE_BLIND_FILES
-
Constructor Summary
Constructors Constructor Description DocumentURI(java.lang.String uri)Create a DocumentURI object that wraps a given URI
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()static java.lang.StringnormalizeURI(java.lang.String uri)Normalize the representation of file: URIs to give better equality matching than straight string comparison.java.lang.StringtoString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
normalizeURI
public static java.lang.String normalizeURI(java.lang.String uri)
Normalize the representation of file: URIs to give better equality matching than straight string comparison. The main purpose is (a) to eliminate the distinction between "file:/" and "file:///", and (b) to normalize case in the case of Windows filenames: especially the distinction between "file:/C:" and "file:/c:".- Parameters:
uri- the URI to be normalized- Returns:
- the normalized URI.
-
-