Oracle Ultra Search Java API Reference
Release 10g

B12028-01

oracle.ultrasearch.query
Class Util

java.lang.Object
extended byoracle.ultrasearch.query.Util

public class Util
extends java.lang.Object

Utility class for some useful methods.

Since:
9.0.2

Constructor Summary
Util()
           

 

Method Summary
static java.util.List getLocaleFallbacks(java.util.Locale orig, java.util.Locale def)
          Calculate the search path from a specific locale (orig) to its parent locales, then to the default locale (def), and finally to the default locale's parent locales.
static java.lang.String getVersion()
          Get the version of the Java Query API.
static java.lang.String htmlEncode(java.lang.String input)
          Utility method to apply HTML encoding to a specified string.
static java.util.Locale parseLocale(java.lang.String localeString)
          Utility method parse a string into an java.util.Locale object
static java.util.Locale parseLocale(java.lang.String localeString, char separator)
          Utility method parse a string into an java.util.Locale object

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

Util

public Util()
Method Detail

getVersion

public static java.lang.String getVersion()
Get the version of the Java Query API.
Returns:
a version string in the format of '#.#.#'

htmlEncode

public static java.lang.String htmlEncode(java.lang.String input)
Utility method to apply HTML encoding to a specified string.

This method encodes the input string by performing the following substitutions:

Parameters:
input - The input string to convert.
Returns:
the HTML encoded version of the input string.

parseLocale

public static java.util.Locale parseLocale(java.lang.String localeString)
                                    throws java.text.ParseException
Utility method parse a string into an java.util.Locale object

the format of the string should be consistent with the output of java.util.Locale's toString() method.

same as calling parseLocale (localeString, '_').

Parameters:
localeString - The input string to parse.
Returns:
a java.util.Locale object
Throws:
java.text.ParseException
Since:
9.0.3.2

parseLocale

public static java.util.Locale parseLocale(java.lang.String localeString,
                                           char separator)
                                    throws java.text.ParseException
Utility method parse a string into an java.util.Locale object

the format of the string should be consistent with the output of java.util.Locale's toString() method, although the separator can be character other than underscore.

same as calling parseLocale (localeString, '_').

Parameters:
localeString - The input string to parse.
Returns:
a java.util.Locale object
Throws:
java.text.ParseException
Since:
9.0.3.2

getLocaleFallbacks

public static java.util.List getLocaleFallbacks(java.util.Locale orig,
                                                java.util.Locale def)
Calculate the search path from a specific locale (orig) to its parent locales, then to the default locale (def), and finally to the default locale's parent locales.
Parameters:
def - the default locale, usually from Locale.getDefault()

Oracle Ultra Search Java API Reference
Release 10g

B12028-01

Copyright © 2003 Oracle Corporation. All Rights Reserved.