com.basistech.util
Class TextDomain

java.lang.Object
  extended by com.basistech.util.TextDomain
All Implemented Interfaces:
Comparable<TextDomain>
Direct Known Subclasses:
ByNameTextDomain

public class TextDomain
extends Object
implements Comparable<TextDomain>

Collection of linguistic properties of a text which are independent of its message; this currently includes script, language, and transliteration scheme. Any text is in a domain (with zero or more components under specified). Instances of this class are immutable.


Constructor Summary
TextDomain(int script, int language, TransliterationScheme scheme)
          Deprecated. Use the one with enum args
TextDomain(ISO15924 script, LanguageCode language, TransliterationScheme scheme)
          Create a TextDomain object.
TextDomain(LanguageCode language)
          Create a TextDomain object for the "native" domain of the language (see LanguageCode.getDefaulatScript())
 
Method Summary
 int compareTo(TextDomain o)
          
 boolean equals(Object o)
          Determine if the contents of this TextDomain object are equal those in the given object.
 LanguageCode getLanguage()
          Get the language of this domain.
 ISO15924 getScript()
          Get the script of this domain.
 TransliterationScheme getTransliterationScheme()
          Get the transliteration scheme of this domain.
 int hashCode()
          Returns the hash code for this TextDomain.
 String toString()
          Retrieve a string representation of the TextDomain.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextDomain

public TextDomain(ISO15924 script,
                  LanguageCode language,
                  TransliterationScheme scheme)
Create a TextDomain object.

Parameters:
script - the ISO 15924 numeric script id
language - the ISO 639 numeric langauge id
scheme - the TransliterationScheme

TextDomain

public TextDomain(LanguageCode language)
Create a TextDomain object for the "native" domain of the language (see LanguageCode.getDefaulatScript())

Parameters:
language - the ISO 639 numeric langauge id

TextDomain

public TextDomain(int script,
                  int language,
                  TransliterationScheme scheme)
Deprecated. Use the one with enum args

Create a TextDomain object.

Parameters:
script - the ISO 15924 numeric script id
language - the ISO 639 numeric langauge id
scheme - the TransliterationScheme
Method Detail

equals

public boolean equals(Object o)
Determine if the contents of this TextDomain object are equal those in the given object.

Overrides:
equals in class Object
Parameters:
o - object to compare
Returns:
true if contents are equal.

hashCode

public int hashCode()
Returns the hash code for this TextDomain.

Overrides:
hashCode in class Object
Returns:
hash code

getScript

public ISO15924 getScript()
Get the script of this domain.

Returns:
script of this domain

getLanguage

public LanguageCode getLanguage()
Get the language of this domain.

Returns:
language of this domain

getTransliterationScheme

public TransliterationScheme getTransliterationScheme()
Get the transliteration scheme of this domain.

Returns:
transliteration scheme of this domain

toString

public String toString()
Retrieve a string representation of the TextDomain.

Overrides:
toString in class Object
Returns:
String representation of the TextDomain.

compareTo

public int compareTo(TextDomain o)

Specified by:
compareTo in interface Comparable<TextDomain>


Copyright © 2004-2008 Basis Technology Corporation. All Rights Reserved.