diff --git a/build.xml b/build.xml
index 69f2b6d..cdd3322 100644
--- a/build.xml
+++ b/build.xml
@@ -108,6 +108,9 @@
+
+
+
diff --git a/lib/thdl/Jskad.jar b/lib/thdl/Jskad.jar
new file mode 100644
index 0000000..d5a1f64
Binary files /dev/null and b/lib/thdl/Jskad.jar differ
diff --git a/src/css/lex-advanced.css b/src/css/lex-advanced.css
index 3341d70..b3fce98 100644
--- a/src/css/lex-advanced.css
+++ b/src/css/lex-advanced.css
@@ -4,6 +4,7 @@
{
}
+
#message
{
}
@@ -36,7 +37,10 @@ margin-top: 2px;
#termChildren, #defChildren, #subdefChildren
{
}
-
+#columnLeft select, #columnLeft input
+{
+ width: 120px;
+}
#columnCenter p
{
text-align: justify;
diff --git a/src/css/lex.css b/src/css/lex.css
index b4d49bf..91d0335 100644
--- a/src/css/lex.css
+++ b/src/css/lex.css
@@ -4,7 +4,7 @@
@import url( "lex-advanced.css" );
-#main *
+#main input, #main textarea, #main p, #main li
{ /*--------- '*' = everything -------------*/
font-family: 'Arial Unicode MS', 'Lucida Grande', sans-serif !important;
}
@@ -12,6 +12,7 @@ font-family: 'Arial Unicode MS', 'Lucida Grande', sans-serif !important;
h1
{
font-size: 1.5em;
+ text-transform: none;
}
li, ol, ul
@@ -19,7 +20,6 @@ li, ol, ul
padding: 0 1em 0 1em;
margin-top: 0;
border-width: 0px;
-
}
li
{
@@ -46,7 +46,15 @@ li
ol
{
list-style-type: upper-roman;
+}
+
+#entry ol, #entry ul, #entry li
+{
+clear: right;
+margin-right: 0 !important;
+padding-right: 0 !important;
}
+
#results ol
{
list-style-type: decimal;
@@ -79,4 +87,62 @@ margin-left: 0 !important;
padding-left: 0 !important;
}
+div.tmw-block
+{
+ margin-top: 1ex !important;
+}
+span
+{
+ /* border: solid 1px red; */
+}
+a.tmw-link:hover
+{
+ background-color: inherit;
+}
+span.tmw-roman {position: relative; top: 0pt; padding-left: .25em;}
+span.tmw {font: 20pt TibetanMachineWeb !important; text-transform: none; position: relative; top: -5pt;}
+span.tmw1 {font: 20pt TibetanMachineWeb1 !important; text-transform: none; position: relative; top: -5pt;}
+span.tmw2 {font: 20pt TibetanMachineWeb2 !important; text-transform: none; position: relative; top: -5pt;}
+span.tmw3 {font: 20pt TibetanMachineWeb3 !important; text-transform: none; position: relative; top: -5pt;}
+span.tmw4 {font: 20pt TibetanMachineWeb4 !important; text-transform: none; position: relative; top: -5pt;}
+span.tmw5 {font: 20pt TibetanMachineWeb5 !important; text-transform: none; position: relative; top: -5pt;}
+span.tmw6 {font: 20pt TibetanMachineWeb6 !important; text-transform: none; position: relative; top: -5pt;}
+span.tmw7 {font: 20pt TibetanMachineWeb7 !important; text-transform: none; position: relative; top: -5pt;}
+span.tmw8 {font: 20pt TibetanMachineWeb8 !important; text-transform: none; position: relative; top: -5pt;}
+span.tmw9 {font: 20pt TibetanMachineWeb9 !important; text-transform: none; position: relative; top: -5pt;}
+
+h1 span.tmw-roman { top: 0pt; }
+h1 span.tmw {font-size: 32pt !important; top: -8pt;}
+h1 span.tmw1 {font-size: 32pt !important; top: -8pt;}
+h1 span.tmw2 {font-size: 32pt !important; top: -8pt;}
+h1 span.tmw3 {font-size: 32pt !important; top: -8pt;}
+h1 span.tmw4 {font-size: 32pt !important; top: -8pt;}
+h1 span.tmw5 {font-size: 32pt !important; top: -8pt;}
+h1 span.tmw6 {font-size: 32pt !important; top: -8pt;}
+h1 span.tmw7 {font-size: 32pt !important; top: -8pt;}
+h1 span.tmw8 {font-size: 32pt !important; top: -8pt;}
+h1 span.tmw9 {font-size: 32pt !important; top: -8pt;}
+
+p span.tmw {font-size: 20pt !important; }
+p span.tmw1 {font-size: 20pt !important; }
+p span.tmw2 {font-size: 20pt !important; }
+p span.tmw3 {font-size: 20pt !important; }
+p span.tmw4 {font-size: 20pt !important; }
+p span.tmw5 {font-size: 20pt !important; }
+p span.tmw6 {font-size: 20pt !important; }
+p span.tmw7 {font-size: 20pt !important; }
+p span.tmw8 {font-size: 20pt !important; }
+p span.tmw9 {font-size: 20pt !important; }
+
+
+li span.tmw {font-size: 20pt !important; }
+li span.tmw1 {font-size: 20pt !important; }
+li span.tmw2 {font-size: 20pt !important; }
+li span.tmw3 {font-size: 20pt !important; }
+li span.tmw4 {font-size: 20pt !important; }
+li span.tmw5 {font-size: 20pt !important; }
+li span.tmw6 {font-size: 20pt !important; }
+li span.tmw7 {font-size: 20pt !important; }
+li span.tmw8 {font-size: 20pt !important; }
+li span.tmw9 {font-size: 20pt !important; }
diff --git a/src/java/org/thdl/lex/DisplayHelper.java b/src/java/org/thdl/lex/DisplayHelper.java
index 8d58e65..a68872e 100644
--- a/src/java/org/thdl/lex/DisplayHelper.java
+++ b/src/java/org/thdl/lex/DisplayHelper.java
@@ -4,6 +4,7 @@ import java.text.DateFormat;
import java.util.*;
import org.apache.commons.beanutils.*;
import org.thdl.lex.component.*;
+import org.thdl.tib.text.TibetanHTML;
/**
@@ -19,11 +20,36 @@ public class DisplayHelper
private ILexComponent note;
private Date date;
private final static DateFormat DATE_FORMAT = DateFormat.getDateInstance( DateFormat.LONG );
+
private boolean showNotes;
private boolean showMeta;
private boolean showEditOptions;
private boolean showTranslations;
+ private String wylie;
+
+
+ /**
+ * Sets the wylie attribute of the DisplayHelper object
+ *
+ * @param wylie The new wylie value
+ */
+ public void setWylie( String wylie )
+ {
+ this.wylie = wylie;
+ }
+
+
+ /**
+ * Gets the wylie attribute of the DisplayHelper object
+ *
+ * @return The wylie value
+ */
+ public String getWylie()
+ {
+ return wylie;
+ }
+
/**
* Sets the date attribute of the DisplayHelper object
@@ -236,6 +262,17 @@ public class DisplayHelper
}
+ /**
+ * Gets the tibetan attribute of the DisplayHelper object
+ *
+ * @return The tibetan value
+ */
+ public String getTibetan()
+ {
+ return TibetanHTML.getHTMLX( getWylie() );
+ }
+
+
/**
* Gets the formattedDate attribute of the DisplayHelper object
*
diff --git a/src/java/org/thdl/lex/LexActionServlet.java b/src/java/org/thdl/lex/LexActionServlet.java
index e2984de..1128c27 100644
--- a/src/java/org/thdl/lex/LexActionServlet.java
+++ b/src/java/org/thdl/lex/LexActionServlet.java
@@ -25,8 +25,6 @@ public class LexActionServlet extends HttpServlet
{
//attributes
private HashMap commands;
- private String cmd;
-
//accessors
@@ -42,17 +40,6 @@ public class LexActionServlet extends HttpServlet
}
- /**
- * Sets the cmd attribute of the LexActionServlet object
- *
- * @param cmd The new cmd value
- * @since
- */
- public void setCmd( String cmd )
- {
- this.cmd = cmd;
- }
-
/**
* Gets the commands attribute of the LexActionServlet object
@@ -66,17 +53,6 @@ public class LexActionServlet extends HttpServlet
}
- /**
- * Gets the cmd attribute of the LexActionServlet object
- *
- * @return The cmd value
- * @since
- */
- public String getCmd()
- {
- return cmd;
- }
-
//helper methods
@@ -122,8 +98,8 @@ public class LexActionServlet extends HttpServlet
String next;
try
{
- setCmd( req.getParameter( LexConstants.COMMAND_REQ_PARAM ) );
- Command command = lookupCommand( getCmd() );
+ String cmd = req.getParameter( LexConstants.COMMAND_REQ_PARAM );
+ Command command = lookupCommand( cmd );
LexComponent component = (LexComponent) req.getAttribute( LexConstants.COMPONENT_REQ_ATTR );
next = command.execute( req, component );
CommandToken.set( req );
@@ -187,7 +163,7 @@ public class LexActionServlet extends HttpServlet
}
else
{
- throw new CommandException( "Invalid Command Identifier: '" + getCmd() + "'" );
+ throw new CommandException( "Invalid Command Identifier: '" + cmdKey + "'" );
}
}
diff --git a/src/java/org/thdl/lex/Visit.java b/src/java/org/thdl/lex/Visit.java
index b103cfb..f533dea 100644
--- a/src/java/org/thdl/lex/Visit.java
+++ b/src/java/org/thdl/lex/Visit.java
@@ -17,6 +17,7 @@ public class Visit
{
//attributes
HttpSession session;
+ String token;
DisplayHelper helper;
Preferences preferences;
LexQuery query;
@@ -24,6 +25,28 @@ public class Visit
String displayMode;
+ /**
+ * Sets the token attribute of the Visit object
+ *
+ * @param token The new token value
+ */
+ public void setToken( String token )
+ {
+ this.token = token;
+ }
+
+
+ /**
+ * Gets the token attribute of the Visit object
+ *
+ * @return The token value
+ */
+ public String getToken()
+ {
+ return token;
+ }
+
+
/**
* Sets the session attribute of the Visit object
*
diff --git a/src/java/org/thdl/lex/commands/CommandToken.java b/src/java/org/thdl/lex/commands/CommandToken.java
index 0a5506c..22ca067 100644
--- a/src/java/org/thdl/lex/commands/CommandToken.java
+++ b/src/java/org/thdl/lex/commands/CommandToken.java
@@ -1,49 +1,88 @@
package org.thdl.lex.commands;
-import org.thdl.lex.*;
-import org.thdl.lex.component.*;
-
import java.security.MessageDigest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
+import org.thdl.lex.*;
+import org.thdl.lex.component.*;
+
+
+/**
+ * Description of the Class
+ *
+ * @author travis
+ * @created October 22, 2003
+ */
public class CommandToken
{
- public static void set(HttpServletRequest req)
+ /**
+ * Description of the Method
+ *
+ * @param req Description of the Parameter
+ */
+ public static void set( HttpServletRequest req )
{
- HttpSession session = req.getSession(true);
+ HttpSession session = req.getSession( true );
+ Visit visit = UserSessionManager.getInstance().getVisit( session );
long systime = System.currentTimeMillis();
- byte[] time = new Long(systime).toString().getBytes();
+ byte[] time = new Long( systime ).toString().getBytes();
byte[] id = session.getId().getBytes();
try
{
- MessageDigest md5 = MessageDigest.getInstance("MD5");
- md5.update(id);
- md5.update(time);
+ MessageDigest md5 = MessageDigest.getInstance( "MD5" );
+ md5.update( id );
+ md5.update( time );
String token = toHex( md5.digest() );
- req.setAttribute("token", token);
- session.setAttribute("token", token);
+ req.setAttribute( "token", token );
+ visit.setToken( token );
}
- catch (Exception e)
+ catch ( Exception e )
{
- System.err.println("Unable to calculate MD5 Digests.\nCould not create unique token");
+ System.err.println( "Unable to calculate MD5 Digests.\nCould not create unique token" );
}
}
- public static boolean isValid(HttpServletRequest req)
+
+
+ /**
+ * Gets the valid attribute of the CommandToken class
+ *
+ * @param req Description of the Parameter
+ * @return The valid value
+ */
+ public static boolean isValid( HttpServletRequest req )
{
- HttpSession session = req.getSession(true);
- String requestToken = req.getParameter("token");
- String sessionToken = (String) session.getAttribute("token");
- if (requestToken == null && sessionToken == null)
- return false;
+ boolean valid;
+ HttpSession session = req.getSession( true );
+ Visit visit = UserSessionManager.getInstance().getVisit( session );
+ String requestToken = req.getParameter( "token" );
+ String sessionToken = visit.getToken();
+ if ( requestToken == null && sessionToken == null )
+ {
+ valid = false;
+ }
else
- return requestToken.equals(sessionToken);//this is a boolean
+ {
+ valid = requestToken.equals( sessionToken );
+ }
+ return valid;
}
- public static String toHex(byte[] digest)
+
+
+ /**
+ * Description of the Method
+ *
+ * @param digest Description of the Parameter
+ * @return Description of the Return Value
+ */
+ public static String toHex( byte[] digest )
{
StringBuffer buf = new StringBuffer();
- for (int i = 0; i < digest.length; i++)
- buf.append( Integer.toHexString( (int)digest[i] & 0x00ff ) );//param=BITWISE operation
+ for ( int i = 0; i < digest.length; i++ )
+ {
+ buf.append( Integer.toHexString( (int) digest[i] & 0x00ff ) );
+ }//param=BITWISE operation
return buf.toString();
}
}
+
diff --git a/src/java/org/thdl/lex/commands/DisplayCommand.java b/src/java/org/thdl/lex/commands/DisplayCommand.java
index 17866ac..c4d6604 100644
--- a/src/java/org/thdl/lex/commands/DisplayCommand.java
+++ b/src/java/org/thdl/lex/commands/DisplayCommand.java
@@ -86,7 +86,7 @@ public class DisplayCommand extends LexCommand implements Command
}
else
{
- setNext( "menu.jsp" );
+ next = "menu.jsp";
msg = "The component set for display was not a term.";
LexLogger.error( msg );
}
diff --git a/src/jsp/jsp/displayDefinition.jsf b/src/jsp/jsp/displayDefinition.jsf
index 20ed789..fc22047 100644
--- a/src/jsp/jsp/displayDefinition.jsf
+++ b/src/jsp/jsp/displayDefinition.jsf
@@ -10,10 +10,10 @@
-
-
-
-
+
+
+
+
diff --git a/src/jsp/jsp/displayEncyclopediaArticle.jsf b/src/jsp/jsp/displayEncyclopediaArticle.jsf
index 30472ca..c13b179 100644
--- a/src/jsp/jsp/displayEncyclopediaArticle.jsf
+++ b/src/jsp/jsp/displayEncyclopediaArticle.jsf
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/src/jsp/jsp/displayEntry.jsp b/src/jsp/jsp/displayEntry.jsp
index 99a1cdd..52f9f62 100644
--- a/src/jsp/jsp/displayEntry.jsp
+++ b/src/jsp/jsp/displayEntry.jsp
@@ -1,121 +1,109 @@
<%@ page buffer="512kb" autoFlush="false" import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
-
+
-
+
-<%--
-
-
-
-
-
-
-
-
-
-
-
-
-
- --%>
-
Search Results
+
Search Results
-
-
-
-
-
- -
-
-
-
+
+
+
+
+
+ -
+
+
+
+
-
+
+
+
+
+
+
+ .
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/src/jsp/jsp/displayEtymology.jsf b/src/jsp/jsp/displayEtymology.jsf
index 90a6da0..043d2fe 100644
--- a/src/jsp/jsp/displayEtymology.jsf
+++ b/src/jsp/jsp/displayEtymology.jsf
@@ -10,9 +10,9 @@
-
-
-
+
+
+
diff --git a/src/jsp/jsp/displayForm.jsp b/src/jsp/jsp/displayForm.jsp
index 023aabf..339dd69 100644
--- a/src/jsp/jsp/displayForm.jsp
+++ b/src/jsp/jsp/displayForm.jsp
@@ -19,7 +19,7 @@
Back to:
-
+
diff --git a/src/jsp/jsp/displayFunction.jsf b/src/jsp/jsp/displayFunction.jsf
index 1b456b1..6f4468b 100644
--- a/src/jsp/jsp/displayFunction.jsf
+++ b/src/jsp/jsp/displayFunction.jsf
@@ -5,8 +5,8 @@
-
-
+
+
diff --git a/src/jsp/jsp/displayKeyword.jsf b/src/jsp/jsp/displayKeyword.jsf
index c895173..8f15918 100644
--- a/src/jsp/jsp/displayKeyword.jsf
+++ b/src/jsp/jsp/displayKeyword.jsf
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/src/jsp/jsp/displayModelSentence.jsf b/src/jsp/jsp/displayModelSentence.jsf
index ae610bc..5d3212a 100644
--- a/src/jsp/jsp/displayModelSentence.jsf
+++ b/src/jsp/jsp/displayModelSentence.jsf
@@ -9,9 +9,9 @@
-
-
-
+
+
+
diff --git a/src/jsp/jsp/displayPassage.jsf b/src/jsp/jsp/displayPassage.jsf
index d6a2d4d..5ec0998 100644
--- a/src/jsp/jsp/displayPassage.jsf
+++ b/src/jsp/jsp/displayPassage.jsf
@@ -9,9 +9,9 @@
-
-
-
+
+
+
@@ -33,7 +33,9 @@
-
+
+
+
diff --git a/src/jsp/jsp/displayPronunciation.jsf b/src/jsp/jsp/displayPronunciation.jsf
index 10cd228..246722d 100644
--- a/src/jsp/jsp/displayPronunciation.jsf
+++ b/src/jsp/jsp/displayPronunciation.jsf
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/src/jsp/jsp/displayRegister.jsf b/src/jsp/jsp/displayRegister.jsf
index 4fa3600..c3e02ea 100644
--- a/src/jsp/jsp/displayRegister.jsf
+++ b/src/jsp/jsp/displayRegister.jsf
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/src/jsp/jsp/displayRelatedTerm.jsf b/src/jsp/jsp/displayRelatedTerm.jsf
index 8b27de0..49cbe96 100644
--- a/src/jsp/jsp/displayRelatedTerm.jsf
+++ b/src/jsp/jsp/displayRelatedTerm.jsf
@@ -8,8 +8,8 @@
-
-
+
+
diff --git a/src/jsp/jsp/displaySpelling.jsf b/src/jsp/jsp/displaySpelling.jsf
index 4d6008a..5c3e421 100644
--- a/src/jsp/jsp/displaySpelling.jsf
+++ b/src/jsp/jsp/displaySpelling.jsf
@@ -5,8 +5,8 @@
-
-
+
+
diff --git a/src/jsp/jsp/displaySubdefinition.jsf b/src/jsp/jsp/displaySubdefinition.jsf
index 51375f9..19f3110 100644
--- a/src/jsp/jsp/displaySubdefinition.jsf
+++ b/src/jsp/jsp/displaySubdefinition.jsf
@@ -11,15 +11,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/jsp/jsp/displayTerm.jsf b/src/jsp/jsp/displayTerm.jsf
index 4913e4a..4ce9ad4 100644
--- a/src/jsp/jsp/displayTerm.jsf
+++ b/src/jsp/jsp/displayTerm.jsf
@@ -7,19 +7,25 @@
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/src/jsp/jsp/displayTransitionalData.jsf b/src/jsp/jsp/displayTransitionalData.jsf
index 51edfee..c318e5f 100644
--- a/src/jsp/jsp/displayTransitionalData.jsf
+++ b/src/jsp/jsp/displayTransitionalData.jsf
@@ -11,8 +11,8 @@
-
-
+
+
diff --git a/src/jsp/jsp/displayTranslationEquivalent.jsf b/src/jsp/jsp/displayTranslationEquivalent.jsf
index 0e84013..db15869 100644
--- a/src/jsp/jsp/displayTranslationEquivalent.jsf
+++ b/src/jsp/jsp/displayTranslationEquivalent.jsf
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/src/jsp/jsp/displayTree.jsf b/src/jsp/jsp/displayTree.jsf
index d86c154..de51228 100644
--- a/src/jsp/jsp/displayTree.jsf
+++ b/src/jsp/jsp/displayTree.jsf
@@ -1,271 +1,272 @@
-<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %>
+<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
-
+
-
+
-
+
-
-
-
-
-
--
-
-
Special Guests
-
-
-
+
-
-
--
-
-
Pronunciations
-
-
-
+
+
+ -
+
+
Pronunciations
+
+
+
-
-
--
-
-
Etymologies
-
-
-
+
+
+ -
+
+
Etymologies
+
+
+
-
-
--
-
-
Spellings
-
-
-
+
+
+ -
+
+
Spellings
+
+
+
-
-
--
-
-
Functions
-
-
-
+
+
+ -
+
+
Functions
+
+
+
-
-
--
-
-
Encyclopedia Articles
-
-
-
+
+
+ -
+
+
Encyclopedia Articles
+
+
+
-
-
--
-
-
Definitions
+
+
+ -
+
+
Definitions
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
--
-
-
+
+
+
+ -
+
+
-
+
-
-
--
-
-
Keywords
-
-
-
+
+
+ -
+
+
Keywords
+
+
+
-
-
--
-
-
Model Sentences
-
-
-
+
+
+ -
+
+
Model Sentences
+
+
+
-
-
--
-
-
Translation Equivalents
-
-
-
+
+
+ -
+
+
Translation Equivalents
+
+
+
-
-
--
-
-
RelatedTerm
-
-
-
+
+
+ -
+
+
RelatedTerm
+
+
+
-
-
--
-
-
Passages
-
-
-
+
+
+ -
+
+
Passages
+
+
+
-
-
--
-
-
Registers
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ -
+
+
Registers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Other Dictionaries
+
+
+
+
+
diff --git a/src/jsp/jsp/displayTreeToc.jsf b/src/jsp/jsp/displayTreeToc.jsf
index 6c12684..5ac398e 100644
--- a/src/jsp/jsp/displayTreeToc.jsf
+++ b/src/jsp/jsp/displayTreeToc.jsf
@@ -124,8 +124,8 @@
-
-
+<%--
+ --%>
diff --git a/src/jsp/jsp/header.jsf b/src/jsp/jsp/header.jsf
index 1d684ed..1deabea 100644
--- a/src/jsp/jsp/header.jsf
+++ b/src/jsp/jsp/header.jsf
@@ -18,6 +18,7 @@ p.data
border: none;
}
+/* <%= org.thdl.tib.text.TibetanHTML.getStyles( "20" ) %> */
diff --git a/src/jsp/jsp/menu.jsp b/src/jsp/jsp/menu.jsp
index ddd2ed8..c49d85d 100644
--- a/src/jsp/jsp/menu.jsp
+++ b/src/jsp/jsp/menu.jsp
@@ -88,8 +88,11 @@