|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.thdl.tib.text.TibTextUtils
Provides methods for converting back and forth between Extended Wylie and TibetanMachineWeb. This class is not instantiable.
The class provides a variety of static methods for converting back and forth between Extended Wylie and TibetanMachineWeb. The Wylie can be accessed as a String, while the TibetanMachineWeb can be exported as Rich Text Format.
Method Summary | |
static org.thdl.tib.text.DuffData[] |
convertGlyphs(List glyphs)
Converts a list of glyphs into an array of DuffData . |
static List |
getBindu(org.thdl.tib.text.DuffCode dc)
Gets the bindu sequence for a given context. |
static List |
getGlyphs(List chars,
boolean areStacksOnRight,
boolean definitelyTibetan,
boolean definitelySanskrit)
Figures out how to arrange a list of characters into glyphs. |
static String |
getNext(String wylie)
Finds the first meaningful element to occur within a string of Extended Wylie. |
static org.thdl.tib.text.DuffData[] |
getTibetanMachineWeb(String wylie)
Converts a string of Extended Wylie into DuffData . |
static List |
getVowel(org.thdl.tib.text.DuffCode context_1,
org.thdl.tib.text.DuffCode context_2,
String vowel)
Gets the vowel sequence for a given vowel in a given context. |
static List |
getVowel(org.thdl.tib.text.DuffCode context,
String vowel)
Gets the vowel sequence for a given vowel in a given context. |
static String |
getWylie(org.thdl.tib.text.DuffCode[] dcs)
Gets the Extended Wylie for a set of glyphs. |
static String |
withA(List glyphList)
Scans a list of glyphs and returns an Extended Wylie string with 'a' inserted. |
static String |
withoutA(List glyphList)
Gets the Extended Wylie for a list of glyphs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static org.thdl.tib.text.DuffData[] convertGlyphs(List glyphs)
DuffData
.
The motivation for this is that most processes - for example using
TibetanMachineWeb in HTML - only need to know what
text to output, and when to change fonts. In general, they don't
need to have an explicit indication for each glyph of the font
for that glyph.
glyphs
- the list of TibetanMachineWeb glyphs
you want to convert
public static List getGlyphs(List chars, boolean areStacksOnRight, boolean definitelyTibetan, boolean definitelySanskrit)
chars
- the list of Tibetan characters you want to find glyphs forareStacksOnRight
- whether stacking should try to maximize from right to left (true)
or from left to right (false). In the Extended Wylie keyboard, you try to stack from
right to left. Thus, the character sequence r-g-r would be stacked as r followed by gr,
rather than rg followed by r. In the Sambhota and TCC keyboards, the stack direction
is reversed.definitelyTibetan
- should be true if the characters are known to be Tibetan and
not SanskritdefinitelySanskrit
- should be true if the characters are known to be Sanskrit and
not Tibetanpublic static String getNext(String wylie)
wylie
- the String of wylie you want to scan
public static org.thdl.tib.text.DuffData[] getTibetanMachineWeb(String wylie) throws InvalidWylieException
DuffData
.
wylie
- the Wylie you want to convert
InvalidWylieException
- if the Wylie is deemed invalid,
i.e. if it does not conform to the Extended Wylie standardpublic static List getBindu(org.thdl.tib.text.DuffCode dc)
dc
- the DuffCode of the glyph you
want to attach a bindu to
public static List getVowel(org.thdl.tib.text.DuffCode context, String vowel)
context
- the glyph preceding the vowel you want to affixvowel
- the vowel you want to affix, in Wylie
public static List getVowel(org.thdl.tib.text.DuffCode context_1, org.thdl.tib.text.DuffCode context_2, String vowel)
context_1
- the glyph occurring two glyphs before the vowel you want to affixcontext_2
- the glyph immediately before the vowel you want to affixvowel
- the vowel you want to affix, in Wylie
public static String withA(List glyphList)
glyphList
- a list of TibetanMachine glyphs, i.e. DuffCodes
.
public static String withoutA(List glyphList)
glyphList
- a list of TibetanMachine glyphs, i.e. DuffCodes
public static String getWylie(org.thdl.tib.text.DuffCode[] dcs)
dcs
- an array of glyphs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |