|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.thdl.tib.text.tshegbar.TshegBar | +--org.thdl.tib.text.tshegbar.LegalTshegBar
A LegalTshegBar is a simple Tibetan syllable or a syllable with
syntactically legal suffix
particles
. A legal tsheg-bar is not a transliteration of Chinese
or some other language. It obeys the following properties:
\u0F71
)"\u0F60\u0F72"
).David, It is a particle that means "or" as opposed to "dang" that means and. "sgom pa'am" would mean "... or meditation" You can also have "'ang" which would be equivalent to "yang" (also) "sgom pa'ang" : even/also meditation. And also there are cases where they combine. For ex you can have "le'u'i'o". "le'u" means chapter. "le'u'i" means "of this chapter". 'o would mark the end of the sentence. Andres
"\u0F60\u0F72"
) (DLC FIXME: 'o and
'am maybe? I asked in the "Embarrasing error in wylie conversion"
bug report.).Note that this class uses only a subset of Unicode to represent
consonants and vowels. In some situations, you should use UnicodeConstants.EWSUB_wa_zur
to represent the consonant wa, while in others you
should use UnicodeConstants.EWC_wa
, even though you mean to subscribe a
fixed-form wa. Basically, stick to the codepoints for which
enumerations exist in UnicodeConstants
and use your common
sense.
For a pretty good, concise summary of the rules this class knows about, see Joe B. Wilson's Translating Buddhism from Tibetan from Snow Lion Publications, Appendix 1, e.g. p. 548.
Field Summary |
Fields inherited from interface org.thdl.tib.text.tshegbar.UnicodeConstants |
EW_ABSENT, EW_achung, EWC_a, EWC_achen, EWC_ba, EWC_ca, EWC_cha, EWC_da, EWC_dza, EWC_ga, EWC_ha, EWC_ja, EWC_ka, EWC_kha, EWC_la, EWC_ma, EWC_na, EWC_nga, EWC_nya, EWC_pa, EWC_pha, EWC_ra, EWC_sa, EWC_sha, EWC_ta, EWC_tha, EWC_tsa, EWC_tsha, EWC_wa, EWC_ya, EWC_za, EWC_zha, EWSUB_la_btags, EWSUB_ra_btags, EWSUB_wa_zur, EWSUB_ya_btags, EWV_e, EWV_i, EWV_o, EWV_u, NORM_NFC, NORM_NFD, NORM_NFKC, NORM_NFKD, NORM_NFTHDL, NORM_UNNORMALIZED |
Constructor Summary | |
LegalTshegBar(char prefix,
char headLetter,
char rootLetter,
char subjoinedLetter,
boolean hasWaZur,
boolean hasAChung,
char suffix,
char postsuffix,
char vowel)
Like LegalTshegBar(char,char,char,char,boolean,boolean,String,char,char)
but geared for the common case where the suffix is simply a
consonant. |
|
LegalTshegBar(char prefix,
char headLetter,
char rootLetter,
char subjoinedLetter,
boolean hasWaZur,
boolean hasAChung,
String suffix,
char postsuffix,
char vowel)
Constructs a valid Tibetan syllable or throws an exception. |
Method Summary | |
static boolean |
formsLegalTshegBar(char prefix,
char headLetter,
char rootLetter,
char subjoinedLetter,
boolean hasWaZur,
boolean hasAChung,
char suffix,
char postsuffix,
char vowel)
Like formsLegalTshegBar(char,char,char,char,boolean,boolean,String,char,char)
but geared for the common case where the suffix is simply a
consonant. |
static boolean |
formsLegalTshegBar(char prefix,
char headLetter,
char rootLetter,
char subjoinedLetter,
boolean hasWaZur,
boolean hasAChung,
String suffix,
char postsuffix,
char vowel)
Returns true iff the given arguments form a legal Tibetan syllable. |
static String |
getConnectiveCaseSuffix()
Returns a two-codepoint string consisting of the Unicode representation of what THDL Extended Wylie calls 'i . |
char |
getHeadLetter()
Returns the head letter of the root stack if it has one, or EW_ABSENT otherwise. |
static String |
getPossiblePostsuffixes()
Returns a string of two codepoints, da and sa. |
static String |
getPossibleSuffixes()
Returns a string of ten codepoints, each of which can be a suffix in Tibetan. |
static String[] |
getPossibleSuffixParticles()
Returns an array of Unicode strings, all the legal suffix particles. |
char |
getPostsuffix()
Returns the secondary suffix, which is either EWC_da or EWC_sa, or EW_ABSENT if there is no postsuffix. |
char |
getPrefix()
Returns the prefixed consonant, or EW_ABSENT if there is no prefix. |
char |
getRootLetter()
Returns the root consonant. |
char |
getSimpleSuffix()
If this syllable has a simple
suffix , this returns it. |
char |
getSubjoinedLetter()
Returns the non-EWSUB_wa_zur consonant subscribed to the root consonant, or EW_ABSENT if none is. |
String |
getSuffix()
Returns null if there is no suffix, or a string containing the one consonant or a string "\u0F60\u0F72"
containing two codepoints in the special case that the suffix
is that connective case marker getConnectiveCaseSuffix() . |
StringBuffer |
getThdlWylie()
Returns a StringBuffer that holds the THDL extended wylie representation of this syllable. |
static String |
getTheFivePrefixes()
Returns a String containing the nominal Unicode representations of the five prefixes. |
static String |
getTheTenSuffixes()
Returns a String containing the nominal Unicode representations of the ten suffixes. |
static String |
getTheThirtyConsonants()
Returns a String containing the nominal Unicode representations of the thirty consonants. |
String |
getUnicodeRepresentation()
Overrides UnicodeReadyThunk
method to return NFKD-normalized Unicode . |
char |
getVowel()
Returns the vowel, or EW_ABSENT if there is no explicit vowel (the syllable has the
built-in "ah" sound in this case). |
boolean |
hasAChungOnRootLetter()
|
boolean |
hasConnectiveCaseMarkerSuffix()
Returns true iff this syllable has a 'i
suffix. |
boolean |
hasExplicitVowel()
Returns false iff the implicit, built-in "ah" sound is the only vowel for the root stack. |
boolean |
hasHeadLetter()
Returns true iff this syllable has a head letter. |
boolean |
hasPostsuffix()
Returns true iff there is a secondary suffix EWC_da or EWC_sa. |
boolean |
hasPrefix()
Returns true iff this syllable contains a prefixed consonant. |
boolean |
hasSimpleSuffix()
Returns true iff there is a single, suffixed consonant. |
boolean |
hasSubjoinedLetter()
Returns true iff the root letter possesses a subscribed consonant ya-btags, ra-btags, la-btags, or wa-zur. |
boolean |
hasSuffix()
Returns true iff there is a suffixed consonant or a suffixed 'i (DLC FIXME). |
boolean |
hasUnicodeRepresentation()
Overrides UnicodeReadyThunk
method to return true. |
boolean |
hasWaZurSubjoinedToRootLetter()
|
static boolean |
isConsonantThatTakesLaBtags(char rootLetter)
Returns true iff rootLetter is a consonant to which la-btags can be subjoined. |
static boolean |
isConsonantThatTakesLaMgo(char rootLetter)
Returns true iff rootLetter is a consonant that takes a la-mgo (pronounced lango because ma is a prenasaling prefix) head letter |
static boolean |
isConsonantThatTakesRaBtags(char rootLetter)
Returns true iff rootLetter is a consonant to which ra-btags can be subjoined. |
static boolean |
isConsonantThatTakesRaMgo(char rootLetter)
Returns true iff rootLetter is a consonant that takes a ra-mgo (pronounced rango because ma is a prenasaling prefix) head letter |
static boolean |
isConsonantThatTakesSaMgo(char rootLetter)
Returns true iff rootLetter is a consonant that takes a sa-mgo (pronounced sango because ma is a prenasaling prefix) head letter |
static boolean |
isConsonantThatTakesWaZur(char rootLetter)
Returns true iff rootLetter is a consonant to which wa-zur can be subjoined (perhaps in addition to another subjoined ra-btags or ya-btags. |
static boolean |
isConsonantThatTakesYaBtags(char rootLetter)
Returns true iff rootLetter is a consonant to which ya-btags can be subjoined. |
static boolean |
isNominalRepresentationOfConsonant(char x)
Returns true iff x is the preferred, nominal Unicode representation of one the thirty consonants. |
static boolean |
isNominalRepresentationOfPrefix(char x)
Returns true iff x is the preferred, nominal Unicode representation of one of the five prefixes. |
static boolean |
isNominalRepresentationOfSimpleSuffix(char x)
Returns true iff x is the preferred, nominal Unicode representation of one of the ten suffixes. |
static boolean |
takesWaZur(char rootLetter,
char subjoinedLetter)
Returns true iff the given (rootLetter, subjoinedLetter) combination can accept an additional wa-zur. |
String |
toConciseXML()
Returns a |
String |
toString()
Returns a descriptive XML element. |
String |
toVerboseXML()
Returns a |
Methods inherited from class org.thdl.tib.text.tshegbar.TshegBar |
isTibetan |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LegalTshegBar(char prefix, char headLetter, char rootLetter, char subjoinedLetter, boolean hasWaZur, boolean hasAChung, String suffix, char postsuffix, char vowel) throws IllegalArgumentException
suffix
) for
those parts of the syllable that are absent. The root letter
must not be absent. To learn about the arguments, and to be
sure that your input won't cause an exception to be thrown,
see formsLegalTshegBar(char,char,char,char,boolean,boolean,String,char,char)
.
IllegalArgumentException
- if the rootLetter is not
one of the thirty consonants (and represented nominally, at
that), or if one of the other arguments is not valid, or if
postsuffix is present but suffix is absent, etc.public LegalTshegBar(char prefix, char headLetter, char rootLetter, char subjoinedLetter, boolean hasWaZur, boolean hasAChung, char suffix, char postsuffix, char vowel) throws IllegalArgumentException
LegalTshegBar(char,char,char,char,boolean,boolean,String,char,char)
but geared for the common case where the suffix is simply a
consonant.
Method Detail |
public char getPrefix()
public boolean hasPrefix()
public char getSubjoinedLetter()
hasWaZurSubjoinedToRootLetter()
public boolean hasSubjoinedLetter()
public boolean hasWaZurSubjoinedToRootLetter()
public boolean hasAChungOnRootLetter()
public String getSuffix()
"\u0F60\u0F72"
containing two codepoints in the special case that the suffix
is that connective case marker getConnectiveCaseSuffix()
.
public boolean hasSuffix()
'i
(DLC FIXME).
public boolean hasSimpleSuffix()
'am
, 'i
,
'u
, and 'o
are not present, but this
does not rule out the presence of a postsuffix.
public char getSimpleSuffix() throws Exception
has a simple
suffix
, this returns it.
Exception
- if hasSimpleSuffix()
is not truepublic char getPostsuffix()
public boolean hasPostsuffix()
public boolean hasConnectiveCaseMarkerSuffix()
'i
suffix.
public char getRootLetter()
public char getHeadLetter()
public boolean hasHeadLetter()
public char getVowel()
explicit vowel
(the syllable has the
built-in "ah" sound in this case).
public boolean hasExplicitVowel()
public static String getPossiblePostsuffixes()
public static String getPossibleSuffixes()
public static String getConnectiveCaseSuffix()
'i
.
public static String getTheThirtyConsonants()
UnicodeConstants
public static boolean isNominalRepresentationOfConsonant(char x)
public static String[] getPossibleSuffixParticles()
This is not very efficient.
public static String getTheFivePrefixes()
UnicodeConstants
public static boolean isNominalRepresentationOfPrefix(char x)
public static String getTheTenSuffixes()
getConnectiveCaseSuffix()
,
UnicodeConstants
public static boolean isNominalRepresentationOfSimpleSuffix(char x)
getConnectiveCaseSuffix()
public static boolean takesWaZur(char rootLetter, char subjoinedLetter)
rootLetter
- the root consonant (in preferred form
in
you expect true to be returned)subjoinedLetter
- the letter subscribed to rootLetter,
which should not be wa
if you
expect true to be returned
public static boolean isConsonantThatTakesWaZur(char rootLetter)
public static boolean isConsonantThatTakesYaBtags(char rootLetter)
public static boolean isConsonantThatTakesLaBtags(char rootLetter)
public static boolean isConsonantThatTakesRaBtags(char rootLetter)
public static boolean isConsonantThatTakesRaMgo(char rootLetter)
public static boolean isConsonantThatTakesLaMgo(char rootLetter)
public static boolean isConsonantThatTakesSaMgo(char rootLetter)
public static boolean formsLegalTshegBar(char prefix, char headLetter, char rootLetter, char subjoinedLetter, boolean hasWaZur, boolean hasAChung, String suffix, char postsuffix, char vowel)
prefix
- the optional, prefixed consonantheadLetter
- the optional superscribed consonantrootLetter
- the mandatory root consonantsubjoinedLetter
- the optional, subscribed consonantsuffix
- the optional suffix, which is null, a String
consisting of a single consonant (i.e. a single,
nondecomposable codepoint) except in the special case that
this is getConnectiveCaseSuffix()
postsuffix
- the optional postsuffix, which should be
EWC_sa or EWC_davowel
- the optional vowelpublic static boolean formsLegalTshegBar(char prefix, char headLetter, char rootLetter, char subjoinedLetter, boolean hasWaZur, boolean hasAChung, char suffix, char postsuffix, char vowel)
formsLegalTshegBar(char,char,char,char,boolean,boolean,String,char,char)
but geared for the common case where the suffix is simply a
consonant.
public StringBuffer getThdlWylie()
public String toConciseXML()
public String toVerboseXML()
public String getUnicodeRepresentation()
UnicodeReadyThunk
method to return NFKD-normalized Unicode
.
getUnicodeRepresentation
in interface UnicodeReadyThunk
UnsupportedOperationException
- is never thrownpublic boolean hasUnicodeRepresentation()
UnicodeReadyThunk
method to return true.
hasUnicodeRepresentation
in interface UnicodeReadyThunk
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |