diff --git a/source/aboutsavant.rtf b/source/aboutsavant.rtf deleted file mode 100644 index 776f723..0000000 --- a/source/aboutsavant.rtf +++ /dev/null @@ -1,169 +0,0 @@ -{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;} -{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f46\fnil\fcharset0\fprq2{\*\panose 01000508020000020002}TibetanMachineWeb1;}{\f79\fswiss\fcharset128\fprq2{\*\panose 020b0604020202020204}Arial Unicode MS;} -{\f80\fnil\fcharset0\fprq2{\*\panose 02000000000000000000}Times_CSX+{\*\falt Times New Roman};}{\f81\fswiss\fcharset128\fprq2{\*\panose 00000000000000000000}@Arial Unicode MS;}{\f84\froman\fcharset238\fprq2 Times New Roman CE;} -{\f85\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f87\froman\fcharset161\fprq2 Times New Roman Greek;}{\f88\froman\fcharset162\fprq2 Times New Roman Tur;}{\f89\froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\f90\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f91\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f100\fmodern\fcharset238\fprq1 Courier New CE;}{\f101\fmodern\fcharset204\fprq1 Courier New Cyr;} -{\f103\fmodern\fcharset161\fprq1 Courier New Greek;}{\f104\fmodern\fcharset162\fprq1 Courier New Tur;}{\f105\fmodern\fcharset177\fprq1 Courier New (Hebrew);}{\f106\fmodern\fcharset178\fprq1 Courier New (Arabic);} -{\f107\fmodern\fcharset186\fprq1 Courier New Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255; -\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\qj \li0\ri0\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal,no;}{\s1\qj \li0\ri0\sb240\sa60\sl-280\slmult0\keepn\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\b\caps\fs28\ul\lang1033\langfe1033\kerning28\loch\f0\hich\af0\dbch\af79\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 1,h1;}{\s2\qj \li0\ri0\sb120\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\b\caps\fs28\cf2\lang1033\langfe1033\loch\f0\hich\af0\dbch\af79\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 2,h2;}{\s3\qj \li0\ri0\sb240\sa60\sl-280\slmult0\keepn\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\b\caps\fs22\ul\cf2\lang1033\langfe1033\loch\f0\hich\af0\dbch\af79\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 3,h3;}{\s4\qj \li0\ri0\sb240\sa60\sl-280\slmult0\keepn\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\b\caps\fs22\cf2\lang1033\langfe1033\loch\f0\hich\af0\dbch\af79\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 4,h4;}{\s5\qj \li0\ri0\sb240\sa60\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\fs22\ulth\cf2\lang1033\langfe1033\loch\f0\hich\af0\dbch\af79\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 5,h5;}{\s6\qj \li0\ri0\sb240\sa60\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\fs22\cf4\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 6,h6;}{\*\cs10 \additive Default Paragraph Font;}{\s15\qj \fi260\li0\ri0\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\b\fs28\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext15 14 pt Outline heading,14;}{\s16\qj \fi-260\li260\ri0\sl240\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin260\itap0 -\i\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext16 Author's verse,av;}{\s17\qj \fi-187\li187\ri374\sl-280\slmult0\widctlpar -\tx360\tx620\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin374 -\lin187\itap0 \fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext17 Bibliography list,bl;}{\s18\qj \fi-187\li187\ri0\sb240\sl-280\slmult0\widctlpar -\tx360\tx620\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0 -\lin187\itap0 \fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext18 Bibliography,bi;}{\s19\qc \fi260\li0\ri0\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\b\fs28\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext19 Bold 14pt Center Heading,bo;}{\s20\qj \fi-260\li800\ri0\sl240\slmult0\widctlpar -\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\tx10800\tx11160\tx11600\aspalpha\aspnum\faauto\adjustright -\rin0\lin800\itap0 \fs22\cf6\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext20 Buddha's verse,bv;}{\s21\qc \fi260\li0\ri0\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext21 Centered Titles,ce;}{\s22\qc \fi260\li0\ri0\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\b\fs28\ul\cf4\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext22 Chapter title,ct;}{\s23\qj \fi-360\li720\ri0\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0 -\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext23 Chapter2,c2;}{\s24\qj \li0\ri0\sl-20\slmult0\nowidctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\cbpat7 \fs20\cf2\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext24 Document Map;}{\s25\qj \fi180\li0\ri0\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext25 footnote text,ft;}{\s26\qj \fi180\li0\ri0\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\b\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon25 \snext26 embedded text prose,ep;}{\s27\qj \fi187\li0\ri0\sl-280\slmult0\nowidctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\b\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon25 \snext27 Embedded text verse,ev;}{\*\cs28 \additive \fs32\super\loch\f79\hich\af79\dbch\af79 \sbasedon10 endnote reference,er;}{\s29\qj \li0\ri0\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\fs22\cf2\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext29 endnote text,et;}{\s30\qj \li0\ri0\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tqc\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tqr\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright -\rin0\lin0\itap0 \fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext30 footer;}{\*\cs31 \additive \fs18\up6 \sbasedon10 footnote reference,fr;}{\s32\qj \li0\ri0\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tqc\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tqr\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright -\rin0\lin0\itap0 \fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext32 header;}{\s33\qj \fi-260\li800\ri0\sl240\slmult0\widctlpar -\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\tx10800\tx11160\tx11600\aspalpha\aspnum\faauto\adjustright -\rin0\lin800\itap0 \fs22\cf2\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext33 Interlocutor's verse,iv;}{\s34\qj \li0\ri0\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext34 Letter block w/o open space,lt;}{\s35\qj \li0\ri0\sb240\sl360\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext35 Letters block style,ls,l;}{\s36\qj \fi-270\li270\ri0\sl360\slmult0\widctlpar -\tx270\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0 -\lin270\itap0 \fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext36 list indent,li;}{\s37\qj \fi-180\li180\ri0\sl240\slmult0\widctlpar -\tx360\tx620\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0 -\lin180\itap0 \fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext37 list-2nd line indent-no open,lii;}{\s38\qj \li0\ri14\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin14\lin0\itap0 -\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext38 lts-single,lts;}{\s39\qj \fi260\li800\ri0\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx900\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9360\tx9720\tx10080\tx10440\tx10800\tx11160\aspalpha\aspnum -\faauto\adjustright\rin0\lin800\itap0 \fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext39 Nested prose quotation,np;}{\s40\qj \fi274\li806\ri0\sl-240\slmult0\widctlpar -\tx360\tx720\tx800\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\tx10800\tx11160\tx11600\aspalpha\aspnum -\faauto\adjustright\rin0\lin806\itap0 \fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext40 nested verse quotation,nv;}{\s41\qj \li0\ri0\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\b\fs22\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext41 Outline Heading,ou,o;}{\s42\qj \li0\ri0\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\b\fs22\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon41 \snext42 OutlineSingleSpace,os;}{\*\cs43 \additive \f80 \sbasedon10 page number;}{\s44\qj \fi360\li0\ri14\sl360\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9090\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin14\lin0\itap0 -\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext44 paragraph,p;}{\s45\qj \fi260\li540\ri734\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx900\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8190\tx8280\tx8640\tx9000\tx9360\tx9720\tx10080\tx10440\tx10800\tx11160\aspalpha -\aspnum\faauto\adjustright\rin734\lin540\itap0 \fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext45 Prose Quotation,pq;}{\s46\qj \fi-260\li1340\ri0\sl240\slmult0\widctlpar -\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\tx10800\tx11160\tx11600\aspalpha\aspnum\faauto\adjustright -\rin0\lin1340\itap0 \fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext46 Quoting in a verse,qv;}{\s47\ql \li0\ri0\sl240\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext47 Table style,tb;}{\s48\qj \fi-259\li806\ri0\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\tx10800\tx11160\tx11600\aspalpha\aspnum\faauto -\adjustright\rin0\lin806\itap0 \fs22\lang1033\langfe1033\loch\f0\hich\af0\dbch\af79\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext48 Verse Quotation,v;}{\s49\qj \li0\ri0\sb240\sa60\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\outlinelevel4\adjustright -\rin0\lin0\itap0 \fs22\ul\cf2\lang1033\langfe1033\loch\f0\hich\af0\dbch\af79\cgrid\langnp1033\langfenp1033 \sbasedon5 \snext49 Style1;}{\s50\qj \li0\ri0\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\f46\fs44\cf6\up12\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext50 Tibetan Outline;}{\s51\ql \li0\ri0\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\fs22\lang1033\langfe1033\loch\f0\hich\af0\dbch\af79\cgrid\langnp1033\langfenp1033 \sbasedon34 \snext51 Unjustified,uj;}{\s52\qj \fi274\li1094\ri0\sl-240\slmult0\widctlpar -\tx360\tx720\tx800\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\tx10800\tx11160\tx11600\aspalpha\aspnum -\faauto\adjustright\rin0\lin1094\itap0 \fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon40 \snext52 Nested Twice Verse,nvv;}{\s53\qj \fi360\li0\ri14\sl360\slmult1\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin14\lin0\itap0 -\fs24\lang1033\langfe1033\loch\f0\hich\af0\dbch\af79\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext53 DoubleSpaced,ds;}{\*\cs54 \additive \b \sbasedon10 Strong;}{\*\cs55 \additive \ul\cf2 \sbasedon10 Hyperlink;}}{\*\listtable -{\list\listtemplateid181026478\listsimple{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-360\li1800 -\jclisttab\tx1800 }{\listname ;}\listid-132}{\list\listtemplateid1882996986\listsimple{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\chbrdr -\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-360\li1440\jclisttab\tx1440 }{\listname ;}\listid-131}{\list\listtemplateid-1071244068\listsimple{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0 -{\leveltext\'02\'00.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-360\li1080\jclisttab\tx1080 }{\listname ;}\listid-130}{\list\listtemplateid-1846625942\listsimple{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0 -\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-360\li720\jclisttab\tx720 }{\listname ;}\listid-129}{\list\listtemplateid-863352614\listsimple -{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-360\li1800\jclisttab\tx1800 }{\listname -;}\listid-128}{\list\listtemplateid22153560\listsimple{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\chbrdr\brdrnone\brdrcf1 -\chshdng0\chcfpat1\chcbpat1\fbias0 \fi-360\li1440\jclisttab\tx1440 }{\listname ;}\listid-127}{\list\listtemplateid766045762\listsimple{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext -\'01\u-3913 ?;}{\levelnumbers;}\f3\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-360\li1080\jclisttab\tx1080 }{\listname ;}\listid-126}{\list\listtemplateid894722280\listsimple{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 -\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 \fi-360\li720\jclisttab\tx720 }{\listname ;}\listid-125}{\list\listtemplateid780544404\listsimple -{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid-120} -{\list\listtemplateid-2102764222\listsimple{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\chbrdr\brdrnone\brdrcf1 \chshdng0\chcfpat1\chcbpat1\fbias0 -\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid-119}}{\*\listoverridetable{\listoverride\listid-119\listoverridecount0\ls1}{\listoverride\listid-125\listoverridecount0\ls2}{\listoverride\listid-126\listoverridecount0\ls3}{\listoverride\listid-127 -\listoverridecount0\ls4}{\listoverride\listid-128\listoverridecount0\ls5}{\listoverride\listid-120\listoverridecount0\ls6}{\listoverride\listid-129\listoverridecount0\ls7}{\listoverride\listid-130\listoverridecount0\ls8}{\listoverride\listid-131 -\listoverridecount0\ls9}{\listoverride\listid-132\listoverridecount0\ls10}}{\info{\title OUR TESTERS}{\author David Germano}{\operator Edward Garrett}{\creatim\yr2002\mo2\dy6\hr11}{\revtim\yr2002\mo2\dy25\hr18\min24}{\version9}{\edmins77}{\nofpages3} -{\nofwords1134}{\nofchars6464}{\*\company None of your business}{\nofcharsws0}{\vern8247}}\margl1440\margr1440 \widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\formshade\horzdoc\dgmargin\dghspace180\dgvspace180 -\dghorigin1701\dgvorigin1984\dghshow1\dgvshow1\jexpand\viewkind4\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule \fet0\sectd \linex0\endnhere\sectdefaultcl {\*\pnseclvl1 -\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5 -\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang -{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s19\qc \fi259\li0\ri0\sb360\sl-440\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\b\fs28\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\fs44 Savant and the THDL Tibetan Language Instructional Initiative -\par }\pard\plain \s41\ql \li0\ri0\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\b\fs22\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\fs28 Overview -\par }\pard\plain \s38\ql \li0\ri14\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin14\lin0\itap0 -\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\fs28 -Our project is a collaboration between the University of Virginia (David Germano), CNRS/Paris 8 University (Nicolas Tournadre, Michel Jacobson), University of Chicago (Matthew Kapstein), UCLA (Roger Andersen), the Tibetan Academy of Social Sciences (Konch -ok Jiatso), and Tibet University (gSang bdag rdo rje, Lhags pa tshe brtan). The goal is twofold: (i) to develop new software called \'93Savant\'94 - for teaching language (literary and colloquial) that incorporates digital video/audio of natural speech in common social contexts; and (ii) to develop an entirely new generation of materials in that software for teaching literary and colloquial Tibetan. - -\par While the individual components have long histories of development, this consortium has been operative for 18 months. - Unfortunately, the exceptional difficulties of using Tibetan script within a digital context have taken far too much of our time, but the good news is that we have now dealt with that are ready to focus on the purely pedagogical issues. -\par Savant was origin -ally developed at UCLA, but is now a collaboration of UVA and UCLA. CNRS has been involved to a lesser degree, but we hope to increase this participation into a full partnership. This first release of Savant in its new form provides the software in its m -ost basic form, without the more complex pedagogical functions that are now being implemented. In its present form, Savant allows users to watch a video/listen to an audio recording (referred to as \'93titles\'94 -), while on the right viewing its transcript in mul -tiple linguistic forms (Tibetan script, Wylie, English translation). The media and transcript are synchronized, so that the transcript automatically scrolls down with the video as it plays, and one can click from a line on the transcript to get that segme -nt of the video alone to play back. -\par We are generating most of our media content in original fieldwork in Lhasa and surrounding areas. So far our focus has been on \'93realistic\'94 speech rather than \'93natural\'94 speech. In short, \'93natural\'94 - speech means speech entirely uninfluenced by its taping, which in its strictest sense means speech which has been surreptitiously taped and thus is entirely natural. In contrast, \'93realistic\'94 - speech signifies that the speech has been improvised with no use of scripts and involves common cultural scenarios. Thus, for example, we might give two people an idea \endash a quarreling couple, or a father scolding his daughter \endash and then th -ey act it out on the spot using whatever speech comes to mind. Both of these contrast markedly to scripted speech, where speech has been written out and actors memorize their lines. -\par Our focus on natural and realistic speech reflect our belief that languag -e learners should learn from natural speech as it is actually spoken on the ground, rather than idealized constructions of how it should be spoken. It also reflects our belief that learning language requires learning cultural contexts and social uses of l -a -nguage, since language derives its meaning only embedded within such specific contexts. In addition, use of such materials in audio and video form allows students to be exposed to a wide variety of speakers and contexts, and learn from body languages, fac -i -al expressions, social contexts and so forth. Another issue is that while often students may read Tibetan and have colloquial fluency, they may not be able to use Tibetan colloquially within specific contexts requiring knowledge of special vocabulary and - -structures. Thus a professor giving a lecture on a text, or a doctor talking about a diagnosis, and so forth. Thus our work helps students acquire specific targeted colloquial competencies, including the ability to understand commentaries and discussions -on specific genres of literature. -\par Our actual fieldwork can be divided roughly into five types at present: (i) various colloquial scenarios; (ii) oral commentaries on literature; (iii) academic lectures on various subjects; (iv) interviews; and (v) performa -nces (musical, poetry, etc.). In particular Chicago and UVA are collaborating on (ii), and CNRS/Paris 8 University are collaborating on (i). -\par }{\b\fs28\ul Contents of this release}{\b\fs28 -\par }{\fs28 This release of Savant includes the following components: -\par }{\fs28\ul The Lhasa Soap Opera}{\fs28 : This series of videos follows a set of people with interlocking lives, and particularly two young women who come to conflict over a common love interest. -\par }{\fs28\ul The Manual of Standard Tibetan}{\fs28 : }{\i\fs28 The Manual of Standard Tibetan }{\fs28 by gSang -bdag rdo rje and Nicolas Tournadre is being published in the coming year in an English translation (from the French) by Snow Lion publications (http://www.snowlionpub.com/) as a print publication. We have also been planning a multimedia supplement -to the book which will at the least include videos of the dialogs. Snow Lion has graciously allowed us to share with you ten chapters along with the associated videos of the dialogs in question (shot in Lhasa, Tibet with the Tibetan Drama - Group). The terms are that you can use these ONLY for your own classes, and cannot disseminate or share them in any other context; they also can only be used during 2002. -The dialogues can be opened within Savant, while the text of the 10 chapters can be found as a pdf file on your cd. We will keep you updated on the print publication date via this list. -\par }\pard\plain \s41\ql \li0\ri0\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\b\fs22\ul\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\fs28 Upcoming releases -\par }\pard\plain \s38\ql \li0\ri14\sb240\sl-280\slmult0\widctlpar -\tx360\tx720\tx1080\tx1440\tx1800\tx2160\tx2520\tx2880\tx3240\tx3600\tx3960\tx4320\tx4680\tx5040\tx5400\tx5760\tx6120\tx6480\tx6840\tx7200\tx7560\tx7920\tx8280\tx8640\tx9000\tx9720\tx10080\tx10440\aspalpha\aspnum\faauto\adjustright\rin14\lin0\itap0 -\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\fs28 -Together with a variety of language instructors at UVA, we are now formulating a comprehensive pedagogical plan for Savant. The second version of Savant will add a pedagogical framework and procedure aimed at language instructional uses of Savant. It -will allow students to interact with the videos and transcripts according to predetermined pedagogical templates. In addition, it will add significant components for exercise and testing, as well as a fully integrated Tibetan grammar and glossary. -\par We welcome and expect your participation in bringing the next stage of Savant to fruition. Your experience using Savant as it is will provide us with crucial feedback on the question of how to build instructional units based on digital video. -\par }{\b\fs28\ul Feedback}{\fs28\ul -\par }{\fs28 Please visit http://thdltools.sourceforge.net/ and give us your feedback. Alternatively, you can report any comments, suggestions, or bug reports to thdltools-devel@lists.sourceforge.net.}{\f2\fs28 -\par }} diff --git a/source/org/thdl/savant/.cvsignore b/source/org/thdl/savant/.cvsignore deleted file mode 100644 index b25c15b..0000000 --- a/source/org/thdl/savant/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*~ diff --git a/source/org/thdl/savant/AnnotationPlayer.java b/source/org/thdl/savant/AnnotationPlayer.java deleted file mode 100644 index 5064667..0000000 --- a/source/org/thdl/savant/AnnotationPlayer.java +++ /dev/null @@ -1,27 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -// testing testing - -package org.thdl.savant; - -public interface AnnotationPlayer extends java.util.EventListener -{ - public void startAnnotation(String id); - public void stopAnnotation(String id); -} diff --git a/source/org/thdl/savant/JdkVersionHacks.java b/source/org/thdl/savant/JdkVersionHacks.java deleted file mode 100644 index bb935cf..0000000 --- a/source/org/thdl/savant/JdkVersionHacks.java +++ /dev/null @@ -1,230 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Field; - -import java.awt.Dimension; -import java.awt.Frame; -import java.awt.Toolkit; - -import javax.swing.JFrame; - -import org.thdl.util.ThdlLazyException; - -/** - * @author David Chandler - * - * This class provides functionality that is not present in Java's JDK - * 1.2. Because we want to compile and run on a Java 2/1.2 system, we - * must use the Java Reflection API to provide functionality specific - * to Java 2/1.3 or later. At present, I haven't tested on a 1.2 box, - * but I have tested on a 1.3.1_04 box. - * - * If your code will break if some functionality here is not present, - * test the return value of the function and throw an exception. - * Avoid such code like the plague. - * - * This code is all written for one-shot operations thus-far. If you - * plan on executing a piece of code many times, you need to set up - * the reflection mechanism first, and then re-use it again and again. - * This is a two-step process. Three steps if you explicitly - * deconstruct the mechanism. - * - * This class is not instantiable. */ -public final class JdkVersionHacks { - /** Don't instantiate this class. */ - private JdkVersionHacks() { } - - /** Calls f.setUndecorated(true) if possible. Returns true if - successful. */ - public static boolean undecorateJFrame(JFrame f) { - /* If we're using JDK 1.4, execute - f.setUndecorated(true). Otherwise, don't. */ - - boolean success = false; - - Method setUndecoratedMethod = null; - try { - setUndecoratedMethod - = JFrame.class.getMethod("setUndecorated", - new Class[] { - Boolean.TYPE - }); - } catch (NoSuchMethodException ex) { - /* We're not using JDK 1.4 or later. */ - } catch (SecurityException ex) { - /* We'll never know if we're using JDK 1.4 or later. */ - handleSecurityException(ex); - return false; - } - if (setUndecoratedMethod != null) { - try { - setUndecoratedMethod.invoke(f, new Object[] { Boolean.TRUE }); - success = true; - - /* We shouldn't get any of these exceptions: */ - } catch (IllegalAccessException ex) { - throw new ThdlLazyException(ex); - } catch (IllegalArgumentException ex) { - throw new ThdlLazyException(ex); - } catch (InvocationTargetException ex) { - throw new ThdlLazyException(ex); - } - } - return success; - } - - /** Calls f.setExtendedState(Frame.MAXIMIZED_BOTH) if possible. - Returns true if successful. */ - public static boolean maximizeJFrameInBothDirections(JFrame f) { - /* If we're using JDK 1.4, execute - f.setExtendedState(Frame.MAXIMIZED_BOTH). Otherwise, - don't. */ - - boolean success = false; - - Method setExtendedStateMethod = null; - try { - setExtendedStateMethod - = JFrame.class.getMethod("setExtendedState", - new Class[] { - Integer.TYPE - }); - } catch (NoSuchMethodException ex) { - /* We're not using JDK 1.4 or later. */ - return false; - } catch (SecurityException ex) { - /* We'll never know if we're using JDK 1.4 or later. */ - handleSecurityException(ex); - return false; - } - try { - setExtendedStateMethod.invoke(f, - new Object[] { - maximizedBothOption() - }); - success = true; - - } catch (NoSuchFieldException ex) { - /* We're not using JDK 1.4 or later. */ - return false; - - /* We shouldn't get any of these exceptions: */ - } catch (IllegalAccessException ex) { - throw new ThdlLazyException(ex); - } catch (IllegalArgumentException ex) { - throw new ThdlLazyException(ex); - } catch (InvocationTargetException ex) { - throw new ThdlLazyException(ex); - } - return success; - } - - /** Returns true iff maximizeJFrameInBothDirections(f) will - actually have an effect. */ - public static boolean maximizedBothSupported(Toolkit tk) { - // Execute - // f.getToolkit().isFrameStateSupported(Frame.MAXIMIZED_BOTH) - // if possible. - - Method isFSSMethod = null; - try { - isFSSMethod - = JFrame.class.getMethod("isFrameStateSupported", - new Class[] { - Integer.TYPE - }); - } catch (NoSuchMethodException ex) { - /* We're not using JDK 1.4 or later. */ - return false; - } catch (SecurityException ex) { - /* We'll never know if we're using JDK 1.4 or later. */ - handleSecurityException(ex); - return false; - } - try { - return ((Boolean)isFSSMethod.invoke(tk, - new Object[] { - maximizedBothOption() - })).booleanValue(); - - } catch (NoSuchFieldException ex) { - /* We're not using JDK 1.4 or later. */ - return false; - - /* We shouldn't get any of these exceptions: */ - } catch (IllegalAccessException ex) { - throw new ThdlLazyException(ex); - } catch (IllegalArgumentException ex) { - throw new ThdlLazyException(ex); - } catch (InvocationTargetException ex) { - throw new ThdlLazyException(ex); - } - } - - /** Coming soon: Does what the user desires (via the options he or - she has set) with this SecurityException, one encountered - during the process of reflection. - - Currently: does nothing. - - FIXME */ - private static void handleSecurityException(SecurityException ex) - throws SecurityException - { - if (false /* FIXME: I want this exception when debugging: THDLUtils.getBooleanOption("EagerlyThrowExceptions") */) - throw ex; - } - - /** Returns the value of Frame.MAXIMIZED_BOTH, wrapped in an - Integer. - - @throws NoSuchFieldException the field does not exist or - cannot be accessed because security settings are too limiting */ - private static Object maximizedBothOption() - throws NoSuchFieldException - { - Field maxBothOptionField = null; - try { - maxBothOptionField = Frame.class.getField("MAXIMIZED_BOTH"); - - /* Don't catch NoSuchFieldException */ - } catch (SecurityException ex) { - /* We'll never know if we're using JDK 1.4 or later. */ - handleSecurityException(ex); - throw new NoSuchFieldException("java.awt.Frame.MAXIMIZED_BOTH"); - } - - try { - return maxBothOptionField.get(null); - } catch (IllegalAccessException ex) { - throw new ThdlLazyException(ex); - } catch (IllegalArgumentException ex) { - throw new ThdlLazyException(ex); - } catch (NullPointerException ex) { - throw new ThdlLazyException(ex); - } catch (ExceptionInInitializerError ex) { - throw new ThdlLazyException(ex); - } - } -}; - diff --git a/source/org/thdl/savant/Savant.java b/source/org/thdl/savant/Savant.java deleted file mode 100644 index b9c7675..0000000 --- a/source/org/thdl/savant/Savant.java +++ /dev/null @@ -1,388 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant; - -import java.awt.Font; -import java.awt.Label; -import java.awt.Color; -import java.awt.Frame; -import java.awt.Cursor; -import java.awt.Window; -import java.awt.Dimension; -import java.awt.GridLayout; -import java.awt.BorderLayout; -import java.awt.FlowLayout; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; -import java.awt.event.ComponentAdapter; -import java.awt.event.ComponentEvent; -import java.awt.event.MouseListener; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; - -import java.util.Iterator; -import java.util.List; -import java.util.Enumeration; -import java.util.StringTokenizer; -import java.util.Timer; -import java.util.TimerTask; -import java.util.ResourceBundle; - -import java.io.CharArrayWriter; -import java.io.CharArrayReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.io.FileOutputStream; -import java.io.FileNotFoundException; -import java.io.IOException; - -import java.net.URL; -import java.net.MalformedURLException; - -import javax.swing.*; -import javax.swing.text.*; -import javax.swing.text.rtf.RTFEditorKit; - -import org.thdl.media.*; -import org.thdl.util.ThdlDebug; -import org.thdl.util.ThdlActionListener; -import org.thdl.util.ThdlI18n; - -public class Savant extends JDesktopPane -{ - protected SmartMoviePanel sp = null; - protected TwoWayTextPlayer tp = null; - - protected JInternalFrame videoFrame = null; - protected JInternalFrame textFrame = null; - protected JInternalFrame vocabFrame = null; - - protected JFrame fullScreen = null; - protected boolean isFullScreen = false; - protected Dimension fullScreenSize = null; - - protected JPanel textPanel = null; - protected JScrollPane vocabPanel = null; - - protected URL mediaURL = null; - protected URL extras = null; - protected TranscriptView[] transcriptViews; - - protected int orientation = 0; - - protected ResourceBundle messages; - - public final int TOP_TO_BOTTOM = 1; - public final int LEFT_TO_RIGHT = 2; - - public Savant() - { - messages = ThdlI18n.getResourceBundle(); - - setBackground(new JFrame().getBackground()); - setDragMode(JDesktopPane.OUTLINE_DRAG_MODE); - - //(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifiable) - videoFrame = new JInternalFrame(null, false, false, false, false); - videoFrame.setVisible(true); - videoFrame.setLocation(0,0); - videoFrame.setSize(0,0); - add(videoFrame, JLayeredPane.POPUP_LAYER); - invalidate(); - validate(); - repaint(); - - textFrame = new JInternalFrame(messages.getString("Transcript"), false, false, false, true); - textPanel = new JPanel(new BorderLayout()); - textFrame.setVisible(true); - textFrame.setLocation(0,0); - textFrame.setSize(0,0); - textFrame.setContentPane(textPanel); - add(textFrame, JLayeredPane.DEFAULT_LAYER); - invalidate(); - validate(); - repaint(); - - addComponentListener(new ComponentAdapter() - { - public void componentResized(ComponentEvent ce) - { - switch (orientation) { - case TOP_TO_BOTTOM: - videoFrame.setLocation(getSize().width/2 - videoFrame.getSize().width/2, 0); - textFrame.setLocation(0, videoFrame.getSize().height); - textFrame.setSize(getSize().width, getSize().height - videoFrame.getSize().height); - break; - - case LEFT_TO_RIGHT: - videoFrame.setLocation(0,0); - textFrame.setLocation(videoFrame.getSize().width, 0); - textFrame.setSize(getSize().width - videoFrame.getSize().width, getSize().height); - break; - - default: - break; - } - } - }); - } - - public void close() - { - if (sp != null) { - try { - sp.destroy(); - } catch (SmartMoviePanelException smpe) { - smpe.printStackTrace(); - } - } - } - - public void open(TranscriptView[] views, String video, String vocabulary) - { - try { - if (vocabulary == null) - open(views, new URL(video), null); - else - open(views, new URL(video), new URL(vocabulary)); - } catch (MalformedURLException murle) { - murle.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public void setMediaPlayer(SmartMoviePanel smp) { - if (sp == smp) - return; - - if (sp != null) { - try { - sp.destroy(); - videoFrame.getContentPane().removeAll(); - } catch (SmartMoviePanelException smpe) { - smpe.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - sp = smp; - sp.setParentContainer(Savant.this); - if (mediaURL != null) { - String t1s = convertTimesForSmartMoviePanel(transcriptViews[0].getT1s()); - String t2s = convertTimesForSmartMoviePanel(transcriptViews[0].getT2s()); - sp.initForSavant(t1s, t2s, transcriptViews[0].getIDs()); - sp.addAnnotationPlayer(tp); - try { - sp.loadMovie(mediaURL); - startTimer(); - } catch (SmartMoviePanelException smpe) { - smpe.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - } - - private void startTimer() { - final java.util.Timer timer = new java.util.Timer(true); - timer.schedule(new TimerTask() { - public void run() - { - if (sp.isInitialized()) - { - System.out.println("initialized"); - - timer.cancel(); - videoFrame.getContentPane().add(sp); - videoFrame.pack(); - videoFrame.setMaximumSize(videoFrame.getSize()); - if (videoFrame.getSize().height < 100) //must be audio file, so frame top to bottom - { - orientation = TOP_TO_BOTTOM; - videoFrame.setTitle(messages.getString("Audio")); - videoFrame.setLocation(getSize().width/2 - videoFrame.getSize().width/2, 0); - textFrame.setLocation(0, videoFrame.getSize().height); - textFrame.setSize(getSize().width, getSize().height - videoFrame.getSize().height); - } else { //must be video file, so frame left to right - orientation = LEFT_TO_RIGHT; - videoFrame.setTitle(messages.getString("Video")); - videoFrame.setLocation(0,0); - textFrame.setLocation(videoFrame.getSize().width, 0); - textFrame.setSize(getSize().width - videoFrame.getSize().width, getSize().height); - } - invalidate(); - validate(); - repaint(); - - Window rootWindow = (Window)SwingUtilities.getAncestorOfClass(Window.class, Savant.this); - rootWindow.setCursor(null); - } - }}, 0, 50); - } - - public SmartMoviePanel getMediaPlayer() { - return sp; - } - - private String convertTimesForSmartMoviePanel(String s) { - StringBuffer sBuff = new StringBuffer(); - StringTokenizer sTok = new StringTokenizer(s, ","); - while (sTok.hasMoreTokens()) { - sBuff.append(String.valueOf(new Float(Float.parseFloat(sTok.nextToken()) * 1000).intValue())); - sBuff.append(','); - } - return sBuff.toString(); - } - public void open(TranscriptView[] views, URL video, final URL vocabulary) - { -/* FIXME eventually - w/Savant and SoundPanel times were in seconds. QuillDriver's - SmartMoviePanel uses milliseconds instead, so here I convert - (for the time being anyway - eventually we need the same - time code format for both QD and Savant. */ - - String t1s = convertTimesForSmartMoviePanel(views[0].getT1s()); - String t2s = convertTimesForSmartMoviePanel(views[0].getT2s()); - - if (sp == null) { - JOptionPane.showConfirmDialog(Savant.this, messages.getString("SupportedMediaError"), null, JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); - return; - } - - sp.initForSavant(t1s, t2s, views[0].getIDs()); - tp = new TwoWayTextPlayer(sp, views[0], Color.cyan); - - transcriptViews = views; - - JPanel jp = new JPanel(); - String[] viewNames = new String[views.length]; - for (int i=0; i*.savant file and - * returns the title associated with it. A *.savant file - * is a properties file like the following: - *
- * #Tue May 14 16:07:15 EDT 2002
- * TRANSCRIPT=MST4.xml
- * PROJECT=THDL
- * MEDIA=MST4.mpg
- * TITLE=MST Chapter 4 (video)
- * 
- * @author Edward Garrett */ -public class SavantFileView extends FileView { - /** When opening a file, this is the only extension Savant cares - about. This is case-insensitive. */ - public final static String getDotSavant() { - return ThdlOptions.getStringOption("thdl.savant.file.extension", - ".savant"); - } - - /** This loads *.savant files as properties files and - returns an associated TITLE attribute. For any other type of - file, or for a properties file that does not specify a - non-empty-string TITLE attribute, this returns null. */ - public String getName(File f) { - if (f.isDirectory()) - return null; - - /* Unless a developer has chosen to do otherwise, examine only - *.savant files. If you don't do this, you waste a lot of - time, making any file chooser that uses this class - unresponsive. In addition, you'll cause the floppy drive - to spin up every time you refresh or cd in the file - chooser. */ - if (!ThdlOptions.getBooleanOption("thdl.treat.all.files.as.dot.savant.files.regardless.of.extension")) { /* FIXME */ - if (!f.getName().toLowerCase().endsWith(getDotSavant())) - return null; - } - Properties p = new Properties(); - try { - p.load(new FileInputStream(f)); - String ttl = p.getProperty("TITLE"); - if (ttl.equals("")) - return null; /* We never want the user to see nothing - at all, so let the L&F file view - handle this. */ - else - return ttl; - } catch (FileNotFoundException fnfe) { - fnfe.printStackTrace(); - ThdlDebug.noteIffyCode(); - } catch (IOException ioe) { - ioe.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - return null; - } - - /** Returns null always, which lets the default look-and-feel's - * FileView take over. - * @return null */ - public String getDescription(File f) { - return null; // let the L&F FileView figure this out - } - - /** Returns null always, which lets the default look-and-feel's - * FileView take over. - * @return null */ - public Boolean isTraversable(File f) { - return null; // let the L&F FileView figure this out - } - - /** Returns null always, which lets the default look-and-feel's - * FileView take over. - * @return null */ - public String getTypeDescription(File f) { - return null; // let the L&F FileView figure this out - } - - /* FIXME: why not same as above? */ -/* - public Icon getIcon(File f) { - } -*/ -} diff --git a/source/org/thdl/savant/SavantShell.java b/source/org/thdl/savant/SavantShell.java deleted file mode 100644 index 23d1045..0000000 --- a/source/org/thdl/savant/SavantShell.java +++ /dev/null @@ -1,390 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant; - -import java.io.*; -import java.awt.*; -import java.net.*; -import java.util.*; -import javax.swing.*; -import javax.swing.filechooser.FileFilter; -import java.awt.event.*; -import javax.swing.text.*; -import javax.swing.text.rtf.*; - -import org.thdl.savant.ucuchi.*; -import org.thdl.savant.tib.*; -import org.thdl.media.*; -import org.thdl.util.TeeStream; -import org.thdl.util.ThdlDebug; -import org.thdl.util.ThdlActionListener; -import org.thdl.util.RTFPane; -import org.thdl.util.SimpleFrame; -import org.thdl.util.ThdlI18n; -import org.thdl.util.ThdlOptions; - - -public class SavantShell extends JFrame -{ - private static int numberOfSavantsOpen = 0; - private static JScrollPane helpPane = null; - private static JScrollPane aboutPane = null; - private static String mediaPath = null; - private static JFileChooser fileChooser; - - private Savant savant = null; - - static Locale locale = null; - ResourceBundle messages = null; - - public static void main(String[] args) { - try { - ThdlDebug.attemptToSetUpLogFile("savant", ".log"); - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (Exception e) { ThdlDebug.noteIffyCode(); } - - try { - helpPane = new RTFPane(SavantShell.class, "savanthelp.rtf"); - aboutPane = new RTFPane(SavantShell.class, "aboutsavant.rtf"); - } catch (FileNotFoundException e) { - System.out.println("Can't find " + e.getMessage() + "."); - System.exit(1); - } catch (IOException e) { - System.out.println("Can't find one of savanthelp.rtf or aboutsavant.rtf."); - System.exit(1); - } catch (BadLocationException e) { - System.out.println("Error reading one of savanthelp.rtf or aboutsavant.rtf."); - System.exit(1); - } catch (Exception e) { - /* Carry on. A security exception, probably. */ - ThdlDebug.noteIffyCode(); - } - - if (args.length == 2) { - locale = new Locale(new String(args[0]), new String(args[1])); - ThdlI18n.setLocale(locale); - } - - initFileChooser(); - SavantShell ssh = new SavantShell(); - ssh.setVisible(true); - } catch (NoClassDefFoundError err) { - ThdlDebug.handleClasspathError("Savant's CLASSPATH", err); - } - } - - public static void initFileChooser() { - fileChooser = new JFileChooser(); - fileChooser.setFileView(new SavantFileView()); - fileChooser.addChoosableFileFilter(new FileFilter() { - public boolean accept(File f) { - if (f.isDirectory()) { - return true; - } - return f.getName().toLowerCase().endsWith(SavantFileView.getDotSavant()); - } - //the description of this filter - public String getDescription() { - return "Savant data (.savant)"; - } - }); - } - - /** Closes one open title, if there is one open. Returns true if - one was closed, or false if no titles are open. */ - private boolean closeOneSavantTitle() { - if (savant != null) { - ThdlDebug.verify("There should be one or more Savant titles open: ", - numberOfSavantsOpen >= 1); - if (numberOfSavantsOpen < 2) { - savant.close(); - savant = null; - getContentPane().removeAll(); - setTitle("Savant"); - invalidate(); - validate(); - repaint(); - } else { - savant.close(); - dispose(); - } - numberOfSavantsOpen--; - return true; - } else { - ThdlDebug.verify("There should be zero Savant titles open: ", - numberOfSavantsOpen == 0); - return false; - } - } - - public SavantShell() - { - setTitle("Savant"); - messages = ThdlI18n.getResourceBundle(); - savant = new Savant(); - - JMenuBar menuBar = new JMenuBar(); - JMenu fileMenu = new JMenu(messages.getString("File")); - - JMenuItem openItem = new JMenuItem(messages.getString("Open")); - openItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,java.awt.Event.CTRL_MASK)); - openItem.addActionListener(new ThdlActionListener() { - public void theRealActionPerformed(ActionEvent e) { - if (fileChooser.showOpenDialog(SavantShell.this) != JFileChooser.APPROVE_OPTION) - return; - Properties p = new Properties(); - try { - File fileChosen = fileChooser.getSelectedFile(); - p.load(new FileInputStream(fileChosen)); - String path = "file:" + fileChosen.getParent() + File.separatorChar; - newSavantWindow(p.getProperty("PROJECT"), p.getProperty("TITLE"), new URL(path + p.getProperty("TRANSCRIPT")), new URL(path + p.getProperty("MEDIA")), null); - } catch (MalformedURLException murle) { - murle.printStackTrace(); - ThdlDebug.noteIffyCode(); - } catch (FileNotFoundException fnfe) { - fnfe.printStackTrace(); - ThdlDebug.noteIffyCode(); - } catch (IOException ioe) { - ioe.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - }); - - - JMenuItem closeItem = new JMenuItem(messages.getString("Close")); - closeItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C,java.awt.Event.CTRL_MASK)); - closeItem.addActionListener(new ThdlActionListener() - { - public void theRealActionPerformed(ActionEvent e) - { - // Return value doesn't matter: - closeOneSavantTitle(); - } - }); - - JMenuItem quitItem = new JMenuItem(messages.getString("Quit")); - quitItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,java.awt.Event.CTRL_MASK)); - quitItem.addActionListener(new ThdlActionListener() - { - public void theRealActionPerformed(ActionEvent e) - { - // Close all Savant titles: - while (closeOneSavantTitle()) - ; - - // Exit normally: - System.exit(0); - } - }); - - /* Hey developers: To test ThdlActionListener, use this: - - JMenuItem errorThrowerItem = new JMenuItem("ErrorThrower"); - errorThrowerItem.addActionListener(new ThdlActionListener() - { - public void theRealActionPerformed(ActionEvent e) - { - throw new Error("Testing ThdlActionListener"); - } - }); - fileMenu.add(errorThrowerItem); - */ - - fileMenu.add(openItem); - fileMenu.add(closeItem); - fileMenu.addSeparator(); - fileMenu.add(quitItem); - - - JMenu mediaPlayerMenu = new JMenu(messages.getString("MediaPlayer")); - java.util.List moviePlayers = SmartPlayerFactory.getAllAvailableSmartPlayers(); - for (int i=0; i 0) { - SmartMoviePanel defaultPlayer = (SmartMoviePanel)moviePlayers.get(0); - savant.setMediaPlayer(defaultPlayer); //set savant media player to default - if (moviePlayers.size() > 1) - preferencesMenu.add(mediaPlayerMenu); - } - - JMenu infoMenu = new JMenu(messages.getString("InfoShort")); - JMenuItem helpItem = new JMenuItem(messages.getString("Help")); - helpItem.addActionListener(new ThdlActionListener() - { - public void theRealActionPerformed(ActionEvent e) - { - new SimpleFrame(messages.getString("Help"), helpPane); - } - }); - JMenuItem aboutItem = new JMenuItem(messages.getString("About")); - aboutItem.addActionListener(new ThdlActionListener() - { - public void theRealActionPerformed(ActionEvent e) - { - new SimpleFrame(messages.getString("About"), aboutPane); - } - }); - infoMenu.add(helpItem); - infoMenu.add(aboutItem); - - //make heavyweight to mix better with jmf video player - - fileMenu.getPopupMenu().setLightWeightPopupEnabled(false); - infoMenu.getPopupMenu().setLightWeightPopupEnabled(false); - - menuBar.add(fileMenu); - menuBar.add(preferencesMenu); - menuBar.add(infoMenu); - setJMenuBar(menuBar); - - addWindowListener(new WindowAdapter () { - public void windowClosing (WindowEvent e) { - if (numberOfSavantsOpen < 2) - System.exit(0); - if (savant != null) - savant.close(); - numberOfSavantsOpen--; - } - }); - - // Code for Merlin - if (JdkVersionHacks.maximizedBothSupported(getToolkit())) { - setLocation(0,0); - setSize(getToolkit().getScreenSize().width,getToolkit().getScreenSize().height); - setVisible(true); - - // call setExtendedState(Frame.MAXIMIZED_BOTH) if possible: - if (!JdkVersionHacks.maximizeJFrameInBothDirections(this)) { - throw new Error("badness at maximum: the frame state is supported, but setting that state failed. JdkVersionHacks has a bug."); - } - } else { - Dimension gs = getToolkit().getScreenSize(); - setLocation(0,0); - setSize(new Dimension(gs.width, gs.height)); - setVisible(true); - } - } - - public void newSavantWindow(String project, String titleName, URL trn, URL vid, URL abt) - { - try { - if (numberOfSavantsOpen == 0) { - setCursor(new Cursor(Cursor.WAIT_CURSOR)); - openSavant(project, titleName, trn, vid, abt); - } else { - SavantShell scp = new SavantShell(); - scp.setVisible(true); - setCursor(new Cursor(Cursor.WAIT_CURSOR)); - scp.openSavant(project, titleName, trn, vid, abt); - } - numberOfSavantsOpen++; - } catch (NoClassDefFoundError err) { - ThdlDebug.handleClasspathError("Savant's CLASSPATH", err); - } - } - - public void openSavant(String project, String titleName, URL trn, URL vid, URL abt) - { - setTitle(titleName); - setContentPane(savant); - validate(); - savant.paintImmediately(0,0,savant.getWidth(),savant.getHeight()); - - InputStreamReader isr = null; - try { - InputStream in = trn.openStream(); - isr = new InputStreamReader(in, "UTF8"); - } catch (IOException ioe) { - System.out.println("input stream error"); - return; - } - - if (project.equals("Ucuchi")) { - TranscriptView[] views = new TranscriptView[5]; - views[0] = new org.thdl.savant.ucuchi.Quechua(isr); - views[1] = new org.thdl.savant.ucuchi.SegmentedQuechua(views[0].getDocument()); - views[2] = new org.thdl.savant.ucuchi.English(views[0].getDocument()); - views[3] = new org.thdl.savant.ucuchi.QuechuaEnglish(views[0].getDocument()); - views[4] = new org.thdl.savant.ucuchi.All(views[0].getDocument()); - savant.open(views, vid, abt); - return; - } - - if (project.equals("THDL")) { - // See if we have the TMW fonts available. If we do, - // allow showing Tibetan as well as Wylie and English. - - int i=0; - if (!ThdlOptions.getBooleanOption("thdl.rely.on.system.tmw.fonts")) { - // We do have the TMW fonts available because we - // manually loaded them. - i = -1; - } else { - // DLC FIXME: scan for this in TibetanMachineWeb.java - // before manually loading the TMW fonts. - GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); - String fonts[] = ge.getAvailableFontFamilyNames(); - for (; i 0) { - viewport.setViewPosition(new Point(0, yFactor)); - text.repaint(); - } - -/* this does scrolling at the bottom of the text window - Rectangle rect = text.modelToView(end); - text.scrollRectToVisible(rect); - text.repaint(); -*/ - } - catch (BadLocationException ble) - { - ble.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - private void unhighlight(String id) - { - if (highlights.containsKey(id)) - { - highlighter.removeHighlight(highlights.get(id)); - highlights.remove(id); - } - } -} diff --git a/source/org/thdl/savant/TextPlayer.java b/source/org/thdl/savant/TextPlayer.java deleted file mode 100644 index dbac382..0000000 --- a/source/org/thdl/savant/TextPlayer.java +++ /dev/null @@ -1,114 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant; - -import java.awt.*; -import java.util.*; -import javax.swing.*; -import javax.swing.text.*; - -import org.thdl.util.ThdlDebug; - -public class TextPlayer extends JPanel implements AnnotationPlayer -{ - private JTextComponent text; - private Hashtable hashStart, hashEnd, highlights; - private Highlighter highlighter; - private Highlighter.HighlightPainter highlightPainter; - - public TextPlayer(JTextComponent textcomponent, Color highlightcolor, String ids, String startoffsets, String endoffsets) - { - text = textcomponent; - text.setEditable(false); - hashStart = new Hashtable(); - hashEnd = new Hashtable(); - highlights = new Hashtable(); - - StringTokenizer stIDS = new StringTokenizer(ids, ","); - StringTokenizer stSTARTS = new StringTokenizer(startoffsets, ","); - StringTokenizer stENDS = new StringTokenizer(endoffsets, ","); - while ((stIDS.hasMoreTokens()) && (stSTARTS.hasMoreTokens()) && (stENDS.hasMoreTokens())) { - String sID = stIDS.nextToken(); - String sStart = stSTARTS.nextToken(); - String sEnd = stENDS.nextToken(); - try { - Integer start = new Integer(sStart); - hashStart.put(sID, start); - } catch (NumberFormatException err) { - hashStart.put(sID, new Integer(0)); - } - try { - Integer end = new Integer(sEnd); - hashEnd.put(sID, end); - } catch (NumberFormatException err) { - hashEnd.put(sID, new Integer(0)); - } - } - - highlighter = text.getHighlighter(); - highlightPainter = new DefaultHighlighter.DefaultHighlightPainter(highlightcolor); - - setLayout(new GridLayout(1,1)); - add(new JScrollPane(text, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER)); - } - - public boolean isPlayableAnnotation(String id) - { - return hashStart.containsKey(id); - } - - public void startAnnotation(String id) - { - if (isPlayableAnnotation(id)) - highlight(id); - } - - public void stopAnnotation(String id) - { - if (isPlayableAnnotation(id)) - unhighlight(id); - } - - private void highlight(String id) - { - try - { - Integer startInt = (Integer)hashStart.get(id); - Integer endInt = (Integer)hashEnd.get(id); - int start = startInt.intValue(); - int end = endInt.intValue(); - Object tag = highlighter.addHighlight(start, end, highlightPainter); - highlights.put(id, tag); - } - catch (BadLocationException ble) - { - ble.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - private void unhighlight(String id) - { - if (highlights.containsKey(id)) - { - highlighter.removeHighlight(highlights.get(id)); - highlights.remove(id); - } - } -} diff --git a/source/org/thdl/savant/TranscriptView.java b/source/org/thdl/savant/TranscriptView.java deleted file mode 100644 index 60d0108..0000000 --- a/source/org/thdl/savant/TranscriptView.java +++ /dev/null @@ -1,31 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant; - -public interface TranscriptView -{ - public String getTitle(); - public javax.swing.text.JTextComponent getTextComponent(); - public String getIDs(); - public String getT1s(); - public String getT2s(); - public String getStartOffsets(); - public String getEndOffsets(); - public org.jdom.Document getDocument(); -} diff --git a/source/org/thdl/savant/TwoWayTextPlayer.java b/source/org/thdl/savant/TwoWayTextPlayer.java deleted file mode 100644 index 440ccc6..0000000 --- a/source/org/thdl/savant/TwoWayTextPlayer.java +++ /dev/null @@ -1,128 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant; - -import java.awt.Color; -import java.awt.Point; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; -import java.util.Timer; -import java.util.TimerTask; -import java.util.TreeMap; -import java.util.SortedMap; -import java.util.Enumeration; -import java.util.NoSuchElementException; -import javax.swing.text.JTextComponent; - -import org.thdl.media.SmartMoviePanel; -import org.thdl.util.ThdlDebug; - -public class TwoWayTextPlayer extends TextHighlightPlayer -{ - protected TreeMap orderedOffsets = null; - protected SmartMoviePanel sound = null; - protected long doubleClickDelay = 300L; - protected long lastClickTime; - protected Point lastClickPoint = null; - - public TwoWayTextPlayer(SmartMoviePanel sp, TranscriptView view, Color highlightColor) - { - super(view, highlightColor); - sound = sp; - - orderedOffsets = new TreeMap(); - for (Enumeration e = hashEnd.keys() ; e.hasMoreElements() ;) - { - String id = (String)e.nextElement(); - orderedOffsets.put(hashEnd.get(id), id); - } - - for (Enumeration e = hashStart.keys() ; e.hasMoreElements() ;) - { - String id = (String)e.nextElement(); - orderedOffsets.put(hashStart.get(id), id); - } - - view.getTextComponent().addMouseListener(new MouseAdapter() - { - public void mouseClicked(MouseEvent e) - { - //note - can't use e.getClickCount() here - //because every double click event is - //preceded by a single click event, so - //no easy way to distinguish the two - try - { - final long currentClickTime = e.getWhen(); - final Point currentClickPoint = e.getPoint(); - if (lastClickPoint != null && currentClickPoint.equals(lastClickPoint)) - { //this could be the second click of a double click - if (currentClickTime - lastClickTime < doubleClickDelay) - { //must be a double-click: play only one line - lastClickPoint = null; //makes sure second click won't be interpreted as single click also - int pos = text.viewToModel(currentClickPoint)+1; - Integer i = new Integer(pos); - SortedMap map = orderedOffsets.headMap(i); - final String id = (String)map.get(map.lastKey()); - highlighter.removeAllHighlights(); - sound.cmd_playS(id); - return; - } - } - //otherwise, this click can only be single click or first click - lastClickTime = currentClickTime; - lastClickPoint = new Point(currentClickPoint); - final Timer clickTimer = new Timer(true); - clickTimer.schedule(new TimerTask() - { - public void run() - { - if (lastClickPoint != null) - { //must be a single click: play line onwards - int pos = text.viewToModel(currentClickPoint)+1; - Integer i = new Integer(pos); - SortedMap map = orderedOffsets.headMap(i); - final String id = (String)map.get(map.lastKey()); - highlighter.removeAllHighlights(); - sound.cmd_playFrom(id); - } - clickTimer.cancel(); - } - }, doubleClickDelay); - } - catch (NoSuchElementException nsee) - { - nsee.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - }); - } - - public void reset() - { - sound.removeAnnotationPlayer(this); - highlighter.removeAllHighlights(); - } - - public JTextComponent getTextComponent() - { - return text; - } -} diff --git a/source/org/thdl/savant/package.html b/source/org/thdl/savant/package.html deleted file mode 100644 index 02f8920..0000000 --- a/source/org/thdl/savant/package.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - -Provides classes and methods for displaying foreign-language text, -audio, and video side-by-side. -

-Savant works for only a couple of languages right now, but can -be extended to work with many more. - - diff --git a/source/org/thdl/savant/tib/English.java b/source/org/thdl/savant/tib/English.java deleted file mode 100644 index 71c0a44..0000000 --- a/source/org/thdl/savant/tib/English.java +++ /dev/null @@ -1,218 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant.tib; - -import java.awt.Color; -import java.io.Reader; -import java.util.List; -import java.util.Iterator; -import javax.swing.JTextPane; -import javax.swing.text.*; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.thdl.tib.text.*; -import org.thdl.tib.input.*; -import org.thdl.savant.*; - -import org.thdl.util.ThdlDebug; - -public class English implements TranscriptView -{ - private JTextPane text = null; - private Document xmlDoc = null; - private StringBuffer idBuffer = null; - private StringBuffer t1Buffer = null; - private StringBuffer t2Buffer = null; - private StringBuffer startBuffer = null; - private StringBuffer endBuffer = null; - - public English(Document xml) - { - process(xml); - xmlDoc = xml; - } - - public English(Reader source) - { - try - { - SAXBuilder builder = new SAXBuilder(); - Document xml = builder.build(source); - process(xml); - xmlDoc = xml; - } - catch (JDOMException jdome) - { - jdome.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public String getTitle() - { - return "English"; - } - - public void process(Document xml) - { - try { - Element root = xml.getRootElement(); - List elements = root.getChildren(); - Iterator iter = elements.iterator(); - Element current = null; - - text = new JTextPane(); - javax.swing.text.Document doc = text.getDocument(); - String space = " "; - MutableAttributeSet mas = new SimpleAttributeSet(); - StyleConstants.setForeground(mas, Color.blue); - Position endPos = null; - - idBuffer = new StringBuffer(); - startBuffer = new StringBuffer(); - endBuffer = new StringBuffer(); - t1Buffer = new StringBuffer(); - t2Buffer = new StringBuffer(); - - String thisStart, thisEnd, thisId; - - int counter = 0; - - if (iter.hasNext()) - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - String wylie = current.getAttributeValue("who"); - if (endPos == null) - { - doc.insertString(0, wylie, mas); - endPos = doc.createPosition(doc.getLength()); - } - else - { - doc.insertString(endPos.getOffset(), wylie, mas); - } - - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - if (endPos == null) - { - doc.insertString(0, space, null); - endPos = doc.createPosition(doc.getLength()); - } else { - doc.insertString(endPos.getOffset(), space, null); - } - - thisStart = String.valueOf(endPos.getOffset()); - doc.insertString(endPos.getOffset(), current.getAttributeValue("eng"), null); - startBuffer.append(thisStart); - startBuffer.append(','); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - idBuffer.append("s0,"); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - - while (iter.hasNext()) - { - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - doc.insertString(endPos.getOffset(), "\n", null); - doc.insertString(endPos.getOffset(), current.getAttributeValue("who"), mas); - - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - doc.insertString(endPos.getOffset(), space, null); - counter++; - thisStart = String.valueOf(endPos.getOffset()); - startBuffer.append(thisStart); - startBuffer.append(','); - doc.insertString(endPos.getOffset(), current.getAttributeValue("eng"), null); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - thisId = "s"+String.valueOf(counter); - idBuffer.append(thisId); - idBuffer.append(','); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - } - - idBuffer.toString(); - t1Buffer.toString(); - t2Buffer.toString(); - startBuffer.toString(); - endBuffer.toString(); - } - catch (BadLocationException ble) - { - ble.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public JTextComponent getTextComponent() - { - return text; - } - - public Document getDocument() - { - return xmlDoc; - } - - public String getIDs() - { - return idBuffer.toString(); - } - - public String getT1s() - { - return t1Buffer.toString(); - } - - public String getT2s() - { - return t2Buffer.toString(); - } - - public String getStartOffsets() - { - return startBuffer.toString(); - } - - public String getEndOffsets() - { - return endBuffer.toString(); - } -} diff --git a/source/org/thdl/savant/tib/Tibetan.java b/source/org/thdl/savant/tib/Tibetan.java deleted file mode 100644 index 7fbe4cc..0000000 --- a/source/org/thdl/savant/tib/Tibetan.java +++ /dev/null @@ -1,229 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant.tib; - -import java.awt.Color; -import java.io.Reader; -import java.util.List; -import java.util.Iterator; -import javax.swing.JTextPane; -import javax.swing.text.*; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.thdl.tib.text.*; -import org.thdl.tib.input.*; -import org.thdl.savant.*; - -import org.thdl.util.ThdlDebug; - -public class Tibetan implements TranscriptView -{ - private DuffPane text = null; - private Document xmlDoc = null; - private StringBuffer idBuffer = null; - private StringBuffer t1Buffer = null; - private StringBuffer t2Buffer = null; - private StringBuffer startBuffer = null; - private StringBuffer endBuffer = null; - - public Tibetan(Document xml) - { - process(xml); - xmlDoc = xml; - } - - public Tibetan(Reader source) - { - try - { - SAXBuilder builder = new SAXBuilder(); - Document xml = builder.build(source); - process(xml); - xmlDoc = xml; - } - catch (JDOMException jdome) - { - jdome.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public String getTitle() - { - return "Tibetan"; - } - - public void process(Document xml) - { - try { - Element root = xml.getRootElement(); - List elements = root.getChildren(); - Iterator iter = elements.iterator(); - Element current = null; - idBuffer = new StringBuffer(); - startBuffer = new StringBuffer(); - endBuffer = new StringBuffer(); - t1Buffer = new StringBuffer(); - t2Buffer = new StringBuffer(); - String thisStart, thisEnd, thisId; - Position endPos = null; - DuffData[] dd; - TibetanDocument doc = new TibetanDocument(new StyleContext()); - DuffData[] space = TibTextUtils.getTibetanMachineWeb("_"); - MutableAttributeSet mas = new SimpleAttributeSet(); - StyleConstants.setForeground(mas, Color.blue); - - int counter = 0; - int wherestart = 0; - - if (iter.hasNext()) - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - dd = TibTextUtils.getTibetanMachineWeb(current.getAttributeValue("who")); - if (endPos == null) - { - doc.insertDuff(0, dd); - endPos = doc.createPosition(doc.getLength()); - doc.setCharacterAttributes(0, endPos.getOffset(), mas, false); - } - else - { - wherestart = endPos.getOffset(); - doc.insertDuff(endPos.getOffset(), dd); - doc.setCharacterAttributes(wherestart, endPos.getOffset()-wherestart, mas, false); - } - - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - if (endPos == null) - { - doc.insertDuff(0, space); - endPos = doc.createPosition(doc.getLength()); - } else { - doc.insertDuff(endPos.getOffset(), space); - } - - wherestart = endPos.getOffset(); - dd = TibTextUtils.getTibetanMachineWeb(current.getText()); //from +"\n" - doc.insertDuff(endPos.getOffset(), dd); - startBuffer.append(String.valueOf(wherestart)+","); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - idBuffer.append("s0,"); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - - while (iter.hasNext()) - { - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - doc.insertString(endPos.getOffset(), "\n", null); - dd = TibTextUtils.getTibetanMachineWeb(current.getAttributeValue("who")); //from +"\n" - wherestart = endPos.getOffset(); - doc.insertDuff(endPos.getOffset(), dd); - doc.setCharacterAttributes(wherestart, endPos.getOffset()-wherestart, mas, false); - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - doc.insertDuff(endPos.getOffset(), space); - counter++; - dd = TibTextUtils.getTibetanMachineWeb(current.getText()); //from "+\n" - thisStart = String.valueOf(endPos.getOffset()); - startBuffer.append(thisStart); - startBuffer.append(','); - doc.insertDuff(endPos.getOffset(), dd); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - thisId = "s"+String.valueOf(counter); - idBuffer.append(thisId); - idBuffer.append(','); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - } - - text = new DuffPane(); - text.setDocument(doc); - idBuffer.toString(); - t1Buffer.toString(); - t2Buffer.toString(); - startBuffer.toString(); - endBuffer.toString(); - } - catch (BadLocationException ble) - { - ble.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - catch (InvalidWylieException iwe) - { - iwe.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public JTextComponent getTextComponent() - { - return text; - } - - public Document getDocument() - { - return xmlDoc; - } - - public String getIDs() - { - return idBuffer.toString(); - } - - public String getT1s() - { - return t1Buffer.toString(); - } - - public String getT2s() - { - return t2Buffer.toString(); - } - - public String getStartOffsets() - { - return startBuffer.toString(); - } - - public String getEndOffsets() - { - return endBuffer.toString(); - } -} diff --git a/source/org/thdl/savant/tib/TibetanEnglish.java b/source/org/thdl/savant/tib/TibetanEnglish.java deleted file mode 100644 index 63e73f5..0000000 --- a/source/org/thdl/savant/tib/TibetanEnglish.java +++ /dev/null @@ -1,237 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant.tib; - -import java.awt.Color; -import java.io.Reader; -import java.util.List; -import java.util.Iterator; -import javax.swing.JTextPane; -import javax.swing.text.*; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.thdl.tib.text.*; -import org.thdl.tib.input.*; -import org.thdl.savant.*; - -import org.thdl.util.ThdlDebug; - -public class TibetanEnglish implements TranscriptView -{ - private DuffPane text = null; - private Document xmlDoc = null; - private StringBuffer idBuffer = null; - private StringBuffer t1Buffer = null; - private StringBuffer t2Buffer = null; - private StringBuffer startBuffer = null; - private StringBuffer endBuffer = null; - - public TibetanEnglish(Document xml) - { - process(xml); - xmlDoc = xml; - } - - public TibetanEnglish(Reader source) - { - try - { - SAXBuilder builder = new SAXBuilder(); - Document xml = builder.build(source); - process(xml); - xmlDoc = xml; - } - catch (JDOMException jdome) - { - jdome.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public String getTitle() - { - return "Tibetan and English"; - } - - public void process(Document xml) - { - try { - Element root = xml.getRootElement(); - List elements = root.getChildren(); - Iterator iter = elements.iterator(); - Element current = null; - - DuffData[] dd; -// DuffData[] space = TibTextUtils.getTibetanMachineWeb("_"); - MutableAttributeSet mas = new SimpleAttributeSet(); - StyleConstants.setForeground(mas, Color.blue); - Position endPos = null; -// int wherestart; - - TibetanDocument doc = new TibetanDocument(new StyleContext()); - - idBuffer = new StringBuffer(); - startBuffer = new StringBuffer(); - endBuffer = new StringBuffer(); - t1Buffer = new StringBuffer(); - t2Buffer = new StringBuffer(); - - String thisStart, thisEnd, thisId; - - int counter = 0; - - if (iter.hasNext()) - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - String wylie = current.getAttributeValue("who"); - if (endPos == null) - { - doc.insertString(0, wylie, mas); - endPos = doc.createPosition(doc.getLength()); - } - else - { -// wherestart = endPos.getOffset(); - doc.insertString(endPos.getOffset(), wylie, mas); - } - - doc.insertString(endPos.getOffset(), "\n", null); - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - dd = TibTextUtils.getTibetanMachineWeb(current.getText()+"\n"); - if (endPos == null) - { - thisStart = "0"; - doc.insertDuff(0, dd); - endPos = doc.createPosition(doc.getLength()); - } else { - thisStart = String.valueOf(endPos.getOffset()); - doc.insertDuff(endPos.getOffset(), dd); - } - - doc.insertString(endPos.getOffset(), current.getAttributeValue("eng"), null); - - startBuffer.append(thisStart); - startBuffer.append(','); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - idBuffer.append("s0,"); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - doc.insertString(endPos.getOffset(), "\n", null); - - while (iter.hasNext()) - { - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - doc.insertString(endPos.getOffset(), "\n", null); - String wylie = current.getAttributeValue("who"); -// wherestart = endPos.getOffset(); - doc.insertString(endPos.getOffset(), wylie, mas); - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - doc.insertString(endPos.getOffset(), "\n", null); - counter++; - thisStart = String.valueOf(endPos.getOffset()); - startBuffer.append(thisStart); - startBuffer.append(','); - dd = TibTextUtils.getTibetanMachineWeb(current.getText()+"\n"); - doc.insertDuff(endPos.getOffset(), dd); - doc.insertString(endPos.getOffset(), current.getAttributeValue("eng"), null); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - thisId = "s"+String.valueOf(counter); - idBuffer.append(thisId); - idBuffer.append(','); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - doc.insertString(endPos.getOffset(), "\n", null); - } - - text = new DuffPane(); - text.setDocument(doc); - idBuffer.toString(); - t1Buffer.toString(); - t2Buffer.toString(); - startBuffer.toString(); - endBuffer.toString(); - } - catch (BadLocationException ble) - { - ble.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - catch (InvalidWylieException iwe) - { - iwe.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public JTextComponent getTextComponent() - { - return text; - } - - public Document getDocument() - { - return xmlDoc; - } - - public String getIDs() - { - return idBuffer.toString(); - } - - public String getT1s() - { - return t1Buffer.toString(); - } - - public String getT2s() - { - return t2Buffer.toString(); - } - - public String getStartOffsets() - { - return startBuffer.toString(); - } - - public String getEndOffsets() - { - return endBuffer.toString(); - } -} diff --git a/source/org/thdl/savant/tib/TibetanWylie.java b/source/org/thdl/savant/tib/TibetanWylie.java deleted file mode 100644 index 52bb63e..0000000 --- a/source/org/thdl/savant/tib/TibetanWylie.java +++ /dev/null @@ -1,240 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant.tib; - -import java.awt.Color; -import java.io.Reader; -import java.util.List; -import java.util.Iterator; -import javax.swing.JTextPane; -import javax.swing.text.*; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.thdl.tib.text.*; -import org.thdl.tib.input.*; -import org.thdl.savant.*; - -import org.thdl.util.ThdlDebug; - -public class TibetanWylie implements TranscriptView -{ - private DuffPane text = null; - private Document xmlDoc = null; - private StringBuffer idBuffer = null; - private StringBuffer t1Buffer = null; - private StringBuffer t2Buffer = null; - private StringBuffer startBuffer = null; - private StringBuffer endBuffer = null; - - public TibetanWylie(Document xml) - { - process(xml); - xmlDoc = xml; - } - - public TibetanWylie(Reader source) - { - try - { - SAXBuilder builder = new SAXBuilder(); - Document xml = builder.build(source); - process(xml); - xmlDoc = xml; - } - catch (JDOMException jdome) - { - jdome.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public String getTitle() - { - return "Tibetan and Wylie"; - } - - public void process(Document xml) - { - try { - Element root = xml.getRootElement(); - List elements = root.getChildren(); - Iterator iter = elements.iterator(); - Element current = null; - - String wylie; - DuffData[] dd; -// DuffData[] space = TibTextUtils.getTibetanMachineWeb("_"); - MutableAttributeSet mas = new SimpleAttributeSet(); - StyleConstants.setForeground(mas, Color.blue); - Position endPos = null; -// int wherestart; - - TibetanDocument doc = new TibetanDocument(new StyleContext()); - - idBuffer = new StringBuffer(); - startBuffer = new StringBuffer(); - endBuffer = new StringBuffer(); - t1Buffer = new StringBuffer(); - t2Buffer = new StringBuffer(); - - String thisStart, thisEnd, thisId; - - int counter = 0; - - if (iter.hasNext()) - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - wylie = current.getAttributeValue("who"); - if (endPos == null) - { - doc.insertString(0, wylie, mas); - endPos = doc.createPosition(doc.getLength()); - } - else - { -// wherestart = endPos.getOffset(); - doc.insertString(endPos.getOffset(), wylie, mas); - } - - doc.insertString(endPos.getOffset(), "\n", null); - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - wylie = current.getText(); - dd = TibTextUtils.getTibetanMachineWeb(wylie+"\n"); - if (endPos == null) - { - thisStart = "0"; - doc.insertDuff(0, dd); - endPos = doc.createPosition(doc.getLength()); - } else { - thisStart = String.valueOf(endPos.getOffset()); - doc.insertDuff(endPos.getOffset(), dd); - } - doc.insertString(endPos.getOffset(), wylie, null); - - startBuffer.append(thisStart); - startBuffer.append(','); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - idBuffer.append("s0,"); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - doc.insertString(endPos.getOffset(), "\n", null); - - while (iter.hasNext()) - { - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - doc.insertString(endPos.getOffset(), "\n", null); - wylie = current.getAttributeValue("who"); -// wherestart = endPos.getOffset(); - doc.insertString(endPos.getOffset(), wylie, mas); - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - doc.insertString(endPos.getOffset(), "\n", null); - counter++; - thisStart = String.valueOf(endPos.getOffset()); - startBuffer.append(thisStart); - startBuffer.append(','); - wylie = current.getText(); - dd = TibTextUtils.getTibetanMachineWeb(wylie+"\n"); - doc.insertDuff(endPos.getOffset(), dd); - doc.insertString(endPos.getOffset(), wylie, null); - - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - thisId = "s"+String.valueOf(counter); - idBuffer.append(thisId); - idBuffer.append(','); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - doc.insertString(endPos.getOffset(), "\n", null); - } - - text = new DuffPane(); - text.setDocument(doc); - idBuffer.toString(); - t1Buffer.toString(); - t2Buffer.toString(); - startBuffer.toString(); - endBuffer.toString(); - } - catch (BadLocationException ble) - { - ble.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - catch (InvalidWylieException iwe) - { - iwe.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public JTextComponent getTextComponent() - { - return text; - } - - public Document getDocument() - { - return xmlDoc; - } - - public String getIDs() - { - return idBuffer.toString(); - } - - public String getT1s() - { - return t1Buffer.toString(); - } - - public String getT2s() - { - return t2Buffer.toString(); - } - - public String getStartOffsets() - { - return startBuffer.toString(); - } - - public String getEndOffsets() - { - return endBuffer.toString(); - } -} diff --git a/source/org/thdl/savant/tib/TibetanWylieEnglish.java b/source/org/thdl/savant/tib/TibetanWylieEnglish.java deleted file mode 100644 index db871da..0000000 --- a/source/org/thdl/savant/tib/TibetanWylieEnglish.java +++ /dev/null @@ -1,242 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant.tib; - -import java.awt.Color; -import java.io.Reader; -import java.util.List; -import java.util.Iterator; -import javax.swing.JTextPane; -import javax.swing.text.*; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.thdl.tib.text.*; -import org.thdl.tib.input.*; -import org.thdl.savant.*; - -import org.thdl.util.ThdlDebug; - -public class TibetanWylieEnglish implements TranscriptView -{ - private DuffPane text = null; - private Document xmlDoc = null; - private StringBuffer idBuffer = null; - private StringBuffer t1Buffer = null; - private StringBuffer t2Buffer = null; - private StringBuffer startBuffer = null; - private StringBuffer endBuffer = null; - - public TibetanWylieEnglish(Document xml) - { - process(xml); - xmlDoc = xml; - } - - public TibetanWylieEnglish(Reader source) - { - try - { - SAXBuilder builder = new SAXBuilder(); - Document xml = builder.build(source); - process(xml); - xmlDoc = xml; - } - catch (JDOMException jdome) - { - jdome.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public String getTitle() - { - return "Tibetan, Wylie and English"; - } - - public void process(Document xml) - { - try { - Element root = xml.getRootElement(); - List elements = root.getChildren(); - Iterator iter = elements.iterator(); - Element current = null; - - DuffData[] dd; -// DuffData[] space = TibTextUtils.getTibetanMachineWeb("_"); - MutableAttributeSet mas = new SimpleAttributeSet(); - StyleConstants.setForeground(mas, Color.blue); - MutableAttributeSet mas2 = new SimpleAttributeSet(); - StyleConstants.setItalic(mas2, true); - Position endPos = null; -// int wherestart; - String wylie; - TibetanDocument doc = new TibetanDocument(new StyleContext()); - - idBuffer = new StringBuffer(); - startBuffer = new StringBuffer(); - endBuffer = new StringBuffer(); - t1Buffer = new StringBuffer(); - t2Buffer = new StringBuffer(); - - String thisStart, thisEnd, thisId; - - int counter = 0; - - if (iter.hasNext()) - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - wylie = current.getAttributeValue("who"); - if (endPos == null) - { - doc.insertString(0, wylie, mas); - endPos = doc.createPosition(doc.getLength()); - } - else - { -// wherestart = endPos.getOffset(); - doc.insertString(endPos.getOffset(), wylie, mas); - } - - doc.insertString(endPos.getOffset(), "\n", null); - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - wylie = current.getText(); - dd = TibTextUtils.getTibetanMachineWeb(wylie+"\n"); - if (endPos == null) - { - thisStart = "0"; - doc.insertDuff(0, dd); - endPos = doc.createPosition(doc.getLength()); - } else { - thisStart = String.valueOf(endPos.getOffset()); - doc.insertDuff(endPos.getOffset(), dd); - } - doc.insertString(endPos.getOffset(), wylie+"\n", mas2); - doc.insertString(endPos.getOffset(), current.getAttributeValue("eng"), null); - - startBuffer.append(thisStart); - startBuffer.append(','); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - idBuffer.append("s0,"); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - doc.insertString(endPos.getOffset(), "\n", null); - - while (iter.hasNext()) - { - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - doc.insertString(endPos.getOffset(), "\n", null); - wylie = current.getAttributeValue("who"); -// wherestart = endPos.getOffset(); - doc.insertString(endPos.getOffset(), wylie, mas); - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - doc.insertString(endPos.getOffset(), "\n", null); - counter++; - thisStart = String.valueOf(endPos.getOffset()); - startBuffer.append(thisStart); - startBuffer.append(','); - wylie = current.getText(); - dd = TibTextUtils.getTibetanMachineWeb(wylie+"\n"); - doc.insertDuff(endPos.getOffset(), dd); - doc.insertString(endPos.getOffset(), wylie+"\n", mas2); - doc.insertString(endPos.getOffset(), current.getAttributeValue("eng"), null); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - thisId = "s"+String.valueOf(counter); - idBuffer.append(thisId); - idBuffer.append(','); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - doc.insertString(endPos.getOffset(), "\n", null); - } - - text = new DuffPane(); - text.setDocument(doc); - idBuffer.toString(); - t1Buffer.toString(); - t2Buffer.toString(); - startBuffer.toString(); - endBuffer.toString(); - } - catch (BadLocationException ble) - { - ble.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - catch (InvalidWylieException iwe) - { - iwe.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public JTextComponent getTextComponent() - { - return text; - } - - public Document getDocument() - { - return xmlDoc; - } - - public String getIDs() - { - return idBuffer.toString(); - } - - public String getT1s() - { - return t1Buffer.toString(); - } - - public String getT2s() - { - return t2Buffer.toString(); - } - - public String getStartOffsets() - { - return startBuffer.toString(); - } - - public String getEndOffsets() - { - return endBuffer.toString(); - } -} diff --git a/source/org/thdl/savant/tib/Wylie.java b/source/org/thdl/savant/tib/Wylie.java deleted file mode 100644 index 387f9fa..0000000 --- a/source/org/thdl/savant/tib/Wylie.java +++ /dev/null @@ -1,218 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant.tib; - -import java.awt.Color; -import java.io.Reader; -import java.util.List; -import java.util.Iterator; -import javax.swing.JTextPane; -import javax.swing.text.*; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.thdl.tib.text.*; -import org.thdl.tib.input.*; -import org.thdl.savant.*; - -import org.thdl.util.ThdlDebug; - -public class Wylie implements TranscriptView -{ - private JTextPane text = null; - private Document xmlDoc = null; - private StringBuffer idBuffer = null; - private StringBuffer t1Buffer = null; - private StringBuffer t2Buffer = null; - private StringBuffer startBuffer = null; - private StringBuffer endBuffer = null; - - public Wylie(Document xml) - { - process(xml); - xmlDoc = xml; - } - - public Wylie(Reader source) - { - try - { - SAXBuilder builder = new SAXBuilder(); - Document xml = builder.build(source); - process(xml); - xmlDoc = xml; - } - catch (JDOMException jdome) - { - jdome.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public String getTitle() - { - return "Wylie"; - } - - public void process(Document xml) - { - try { - Element root = xml.getRootElement(); - List elements = root.getChildren(); - Iterator iter = elements.iterator(); - Element current = null; - - String space = " "; - MutableAttributeSet mas = new SimpleAttributeSet(); - StyleConstants.setForeground(mas, Color.blue); - Position endPos = null; - StyledDocument doc = new TibetanDocument(new StyleContext()); - - idBuffer = new StringBuffer(); - startBuffer = new StringBuffer(); - endBuffer = new StringBuffer(); - t1Buffer = new StringBuffer(); - t2Buffer = new StringBuffer(); - - String thisStart, thisEnd, thisId; - - int counter = 0; - - if (iter.hasNext()) - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - String wylie = current.getAttributeValue("who"); - if (endPos == null) - { - doc.insertString(0, wylie, mas); - endPos = doc.createPosition(doc.getLength()); - } - else - { - doc.insertString(endPos.getOffset(), wylie, mas); - } - - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - if (endPos == null) - { - doc.insertString(0, space, null); - endPos = doc.createPosition(doc.getLength()); - } else { - doc.insertString(endPos.getOffset(), space, null); - } - - thisStart = String.valueOf(endPos.getOffset()); - doc.insertString(endPos.getOffset(), current.getText(), null); - startBuffer.append(thisStart); - startBuffer.append(','); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - idBuffer.append("s0,"); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - - while (iter.hasNext()) - { - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - doc.insertString(endPos.getOffset(), "\n", null); - doc.insertString(endPos.getOffset(), current.getAttributeValue("who"), mas); - - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - doc.insertString(endPos.getOffset(), space, null); - counter++; - thisStart = String.valueOf(endPos.getOffset()); - startBuffer.append(thisStart); - startBuffer.append(','); - doc.insertString(endPos.getOffset(), current.getText(), null); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - thisId = "s"+String.valueOf(counter); - idBuffer.append(thisId); - idBuffer.append(','); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - } - - text = new JTextPane(doc); - idBuffer.toString(); - t1Buffer.toString(); - t2Buffer.toString(); - startBuffer.toString(); - endBuffer.toString(); - } - catch (BadLocationException ble) - { - ble.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public JTextComponent getTextComponent() - { - return text; - } - - public Document getDocument() - { - return xmlDoc; - } - - public String getIDs() - { - return idBuffer.toString(); - } - - public String getT1s() - { - return t1Buffer.toString(); - } - - public String getT2s() - { - return t2Buffer.toString(); - } - - public String getStartOffsets() - { - return startBuffer.toString(); - } - - public String getEndOffsets() - { - return endBuffer.toString(); - } -} diff --git a/source/org/thdl/savant/tib/WylieEnglish.java b/source/org/thdl/savant/tib/WylieEnglish.java deleted file mode 100644 index 90436a7..0000000 --- a/source/org/thdl/savant/tib/WylieEnglish.java +++ /dev/null @@ -1,230 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant.tib; - -import java.awt.Color; -import java.io.Reader; -import java.util.List; -import java.util.Iterator; -import javax.swing.JTextPane; -import javax.swing.text.*; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.thdl.tib.text.*; -import org.thdl.tib.input.*; -import org.thdl.savant.*; - -import org.thdl.util.ThdlDebug; - -public class WylieEnglish implements TranscriptView -{ - private JTextPane text = null; - private Document xmlDoc = null; - private StringBuffer idBuffer = null; - private StringBuffer t1Buffer = null; - private StringBuffer t2Buffer = null; - private StringBuffer startBuffer = null; - private StringBuffer endBuffer = null; - - public WylieEnglish(Document xml) - { - process(xml); - xmlDoc = xml; - } - - public WylieEnglish(Reader source) - { - try - { - SAXBuilder builder = new SAXBuilder(); - Document xml = builder.build(source); - process(xml); - xmlDoc = xml; - } - catch (JDOMException jdome) - { - jdome.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public String getTitle() - { - return "Wylie and English"; - } - - public void process(Document xml) - { - try { - Element root = xml.getRootElement(); - List elements = root.getChildren(); - Iterator iter = elements.iterator(); - Element current = null; - - MutableAttributeSet mas = new SimpleAttributeSet(); - StyleConstants.setForeground(mas, Color.blue); - MutableAttributeSet mas2 = new SimpleAttributeSet(); - StyleConstants.setItalic(mas2, true); - Position endPos = null; -// int wherestart; - String wylie; - StyledDocument doc = new TibetanDocument(new StyleContext()); - - idBuffer = new StringBuffer(); - startBuffer = new StringBuffer(); - endBuffer = new StringBuffer(); - t1Buffer = new StringBuffer(); - t2Buffer = new StringBuffer(); - - String thisStart, thisEnd, thisId; - - int counter = 0; - - if (iter.hasNext()) - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - wylie = current.getAttributeValue("who"); - if (endPos == null) - { - doc.insertString(0, wylie, mas); - endPos = doc.createPosition(doc.getLength()); - } - else - { -// wherestart = endPos.getOffset(); - doc.insertString(endPos.getOffset(), wylie, mas); - } - - doc.insertString(endPos.getOffset(), "\n", null); - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - wylie = current.getText(); - if (endPos == null) - { - thisStart = "0"; - doc.insertString(0, wylie+"\n", null); - endPos = doc.createPosition(doc.getLength()); - } else { - thisStart = String.valueOf(endPos.getOffset()); - doc.insertString(endPos.getOffset(), wylie+"\n", mas2); - } - doc.insertString(endPos.getOffset(), current.getAttributeValue("eng"), null); - - startBuffer.append(thisStart); - startBuffer.append(','); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - idBuffer.append("s0,"); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - doc.insertString(endPos.getOffset(), "\n", null); - - while (iter.hasNext()) - { - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - doc.insertString(endPos.getOffset(), "\n", null); - wylie = current.getAttributeValue("who"); -// wherestart = endPos.getOffset(); - doc.insertString(endPos.getOffset(), wylie, mas); - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - doc.insertString(endPos.getOffset(), "\n", null); - counter++; - thisStart = String.valueOf(endPos.getOffset()); - startBuffer.append(thisStart); - startBuffer.append(','); - wylie = current.getText(); - doc.insertString(endPos.getOffset(), wylie+"\n", mas2); - doc.insertString(endPos.getOffset(), current.getAttributeValue("eng"), null); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - thisId = "s"+String.valueOf(counter); - idBuffer.append(thisId); - idBuffer.append(','); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - doc.insertString(endPos.getOffset(), "\n", null); - } - - text = new JTextPane(doc); - idBuffer.toString(); - t1Buffer.toString(); - t2Buffer.toString(); - startBuffer.toString(); - endBuffer.toString(); - } - catch (BadLocationException ble) - { - ble.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public JTextComponent getTextComponent() - { - return text; - } - - public Document getDocument() - { - return xmlDoc; - } - - public String getIDs() - { - return idBuffer.toString(); - } - - public String getT1s() - { - return t1Buffer.toString(); - } - - public String getT2s() - { - return t2Buffer.toString(); - } - - public String getStartOffsets() - { - return startBuffer.toString(); - } - - public String getEndOffsets() - { - return endBuffer.toString(); - } -} diff --git a/source/org/thdl/savant/tib/package.html b/source/org/thdl/savant/tib/package.html deleted file mode 100644 index 4a95b9d..0000000 --- a/source/org/thdl/savant/tib/package.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -Provides Savant with the power to display Tibetan language -text beside video or audio of Tibetan speakers. -

-Supports Wylie, English, and Tibetan. - - diff --git a/source/org/thdl/savant/ucuchi/All.java b/source/org/thdl/savant/ucuchi/All.java deleted file mode 100644 index ea790bb..0000000 --- a/source/org/thdl/savant/ucuchi/All.java +++ /dev/null @@ -1,246 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant.ucuchi; - -import java.io.Reader; -import java.util.List; -import java.util.Iterator; -import javax.swing.JTextPane; -import javax.swing.text.*; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.thdl.savant.*; - -import org.thdl.util.ThdlDebug; - -public class All implements TranscriptView -{ - private JTextPane text = null; - private Document xmlDoc = null; - private StringBuffer idBuffer = null; - private StringBuffer t1Buffer = null; - private StringBuffer t2Buffer = null; - private StringBuffer startBuffer = null; - private StringBuffer endBuffer = null; - - public All(Document xml) - { - process(xml); - xmlDoc = xml; - } - - public All(Reader source) - { - try - { - SAXBuilder builder = new SAXBuilder(); - Document xml = builder.build(source); - process(xml); - xmlDoc = xml; - } - catch (JDOMException jdome) - { - jdome.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public String getTitle() - { - return "Quechua, Segmented Quechua, Gloss and English"; - } - - public void process(Document xml) - { - try { - Element root = xml.getRootElement(); - List elements = root.getChildren(); - Iterator iter = elements.iterator(); - Element current = null; - - text = new JTextPane(); - javax.swing.text.Document doc = text.getDocument(); - - MutableAttributeSet mas = new SimpleAttributeSet(); - StyleConstants.setBold(mas, true); - StyleConstants.setUnderline(mas, true); - StyleConstants.setFontFamily(mas, "Monospaced"); - StyleConstants.setFontSize(mas, 14); - MutableAttributeSet mas2 = new SimpleAttributeSet(); - StyleConstants.setItalic(mas2, true); - StyleConstants.setFontFamily(mas2, "Monospaced"); - StyleConstants.setFontSize(mas2, 14); - MutableAttributeSet mas3 = new SimpleAttributeSet(); - StyleConstants.setFontFamily(mas3, "Monospaced"); - StyleConstants.setFontSize(mas3, 14); - Position endPos = null; - String wylie; - - idBuffer = new StringBuffer(); - startBuffer = new StringBuffer(); - endBuffer = new StringBuffer(); - t1Buffer = new StringBuffer(); - t2Buffer = new StringBuffer(); - - String thisStart, thisEnd, thisId; - - int counter = 0; - - if (iter.hasNext()) - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - wylie = current.getAttributeValue("who"); - if (endPos == null) - { - doc.insertString(0, wylie, mas); - endPos = doc.createPosition(doc.getLength()); - } - else - { -// wherestart = endPos.getOffset(); - doc.insertString(endPos.getOffset(), wylie, mas); - } - - doc.insertString(endPos.getOffset(), "\n", null); - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - thisStart = "0"; - if (current.getAttributeValue("gls").equals("PAUSE")) - doc.insertString(endPos.getOffset(), "((pause))", mas3); - else { - wylie = current.getText(); - if (endPos == null) - { - doc.insertString(0, wylie+"\n", null); - endPos = doc.createPosition(doc.getLength()); - } else { - thisStart = String.valueOf(endPos.getOffset()); - doc.insertString(endPos.getOffset(), wylie+"\n", mas3); - } - doc.insertString(endPos.getOffset(), current.getAttributeValue("seg")+"\n", mas3); - doc.insertString(endPos.getOffset(), current.getAttributeValue("gls")+"\n", mas3); - doc.insertString(endPos.getOffset(), current.getAttributeValue("eng"), mas2); - } - startBuffer.append(thisStart); - startBuffer.append(','); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - idBuffer.append("s0,"); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - doc.insertString(endPos.getOffset(), "\n", null); - - while (iter.hasNext()) - { - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - doc.insertString(endPos.getOffset(), "\n", null); - wylie = current.getAttributeValue("who"); -// wherestart = endPos.getOffset(); - doc.insertString(endPos.getOffset(), wylie, mas); - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - doc.insertString(endPos.getOffset(), "\n", null); - counter++; - thisStart = String.valueOf(endPos.getOffset()); - startBuffer.append(thisStart); - startBuffer.append(','); - if (current.getAttributeValue("gls").equals("PAUSE")) - doc.insertString(endPos.getOffset(), "((pause))", mas3); - else { - wylie = current.getText(); - doc.insertString(endPos.getOffset(), wylie+"\n", mas3); - doc.insertString(endPos.getOffset(), current.getAttributeValue("seg")+"\n", mas3); - doc.insertString(endPos.getOffset(), current.getAttributeValue("gls")+"\n", mas3); - doc.insertString(endPos.getOffset(), current.getAttributeValue("eng"), mas2); - } - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - thisId = "s"+String.valueOf(counter); - idBuffer.append(thisId); - idBuffer.append(','); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - doc.insertString(endPos.getOffset(), "\n", null); - } - - idBuffer.toString(); - t1Buffer.toString(); - t2Buffer.toString(); - startBuffer.toString(); - endBuffer.toString(); - } - catch (BadLocationException ble) - { - ble.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public JTextComponent getTextComponent() - { - return text; - } - - public Document getDocument() - { - return xmlDoc; - } - - public String getIDs() - { - return idBuffer.toString(); - } - - public String getT1s() - { - return t1Buffer.toString(); - } - - public String getT2s() - { - return t2Buffer.toString(); - } - - public String getStartOffsets() - { - return startBuffer.toString(); - } - - public String getEndOffsets() - { - return endBuffer.toString(); - } -} diff --git a/source/org/thdl/savant/ucuchi/English.java b/source/org/thdl/savant/ucuchi/English.java deleted file mode 100644 index 3dc3fe9..0000000 --- a/source/org/thdl/savant/ucuchi/English.java +++ /dev/null @@ -1,218 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant.ucuchi; - -import java.io.Reader; -import java.util.List; -import java.util.Iterator; -import javax.swing.JTextPane; -import javax.swing.text.*; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.thdl.savant.*; - -import org.thdl.util.ThdlDebug; - -public class English implements TranscriptView -{ - private JTextPane text = null; - private Document xmlDoc = null; - private StringBuffer idBuffer = null; - private StringBuffer t1Buffer = null; - private StringBuffer t2Buffer = null; - private StringBuffer startBuffer = null; - private StringBuffer endBuffer = null; - - public English(Document xml) - { - process(xml); - xmlDoc = xml; - } - - public English(Reader source) - { - try - { - SAXBuilder builder = new SAXBuilder(); - Document xml = builder.build(source); - process(xml); - xmlDoc = xml; - } - catch (JDOMException jdome) - { - jdome.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public String getTitle() - { - return "English"; - } - - public void process(Document xml) - { - try { - Element root = xml.getRootElement(); - List elements = root.getChildren(); - Iterator iter = elements.iterator(); - Element current = null; - - text = new JTextPane(); - javax.swing.text.Document doc = text.getDocument(); - - MutableAttributeSet mas0 = new SimpleAttributeSet(); - StyleConstants.setFontSize(mas0, 16); - MutableAttributeSet mas = new SimpleAttributeSet(); - StyleConstants.setBold(mas, true); - StyleConstants.setUnderline(mas, true); - StyleConstants.setFontSize(mas, 16); - Position endPos = null; - - idBuffer = new StringBuffer(); - startBuffer = new StringBuffer(); - endBuffer = new StringBuffer(); - t1Buffer = new StringBuffer(); - t2Buffer = new StringBuffer(); - - String thisStart, thisEnd, thisId; - - int counter = 0; - - if (iter.hasNext()) - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - String wylie = current.getAttributeValue("who"); - if (endPos == null) - { - doc.insertString(0, wylie, mas); - endPos = doc.createPosition(doc.getLength()); - } - else - { - doc.insertString(endPos.getOffset(), wylie, mas); - } - - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - doc.insertString(endPos.getOffset(), "\n", mas0); - thisStart = String.valueOf(endPos.getOffset()); - if (current.getAttributeValue("gls").equals("PAUSE")) - doc.insertString(endPos.getOffset(), "......", mas0); - else - doc.insertString(endPos.getOffset(), current.getAttributeValue("eng"), mas0); - startBuffer.append(thisStart); - startBuffer.append(','); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - idBuffer.append("s0,"); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - - while (iter.hasNext()) - { - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - doc.insertString(endPos.getOffset(), "\n\n", mas0); - doc.insertString(endPos.getOffset(), current.getAttributeValue("who"), mas); - - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - doc.insertString(endPos.getOffset(), "\n", mas0); - counter++; - thisStart = String.valueOf(endPos.getOffset()); - startBuffer.append(thisStart); - startBuffer.append(','); - if (current.getAttributeValue("gls").equals("PAUSE")) - doc.insertString(endPos.getOffset(), "......", mas0); - else - doc.insertString(endPos.getOffset(), current.getAttributeValue("eng"), mas0); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - thisId = "s"+String.valueOf(counter); - idBuffer.append(thisId); - idBuffer.append(','); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - } - - idBuffer.toString(); - t1Buffer.toString(); - t2Buffer.toString(); - startBuffer.toString(); - endBuffer.toString(); - } - catch (BadLocationException ble) - { - ble.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public JTextComponent getTextComponent() - { - return text; - } - - public Document getDocument() - { - return xmlDoc; - } - - public String getIDs() - { - return idBuffer.toString(); - } - - public String getT1s() - { - return t1Buffer.toString(); - } - - public String getT2s() - { - return t2Buffer.toString(); - } - - public String getStartOffsets() - { - return startBuffer.toString(); - } - - public String getEndOffsets() - { - return endBuffer.toString(); - } -} diff --git a/source/org/thdl/savant/ucuchi/Quechua.java b/source/org/thdl/savant/ucuchi/Quechua.java deleted file mode 100644 index d54706c..0000000 --- a/source/org/thdl/savant/ucuchi/Quechua.java +++ /dev/null @@ -1,217 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant.ucuchi; - -import java.io.Reader; -import java.util.List; -import java.util.Iterator; -import javax.swing.JTextPane; -import javax.swing.text.*; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.thdl.savant.*; - -import org.thdl.util.ThdlDebug; - -public class Quechua implements TranscriptView -{ - private JTextPane text = null; - private Document xmlDoc = null; - private StringBuffer idBuffer = null; - private StringBuffer t1Buffer = null; - private StringBuffer t2Buffer = null; - private StringBuffer startBuffer = null; - private StringBuffer endBuffer = null; - - public Quechua(Document xml) - { - process(xml); - xmlDoc = xml; - } - - public Quechua(Reader source) - { - try - { - SAXBuilder builder = new SAXBuilder(); - Document xml = builder.build(source); - process(xml); - xmlDoc = xml; - } - catch (JDOMException jdome) - { - jdome.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public String getTitle() - { - return "Quechua"; - } - - public void process(Document xml) - { - try { - Element root = xml.getRootElement(); - List elements = root.getChildren(); - Iterator iter = elements.iterator(); - Element current = null; - - text = new JTextPane(); - javax.swing.text.Document doc = text.getDocument(); - - MutableAttributeSet mas0 = new SimpleAttributeSet(); - StyleConstants.setFontSize(mas0, 16); - MutableAttributeSet mas = new SimpleAttributeSet(); - StyleConstants.setBold(mas, true); - StyleConstants.setUnderline(mas, true); - StyleConstants.setFontSize(mas, 16); - Position endPos = null; - - idBuffer = new StringBuffer(); - startBuffer = new StringBuffer(); - endBuffer = new StringBuffer(); - t1Buffer = new StringBuffer(); - t2Buffer = new StringBuffer(); - - String thisStart, thisEnd, thisId; - - int counter = 0; - - if (iter.hasNext()) - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - String wylie = current.getAttributeValue("who"); - if (endPos == null) - { - doc.insertString(0, wylie, mas); - endPos = doc.createPosition(doc.getLength()); - } - else - { - doc.insertString(endPos.getOffset(), wylie, mas); - } - - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - doc.insertString(endPos.getOffset(), "\n", mas0); - thisStart = String.valueOf(endPos.getOffset()); - if (current.getAttributeValue("gls").equals("PAUSE")) - doc.insertString(endPos.getOffset(), "......", mas0); - else - doc.insertString(endPos.getOffset(), current.getText(), mas0); - startBuffer.append(thisStart); - startBuffer.append(','); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - idBuffer.append("s0,"); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - - while (iter.hasNext()) - { - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - doc.insertString(endPos.getOffset(), "\n\n", mas0); - doc.insertString(endPos.getOffset(), current.getAttributeValue("who"), mas); - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - doc.insertString(endPos.getOffset(), "\n", mas0); - counter++; - thisStart = String.valueOf(endPos.getOffset()); - startBuffer.append(thisStart); - startBuffer.append(','); - if (current.getAttributeValue("gls").equals("PAUSE")) - doc.insertString(endPos.getOffset(), "......", mas0); - else - doc.insertString(endPos.getOffset(), current.getText(), mas0); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - thisId = "s"+String.valueOf(counter); - idBuffer.append(thisId); - idBuffer.append(','); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - } - - idBuffer.toString(); - t1Buffer.toString(); - t2Buffer.toString(); - startBuffer.toString(); - endBuffer.toString(); - } - catch (BadLocationException ble) - { - ble.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public JTextComponent getTextComponent() - { - return text; - } - - public Document getDocument() - { - return xmlDoc; - } - - public String getIDs() - { - return idBuffer.toString(); - } - - public String getT1s() - { - return t1Buffer.toString(); - } - - public String getT2s() - { - return t2Buffer.toString(); - } - - public String getStartOffsets() - { - return startBuffer.toString(); - } - - public String getEndOffsets() - { - return endBuffer.toString(); - } -} diff --git a/source/org/thdl/savant/ucuchi/QuechuaEnglish.java b/source/org/thdl/savant/ucuchi/QuechuaEnglish.java deleted file mode 100644 index 1f93c70..0000000 --- a/source/org/thdl/savant/ucuchi/QuechuaEnglish.java +++ /dev/null @@ -1,238 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant.ucuchi; - -import java.io.Reader; -import java.util.List; -import java.util.Iterator; -import javax.swing.JTextPane; -import javax.swing.text.*; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.thdl.savant.*; - -import org.thdl.util.ThdlDebug; - -public class QuechuaEnglish implements TranscriptView -{ - private JTextPane text = null; - private Document xmlDoc = null; - private StringBuffer idBuffer = null; - private StringBuffer t1Buffer = null; - private StringBuffer t2Buffer = null; - private StringBuffer startBuffer = null; - private StringBuffer endBuffer = null; - - public QuechuaEnglish(Document xml) - { - process(xml); - xmlDoc = xml; - } - - public QuechuaEnglish(Reader source) - { - try - { - SAXBuilder builder = new SAXBuilder(); - Document xml = builder.build(source); - process(xml); - xmlDoc = xml; - } - catch (JDOMException jdome) - { - jdome.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public String getTitle() - { - return "Quechua and English"; - } - - public void process(Document xml) - { - try { - Element root = xml.getRootElement(); - List elements = root.getChildren(); - Iterator iter = elements.iterator(); - Element current = null; - - text = new JTextPane(); - javax.swing.text.Document doc = text.getDocument(); - - MutableAttributeSet mas0 = new SimpleAttributeSet(); - StyleConstants.setFontSize(mas0, 16); - - MutableAttributeSet mas = new SimpleAttributeSet(); - StyleConstants.setBold(mas, true); - StyleConstants.setUnderline(mas, true); - StyleConstants.setFontSize(mas, 16); - MutableAttributeSet mas2 = new SimpleAttributeSet(); - StyleConstants.setItalic(mas2, true); - StyleConstants.setFontSize(mas2, 16); - StyleConstants.setFontSize(mas2, 16); - Position endPos = null; - String wylie; - - idBuffer = new StringBuffer(); - startBuffer = new StringBuffer(); - endBuffer = new StringBuffer(); - t1Buffer = new StringBuffer(); - t2Buffer = new StringBuffer(); - - String thisStart, thisEnd, thisId; - - int counter = 0; - - if (iter.hasNext()) - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - wylie = current.getAttributeValue("who"); - if (endPos == null) - { - doc.insertString(0, wylie, mas); - endPos = doc.createPosition(doc.getLength()); - } - else - { -// wherestart = endPos.getOffset(); - doc.insertString(endPos.getOffset(), wylie, mas); - } - - doc.insertString(endPos.getOffset(), "\n", mas0); - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - thisStart = "0"; - if (current.getAttributeValue("gls").equals("PAUSE")) - doc.insertString(endPos.getOffset(), "((pause))", mas0); - else { - wylie = current.getText(); - if (endPos == null) - { - doc.insertString(0, wylie+"\n", mas0); - endPos = doc.createPosition(doc.getLength()); - } else { - thisStart = String.valueOf(endPos.getOffset()); - doc.insertString(endPos.getOffset(), wylie+"\n", mas0); - } - doc.insertString(endPos.getOffset(), current.getAttributeValue("eng"), mas2); - } - startBuffer.append(thisStart); - startBuffer.append(','); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - idBuffer.append("s0,"); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - - while (iter.hasNext()) - { - current = (Element)iter.next(); - doc.insertString(endPos.getOffset(), "\n", mas0); - while (current.getName().equals("spkr")) - { - doc.insertString(endPos.getOffset(), "\n", mas0); - wylie = current.getAttributeValue("who"); -// wherestart = endPos.getOffset(); - doc.insertString(endPos.getOffset(), wylie, mas); - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - doc.insertString(endPos.getOffset(), "\n", mas0); - counter++; - thisStart = String.valueOf(endPos.getOffset()); - startBuffer.append(thisStart); - startBuffer.append(','); - if (current.getAttributeValue("gls").equals("PAUSE")) - doc.insertString(endPos.getOffset(), "((pause))", mas0); - else { - wylie = current.getText(); - doc.insertString(endPos.getOffset(), wylie+"\n", mas0); - doc.insertString(endPos.getOffset(), current.getAttributeValue("eng"), mas2); - } - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - thisId = "s"+String.valueOf(counter); - idBuffer.append(thisId); - idBuffer.append(','); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - } - - idBuffer.toString(); - t1Buffer.toString(); - t2Buffer.toString(); - startBuffer.toString(); - endBuffer.toString(); - } - catch (BadLocationException ble) - { - ble.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public JTextComponent getTextComponent() - { - return text; - } - - public Document getDocument() - { - return xmlDoc; - } - - public String getIDs() - { - return idBuffer.toString(); - } - - public String getT1s() - { - return t1Buffer.toString(); - } - - public String getT2s() - { - return t2Buffer.toString(); - } - - public String getStartOffsets() - { - return startBuffer.toString(); - } - - public String getEndOffsets() - { - return endBuffer.toString(); - } -} diff --git a/source/org/thdl/savant/ucuchi/SegmentedQuechua.java b/source/org/thdl/savant/ucuchi/SegmentedQuechua.java deleted file mode 100644 index 97c3f40..0000000 --- a/source/org/thdl/savant/ucuchi/SegmentedQuechua.java +++ /dev/null @@ -1,239 +0,0 @@ -/* -The contents of this file are subject to the THDL Open Community License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License on the THDL web site -(http://www.thdl.org/). - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific terms governing rights and limitations under the -License. - -The Initial Developer of this software is the Tibetan and Himalayan Digital -Library (THDL). Portions created by the THDL are Copyright 2001 THDL. -All Rights Reserved. - -Contributor(s): ______________________________________. -*/ - -package org.thdl.savant.ucuchi; - -import java.io.Reader; -import java.util.List; -import java.util.Iterator; -import java.util.StringTokenizer; -import javax.swing.JTextPane; -import javax.swing.text.*; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.input.SAXBuilder; -import org.thdl.savant.*; - -import org.thdl.util.ThdlDebug; - -public class SegmentedQuechua implements TranscriptView -{ - private JTextPane text = null; - private Document xmlDoc = null; - private StringBuffer idBuffer = null; - private StringBuffer t1Buffer = null; - private StringBuffer t2Buffer = null; - private StringBuffer startBuffer = null; - private StringBuffer endBuffer = null; - - public SegmentedQuechua(Document xml) - { - process(xml); - xmlDoc = xml; - } - - public SegmentedQuechua(Reader source) - { - try - { - SAXBuilder builder = new SAXBuilder(); - Document xml = builder.build(source); - process(xml); - xmlDoc = xml; - } - catch (JDOMException jdome) - { - jdome.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public String getTitle() - { - return "Segmented Quechua"; - } - - public void process(Document xml) - { - try { - Element root = xml.getRootElement(); - List elements = root.getChildren(); - Iterator iter = elements.iterator(); - Element current = null; - - text = new JTextPane(); - javax.swing.text.Document doc = text.getDocument(); - - MutableAttributeSet mas0 = new SimpleAttributeSet(); - StyleConstants.setFontSize(mas0, 16); - MutableAttributeSet mas = new SimpleAttributeSet(); - StyleConstants.setBold(mas, true); - StyleConstants.setUnderline(mas, true); - StyleConstants.setFontSize(mas, 16); - Position endPos = null; - - idBuffer = new StringBuffer(); - startBuffer = new StringBuffer(); - endBuffer = new StringBuffer(); - t1Buffer = new StringBuffer(); - t2Buffer = new StringBuffer(); - - String thisStart, thisEnd, thisId; - - int counter = 0; - - if (iter.hasNext()) - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - String wylie = current.getAttributeValue("who"); - if (endPos == null) - { - doc.insertString(0, wylie, mas); - endPos = doc.createPosition(doc.getLength()); - } - else - { - doc.insertString(endPos.getOffset(), wylie, mas); - } - - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - doc.insertString(endPos.getOffset(), "\n", mas0); - thisStart = String.valueOf(endPos.getOffset()); - if (current.getAttributeValue("gls").equals("PAUSE")) - doc.insertString(endPos.getOffset(), "......", mas0); - else { - String segString = current.getAttributeValue("seg"); - StringBuffer segBuffer = new StringBuffer(); - StringTokenizer segTokenizer = new StringTokenizer(segString); - for (int i=0; segTokenizer.hasMoreTokens(); i++) { - String next = segTokenizer.nextToken(); - if (i>0 && next.charAt(0)!='-') - segBuffer.append(' '); - segBuffer.append(next); - } - doc.insertString(endPos.getOffset(), segBuffer.toString(), mas0); - } - startBuffer.append(thisStart); - startBuffer.append(','); - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - idBuffer.append("s0,"); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - - while (iter.hasNext()) - { - current = (Element)iter.next(); - - while (current.getName().equals("spkr")) - { - doc.insertString(endPos.getOffset(), "\n\n", mas0); - doc.insertString(endPos.getOffset(), current.getAttributeValue("who"), mas); - - if (iter.hasNext()) - current = (org.jdom.Element)iter.next(); - } - - doc.insertString(endPos.getOffset(), "\n", mas0); - counter++; - thisStart = String.valueOf(endPos.getOffset()); - startBuffer.append(thisStart); - startBuffer.append(','); - if (current.getAttributeValue("gls").equals("PAUSE")) - doc.insertString(endPos.getOffset(), "......", mas0); - else { - String segString = current.getAttributeValue("seg"); - StringBuffer segBuffer = new StringBuffer(); - StringTokenizer segTokenizer = new StringTokenizer(segString); - for (int i=0; segTokenizer.hasMoreTokens(); i++) { - String next = segTokenizer.nextToken(); - if (i>0 && next.charAt(0)!='-') - segBuffer.append(' '); - segBuffer.append(next); - } - doc.insertString(endPos.getOffset(), segBuffer.toString(), mas0); - } - thisEnd = String.valueOf(endPos.getOffset()); - endBuffer.append(thisEnd); - endBuffer.append(','); - thisId = "s"+String.valueOf(counter); - idBuffer.append(thisId); - idBuffer.append(','); - t1Buffer.append(current.getAttributeValue("start")); - t1Buffer.append(','); - t2Buffer.append(current.getAttributeValue("end")); - t2Buffer.append(','); - } - - idBuffer.toString(); - t1Buffer.toString(); - t2Buffer.toString(); - startBuffer.toString(); - endBuffer.toString(); - } - catch (BadLocationException ble) - { - ble.printStackTrace(); - ThdlDebug.noteIffyCode(); - } - } - - public JTextComponent getTextComponent() - { - return text; - } - - public Document getDocument() - { - return xmlDoc; - } - - public String getIDs() - { - return idBuffer.toString(); - } - - public String getT1s() - { - return t1Buffer.toString(); - } - - public String getT2s() - { - return t2Buffer.toString(); - } - - public String getStartOffsets() - { - return startBuffer.toString(); - } - - public String getEndOffsets() - { - return endBuffer.toString(); - } -} diff --git a/source/org/thdl/savant/ucuchi/package.html b/source/org/thdl/savant/ucuchi/package.html deleted file mode 100644 index 243f12b..0000000 --- a/source/org/thdl/savant/ucuchi/package.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -Provides Savant with the power to display Quechua language -text beside video or audio of Quechua speakers. -

-Supports Quechua and English. - - diff --git a/source/savanthelp.rtf b/source/savanthelp.rtf deleted file mode 100644 index 51d27a0..0000000 --- a/source/savanthelp.rtf +++ /dev/null @@ -1,46 +0,0 @@ -{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f79\froman\fcharset238\fprq2 Times New Roman CE;}{\f80\froman\fcharset204\fprq2 Times New Roman Cyr;} -{\f82\froman\fcharset161\fprq2 Times New Roman Greek;}{\f83\froman\fcharset162\fprq2 Times New Roman Tur;}{\f84\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f85\froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\f86\froman\fcharset186\fprq2 Times New Roman Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255; -\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{ -\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive Default Paragraph Font;}{ -\s15\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext15 Body Text;}{\*\cs16 \additive \ul\cf2 \sbasedon10 Hyperlink;}}{\info{\title How to Use Savant } -{\author Edward Garrett}{\operator Edward Garrett}{\creatim\yr2002\mo2\dy6\hr11\min8}{\revtim\yr2002\mo2\dy25\hr18\min16}{\version9}{\edmins57}{\nofpages2}{\nofwords314}{\nofchars1790}{\*\company THDL}{\nofcharsws0}{\vern8247}} -\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1701\dgvorigin1984\dghshow1\dgvshow1 -\jexpand\viewkind4\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule \fet0\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl {\*\pnseclvl1 -\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5 -\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang -{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s15\qc \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs44\ul -How to Use Savant}{\b\fs44 -\par }\pard \s15\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 { -\par Savant allows users to watch a video or listen to an audio recording while simultaneously viewing its transcript in multiple linguistic forms (Tibetan script, Wylie, English translation). The media and transcript are synchronized, so th -at the transcript automatically scrolls down with the media as it plays, and one can click from a line on the transcript to get that segment of the media alone to play back. -\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\fs28 -\par Savant allows several modes of access. On the one hand, the video/audio has controls, which you can use to play, pause, and move through the media file. Whatever you do, the transcript will keep up with the video/audio. -\par -\par Alternatively, you can control the media from the transcript. Two functionalities are available: -\par -\par - }{\i\fs28 Single-click}{\fs28 on a line of text to play that line and those that follow it. -\par - }{\i\fs28 Double-click}{\fs28 on a line of text to play only that line. -\par -\par The transcript window lets you switch back and forth between various modes of representation. In particular, you can turn Tibetan script, W -ylie transliteration, and the English translation on and off. (Note that our method of transliteration follows THDL Extended Wylie. For details, please visit www.thdl.org) -\par -\par Savant also supports full screen video on most platforms. To watch a video in full -screen mode, click your mouse on the video. The video should fill the screen. If you want to see the transcript or access the video controls, press Alt-Tab (or Alt-Tab-Tab - press as many Tabs as needed). Eventually you will get to a window which contains - the transcript and an empty shell for the video. To return to the video, press Alt-Tab (or Alt-Tab-Tab - press as many Tabs as needed) again. To resume initial dimensions, click on the video again. -\par -\par Most titles also have an additional "About the Video" window. -\par -\par }{\fs28\ul Known Bugs}{\fs28 -\par -\par - Some users may experience problems with video playback. This as yet unsolved problem may cause the video control slider to work improperly. In addition, sometimes the audio may not start in time with the video. If you experience such p -roblems, then we recommend that you listen to the audio rather than watching the video. -\par -\par - When switching views (e.g. between Tibetan and English), the highlight may not always keep up. If the highlight disappears or gets confused, please pause and restart the video. -\par -\par - Tibetan text breaks properly at whitespace, but it does not break properly after tsheg or other punctuation marks. This means that a line of Tibetan text will sometimes be improperly broken in the middle of a syllable. -\par -\par If you find a bug tha -t is not reported here, please let us know. Send a message to Edward Garrett at eg3p@virginia.edu. If possible, please include the file 'savant.log' as an attachment. You can find this file on your desktop, or wherever you have placed the file -'Savant.jar'. -\par }} diff --git a/source/xml/LACITO-THDL.dtd b/source/xml/LACITO-THDL.dtd deleted file mode 100644 index ee395cc..0000000 --- a/source/xml/LACITO-THDL.dtd +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - id ID #REQUIRED> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -