org.exist.util
Class Collations

java.lang.Object
  extended by org.exist.util.Collations

public class Collations
extends Object

Utility methods dealing with collations.

Author:
wolf

Field Summary
static String CODEPOINT
          The default unicode codepoint collation URI as defined by the XQuery spec.
static String CODEPOINT_SHORT
          Short string to select the default codepoint collation
static String EXIST_COLLATION_URI
          The URI used to select collations in eXist.
 
Constructor Summary
Collations()
           
 
Method Summary
static int compare(Collator collator, String s1, String s2)
           
static boolean contains(Collator collator, String s1, String s2)
           
static boolean endsWith(Collator collator, String s1, String s2)
           
static boolean equals(Collator collator, String s1, String s2)
           
static Collator getCollationFromURI(XQueryContext context, String uri)
          Get a Comparatorfrom the specified URI.
static int indexOf(Collator collator, String s1, String s2)
           
static boolean startsWith(Collator collator, String s1, String s2)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CODEPOINT

public static final String CODEPOINT
The default unicode codepoint collation URI as defined by the XQuery spec.

See Also:
Constant Field Values

CODEPOINT_SHORT

public static final String CODEPOINT_SHORT
Short string to select the default codepoint collation

See Also:
Constant Field Values

EXIST_COLLATION_URI

public static final String EXIST_COLLATION_URI
The URI used to select collations in eXist.

See Also:
Constant Field Values
Constructor Detail

Collations

public Collations()
Method Detail

getCollationFromURI

public static final Collator getCollationFromURI(XQueryContext context,
                                                 String uri)
                                          throws XPathException
Get a Comparatorfrom the specified URI. The original code is from saxon (@linkplain http://saxon.sf.net).

Parameters:
uri -
Throws:
XPathException

equals

public static final boolean equals(Collator collator,
                                   String s1,
                                   String s2)

compare

public static final int compare(Collator collator,
                                String s1,
                                String s2)

startsWith

public static final boolean startsWith(Collator collator,
                                       String s1,
                                       String s2)

endsWith

public static final boolean endsWith(Collator collator,
                                     String s1,
                                     String s2)

contains

public static final boolean contains(Collator collator,
                                     String s1,
                                     String s2)

indexOf

public static final int indexOf(Collator collator,
                                String s1,
                                String s2)


Copyright (C) Wolfgang Meier. All rights reserved.