diff --git a/loadtests/LoadTest.jmx b/loadtests/LoadTest.jmx new file mode 100644 index 0000000..f270699 --- /dev/null +++ b/loadtests/LoadTest.jmx @@ -0,0 +1,134 @@ + + + + +org.apache.jmeter.config.gui.ArgumentsPanel +org.apache.jmeter.config.Arguments + +Argument List +true + +org.apache.jmeter.control.gui.TestPlanGui + +org.apache.jmeter.testelement.TestPlan +false +Test Plan +true +false + + + +org.apache.jmeter.threads.gui.ThreadGroupGui +1068560706000 +org.apache.jmeter.threads.ThreadGroup + +org.apache.jmeter.control.gui.LoopControlPanel +250 +org.apache.jmeter.control.LoopController +Loop Controller +true +false + +/lex/action Thread Group +1068560706000 +true +1 +false +1 + + + +org.apache.jmeter.protocol.http.config.gui.HttpDefaultsGui + +org.apache.jmeter.config.ConfigTestElement +HTTP Request Defaults +haley.local +http +true + +org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel +org.apache.jmeter.config.Arguments + +Argument List +true + +2020 + + + + +/lex/action +org.apache.jmeter.protocol.http.sampler.HTTPSampler +/lex/action +GET +true + +true +false +true + +org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel +org.apache.jmeter.config.Arguments + + += +menu +true +cmd +false + + +Argument List +true + + + +org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui + +cmd=menu + + + + + + +org.apache.jmeter.visualizers.ViewResultsFullVisualizer +org.apache.jmeter.reporters.ResultCollector +View Results Tree +true + +false + + + + +org.apache.jmeter.visualizers.StatVisualizer +org.apache.jmeter.reporters.ResultCollector +Aggregate Report +true + +false + + + + +org.apache.jmeter.timers.gui.UniformRandomTimerGui +org.apache.jmeter.timers.UniformRandomTimer +Uniform Random Timer +true +2000 +1000 + + + + +org.apache.jmeter.protocol.http.gui.CookiePanel +org.apache.jmeter.protocol.http.control.CookieManager +HTTP Cookie Manager +false +true + + + + + diff --git a/loadtests/LoadTestRecorder.jmx b/loadtests/LoadTestRecorder.jmx new file mode 100644 index 0000000..07175d2 --- /dev/null +++ b/loadtests/LoadTestRecorder.jmx @@ -0,0 +1,124 @@ + + + + +org.apache.jmeter.config.gui.ArgumentsPanel +org.apache.jmeter.config.Arguments + +Argument List +true + +org.apache.jmeter.control.gui.TestPlanGui + +org.apache.jmeter.testelement.TestPlan +false +Test Plan +true +false + + + +org.apache.jmeter.threads.gui.ThreadGroupGui +1068560706000 +org.apache.jmeter.threads.ThreadGroup + +org.apache.jmeter.control.gui.LoopControlPanel +250 +org.apache.jmeter.control.LoopController +Loop Controller +true +false + +/lex/action Thread Group +1068560706000 +true +1 +false +1 + + + + +org.apache.jmeter.protocol.http.config.gui.HttpDefaultsGui +org.apache.jmeter.config.ConfigTestElement +HTTP Request Defaults +haley.local +http +true +2020 + +org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel +org.apache.jmeter.config.Arguments + +Argument List +true + + + + + +/lex/action +org.apache.jmeter.protocol.http.sampler.HTTPSampler +/lex/action +GET +true + +true +false +true + +org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel +org.apache.jmeter.config.Arguments + + += +menu +true +cmd +false + + +Argument List +true + + + +org.apache.jmeter.protocol.http.control.gui.HttpTestSampleGui + +cmd=menu + + + + + + +org.apache.jmeter.visualizers.ViewResultsFullVisualizer +org.apache.jmeter.reporters.ResultCollector +View Results Tree +true + +false + + + + +org.apache.jmeter.visualizers.StatVisualizer +org.apache.jmeter.reporters.ResultCollector +Aggregate Report +true + +false + + + + +org.apache.jmeter.timers.gui.UniformRandomTimerGui +org.apache.jmeter.timers.UniformRandomTimer +Uniform Random Timer +true +1000 +2000 + + + + diff --git a/src/java/dictionary-importer.properties.sample b/src/java/dictionary-importer.properties.sample new file mode 100644 index 0000000..71e5c44 --- /dev/null +++ b/src/java/dictionary-importer.properties.sample @@ -0,0 +1,4 @@ +# Default localized resources for DictionaryImporter + +dictionaryimporter.driverclassname=com.mysql.jdbc.Driver +dictionaryimporter.url=jdbc:mysql://localhost:3306/lex?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&user=USERNAME&password=PASSWORD diff --git a/src/java/hibernate.cfg.xml b/src/java/hibernate.cfg.xml new file mode 100644 index 0000000..ac14dcb --- /dev/null +++ b/src/java/hibernate.cfg.xml @@ -0,0 +1,46 @@ + + + + + + + + java:comp/env/jdbc/lex-datasource + + + + false + true + net.sf.hibernate.dialect.MySQLDialect + + + + + + + diff --git a/src/java/lex-codegen-cfg.xml b/src/java/lex-codegen-cfg.xml new file mode 100644 index 0000000..bfce532 --- /dev/null +++ b/src/java/lex-codegen-cfg.xml @@ -0,0 +1,6 @@ + + abstract public + + + + diff --git a/src/java/log4j.properties b/src/java/log4j.properties new file mode 100644 index 0000000..5adb158 --- /dev/null +++ b/src/java/log4j.properties @@ -0,0 +1,17 @@ +### direct log messages to stdout ### +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n + +### direct messages to file hibernate.log ### +log4j.appender.file=org.apache.log4j.FileAppender +log4j.appender.file.File=/dictionary-hibernate.log +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n + +### direct messages to file lex.log ### +log4j.appender.lex-out=org.apache.log4j.FileAppender +log4j.appender.lex-out.File=/dictionary.log +log4j.appender.lex-out.layout=org.apache.log4j.PatternLayout +log4j.appender.lex-out.layout.ConversionPattern=%d{ABattribute> diff --git a/src/java/org/thdl/lex/AuthenticationFilter.java b/src/java/org/thdl/lex/AuthenticationFilter.java new file mode 100644 index 0000000..e316841 --- /dev/null +++ b/src/java/org/thdl/lex/AuthenticationFilter.java @@ -0,0 +1,145 @@ +package org.thdl.lex; + +import java.io.IOException; +import java.util.Enumeration; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.thdl.users.ThdlUser; + +/** + * Description of the Class + * + * @author travis + * @created October 21, 2003 + */ +public class AuthenticationFilter implements Filter { + //attributes + private String loginPage; + + //accessors + /** + * Sets the loginPage attribute of the AuthenticationFilter object + * + * @param loginPage + * The new loginPage value + */ + public void setLoginPage(String loginPage) { + this.loginPage = loginPage; + } + + /** + * Gets the loginPage attribute of the AuthenticationFilter object + * + * @return The loginPage value + */ + public String getLoginPage() { + return loginPage; + } + + //contract methods + /** + * Description of the Method + * + * @param config + * Description of the Parameter + * @exception ServletException + * Description of the Exception + */ + public void init(FilterConfig config) throws ServletException { + setLoginPage(config.getInitParameter("loginPage")); + if (null == getLoginPage()) { + throw new ServletException( + "The loginPage parameter must be specified"); + } + } + + /** + * Description of the Method + * + * @param request + * Description of the Parameter + * @param response + * Description of the Parameter + * @param chain + * Description of the Parameter + * @exception IOException + * Description of the Exception + * @exception ServletException + * Description of the Exception + */ + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + if (request instanceof HttpServletRequest + && response instanceof HttpServletResponse) { + HttpServletRequest req = (HttpServletRequest) request; + Visit visit = UserSessionManager.getInstance().getVisit( + req.getSession(true)); + ThdlUser user = visit.getUser(); + if (null == user) { + requireLogin(req, (HttpServletResponse) response, req + .getSession(true)); + } else { + chain.doFilter(request, response); + } + } else { + throw new ServletException( + "Filter only applicable to HTTP and HTTPS requests"); + } + } + + /** + * Description of the Method + */ + public void destroy() { + } + + //helper methods + + /** + * Description of the Method + * + * @param request + * Description of the Parameter + * @param response + * Description of the Parameter + * @param session + * Description of the Parameter + * @exception IOException + * Description of the Exception + */ + public void requireLogin(HttpServletRequest request, + HttpServletResponse response, HttpSession session) + throws IOException { + StringBuffer buffer = request.getRequestURL(); + String query = request.getQueryString(); + Enumeration params = request.getParameterNames(); + boolean paramsExist; + if (params.hasMoreElements()) { + paramsExist = true; + buffer.append('?'); + while (params.hasMoreElements()) { + String temp = (String) params.nextElement(); + buffer.append(temp + "=" + request.getParameter(temp)); + if (params.hasMoreElements()) { + buffer.append("&"); + } + } + } else { + paramsExist = false; + } + + UserSessionManager.getInstance().setSessionLoginTarget(session, + buffer.toString()); + UserSessionManager.doRedirect(request, response, loginPage); + } +} + diff --git a/src/java/org/thdl/lex/CharEncFilter.java b/src/java/org/thdl/lex/CharEncFilter.java new file mode 100644 index 0000000..095d207 --- /dev/null +++ b/src/java/org/thdl/lex/CharEncFilter.java @@ -0,0 +1,70 @@ +package org.thdl.lex; + +import java.io.IOException; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Description of the Class + * + * @author travis + * @created October 21, 2003 + */ +public class CharEncFilter implements Filter { + /** + * Description of the Method + * + * @param config + * Description of the Parameter + * @exception ServletException + * Description of the Exception + */ + public void init(FilterConfig config) throws ServletException { + } + + /** + * Description of the Method + * + * @param request + * Description of the Parameter + * @param response + * Description of the Parameter + * @param chain + * Description of the Parameter + * @exception IOException + * Description of the Exception + * @exception ServletException + * Description of the Exception + */ + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + if (request instanceof HttpServletRequest + && response instanceof HttpServletResponse) { + HttpServletResponse res = (HttpServletResponse) response; + HttpServletRequest req = (HttpServletRequest) request; + res.setContentType("text/html; charset=UTF-8;"); + req.setCharacterEncoding("UTF-8"); + + chain.doFilter(request, response); + } else { + throw new ServletException( + "Filter only applicable to HTTP and HTTPS requests"); + } + } + + /** + * Description of the Method + */ + public void destroy() { + } + //helper methods + +} + diff --git a/src/java/org/thdl/lex/ConvertDataToNewMapping.java b/src/java/org/thdl/lex/ConvertDataToNewMapping.java new file mode 100644 index 0000000..a4c2c77 --- /dev/null +++ b/src/java/org/thdl/lex/ConvertDataToNewMapping.java @@ -0,0 +1,79 @@ +package org.thdl.lex; + +import java.io.File; +import java.util.Iterator; + +import net.sf.hibernate.HibernateException; +import net.sf.hibernate.Query; + +import org.thdl.lex.component.ILexComponent; + +/** + * Description of the Class + * + * @author travis + * @created February 16, 2004 + */ +public class ConvertDataToNewMapping { + public static File file = null; + + public static void convertLexComponents(String[] args) { + try { + + if (file.exists()) { + System.out.println("Config File exists!"); + } else { + System.out.println("Config File DOES NOT exist!"); + } + + HibernateSessionDataTransfer.setConfig(file); + HibernateSessionDataTransfer.setConfigResource(args[0]); + + Iterator it; + ILexComponent lc; + + LexComponentRepository.beginTransaction(); + + String queryString = " FROM org.thdl.lex.component.LexComponent comp where metaId"; + Query query = LexComponentRepository.getSession().createQuery( + queryString); + it = query.iterate(); + while (it.hasNext()) { + lc = (ILexComponent) it.next(); + + System.out.println("Saving: " + lc.toString()); + + try { + LexComponentRepositoryDataTransfer.beginTransaction(); + LexComponentRepositoryDataTransfer.getSession().save(lc); + LexComponentRepositoryDataTransfer.endTransaction(true); + LexComponentRepositoryDataTransfer.getSession().evict(lc); + LexComponentRepository.getSession().evict(lc); + } catch (HibernateException he) { + LexComponentRepositoryDataTransfer.endTransaction(false); + throw he; + } + + } + + LexComponentRepository.endTransaction(false); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * The main program for the ConvertDataToNewMapping class + * + * @param args + * The command line arguments + */ + public static void main(String[] args) { + file = new java.io.File(args[0]); + //ConvertDataToNewMapping.convertLexComponents(); + //ConvertDataToNewMapping.convertTerms(); + //ConvertDataToNewMapping.writeCredits(); + } +} + diff --git a/src/java/org/thdl/lex/DisplayHelper.java b/src/java/org/thdl/lex/DisplayHelper.java new file mode 100644 index 0000000..b697585 --- /dev/null +++ b/src/java/org/thdl/lex/DisplayHelper.java @@ -0,0 +1,317 @@ +package org.thdl.lex; + +import java.text.DateFormat; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.commons.beanutils.BeanUtils; +import org.thdl.lex.component.ILexComponent; +import org.thdl.lex.component.Translatable; +import org.thdl.tib.text.TibetanHTML; + +/** + * Description of the Class + * + * @author travis + * @created October 14, 2003 + */ +public class DisplayHelper { + private Collection collection; + + private ILexComponent component; + + 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 + * + * @param date + * The new date value + */ + public void setDate(Date date) { + this.date = date; + } + + /** + * Gets the date attribute of the DisplayHelper object + * + * @return The date value + */ + public Date getDate() { + return date; + } + + /** + * Sets the note attribute of the DisplayHelper object + * + * @param note + * The new note value + */ + public void setNote(ILexComponent note) { + this.note = note; + } + + /** + * Gets the note attribute of the DisplayHelper object + * + * @return The note value + */ + public ILexComponent getNote() { + return note; + } + + /** + * Sets the component attribute of the DisplayHelper object + * + * @param component + * The new component value + */ + public void setComponent(ILexComponent component) { + this.component = component; + } + + /** + * Gets the component attribute of the DisplayHelper object + * + * @return The component value + */ + public ILexComponent getComponent() { + return component; + } + + /** + * Sets the showEditOptions attribute of the DisplayHelper object + * + * @param showEditOptions + * The new showEditOptions value + */ + public void setShowEditOptions(boolean showEditOptions) { + this.showEditOptions = showEditOptions; + } + + /** + * Gets the showEditOptions attribute of the DisplayHelper object + * + * @return The showEditOptions value + */ + public boolean getShowEditOptions() { + return showEditOptions; + } + + /** + * Sets the showTranslations attribute of the DisplayHelper object + * + * @param showTranslations + * The new showTranslations value + */ + public void setShowTranslations(boolean showTranslations) { + this.showTranslations = showTranslations; + } + + /** + * Gets the showTranslations attribute of the DisplayHelper object + * + * @return The showTranslations value + */ + public boolean getShowTranslations() { + return showTranslations; + } + + /** + * Sets the showNotes attribute of the DisplayHelper object + * + * @param showNotes + * The new showNotes value + */ + public void setShowNotes(boolean showNotes) { + this.showNotes = showNotes; + } + + /** + * Sets the showMeta attribute of the DisplayHelper object + * + * @param showMeta + * The new showMeta value + */ + public void setShowMeta(boolean showMeta) { + this.showMeta = showMeta; + } + + /** + * Gets the showNotes attribute of the DisplayHelper object + * + * @return The showNotes value + */ + public boolean getShowNotes() { + return showNotes; + } + + /** + * Gets the showMeta attribute of the DisplayHelper object + * + * @return The showMeta value + */ + public boolean getShowMeta() { + return showMeta; + } + + /** + * Sets the collection attribute of the DisplayHelper object + * + * @param collection + * The new collection value + */ + public void setCollection(Collection collection) { + this.collection = collection; + } + + /** + * Gets the collection attribute of the DisplayHelper object + * + * @return The collection value + */ + public Collection getCollection() { + return collection; + } + + //composite properties + /** + * Gets the collectionSize attribute of the DisplayHelper object + * + * @return The collectionSize value + */ + public int getCollectionSize() { + int size = 0; + if (null != getCollection()) { + size = getCollection().size(); + } + return size; + } + + /** + * Gets the componentIsTranslation attribute of the DisplayHelper object + * + * @return The componentIsTranslation value + */ + public boolean getComponentIsTranslation() { + + boolean b = false; + if (null != getComponent() && getComponent() instanceof Translatable) { + Translatable t = (Translatable) getComponent(); + b = t.getTranslationOf() != null ? true : false; + } + return b; + } + + /** + * Gets the tibetan attribute of the DisplayHelper object + * + * @return The tibetan value + */ + public String getTibetan() { + return TibetanHTML.getHTML(getWylie()); + } + + /** + * Gets the formattedDate attribute of the DisplayHelper object + * + * @return The formattedDate value + */ + public String getFormattedDate() { + String date = null; + if (null != getDate()) { + date = DATE_FORMAT.format(getDate()); + } + return date; + } + + // helpers + /** + * Description of the Method + */ + public void clear() { + setShowEditOptions(false); + setShowMeta(false); + setShowTranslations(false); + setShowNotes(false); + } + + /** + * Description of the Method + * + * @param map + * Description of the Parameter + * @exception Exception + * Description of the Exception + */ + public void populate(Map map) throws Exception { + clear(); + BeanUtils.populate(this, map); + } + + /** + * Gets the hashCode attribute of the DisplayHelper object + * + * @return The hashCode value + */ + public int getHashCodeForComponent() { + return getComponent().hashCode(); + } + + /** + * Gets the hashCodeForCollection attribute of the DisplayHelper object + * + * @return The hashCodeForCollection value + */ + public int getHashCodeForCollection() { + return getCollection().hashCode(); + } + + public String getIndexOfComponent() { + int i = ((List) getCollection()).indexOf(getComponent()) + 1; + return "" + i; + } + + /** + * Constructor for the DisplayHelper object + */ + public DisplayHelper() { + } +} + diff --git a/src/java/org/thdl/lex/Global.java b/src/java/org/thdl/lex/Global.java new file mode 100644 index 0000000..272b484 --- /dev/null +++ b/src/java/org/thdl/lex/Global.java @@ -0,0 +1,204 @@ +package org.thdl.lex; + +import java.io.PrintWriter; +import java.io.StringWriter; +import java.util.Date; +import java.util.List; + +import org.thdl.lex.component.ITerm; + +/** + * Description of the Class + * + * @author travis + * @created October 20, 2003 + */ +public class Global { + private static long refreshDelay; + + private static int recentTermsCount; + + private static long lastRefresh; + + private int entryCount; + + private List recentTerms; + + /** + * Gets the lastUpdateAsDate attribute of the LexComponentRepository class + * + * @return The lastUpdateAsDate value + * @exception LexRepositoryException + * Description of the Exception + */ + public Date getLastUpdate() throws LexRepositoryException { + Date date = null; + if (null != getRecentTerms() && getRecentTerms().size() > 0) { + ITerm term = (ITerm) getRecentTerms().get(0); + date = term.getMeta().getModifiedOn(); + } + return date; + } + + /** + * Sets the recentTermsCount attribute of the Global object + * + * @param recentTermsCount + * The new recentTermsCount value + */ + public void setRecentTermsCount(int recentTermsCount) { + this.recentTermsCount = recentTermsCount; + } + + /** + * Sets the refreshDelay attribute of the Global object + * + * @param refreshDelay + * The new refreshDelay value + */ + public void setRefreshDelay(long refreshDelay) { + this.refreshDelay = refreshDelay; + } + + /** + * Gets the recentTermsCount attribute of the Global object + * + * @return The recentTermsCount value + */ + public int getRecentTermsCount() { + return recentTermsCount; + } + + /** + * Gets the refreshDelay attribute of the Global object + * + * @return The refreshDelay value + */ + public long getRefreshDelay() { + return refreshDelay; + } + + /** + * Sets the entryCount attribute of the Global object + * + * @param entryCount + * The new entryCount value + */ + public void setEntryCount(int entryCount) { + this.entryCount = entryCount; + } + + /** + * Sets the lastRefresh attribute of the Global object + * + * @param lastRefresh + * The new lastRefresh value + */ + public void setLastRefresh(long lastRefresh) { + this.lastRefresh = lastRefresh; + } + + /** + * Sets the recentTerms attribute of the Global object + * + * @param recentTerms + * The new recentTerms value + */ + public void setRecentTerms(List recentTerms) { + this.recentTerms = recentTerms; + setLastRefresh(System.currentTimeMillis()); + } + + /** + * Gets the lastRefresh attribute of the Global object + * + * @return The lastRefresh value + */ + public long getLastRefresh() { + return lastRefresh; + } + + /** + * Gets the recentTerms attribute of the Global object + * + * @return The recentTerms value + * @exception LexRepositoryException + * Description of the Exception + */ + public List getRecentTerms() throws LexRepositoryException { + if (null == recentTerms || requiresRefresh()) { + refresh(); + } + return recentTerms; + } + + //helpers + + /** + * Description of the Method + * + * @return Description of the Return Value + */ + public boolean requiresRefresh() { + boolean requiresRefresh = false; + long now = System.currentTimeMillis(); + long lastUpdate = LexComponentRepository.getLastUpdate(); + long sinceLastRefresh = now - getLastRefresh(); + + //LexLogger.debug( "Requires Refresh Logic: if " + sinceLastRefresh + " + // > " + getRefreshDelay() + " && " + lastUpdate + " > " + + // getLastRefresh() ); + if (sinceLastRefresh > getRefreshDelay() + && lastUpdate > getLastRefresh()) { + requiresRefresh = true; + LexLogger.debug("Refresh Required at: " + + System.currentTimeMillis()); + } + return requiresRefresh; + } + + /** + * Description of the Method + */ + public void refresh() { + try { + int limit = getRecentTermsCount(); + LexLogger.debug("GlobalRefresher is starting a refresh for the " + + limit + " most recent terms."); + setRecentTerms(LexComponentRepository.getRecentTerms(limit)); + LexLogger.debug("GlobalRefresher is finished refreshing..."); + LexLogger.debug("Here's the new recent terms list: " + + getRecentTerms().toString()); + LexComponentRepository.cleanup(); + LexLogger.info("GlobalRefresher finished a refresh..."); + } catch (Exception e) { + StringWriter writer = new StringWriter(); + e.printStackTrace(new PrintWriter(writer)); + String stackTrace = writer.getBuffer().toString(); + LexLogger.error("GlobalRefresher Thread caught an Exception: " + + stackTrace); + } + + } + + /** + * Constructor for the Global object + */ + public Global() { + } + + /** + * Constructor for the Global object + * + * @param refreshDelay + * Description of the Parameter + * @param recentItems + * Description of the Parameter + */ + public Global(int recentItems, long refreshDelay) { + setRecentTermsCount(recentItems); + setRefreshDelay(refreshDelay); + } + +} + diff --git a/src/java/org/thdl/lex/GuestFilter.java b/src/java/org/thdl/lex/GuestFilter.java new file mode 100644 index 0000000..d428ae9 --- /dev/null +++ b/src/java/org/thdl/lex/GuestFilter.java @@ -0,0 +1,106 @@ +package org.thdl.lex; + +import java.io.IOException; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.thdl.users.ThdlUser; + +/** + * Description of the Class + * + * @author travis + * @created October 9, 2003 + */ +public class GuestFilter implements Filter { + //attributes + private String loginPage; + + private UserSessionManager sessionMgr; + + //accessors + /** + * Sets the loginPage attribute of the GuestFilter object + * + * @param loginPage + * The new loginPage value + */ + public void setLoginPage(String loginPage) { + this.loginPage = loginPage; + } + + /** + * Gets the loginPage attribute of the GuestFilter object + * + * @return The loginPage value + */ + public String getLoginPage() { + return loginPage; + } + + //contract methods + /** + * Description of the Method + * + * @param config + * Description of the Parameter + * @exception ServletException + * Description of the Exception + */ + public void init(FilterConfig config) throws ServletException { + } + + /** + * Description of the Method + * + * @param request + * Description of the Parameter + * @param response + * Description of the Parameter + * @param chain + * Description of the Parameter + * @exception IOException + * Description of the Exception + * @exception ServletException + * Description of the Exception + */ + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + if (request instanceof HttpServletRequest + && response instanceof HttpServletResponse) { + HttpServletRequest req = (HttpServletRequest) request; + Visit visit = UserSessionManager.getInstance().getVisit( + req.getSession(true)); + ThdlUser user = visit.getUser(); + if (null == user) { + try { + user = new LexUser(); + } catch (Exception e) { + throw new ServletException(e); + } + user.setRoles("guest"); + visit.setUser(user); + visit.setDisplayMode("full"); + } + chain.doFilter(request, response); + } else { + throw new ServletException( + "Filter only applicable to HTTP and HTTPS requests"); + } + } + + /** + * Description of the Method + */ + public void destroy() { + } + //helper methods +} + diff --git a/src/java/org/thdl/lex/HibernateSession.java b/src/java/org/thdl/lex/HibernateSession.java new file mode 100644 index 0000000..556dca9 --- /dev/null +++ b/src/java/org/thdl/lex/HibernateSession.java @@ -0,0 +1,68 @@ +package org.thdl.lex; + +import net.sf.hibernate.HibernateException; +import net.sf.hibernate.Session; +import net.sf.hibernate.SessionFactory; +import net.sf.hibernate.cfg.Configuration; + +/** + * Description of the Class + * + * @author Hibernate WIKI + * @created October 1, 2003 + */ +public class HibernateSession { + + private static SessionFactory sessionFactory; + + /** + * Description of the Field + */ + public final static ThreadLocal session = new ThreadLocal(); + + /** + * Description of the Method + * + * @return Description of the Returned Value + * @exception HibernateException + * Description of Exception + * @since + */ + public static Session currentSession() throws HibernateException { + + Session s = (Session) session.get(); + if (s == null) { + + // Don't get from JNDI, use a static SessionFactory + if (sessionFactory == null) { + + // Use default hibernate.cfg.xml + sessionFactory = new Configuration().configure() + .buildSessionFactory(); + + } + + s = sessionFactory.openSession(); + session.set(s); + } + return s; + } + + /** + * Description of the Method + * + * @exception HibernateException + * Description of Exception + * @since + */ + public static void closeSession() throws HibernateException { + + Session s = (Session) session.get(); + session.set(null); + if (s != null) { + s.close(); + } + } + +} + diff --git a/src/java/org/thdl/lex/HibernateSessionDataTransfer.java b/src/java/org/thdl/lex/HibernateSessionDataTransfer.java new file mode 100644 index 0000000..f7d55ee --- /dev/null +++ b/src/java/org/thdl/lex/HibernateSessionDataTransfer.java @@ -0,0 +1,104 @@ +package org.thdl.lex; + +import java.io.File; + +import net.sf.hibernate.HibernateException; +import net.sf.hibernate.Session; +import net.sf.hibernate.SessionFactory; +import net.sf.hibernate.cfg.Configuration; + +/** + * Description of the Class + * + * @author Hibernate WIKI + * @created October 1, 2003 + */ +public class HibernateSessionDataTransfer { + + private static SessionFactory sessionFactory; + + /** + * Description of the Field + */ + public final static ThreadLocal session = new ThreadLocal(); + + /** + * Description of the Field + */ + public static File config; + + public static String configResource; + + public static void setConfigResource(String configResource) { + HibernateSessionDataTransfer.configResource = configResource; + } + + public static String getConfigResource() { + return configResource; + } + + /** + * Sets the config attribute of the HibernateSessionDataTransfer object + * + * @param config + * The new config value + */ + public static void setConfig(File config) { + HibernateSessionDataTransfer.config = config; + } + + /** + * Gets the config attribute of the HibernateSessionDataTransfer object + * + * @return The config value + */ + public static File getConfig() { + return config; + } + + /** + * Description of the Method + * + * @return Description of the Returned Value + * @exception HibernateException + * Description of Exception + * @since + */ + public static Session currentSession() throws HibernateException { + + Session s = (Session) session.get(); + if (s == null) { + + // Don't get from JNDI, use a static SessionFactory + if (sessionFactory == null) { + + // Use default hibernate.cfg.xml + sessionFactory = new Configuration().configure(getConfig()) + .buildSessionFactory(); + + } + + s = sessionFactory.openSession(); + session.set(s); + } + return s; + } + + /** + * Description of the Method + * + * @exception HibernateException + * Description of Exception + * @since + */ + public static void closeSession() throws HibernateException { + + Session s = (Session) session.get(); + session.set(null); + if (s != null) { + s.close(); + } + } + +} + diff --git a/src/java/org/thdl/lex/HibernateTestServlet.java b/src/java/org/thdl/lex/HibernateTestServlet.java new file mode 100644 index 0000000..ffcf239 --- /dev/null +++ b/src/java/org/thdl/lex/HibernateTestServlet.java @@ -0,0 +1,218 @@ +package org.thdl.lex; + +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.SQLException; +import java.util.Iterator; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import net.sf.hibernate.HibernateException; +import net.sf.hibernate.Query; +import net.sf.hibernate.Session; +import net.sf.hibernate.SessionFactory; +import net.sf.hibernate.Transaction; +import net.sf.hibernate.cfg.Configuration; + +import org.thdl.lex.component.IPronunciation; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class HibernateTestServlet extends HttpServlet { + + private SessionFactory sessionFactory; + + private Session session; + + private Transaction transaction; + + /** + * Sets the sessionFactory attribute of the HibernateTestServlet object + * + * @param sessionFactory + * The new sessionFactory value + * @since + */ + public void setSessionFactory(SessionFactory sessionFactory) { + this.sessionFactory = sessionFactory; + } + + /** + * Sets the session attribute of the HibernateTestServlet object + * + * @param session + * The new session value + * @since + */ + public void setSession(Session session) { + this.session = session; + } + + /** + * Sets the transaction attribute of the HibernateTestServlet object + * + * @param transaction + * The new transaction value + * @since + */ + public void setTransaction(Transaction transaction) { + this.transaction = transaction; + } + + /** + * Gets the sessionFactory attribute of the HibernateTestServlet object + * + * @return The sessionFactory value + * @since + */ + public SessionFactory getSessionFactory() { + return sessionFactory; + } + + /** + * Gets the session attribute of the HibernateTestServlet object + * + * @return The session value + * @since + */ + public Session getSession() { + return session; + } + + /** + * Gets the transaction attribute of the HibernateTestServlet object + * + * @return The transaction value + * @since + */ + public Transaction getTransaction() { + return transaction; + } + + /** + * Description of the Method + * + * @param request + * Description of Parameter + * @param response + * Description of Parameter + * @exception ServletException + * Description of Exception + * @exception IOException + * Description of Exception + * @since + */ + public void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + try { + initHibernate(); + + //response.setContentType( "text/html" ); + response.setContentType("text/html;charset=UTF-8;"); + request.setCharacterEncoding("UTF-8"); + + PrintWriter out = response.getWriter(); + out.println(""); + beginTransaction(); + testQuery(out); + endTransaction(false); + LexLogger.logRequestState(request); + LexLogger.logResponseState(response); + out.println(""); + + } catch (SQLException e) { + try { + getSession().close(); + throw new ServletException(e); + } catch (HibernateException he) { + throw new ServletException(he); + } + } catch (HibernateException e) { + try { + getSession().close(); + throw new ServletException(e); + } catch (HibernateException he) { + throw new ServletException(he); + } + } + + } + + // Helper Methods + /** + * Description of the Method + * + * @exception HibernateException + * Description of Exception + * @since + */ + private void initHibernate() throws HibernateException { + + // Load Configuration and build SessionFactory + setSessionFactory(new Configuration().configure().buildSessionFactory()); + } + + /** + * Description of the Method + * + * @exception HibernateException + * Description of Exception + * @since + */ + private void beginTransaction() throws HibernateException { + setSession(getSessionFactory().openSession()); + setTransaction(session.beginTransaction()); + } + + /** + * Description of the Method + * + * @param commit + * Description of Parameter + * @exception HibernateException + * Description of Exception + * @since + */ + private void endTransaction(boolean commit) throws HibernateException { + + if (commit) { + getTransaction().commit(); + } else { + // Don't commit the transaction, can be faster for read-only + // operations + getTransaction().rollback(); + } + getSession().close(); + } + + /** + * A unit test for JUnit + * + * @param out + * Description of Parameter + * @exception SQLException + * Description of Exception + * @exception HibernateException + * Description of Exception + * @since + */ + public void testQuery(PrintWriter out) throws SQLException, + HibernateException { + String queryString = "FROM org.thdl.lex.component.Pronunciation"; + Query query = getSession().createQuery(queryString); + for (Iterator it = query.iterate(); it.hasNext();) { + String s = ((IPronunciation) it.next()).getPhonetics(); + out.println(s + "
"); + LexLogger.debug("Diacritics Test: " + s); + } + } +} + diff --git a/src/java/org/thdl/lex/HibernateTransaction.java b/src/java/org/thdl/lex/HibernateTransaction.java new file mode 100644 index 0000000..1339015 --- /dev/null +++ b/src/java/org/thdl/lex/HibernateTransaction.java @@ -0,0 +1,57 @@ +package org.thdl.lex; + +import net.sf.hibernate.HibernateException; +import net.sf.hibernate.Transaction; + +/** + * Description of the Class + * + * @author Hibernate WIKI + * @created October 1, 2003 + */ +public class HibernateTransaction { + + /** + * Description of the Field + */ + public final static ThreadLocal transaction = new ThreadLocal(); + + /** + * Description of the Method + * + * @exception HibernateException + * Description of Exception + * @since + */ + public static void beginTransaction() throws HibernateException { + + Transaction t = (Transaction) transaction.get(); + if (t == null) { + t = HibernateSession.currentSession().beginTransaction(); + transaction.set(t); + } + } + + /** + * Description of the Method + * + * @param commit + * Description of the Parameter + * @exception HibernateException + * Description of Exception + * @since + */ + public static void endTransaction(boolean commit) throws HibernateException { + Transaction t = (Transaction) transaction.get(); + transaction.set(null); + if (t != null) { + if (commit) { + t.commit(); + } else { + t.rollback(); + } + } + } + +} + diff --git a/src/java/org/thdl/lex/HibernateTransactionDataTransfer.java b/src/java/org/thdl/lex/HibernateTransactionDataTransfer.java new file mode 100644 index 0000000..ff5fa68 --- /dev/null +++ b/src/java/org/thdl/lex/HibernateTransactionDataTransfer.java @@ -0,0 +1,58 @@ +package org.thdl.lex; + +import net.sf.hibernate.HibernateException; +import net.sf.hibernate.Transaction; + +/** + * Description of the Class + * + * @author Hibernate WIKI + * @created October 1, 2003 + */ +public class HibernateTransactionDataTransfer { + + /** + * Description of the Field + */ + public final static ThreadLocal transaction = new ThreadLocal(); + + /** + * Description of the Method + * + * @exception HibernateException + * Description of Exception + * @since + */ + public static void beginTransaction() throws HibernateException { + + Transaction t = (Transaction) transaction.get(); + if (t == null) { + t = HibernateSessionDataTransfer.currentSession() + .beginTransaction(); + transaction.set(t); + } + } + + /** + * Description of the Method + * + * @param commit + * Description of the Parameter + * @exception HibernateException + * Description of Exception + * @since + */ + public static void endTransaction(boolean commit) throws HibernateException { + Transaction t = (Transaction) transaction.get(); + transaction.set(null); + if (t != null) { + if (commit) { + t.commit(); + } else { + t.rollback(); + } + } + } + +} + diff --git a/src/java/org/thdl/lex/LexActionServlet.java b/src/java/org/thdl/lex/LexActionServlet.java new file mode 100644 index 0000000..78bad96 --- /dev/null +++ b/src/java/org/thdl/lex/LexActionServlet.java @@ -0,0 +1,265 @@ +package org.thdl.lex; + +import java.io.IOException; +import java.util.HashMap; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.thdl.lex.commands.AbortCommand; +import org.thdl.lex.commands.Command; +import org.thdl.lex.commands.CommandException; +import org.thdl.lex.commands.CommandToken; +import org.thdl.lex.commands.DisplayCommand; +import org.thdl.lex.commands.FindCommand; +import org.thdl.lex.commands.GetInsertFormCommand; +import org.thdl.lex.commands.GetRemoveFormCommand; +import org.thdl.lex.commands.GetUpdateFormCommand; +import org.thdl.lex.commands.InsertCommand; +import org.thdl.lex.commands.NullCommand; +import org.thdl.lex.commands.PreferencesCommand; +import org.thdl.lex.commands.RemoveCommand; +import org.thdl.lex.commands.UpdateCommand; +import org.thdl.lex.component.LexComponent; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class LexActionServlet extends HttpServlet { + //attributes + private HashMap commands; + + //accessors + + /** + * Sets the commands attribute of the LexActionServlet object + * + * @param commands + * The new commands value + * @since + */ + public void setCommands(HashMap commands) { + this.commands = commands; + } + + /** + * Gets the commands attribute of the LexActionServlet object + * + * @return The commands value + * @since + */ + public HashMap getCommands() { + return commands; + } + + //helper methods + + /** + * Description of the Method + * + * @param config + * Description of Parameter + * @exception ServletException + * Description of Exception + * @since + */ + public void init(ServletConfig config) throws ServletException { + try { + super.init(config); + initCommands(); + + config.getServletContext().setAttribute("flatData", + new LexFlatDataRepository()); + + /* + * LexSourceRepository sources = LexSourceRepository.getInstance(); + * sources.setOaiServer( + * config.getServletContext().getInitParameter( "oaiServer" ) ); + * sources.setOaiMetadataPrefix( + * config.getServletContext().getInitParameter( "oaiMetadataPrefix" ) ); + * sources.setOaiHome( config.getServletContext().getInitParameter( + * "oaiHome" ) ); sources.setOaiLocalCopy( + * config.getServletContext().getInitParameter( "oaiLocalCopy" ) ); + * //int oaiDelay = Integer.parseInt( + * config.getServletContext().getInitParameter( "oaiRefreshDelay" ) ); + * sources.setOaiRefreshDelay( 24 ); + * config.getServletContext().setAttribute( "sources", sources ); + */ + String delay = config.getInitParameter("globalDataRefreshDelay"); + long refreshDelay = Long.parseLong(delay) * 1000; + String recent = config.getInitParameter("recentItems"); + int recentItems = Integer.parseInt(recent); + Global global = new Global(recentItems, refreshDelay); + config.getServletContext().setAttribute( + LexConstants.GLOBAL_CONTEXT_ATTR, global); + LexLogger.debugComponent(global); + System.setProperty("java.awt.headless", "true"); + } catch (Exception e) { + throw new ServletException(e); + } + } + + /** + * Description of the Method + * + * @param req + * Description of Parameter + * @param res + * Description of Parameter + * @exception ServletException + * Description of Exception + * @exception IOException + * Description of Exception + * @since + */ + public void service(HttpServletRequest req, HttpServletResponse res) + throws ServletException, IOException { + /* + * LexLogger.debug( "Checking Request state at start of + * LexActionServlet.service()" ); LexLogger.logRequestState( req ); + * LexLogger.logSessionState( req ); + */ + String next; + try { + 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); + } catch (CommandException e) { + req.setAttribute("javax.servlet.jsp.jspException", e); + next = LexConstants.ERROR_PAGE; + try { + LexComponentRepository.cleanup(); + } catch (LexRepositoryException lre) { + Exception ex = new Exception( + "LexComponentRepository couldn't clean up after Exception because: " + + lre.getMessage(), e); + req.setAttribute("javax.servlet.jsp.jspException", ex); + } + } catch (Exception e) { + req.setAttribute("javax.servlet.jsp.jspException", e); + next = LexConstants.ERROR_PAGE; + try { + LexComponentRepository.cleanup(); + } catch (LexRepositoryException lre) { + Exception ex = new Exception( + "LexComponentRepository couldn't clean up after Exception because: " + + lre.getMessage(), e); + req.setAttribute("javax.servlet.jsp.jspException", ex); + } + } + RequestDispatcher rd; + rd = getServletContext().getRequestDispatcher( + LexConstants.JSP_DIR + next); + rd.forward(req, res); + LexLogger + .debug("Checking Request state at end of LexActionServlet.service()"); + LexLogger.logRequestState(req); + LexLogger + .debug("Checking Session state at end of LexActionServlet.service()"); + LexLogger.logSessionState(req); + LexLogger + .debug("Checking Context state at end of LexActionServlet.service()"); + LexLogger.logContextState(getServletContext()); + } + + /** + * Description of the Method + * + * @param cmdKey + * Description of Parameter + * @return Description of the Returned Value + * @exception CommandException + * Description of Exception + * @since + */ + private Command lookupCommand(String cmdKey) throws CommandException { + if (cmdKey == null) { + cmdKey = "menu"; + } + if (getCommands().containsKey(cmdKey)) { + return (Command) getCommands().get(cmdKey); + } else { + throw new CommandException("Invalid Command Identifier: '" + cmdKey + + "'"); + } + } + + /** + * Description of the Method + * + * @since + */ + private void initCommands() { + HashMap commands = new HashMap(); + + commands.put("menu", new NullCommand("menu.jsp")); + commands.put("search", new NullCommand("search.jsp")); + commands.put("logout", new NullCommand("logout.jsp")); + commands.put("getMetaPrefsForm", new NullCommand("metaPrefsForm.jsp")); + commands.put("getMetaDefaultsForm", new NullCommand( + "metaDefaultsForm.jsp")); + + commands.put("find", new FindCommand("displayEntry.jsp")); + + commands.put("getInsertForm", new GetInsertFormCommand( + "displayForm.jsp?formMode=insert", Boolean.FALSE)); + commands.put("getInsertTermForm", new GetInsertFormCommand( + "displayForm.jsp?formMode=insert", Boolean.TRUE)); + commands.put("getTranslationForm", new GetInsertFormCommand( + "displayForm.jsp?formMode=insert", Boolean.FALSE)); + commands.put("getAnnotationForm", new GetInsertFormCommand( + "displayForm.jsp?formMode=insert", Boolean.FALSE)); + + commands.put("getUpdateForm", new GetUpdateFormCommand( + "displayForm.jsp?formMode=update", Boolean.FALSE)); + commands.put("getUpdateTermForm", new GetUpdateFormCommand( + "displayForm.jsp?formMode=update", Boolean.TRUE)); + + /* + * commands.put( "getAnnotationForm", new AnnotateCommand( + * "displayForm.jsp?formMode=insert" ) ); commands.put( "addAnnotation", + * new AddAnnotationCommand( "displayEntry.jsp", Boolean.TRUE ) ); + */ + commands.put("insert", new InsertCommand("displayEntry.jsp", + Boolean.FALSE)); + commands.put("insertTerm", new InsertCommand("displayEntry.jsp", + Boolean.TRUE)); + + commands.put("update", new UpdateCommand("displayEntry.jsp", + Boolean.FALSE)); + commands.put("updateTerm", new UpdateCommand("displayEntry.jsp", + Boolean.TRUE)); + + commands.put("display", new DisplayCommand("displayEntry.jsp")); + commands.put("displayFull", new DisplayCommand("displayEntry.jsp")); + commands.put("editEntry", new DisplayCommand("displayEntry.jsp")); + + commands.put("getRemoveForm", new GetRemoveFormCommand( + "displayForm.jsp?formMode=remove", Boolean.FALSE)); + commands.put("getRemoveTermForm", new GetRemoveFormCommand( + "displayForm.jsp?formMode=remove", Boolean.TRUE)); + commands.put("remove", new RemoveCommand("displayEntry.jsp", + Boolean.FALSE)); + commands.put("removeTerm", new RemoveCommand("menu.jsp", Boolean.TRUE)); + + commands.put("setMetaPrefs", new PreferencesCommand("menu.jsp")); + commands.put("setMetaDefaults", new PreferencesCommand("menu.jsp")); + // commands.put( "refreshSources", new RefreshSourcesCommand( "test.jsp" + // ) ); + + commands.put("abort", new AbortCommand("menu.jsp")); + + setCommands(commands); + } +} + diff --git a/src/java/org/thdl/lex/LexComponentFilter.java b/src/java/org/thdl/lex/LexComponentFilter.java new file mode 100644 index 0000000..c5bba31 --- /dev/null +++ b/src/java/org/thdl/lex/LexComponentFilter.java @@ -0,0 +1,238 @@ +package org.thdl.lex; + +import java.io.IOException; +import java.util.HashMap; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.thdl.lex.component.AnalyticalNote; +import org.thdl.lex.component.Definition; +import org.thdl.lex.component.EncyclopediaArticle; +import org.thdl.lex.component.Etymology; +import org.thdl.lex.component.GrammaticalFunction; +import org.thdl.lex.component.ITerm; +import org.thdl.lex.component.Keyword; +import org.thdl.lex.component.LexComponent; +import org.thdl.lex.component.LexComponentException; +import org.thdl.lex.component.ModelSentence; +import org.thdl.lex.component.Passage; +import org.thdl.lex.component.Pronunciation; +import org.thdl.lex.component.RelatedTerm; +import org.thdl.lex.component.SpeechRegister; +import org.thdl.lex.component.Spelling; +import org.thdl.lex.component.Subdefinition; +import org.thdl.lex.component.Term; +import org.thdl.lex.component.TransitionalData; +import org.thdl.lex.component.TranslationEquivalent; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class LexComponentFilter implements Filter { + //attributes + private HashMap blanks; + + private UserSessionManager sessionMgr; + + //accessors + /** + * Sets the blanks attribute of the LexComponentFilter object + * + * @param blanks + * The new blanks value + * @since + */ + public void setBlanks(HashMap blanks) { + this.blanks = blanks; + } + + /** + * Sets the sessionMgr attribute of the LexComponentFilter object + * + * @param sessionMgr + * The new sessionMgr value + * @since + */ + public void setSessionManager(UserSessionManager sessionMgr) { + this.sessionMgr = sessionMgr; + } + + /** + * Gets the blanks attribute of the LexComponentFilter object + * + * @return The blanks value + * @since + */ + public HashMap getBlanks() { + return blanks; + } + + /** + * Gets the sessionMgr attribute of the LexComponentFilter object + * + * @return The sessionMgr value + * @since + */ + public UserSessionManager getSessionManager() { + if (null == sessionMgr) { + setSessionManager(UserSessionManager.getInstance()); + } + return sessionMgr; + } + + //contract methods + + /** + * Description of the Method + * + * @param config + * Description of Parameter + * @exception ServletException + * Description of Exception + * @since + */ + public void init(FilterConfig config) throws ServletException { + try { + setBlanks(new HashMap()); + ITerm term = new Term(); + getBlanks().put(LexConstants.TERMLABEL_VALUE, term); + getBlanks().put(LexConstants.PRONUNCIATIONLABEL_VALUE, + new Pronunciation()); + getBlanks().put(LexConstants.ETYMOLOGYLABEL_VALUE, new Etymology()); + getBlanks().put(LexConstants.FUNCTIONLABEL_VALUE, + new GrammaticalFunction()); + getBlanks().put(LexConstants.SPELLINGLABEL_VALUE, new Spelling()); + getBlanks().put(LexConstants.ENCYCLOPEDIA_ARTICLE_LABEL_VALUE, + new EncyclopediaArticle()); + getBlanks().put(LexConstants.DEFINITIONLABEL_VALUE, + new Definition()); + getBlanks().put(LexConstants.PASSAGELABEL_VALUE, new Passage()); + getBlanks().put(LexConstants.SUBDEFINITIONLABEL_VALUE, + new Subdefinition()); + getBlanks().put(LexConstants.TRANSLATIONLABEL_VALUE, + new TranslationEquivalent()); + getBlanks().put(LexConstants.KEYWORDLABEL_VALUE, new Keyword()); + getBlanks().put(LexConstants.RELATEDTERMLABEL_VALUE, + new RelatedTerm()); + getBlanks().put(LexConstants.MODELSENTENCELABEL_VALUE, + new ModelSentence()); + getBlanks().put(LexConstants.REGISTERLABEL_VALUE, + new SpeechRegister()); + getBlanks().put("analyticalNote", new AnalyticalNote()); + getBlanks().put("transitionalData", new TransitionalData()); + // getBlanks().put( LexConstants.INPUTSESSIONLABEL_VALUE, new + // Preferences() ); + } + // catch (LexComponentException labe) + catch (Exception labe) { + throw new ServletException(labe); + } + } + + /** + * Description of the Method + * + * @param request + * Description of Parameter + * @param response + * Description of Parameter + * @param chain + * Description of Parameter + * @exception IOException + * Description of Exception + * @exception ServletException + * Description of Exception + * @since + */ + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + long start = System.currentTimeMillis(); + if (request instanceof HttpServletRequest + && response instanceof HttpServletResponse) { + HttpServletResponse res = (HttpServletResponse) response; + HttpServletRequest req = (HttpServletRequest) request; + res.setContentType("text/html; charset=UTF-8;"); + req.setCharacterEncoding("UTF-8"); + + if (null != req.getParameter(LexConstants.LABEL_REQ_PARAM)) { + String labelValue = req + .getParameter(LexConstants.LABEL_REQ_PARAM); + try { + if (getBlanks().get(labelValue) != null) { + Class c = getBlanks().get(labelValue).getClass(); + LexComponent component = (LexComponent) c.newInstance(); + component.populate(req.getParameterMap()); + component.getMeta().populate(req.getParameterMap()); + req.setAttribute(LexConstants.COMPONENT_REQ_ATTR, + component); + } else { + LexLogger + .error("componentLabel was not in blank components"); + } + } catch (InstantiationException ie) { + throw new ServletException(ie); + } catch (IllegalAccessException iae) { + throw new ServletException(iae); + } catch (LexComponentException lce) { + throw new ServletException(lce); + } + } else { + LexLogger + .error("Required parameter, '" + + LexConstants.LABEL_REQ_PARAM + + "' was not specified."); + } + chain.doFilter(request, response); + + HttpServletResponse resp = (HttpServletResponse) response; + resp.setContentType("text/html; charset=UTF-8;"); + LexLogger.logResponseState(resp); + try { + LexComponentRepository.cleanup(); + } catch (LexRepositoryException lre) { + throw new ServletException(lre); + } + /* + * LexLogger.debug( "Checking Request state at end of + * LexComponentFilter.doFilter()" ); LexLogger.logRequestState( req ); + * LexLogger.logSessionState( req ); + */ + long dur = System.currentTimeMillis() - start; + LexLogger.debug("Total Request took: " + dur / 1000 + + " seconds.\n\n"); + } else { + throw new ServletException( + "Filter only applicable to HTTP and HTTPS requests"); + } + } + + /** + * Description of the Method + * + * @since + */ + public void destroy() { + } + + //helper methods + + //constructors + /** + * Constructor for the LexComponentFilter object + * + * @since + */ + public LexComponentFilter() { + } +} + diff --git a/src/java/org/thdl/lex/LexComponentRepository.java b/src/java/org/thdl/lex/LexComponentRepository.java new file mode 100644 index 0000000..e27dc1d --- /dev/null +++ b/src/java/org/thdl/lex/LexComponentRepository.java @@ -0,0 +1,853 @@ +package org.thdl.lex; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import net.sf.hibernate.HibernateException; +import net.sf.hibernate.Query; +import net.sf.hibernate.Session; + +import org.apache.log4j.Logger; +import org.thdl.lex.component.ILexComponent; +import org.thdl.lex.component.ITerm; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class LexComponentRepository { + + /** + * Description of the Field + */ + public final static String EXACT = "exact"; + + /** + * Description of the Field + */ + public final static String STARTS_WITH = "startsWith"; + + /** + * Description of the Field + */ + public final static String ANYWHERE = "anywhere"; + + private static long start; + + private static long lastUpdate = now(); + + /** + * Sets the lastUpdate attribute of the LexComponentRepository class + * + * @param last + * The new lastUpdate value + */ + public static void setLastUpdate(long last) { + lastUpdate = last; + } + + /** + * Gets the lastUpdate attribute of the LexComponentRepository class + * + * @return The lastUpdate value + */ + public static long getLastUpdate() { + return lastUpdate; + } + + /** + * Sets the start attribute of the LexComponentRepository object + * + * @param startTime + * The new start value + * @since + */ + private static void setStart(long startTime) { + Logger logger = Logger.getLogger("org.thdl.lex"); + logger.debug("Query start time: " + new java.util.Date(startTime)); + start = startTime; + } + + /** + * Gets the start attribute of the LexComponentRepository object + * + * @return The start value + * @since + */ + private static long getStart() { + return start; + } + + /** + * Gets the duration attribute of the LexComponentRepository class + * + * @return The duration value + */ + private static long getDuration() { + long duration = now() - getStart(); + + Logger logger = Logger.getLogger("org.thdl.lex"); + logger.debug("Query finish: " + new java.util.Date(now())); + logger.debug("Query duration in ms: " + duration); + logger.info("Query duration: " + duration / 1000 + " seconds."); + return duration; + } + + /** + * Gets the session attribute of the LexComponentRepository class + * + * @return The session value + * @exception HibernateException + * Description of Exception + * @since + */ + protected static Session getSession() throws HibernateException { + Session session = HibernateSession.currentSession(); + if (!session.isConnected()) { + //session.reconnect(); + } + return session; + } + + /** + * Description of the Method + * + * @exception LexRepositoryException + * Description of the Exception + */ + protected static void beginTransaction() throws LexRepositoryException { + try { + HibernateTransaction.beginTransaction(); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + + } + + /** + * Description of the Method + * + * @param commit + * Description of Parameter + * @exception LexRepositoryException + * Description of the Exception + * @since + */ + protected static void endTransaction(boolean commit) + throws LexRepositoryException { + try { + HibernateTransaction.endTransaction(commit); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Description of the Method + * + * @return Description of the Returned Value + * @since + */ + private static long now() { + return System.currentTimeMillis(); + } + + /** + * Description of the Method + * + * @param comp + * Description of Parameter + * @return Description of the Returned Value + * @exception LexRepositoryException + * Description of Exception + * @since + */ + private static ITerm assertTerm(ILexComponent comp) + throws LexRepositoryException { + ITerm term = null; + try { + term = (ITerm) comp; + } catch (Exception e) { + throw new LexRepositoryException("Query Component was not a term."); + } + return term; + } + + /** + * Queries the database for Terms that start with the string in the term + * property of the queryComponent. Sets entry property the first hit + * returned. + * + * @param lexQuery + * Description of Parameter + * @exception LexRepositoryException + * Description of Exception + * @since + */ + public static void findTermsByTerm(LexQuery lexQuery) + throws LexRepositoryException { + setStart(now()); + beginTransaction(); + ITerm term = assertTerm(lexQuery.getQueryComponent()); + if (null == term.getTerm()) { + throw new LexRepositoryException("Query Component term was null."); + } + + Query query = null; + Iterator it = null; + + /* + * String termForQuery = LexUtilities.hqlEscape( term.getTerm() ); + * LexLogger.debug( "Escaped term string: " + termForQuery ); + */ + String termForQuery = term.getTerm(); + + if (lexQuery.getFindMode().equals(LexComponentRepository.STARTS_WITH)) { + termForQuery = termForQuery + "%"; + } else if (lexQuery.getFindMode().equals( + LexComponentRepository.ANYWHERE)) { + termForQuery = "%" + termForQuery + "%"; + } + + String queryString = " FROM org.thdl.lex.component.ITerm as term WHERE term.term like :term AND term.deleted=0 ORDER BY term"; + try { + query = getSession().createQuery(queryString); + query.setString("term", termForQuery); + + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + + try { + it = query.iterate(); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + + if (it.hasNext()) { + term = (ITerm) it.next(); + lexQuery.setEntry(term); + lexQuery.getResults().clear(); + lexQuery.getResults().put(term.getMetaId(), term.getTerm()); + } else { + lexQuery.setEntry(null); + lexQuery.getResults().clear(); + } + while (it.hasNext()) { + term = (ITerm) it.next(); + lexQuery.getResults().put(term.getMetaId(), term.getTerm()); + } + endTransaction(false); + lexQuery.setDuration(getDuration()); + } + + /** + * Description of the Method + * + * @param pk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexRepositoryException + * Description of the Exception + */ + public static ITerm findTermByPk(Integer pk) throws LexRepositoryException { + ITerm term = null; + + beginTransaction(); + String queryString = " FROM org.thdl.lex.component.ITerm as term WHERE term.metaId = " + + pk.toString(); + try { + Query query = getSession().createQuery(queryString); + term = (ITerm) query.uniqueResult(); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + endTransaction(false); + return term; + } + + public static List getAllTerms() throws LexRepositoryException { + List terms = null; + + beginTransaction(); + String queryString = " FROM org.thdl.lex.component.ITerm"; + try { + Query query = getSession().createQuery(queryString); + terms = query.list(); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + endTransaction(false); + return terms; + } + + /** + * Description of the Method + * + * @param lexQuery + * Description of the Parameter + * @return Description of the Return Value + * @exception LexRepositoryException + * Description of the Exception + */ + public static Map findTermsByMeta(LexQuery lexQuery) + throws LexRepositoryException { + Logger logger = Logger.getLogger("org.thdl.lex"); + ITerm term = assertTerm(lexQuery.getQueryComponent()); + Map terms = new HashMap(); + ILexComponent comp = null; + ITerm aTerm; + Query query = null; + Iterator it = null; + + setStart(now()); + beginTransaction(); + if (null == term.getMeta()) { + throw new LexRepositoryException( + "Query Component term.meta was null."); + } + + if (logger.isDebugEnabled()) { + logger.debug("Tibetan Dictionary begin query!"); + } + String queryString = "select term from org.thdl.lex.component.Term as term " + //join term collections + + " join term.pronunciations as pron " + + " join term.etymologies as ety " + + " join term.spellings as sp " + + " join term.functions as func " + + " join term.encyclopediaArticles as ency " + + " join term.transitionalData as transData " + + " join term.definitions as def " + + " join term.glosses as glo " + + " join term.keywords as key " + + " join term.translationEquivalents as trans " + + " join term.relatedTerms as rel " + + " join term.passages as pass " + + " join term.registers as reg " + //join def collections + + " join def.subdefinitions as sub " + + " join def.glosses as gloDef " + + " join def.keywords as keyDef " + + " join def.modelSentences as modDef " + + " join def.translationEquivalents as transDef " + + " join def.relatedTerms as relDef " + + " join def.passages as passDef " + + " join def.registers as regDef " + //join subdef collections + + " join sub.glosses as gloSub " + + " join sub.keywords as keySub " + + " join sub.modelSentences as modSub " + + " join sub.translationEquivalents as transSub " + + " join sub.relatedTerms as relSub " + + " join sub.passages as passSub " + + " join sub.registers as regSub " + // join translation collections + /* + * + " join ety.translations as etyTrans " + " join + * term.definitions.translations as defTrans " + " join + * term.modelSentences.translations as modTrans " + " join + * term.passages.translations as passTrans " + " join + * def.subdefinition.translations as subTrans " + " join + * def.modelSentences.translations as modDefTrans " + " join + * def.passages.translations as passDefTrans " + " join + * sub.modelSentences.translations as modSubTrans " + " join + * sub.passages.translations as passSubTrans " + */ + //restrict by projectSubject in createdByProjSub + + " where term.meta.createdByProjSub = :projSub" + + " or pron.meta.createdByProjSub = :projSub" + + " or ety.meta.createdByProjSub = :projSub" + + " or sp.meta.createdByProjSub = :projSub" + + " or func.meta.createdByProjSub = :projSub" + + " or ency.meta.createdByProjSub = :projSub" + + " or transData.meta.createdByProjSub = :projSub" + + " or def.meta.createdByProjSub = :projSub" + + " or glo.meta.createdByProjSub = :projSub" + + " or key.meta.createdByProjSub = :projSub" + + " or trans.meta.createdByProjSub = :projSub" + + " or rel.meta.createdByProjSub = :projSub" + + " or pass.meta.createdByProjSub = :projSub" + + " or reg.meta.createdByProjSub = :projSub" + + " or sub.meta.createdByProjSub = :projSub" + + " or gloDef.meta.createdByProjSub = :projSub" + + " or keyDef.meta.createdByProjSub = :projSub" + + " or modDef.meta.createdByProjSub = :projSub" + + " or transDef.meta.createdByProjSub = :projSub" + + " or relDef.meta.createdByProjSub = :projSub" + + " or passDef.meta.createdByProjSub = :projSub" + + " or regDef.meta.createdByProjSub = :projSub" + + " or gloSub.meta.createdByProjSub = :projSub" + + " or keySub.meta.createdByProjSub = :projSub" + + " or modSub.meta.createdByProjSub = :projSub" + + " or transSub.meta.createdByProjSub = :projSub" + + " or relSub.meta.createdByProjSub = :projSub" + + " or passSub.meta.createdByProjSub = :projSub" + + " or regSub.meta.createdByProjSub = :projSub" + /* + * + " or etyTrans.meta.createdByProjSub = :projSub" + " or + * defTrans.meta.createdByProjSub = :projSub" + " or + * modTrans.meta.createdByProjSub = :projSub" + " or + * passTrans.meta.createdByProjSub = :projSub" + " or + * subTrans.meta.createdByProjSub = :projSub" + " or + * modDefTrans.meta.createdByProjSub = :projSub" + " or + * passDefTrans.meta.createdByProjSub = :projSub" + " or + * modSubTrans.meta.createdByProjSub = :projSub" + " or + * passSubTrans.meta.createdByProjSub = :projSub" + */ + //restrict by projectSubject in modifiedByProjSub + + " or term.meta.modifiedByProjSub = :projSub" + + " or pron.meta.modifiedByProjSub = :projSub" + + " or ety.meta.modifiedByProjSub = :projSub" + + " or sp.meta.modifiedByProjSub = :projSub" + + " or func.meta.modifiedByProjSub = :projSub" + + " or ency.meta.modifiedByProjSub = :projSub" + + " or transData.meta.modifiedByProjSub = :projSub" + + " or def.meta.modifiedByProjSub = :projSub" + + " or glo.meta.modifiedByProjSub = :projSub" + + " or key.meta.modifiedByProjSub = :projSub" + + " or trans.meta.modifiedByProjSub = :projSub" + + " or rel.meta.modifiedByProjSub = :projSub" + + " or pass.meta.modifiedByProjSub = :projSub" + + " or reg.meta.modifiedByProjSub = :projSub" + + " or sub.meta.modifiedByProjSub = :projSub" + + " or gloDef.meta.modifiedByProjSub = :projSub" + + " or keyDef.meta.modifiedByProjSub = :projSub" + + " or modDef.meta.modifiedByProjSub = :projSub" + + " or transDef.meta.modifiedByProjSub = :projSub" + + " or relDef.meta.modifiedByProjSub = :projSub" + + " or passDef.meta.modifiedByProjSub = :projSub" + + " or regDef.meta.modifiedByProjSub = :projSub" + + " or gloSub.meta.modifiedByProjSub = :projSub" + + " or keySub.meta.modifiedByProjSub = :projSub" + + " or modSub.meta.modifiedByProjSub = :projSub" + + " or transSub.meta.modifiedByProjSub = :projSub" + + " or relSub.meta.modifiedByProjSub = :projSub" + + " or passSub.meta.modifiedByProjSub = :projSub" + + " or regSub.meta.modifiedByProjSub = :projSub" + /* + * + " or etyTrans.meta.modifiedByProjSub = :projSub" + " or + * defTrans.meta.modifiedByProjSub = :projSub" + " or + * modTrans.meta.modifiedByProjSub = :projSub" + " or + * passTrans.meta.modifiedByProjSub = :projSub" + " or + * subTrans.meta.modifiedByProjSub = :projSub" + " or + * modDefTrans.meta.modifiedByProjSub = :projSub" + " or + * passDefTrans.meta.modifiedByProjSub = :projSub" + " or + * modSubTrans.meta.modifiedByProjSub = :projSub" + " or + * passSubTrans.meta.modifiedByProjSub = :projSub"; + */ + + + ""; + try { + query = getSession().createQuery(queryString); + query.setMaxResults(100); + query.setInteger("projSub", lexQuery.getQueryComponent().getMeta() + .getCreatedByProjSub().intValue()); + logger.debug("About to list query"); + List list = query.list(); + logger.debug("results size: " + list.size()); + it = list.iterator(); + logger.debug("Starting to add terms to map"); + while (it.hasNext()) { + aTerm = (ITerm) comp; + logger.debug("successfully cast comp to an ITerm"); + + Integer id = aTerm.getMetaId(); + String tm = aTerm.getTerm(); + terms.put(id, tm); + } + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + endTransaction(false); + lexQuery.setDuration(getDuration()); + return terms; + } + + public static Map findTermsByMetaViaLc(LexQuery lexQuery) + throws LexRepositoryException { + Logger logger = Logger.getLogger("org.thdl.lex"); + ITerm term = assertTerm(lexQuery.getQueryComponent()); + Map terms = new HashMap(); + ILexComponent comp = null; + ITerm aTerm; + Query query = null; + Iterator it = null; + + setStart(now()); + beginTransaction(); + if (null == term.getMeta()) { + throw new LexRepositoryException( + "Query Component term.meta was null."); + } + + if (logger.isDebugEnabled()) { + logger.debug("Tibetan Dictionary begin query!"); + } + String queryString = "from org.thdl.lex.component.LexComponent as comp where comp.meta.createdByProjSub=:projSub"; + + try { + query = getSession().createQuery(queryString); + //query.setMaxResults( 100 ); + query.setInteger("projSub", lexQuery.getQueryComponent().getMeta() + .getCreatedByProjSub().intValue()); + logger.debug("About to list query"); + List list = query.list(); + logger.debug("results size: " + list.size()); + it = list.iterator(); + while (it.hasNext()) { + logger.debug("Starting quest for a term parent"); + + comp = (ILexComponent) it.next(); + int safetyFirst = 0; + parentSearch: while (!(comp instanceof ITerm) && comp != null) { + logger.debug("comp class: " + comp.getClass().getName()); + comp = comp.getParent(); + if (comp instanceof ITerm) { + try { + aTerm = (ITerm) comp; + terms.put(aTerm.getMetaId(), aTerm.getTerm()); + logger.debug("successfully cast comp to an ITerm"); + } catch (ClassCastException cce) { + logger + .debug("LCR caught ClassCastException Failed cast of " + + comp.toString() + " to ITerm"); + throw cce; + } + } + + safetyFirst++; + if (safetyFirst > 10) { + logger + .debug("could not find an ITerm parent for component: " + + comp); + break parentSearch; + } + } + } + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + endTransaction(false); + lexQuery.setDuration(getDuration()); + return terms; + } + + /** + * Description of the Method + * + * @param term + * Description of the Parameter + * @exception LexRepositoryException + * Description of Exception + * @since + */ + public static void loadTerm(ITerm term) throws LexRepositoryException { + try { + beginTransaction(); + getSession().load(term, term.getMetaId()); + endTransaction(false); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Description of the Method + * + * @param lexQuery + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + */ + public static void loadTermByPk(LexQuery lexQuery) + throws LexRepositoryException { + beginTransaction(); + ITerm term = assertTerm(lexQuery.getQueryComponent()); + loadTerm(term); + lexQuery.setEntry(term); + if (!lexQuery.getResults().containsKey(term.getMetaId())) { + lexQuery.getResults().put(term.getMetaId(), term.getTerm()); + } + endTransaction(false); + } + + public static ITerm loadTermByTerm(String term) + throws LexRepositoryException { + ITerm returnTerm = null; + beginTransaction(); + String queryString = " FROM org.thdl.lex.component.ITerm as theTerm where theTerm.term = :term"; + try { + Query query = getSession().createQuery(queryString); + query.setString("term", term); + returnTerm = (ITerm) query.uniqueResult(); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + + endTransaction(false); + return returnTerm; + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + */ + public static void loadByPk(ILexComponent component) + throws LexRepositoryException { + + try { + beginTransaction(); + getSession().load(component, component.getMetaId()); + endTransaction(false); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @param pk + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + */ + public static void loadByPk(ILexComponent component, Integer pk) + throws LexRepositoryException { + + try { + beginTransaction(); + getSession().load(component, pk); + endTransaction(false); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Gets the recentTerms attribute of the LexComponentRepository class + * + * @param limit + * Description of the Parameter + * @return The recentTerms value + * @exception LexRepositoryException + * Description of the Exception + */ + public static List getRecentTerms(int limit) throws LexRepositoryException { + Query query = null; + List results = null; + String queryString = " FROM org.thdl.lex.component.ITerm ORDER BY modifiedOn DESC LIMIT " + + limit; + try { + beginTransaction(); + query = getSession().createQuery(queryString); + results = query.list(); + endTransaction(false); + getSession().clear(); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + + return results; + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + */ + public static void save(ILexComponent component) + throws LexRepositoryException { + + try { + beginTransaction(); + getSession().saveOrUpdate(component); + endTransaction(true); + setLastUpdate(now()); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + */ + public static void update(ILexComponent component) + throws LexRepositoryException { + + try { + beginTransaction(); + getSession().update(component); + endTransaction(true); + setLastUpdate(now()); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + */ + public static void remove(ILexComponent component) + throws LexRepositoryException { + + try { + beginTransaction(); + getSession().delete(component); + endTransaction(true); + setLastUpdate(now()); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + */ + public static void refresh(ILexComponent component) + throws LexRepositoryException { + + try { + beginTransaction(); + getSession().refresh(component); + endTransaction(true); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Description of the Method + * + * @exception LexRepositoryException + * Description of Exception + * @since + */ + public static void cleanup() throws LexRepositoryException { + try { + endTransaction(false); + HibernateSession.closeSession(); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } +} + +/* + * /join term collections + " join term.pronunciations as pron " + " join + * term.etymologies as ety " + " join term.spellings as sp " + " join + * term.functions as func " + " join term.encyclopediaArticles as ency " + " + * join term.transitionalData as trans " + " join term.definitions as def " + " + * join term.glosses as glo " + " join term.keywords as key " + " join + * term.translationEquivalents as trans " + " join term.relatedTerms as rel " + " + * join term.passages as pass " + " join term.registers as reg " join def + * collections + " join def.subdefinitions as sub " + " join def.glosses as + * gloDef " + " join def.keywords as keyDef " + " join def.modelSentences as + * modDef " + " join def.translationEquivalents as transDef " + " join + * def.relatedTerms as relDef " + " join def.passages as passDef " + " join + * def.registers as regDef " join subdef collections + " join sub.glosses as + * gloSub " + " join sub.keywords as keySub " + " join sub.modelSentences as + * modSub " + " join sub.translationEquivalents as transSub " + " join + * sub.relatedTerms as relSub " + " join sub.passages as passSub " + " join + * sub.registers as regSub " join translation collections + " join + * ety.translations as etyTrans " + " join term.definitions.translations as + * defTrans " + " join term.modelSentences.translations as modTrans " + " join + * term.passages.translations as passTrans " + " join + * def.subdefinition.translations as subTrans " + " join + * def.modelSentences.translations as modDefTrans " + " join + * def.passages.translations as passDefTrans " + " join + * sub.modelSentences.translations as modSubTrans " + " join + * sub.passages.translations as passSubTrans " /restrict by projectSubject in + * createdByProjSub + " where term.meta.createdByProjSub = :projSub" + " or + * pron.meta.createdByProjSub = :projSub" + " or ety.meta.createdByProjSub = + * :projSub" + " or sp.meta.createdByProjSub = :projSub" + " or + * func.meta.createdByProjSub = :projSub" + " or ency.meta.createdByProjSub = + * :projSub" + " or trans.meta.createdByProjSub = :projSub" + " or + * def.meta.createdByProjSub = :projSub" + " or glo.meta.createdByProjSub = + * :projSub" + " or key.meta.createdByProjSub = :projSub" + " or + * trans.meta.createdByProjSub = :projSub" + " or rel.meta.createdByProjSub = + * :projSub" + " or pass.meta.createdByProjSub = :projSub" + " or + * reg.meta.createdByProjSub = :projSub" + " or subDef.meta.createdByProjSub = + * :projSub" + " or gloDef.meta.createdByProjSub = :projSub" + " or + * keyDef.meta.createdByProjSub = :projSub" + " or modDef.meta.createdByProjSub = + * :projSub" + " or transDef.meta.createdByProjSub = :projSub" + " or + * relDef.meta.createdByProjSub = :projSub" + " or passDef.meta.createdByProjSub = + * :projSub" + " or regDef.meta.createdByProjSub = :projSub" + " or + * gloSub.meta.createdByProjSub = :projSub" + " or keySub.meta.createdByProjSub = + * :projSub" + " or modSub.meta.createdByProjSub = :projSub" + " or + * transSub.meta.createdByProjSub = :projSub" + " or + * relSub.meta.createdByProjSub = :projSub" + " or passSub.meta.createdByProjSub = + * :projSub" + " or regSub.meta.createdByProjSub = :projSub" + " or + * etyTrans.meta.createdByProjSub = :projSub" + " or + * defTrans.meta.createdByProjSub = :projSub" + " or + * modTrans.meta.createdByProjSub = :projSub" + " or + * passTrans.meta.createdByProjSub = :projSub" + " or + * subTrans.meta.createdByProjSub = :projSub" + " or + * modDefTrans.meta.createdByProjSub = :projSub" + " or + * passDefTrans.meta.createdByProjSub = :projSub" + " or + * modSubTrans.meta.createdByProjSub = :projSub" + " or + * passSubTrans.meta.createdByProjSub = :projSub" /restrict by projectSubject in + * modifiedByProjSub + " or term.meta.modifiedByProjSub = :projSub" + " or + * pron.meta.modifiedByProjSub = :projSub" + " or ety.meta.modifiedByProjSub = + * :projSub" + " or sp.meta.modifiedByProjSub = :projSub" + " or + * func.meta.modifiedByProjSub = :projSub" + " or ency.meta.modifiedByProjSub = + * :projSub" + " or trans.meta.modifiedByProjSub = :projSub" + " or + * def.meta.modifiedByProjSub = :projSub" + " or glo.meta.modifiedByProjSub = + * :projSub" + " or key.meta.modifiedByProjSub = :projSub" + " or + * trans.meta.modifiedByProjSub = :projSub" + " or rel.meta.modifiedByProjSub = + * :projSub" + " or pass.meta.modifiedByProjSub = :projSub" + " or + * reg.meta.modifiedByProjSub = :projSub" + " or subDef.meta.modifiedByProjSub = + * :projSub" + " or gloDef.meta.modifiedByProjSub = :projSub" + " or + * keyDef.meta.modifiedByProjSub = :projSub" + " or + * modDef.meta.modifiedByProjSub = :projSub" + " or + * transDef.meta.modifiedByProjSub = :projSub" + " or + * relDef.meta.modifiedByProjSub = :projSub" + " or + * passDef.meta.modifiedByProjSub = :projSub" + " or + * regDef.meta.modifiedByProjSub = :projSub" + " or + * gloSub.meta.modifiedByProjSub = :projSub" + " or + * keySub.meta.modifiedByProjSub = :projSub" + " or + * modSub.meta.modifiedByProjSub = :projSub" + " or + * transSub.meta.modifiedByProjSub = :projSub" + " or + * relSub.meta.modifiedByProjSub = :projSub" + " or + * passSub.meta.modifiedByProjSub = :projSub" + " or + * regSub.meta.modifiedByProjSub = :projSub" + " or + * etyTrans.meta.modifiedByProjSub = :projSub" + " or + * defTrans.meta.modifiedByProjSub = :projSub" + " or + * modTrans.meta.modifiedByProjSub = :projSub" + " or + * passTrans.meta.modifiedByProjSub = :projSub" + " or + * subTrans.meta.modifiedByProjSub = :projSub" + " or + * modDefTrans.meta.modifiedByProjSub = :projSub" + " or + * passDefTrans.meta.modifiedByProjSub = :projSub" + " or + * modSubTrans.meta.modifiedByProjSub = :projSub" + " or + * passSubTrans.meta.modifiedByProjSub = :projSub"; + */ + diff --git a/src/java/org/thdl/lex/LexComponentRepositoryDataTransfer.java b/src/java/org/thdl/lex/LexComponentRepositoryDataTransfer.java new file mode 100644 index 0000000..940946a --- /dev/null +++ b/src/java/org/thdl/lex/LexComponentRepositoryDataTransfer.java @@ -0,0 +1,811 @@ +package org.thdl.lex; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import net.sf.hibernate.HibernateException; +import net.sf.hibernate.Query; +import net.sf.hibernate.Session; + +import org.apache.log4j.Logger; +import org.thdl.lex.component.ILexComponent; +import org.thdl.lex.component.ITerm; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class LexComponentRepositoryDataTransfer { + + /** + * Description of the Field + */ + public final static String EXACT = "exact"; + + /** + * Description of the Field + */ + public final static String STARTS_WITH = "startsWith"; + + /** + * Description of the Field + */ + public final static String ANYWHERE = "anywhere"; + + private static long start; + + private static long lastUpdate = now(); + + /** + * Sets the lastUpdate attribute of the LexComponentRepository class + * + * @param last + * The new lastUpdate value + */ + public static void setLastUpdate(long last) { + lastUpdate = last; + } + + /** + * Gets the lastUpdate attribute of the LexComponentRepository class + * + * @return The lastUpdate value + */ + public static long getLastUpdate() { + return lastUpdate; + } + + /** + * Sets the start attribute of the LexComponentRepository object + * + * @param startTime + * The new start value + * @since + */ + private static void setStart(long startTime) { + Logger logger = Logger.getLogger("org.thdl.lex"); + logger.debug("Query start time: " + new java.util.Date(startTime)); + start = startTime; + } + + /** + * Gets the start attribute of the LexComponentRepository object + * + * @return The start value + * @since + */ + private static long getStart() { + return start; + } + + /** + * Gets the duration attribute of the LexComponentRepository class + * + * @return The duration value + */ + private static long getDuration() { + long duration = now() - getStart(); + + Logger logger = Logger.getLogger("org.thdl.lex"); + logger.debug("Query finish: " + new java.util.Date(now())); + logger.debug("Query duration in ms: " + duration); + logger.info("Query duration: " + duration / 1000 + " seconds."); + return duration; + } + + /** + * Gets the session attribute of the LexComponentRepository class + * + * @return The session value + * @exception HibernateException + * Description of Exception + * @since + */ + protected static Session getSession() throws HibernateException { + Session session = HibernateSessionDataTransfer.currentSession(); + if (!session.isConnected()) { + //session.reconnect(); + } + return session; + } + + /** + * Description of the Method + * + * @exception LexRepositoryException + * Description of the Exception + */ + protected static void beginTransaction() throws LexRepositoryException { + try { + HibernateTransactionDataTransfer.beginTransaction(); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + + } + + /** + * Description of the Method + * + * @param commit + * Description of Parameter + * @exception LexRepositoryException + * Description of the Exception + * @since + */ + protected static void endTransaction(boolean commit) + throws LexRepositoryException { + try { + HibernateTransactionDataTransfer.endTransaction(commit); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Description of the Method + * + * @return Description of the Returned Value + * @since + */ + private static long now() { + return System.currentTimeMillis(); + } + + /** + * Description of the Method + * + * @param comp + * Description of Parameter + * @return Description of the Returned Value + * @exception LexRepositoryException + * Description of Exception + * @since + */ + private static ITerm assertTerm(ILexComponent comp) + throws LexRepositoryException { + ITerm term = null; + try { + term = (ITerm) comp; + } catch (Exception e) { + throw new LexRepositoryException("Query Component was not a term."); + } + return term; + } + + /** + * Queries the database for Terms that start with the string in the term + * property of the queryComponent. Sets entry property the first hit + * returned. + * + * @param lexQuery + * Description of Parameter + * @exception LexRepositoryException + * Description of Exception + * @since + */ + public static void findTermsByTerm(LexQuery lexQuery) + throws LexRepositoryException { + setStart(now()); + beginTransaction(); + ITerm term = assertTerm(lexQuery.getQueryComponent()); + if (null == term.getTerm()) { + throw new LexRepositoryException("Query Component term was null."); + } + + Query query = null; + Iterator it = null; + + String termForQuery = LexUtilities.hqlEscape(term.getTerm()); + LexLogger.debug("Escaped term string: " + termForQuery); + + if (lexQuery.getFindMode().equals(LexComponentRepository.STARTS_WITH)) { + termForQuery = termForQuery + "%"; + } else if (lexQuery.getFindMode().equals( + LexComponentRepository.ANYWHERE)) { + termForQuery = "%" + termForQuery + "%"; + } + + String queryString = " FROM org.thdl.lex.component.ITerm as term WHERE term like :term AND term.deleted=0 ORDER BY term"; + try { + query = getSession().createQuery(queryString); + query.setString("term", termForQuery); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + + try { + it = query.iterate(); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + + if (it.hasNext()) { + term = (ITerm) it.next(); + lexQuery.setEntry(term); + lexQuery.getResults().clear(); + lexQuery.getResults().put(term.getMetaId(), term.getTerm()); + } else { + lexQuery.setEntry(null); + lexQuery.getResults().clear(); + } + while (it.hasNext()) { + term = (ITerm) it.next(); + lexQuery.getResults().put(term.getMetaId(), term.getTerm()); + } + endTransaction(false); + lexQuery.setDuration(getDuration()); + } + + /** + * Description of the Method + * + * @param pk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexRepositoryException + * Description of the Exception + */ + public static ITerm findTermByPk(Integer pk) throws LexRepositoryException { + ITerm term = null; + + beginTransaction(); + String queryString = " FROM org.thdl.lex.component.ITerm as term WHERE term.metaId = " + + pk.toString(); + try { + Query query = getSession().createQuery(queryString); + term = (ITerm) query.uniqueResult(); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + endTransaction(false); + return term; + } + + /** + * Description of the Method + * + * @param lexQuery + * Description of the Parameter + * @return Description of the Return Value + * @exception LexRepositoryException + * Description of the Exception + */ + public static Map findTermsByMeta(LexQuery lexQuery) + throws LexRepositoryException { + Logger logger = Logger.getLogger("org.thdl.lex"); + ITerm term = assertTerm(lexQuery.getQueryComponent()); + Map terms = new HashMap(); + ILexComponent comp = null; + ITerm aTerm; + Query query = null; + Iterator it = null; + + setStart(now()); + beginTransaction(); + if (null == term.getMeta()) { + throw new LexRepositoryException( + "Query Component term.meta was null."); + } + + if (logger.isDebugEnabled()) { + logger.debug("Tibetan Dictionary begin query!"); + } + String queryString = "select term from org.thdl.lex.component.Term as term " + //join term collections + + " join term.pronunciations as pron " + + " join term.etymologies as ety " + + " join term.spellings as sp " + + " join term.functions as func " + + " join term.encyclopediaArticles as ency " + + " join term.transitionalData as transData " + + " join term.definitions as def " + + " join term.glosses as glo " + + " join term.keywords as key " + + " join term.translationEquivalents as trans " + + " join term.relatedTerms as rel " + + " join term.passages as pass " + + " join term.registers as reg " + //join def collections + + " join def.subdefinitions as sub " + + " join def.glosses as gloDef " + + " join def.keywords as keyDef " + + " join def.modelSentences as modDef " + + " join def.translationEquivalents as transDef " + + " join def.relatedTerms as relDef " + + " join def.passages as passDef " + + " join def.registers as regDef " + //join subdef collections + + " join sub.glosses as gloSub " + + " join sub.keywords as keySub " + + " join sub.modelSentences as modSub " + + " join sub.translationEquivalents as transSub " + + " join sub.relatedTerms as relSub " + + " join sub.passages as passSub " + + " join sub.registers as regSub " + // join translation collections + /* + * + " join ety.translations as etyTrans " + " join + * term.definitions.translations as defTrans " + " join + * term.modelSentences.translations as modTrans " + " join + * term.passages.translations as passTrans " + " join + * def.subdefinition.translations as subTrans " + " join + * def.modelSentences.translations as modDefTrans " + " join + * def.passages.translations as passDefTrans " + " join + * sub.modelSentences.translations as modSubTrans " + " join + * sub.passages.translations as passSubTrans " + */ + //restrict by projectSubject in createdByProjSub + + " where term.meta.createdByProjSub = :projSub" + + " or pron.meta.createdByProjSub = :projSub" + + " or ety.meta.createdByProjSub = :projSub" + + " or sp.meta.createdByProjSub = :projSub" + + " or func.meta.createdByProjSub = :projSub" + + " or ency.meta.createdByProjSub = :projSub" + + " or transData.meta.createdByProjSub = :projSub" + + " or def.meta.createdByProjSub = :projSub" + + " or glo.meta.createdByProjSub = :projSub" + + " or key.meta.createdByProjSub = :projSub" + + " or trans.meta.createdByProjSub = :projSub" + + " or rel.meta.createdByProjSub = :projSub" + + " or pass.meta.createdByProjSub = :projSub" + + " or reg.meta.createdByProjSub = :projSub" + + " or subDef.meta.createdByProjSub = :projSub" + + " or gloDef.meta.createdByProjSub = :projSub" + + " or keyDef.meta.createdByProjSub = :projSub" + + " or modDef.meta.createdByProjSub = :projSub" + + " or transDef.meta.createdByProjSub = :projSub" + + " or relDef.meta.createdByProjSub = :projSub" + + " or passDef.meta.createdByProjSub = :projSub" + + " or regDef.meta.createdByProjSub = :projSub" + + " or gloSub.meta.createdByProjSub = :projSub" + + " or keySub.meta.createdByProjSub = :projSub" + + " or modSub.meta.createdByProjSub = :projSub" + + " or transSub.meta.createdByProjSub = :projSub" + + " or relSub.meta.createdByProjSub = :projSub" + + " or passSub.meta.createdByProjSub = :projSub" + + " or regSub.meta.createdByProjSub = :projSub" + + " or etyTrans.meta.createdByProjSub = :projSub" + + " or defTrans.meta.createdByProjSub = :projSub" + + " or modTrans.meta.createdByProjSub = :projSub" + + " or passTrans.meta.createdByProjSub = :projSub" + + " or subTrans.meta.createdByProjSub = :projSub" + + " or modDefTrans.meta.createdByProjSub = :projSub" + + " or passDefTrans.meta.createdByProjSub = :projSub" + + " or modSubTrans.meta.createdByProjSub = :projSub" + + " or passSubTrans.meta.createdByProjSub = :projSub" + //restrict by projectSubject in modifiedByProjSub + + " or term.meta.modifiedByProjSub = :projSub" + + " or pron.meta.modifiedByProjSub = :projSub" + + " or ety.meta.modifiedByProjSub = :projSub" + + " or sp.meta.modifiedByProjSub = :projSub" + + " or func.meta.modifiedByProjSub = :projSub" + + " or ency.meta.modifiedByProjSub = :projSub" + + " or trans.meta.modifiedByProjSub = :projSub" + + " or def.meta.modifiedByProjSub = :projSub" + + " or glo.meta.modifiedByProjSub = :projSub" + + " or key.meta.modifiedByProjSub = :projSub" + + " or trans.meta.modifiedByProjSub = :projSub" + + " or rel.meta.modifiedByProjSub = :projSub" + + " or pass.meta.modifiedByProjSub = :projSub" + + " or reg.meta.modifiedByProjSub = :projSub" + + " or subDef.meta.modifiedByProjSub = :projSub" + + " or gloDef.meta.modifiedByProjSub = :projSub" + + " or keyDef.meta.modifiedByProjSub = :projSub" + + " or modDef.meta.modifiedByProjSub = :projSub" + + " or transDef.meta.modifiedByProjSub = :projSub" + + " or relDef.meta.modifiedByProjSub = :projSub" + + " or passDef.meta.modifiedByProjSub = :projSub" + + " or regDef.meta.modifiedByProjSub = :projSub" + + " or gloSub.meta.modifiedByProjSub = :projSub" + + " or keySub.meta.modifiedByProjSub = :projSub" + + " or modSub.meta.modifiedByProjSub = :projSub" + + " or transSub.meta.modifiedByProjSub = :projSub" + + " or relSub.meta.modifiedByProjSub = :projSub" + + " or passSub.meta.modifiedByProjSub = :projSub" + /* + * + " or regSub.meta.modifiedByProjSub = :projSub" + " or + * etyTrans.meta.modifiedByProjSub = :projSub" + " or + * defTrans.meta.modifiedByProjSub = :projSub" + " or + * modTrans.meta.modifiedByProjSub = :projSub" + " or + * passTrans.meta.modifiedByProjSub = :projSub" + " or + * subTrans.meta.modifiedByProjSub = :projSub" + " or + * modDefTrans.meta.modifiedByProjSub = :projSub" + " or + * passDefTrans.meta.modifiedByProjSub = :projSub" + " or + * modSubTrans.meta.modifiedByProjSub = :projSub" + " or + * passSubTrans.meta.modifiedByProjSub = :projSub"; + */ + + + ""; + try { + query = getSession().createQuery(queryString); + //query.setMaxResults( 100 ); + query.setInteger("projSub", lexQuery.getQueryComponent().getMeta() + .getCreatedByProjSub().intValue()); + logger.debug("About to list query"); + List list = query.list(); + logger.debug("results size: " + list.size()); + it = list.iterator(); + logger.debug("Starting to add terms to map"); + while (it.hasNext()) { + aTerm = (ITerm) comp; + logger.debug("successfully cast comp to an ITerm"); + terms.put(aTerm.getMetaId(), aTerm.getTerm()); + } + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + endTransaction(false); + lexQuery.setDuration(getDuration()); + return terms; + } + + public static Map findTermsByMetaViaLc(LexQuery lexQuery) + throws LexRepositoryException { + Logger logger = Logger.getLogger("org.thdl.lex"); + ITerm term = assertTerm(lexQuery.getQueryComponent()); + Map terms = new HashMap(); + ILexComponent comp = null; + ITerm aTerm; + Query query = null; + Iterator it = null; + + setStart(now()); + beginTransaction(); + if (null == term.getMeta()) { + throw new LexRepositoryException( + "Query Component term.meta was null."); + } + + if (logger.isDebugEnabled()) { + logger.debug("Tibetan Dictionary begin query!"); + } + String queryString = "from org.thdl.lex.component.LexComponent as comp where comp.meta.createdByProjSub=:projSub"; + + try { + query = getSession().createQuery(queryString); + //query.setMaxResults( 100 ); + query.setInteger("projSub", lexQuery.getQueryComponent().getMeta() + .getCreatedByProjSub().intValue()); + logger.debug("About to list query"); + List list = query.list(); + logger.debug("results size: " + list.size()); + it = list.iterator(); + while (it.hasNext()) { + logger.debug("Starting quest for a term parent"); + + comp = (ILexComponent) it.next(); + int safetyFirst = 0; + while (!(comp instanceof ITerm) && comp != null) { + logger.debug("comp class: " + comp.getClass().getName()); + comp = comp.getParent(); + if (comp instanceof ITerm) { + try { + aTerm = (ITerm) comp; + terms.put(aTerm.getMetaId(), aTerm.getTerm()); + logger.debug("successfully cast comp to an ITerm"); + } catch (ClassCastException cce) { + logger + .debug("LCR caught ClassCastException Failed cast of " + + comp.toString() + " to ITerm"); + throw cce; + } + } + + safetyFirst++; + if (safetyFirst > 10) { + logger + .debug("could not find an ITerm parent for component: " + + comp); + } + } + } + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + endTransaction(false); + lexQuery.setDuration(getDuration()); + return terms; + } + + /** + * Description of the Method + * + * @param term + * Description of the Parameter + * @exception LexRepositoryException + * Description of Exception + * @since + */ + public static void loadTerm(ITerm term) throws LexRepositoryException { + try { + beginTransaction(); + getSession().load(term, term.getMetaId()); + endTransaction(false); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Description of the Method + * + * @param lexQuery + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + */ + public static void loadTermByPk(LexQuery lexQuery) + throws LexRepositoryException { + beginTransaction(); + ITerm term = assertTerm(lexQuery.getQueryComponent()); + loadTerm(term); + lexQuery.setEntry(term); + if (!lexQuery.getResults().containsKey(term.getMetaId())) { + lexQuery.getResults().put(term.getMetaId(), term.getTerm()); + } + endTransaction(false); + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + */ + public static void loadByPk(ILexComponent component) + throws LexRepositoryException { + + try { + beginTransaction(); + getSession().load(component, component.getMetaId()); + endTransaction(false); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @param pk + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + */ + public static void loadByPk(ILexComponent component, Integer pk) + throws LexRepositoryException { + + try { + beginTransaction(); + getSession().load(component, pk); + endTransaction(false); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Gets the recentTerms attribute of the LexComponentRepository class + * + * @param limit + * Description of the Parameter + * @return The recentTerms value + * @exception LexRepositoryException + * Description of the Exception + */ + public static List getRecentTerms(int limit) throws LexRepositoryException { + Query query = null; + List results = null; + String queryString = " FROM org.thdl.lex.component.ITerm ORDER BY modifiedOn DESC LIMIT " + + limit; + try { + beginTransaction(); + query = getSession().createQuery(queryString); + results = query.list(); + endTransaction(false); + getSession().clear(); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + + return results; + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + */ + public static void save(ILexComponent component) + throws LexRepositoryException { + + try { + beginTransaction(); + getSession().saveOrUpdate(component); + endTransaction(true); + setLastUpdate(now()); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + */ + public static void update(ILexComponent component) + throws LexRepositoryException { + + try { + beginTransaction(); + getSession().update(component); + endTransaction(true); + setLastUpdate(now()); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + */ + public static void remove(ILexComponent component) + throws LexRepositoryException { + + try { + beginTransaction(); + getSession().delete(component); + endTransaction(true); + setLastUpdate(now()); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + */ + public static void refresh(ILexComponent component) + throws LexRepositoryException { + + try { + beginTransaction(); + getSession().refresh(component); + endTransaction(true); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } + + /** + * Description of the Method + * + * @exception LexRepositoryException + * Description of Exception + * @since + */ + public static void cleanup() throws LexRepositoryException { + try { + endTransaction(false); + HibernateSessionDataTransfer.closeSession(); + } catch (HibernateException he) { + throw new LexRepositoryException(he); + } + } +} + +/* + * /join term collections + " join term.pronunciations as pron " + " join + * term.etymologies as ety " + " join term.spellings as sp " + " join + * term.functions as func " + " join term.encyclopediaArticles as ency " + " + * join term.transitionalData as trans " + " join term.definitions as def " + " + * join term.glosses as glo " + " join term.keywords as key " + " join + * term.translationEquivalents as trans " + " join term.relatedTerms as rel " + " + * join term.passages as pass " + " join term.registers as reg " join def + * collections + " join def.subdefinitions as sub " + " join def.glosses as + * gloDef " + " join def.keywords as keyDef " + " join def.modelSentences as + * modDef " + " join def.translationEquivalents as transDef " + " join + * def.relatedTerms as relDef " + " join def.passages as passDef " + " join + * def.registers as regDef " join subdef collections + " join sub.glosses as + * gloSub " + " join sub.keywords as keySub " + " join sub.modelSentences as + * modSub " + " join sub.translationEquivalents as transSub " + " join + * sub.relatedTerms as relSub " + " join sub.passages as passSub " + " join + * sub.registers as regSub " join translation collections + " join + * ety.translations as etyTrans " + " join term.definitions.translations as + * defTrans " + " join term.modelSentences.translations as modTrans " + " join + * term.passages.translations as passTrans " + " join + * def.subdefinition.translations as subTrans " + " join + * def.modelSentences.translations as modDefTrans " + " join + * def.passages.translations as passDefTrans " + " join + * sub.modelSentences.translations as modSubTrans " + " join + * sub.passages.translations as passSubTrans " /restrict by projectSubject in + * createdByProjSub + " where term.meta.createdByProjSub = :projSub" + " or + * pron.meta.createdByProjSub = :projSub" + " or ety.meta.createdByProjSub = + * :projSub" + " or sp.meta.createdByProjSub = :projSub" + " or + * func.meta.createdByProjSub = :projSub" + " or ency.meta.createdByProjSub = + * :projSub" + " or trans.meta.createdByProjSub = :projSub" + " or + * def.meta.createdByProjSub = :projSub" + " or glo.meta.createdByProjSub = + * :projSub" + " or key.meta.createdByProjSub = :projSub" + " or + * trans.meta.createdByProjSub = :projSub" + " or rel.meta.createdByProjSub = + * :projSub" + " or pass.meta.createdByProjSub = :projSub" + " or + * reg.meta.createdByProjSub = :projSub" + " or subDef.meta.createdByProjSub = + * :projSub" + " or gloDef.meta.createdByProjSub = :projSub" + " or + * keyDef.meta.createdByProjSub = :projSub" + " or modDef.meta.createdByProjSub = + * :projSub" + " or transDef.meta.createdByProjSub = :projSub" + " or + * relDef.meta.createdByProjSub = :projSub" + " or passDef.meta.createdByProjSub = + * :projSub" + " or regDef.meta.createdByProjSub = :projSub" + " or + * gloSub.meta.createdByProjSub = :projSub" + " or keySub.meta.createdByProjSub = + * :projSub" + " or modSub.meta.createdByProjSub = :projSub" + " or + * transSub.meta.createdByProjSub = :projSub" + " or + * relSub.meta.createdByProjSub = :projSub" + " or passSub.meta.createdByProjSub = + * :projSub" + " or regSub.meta.createdByProjSub = :projSub" + " or + * etyTrans.meta.createdByProjSub = :projSub" + " or + * defTrans.meta.createdByProjSub = :projSub" + " or + * modTrans.meta.createdByProjSub = :projSub" + " or + * passTrans.meta.createdByProjSub = :projSub" + " or + * subTrans.meta.createdByProjSub = :projSub" + " or + * modDefTrans.meta.createdByProjSub = :projSub" + " or + * passDefTrans.meta.createdByProjSub = :projSub" + " or + * modSubTrans.meta.createdByProjSub = :projSub" + " or + * passSubTrans.meta.createdByProjSub = :projSub" /restrict by projectSubject in + * modifiedByProjSub + " or term.meta.modifiedByProjSub = :projSub" + " or + * pron.meta.modifiedByProjSub = :projSub" + " or ety.meta.modifiedByProjSub = + * :projSub" + " or sp.meta.modifiedByProjSub = :projSub" + " or + * func.meta.modifiedByProjSub = :projSub" + " or ency.meta.modifiedByProjSub = + * :projSub" + " or trans.meta.modifiedByProjSub = :projSub" + " or + * def.meta.modifiedByProjSub = :projSub" + " or glo.meta.modifiedByProjSub = + * :projSub" + " or key.meta.modifiedByProjSub = :projSub" + " or + * trans.meta.modifiedByProjSub = :projSub" + " or rel.meta.modifiedByProjSub = + * :projSub" + " or pass.meta.modifiedByProjSub = :projSub" + " or + * reg.meta.modifiedByProjSub = :projSub" + " or subDef.meta.modifiedByProjSub = + * :projSub" + " or gloDef.meta.modifiedByProjSub = :projSub" + " or + * keyDef.meta.modifiedByProjSub = :projSub" + " or + * modDef.meta.modifiedByProjSub = :projSub" + " or + * transDef.meta.modifiedByProjSub = :projSub" + " or + * relDef.meta.modifiedByProjSub = :projSub" + " or + * passDef.meta.modifiedByProjSub = :projSub" + " or + * regDef.meta.modifiedByProjSub = :projSub" + " or + * gloSub.meta.modifiedByProjSub = :projSub" + " or + * keySub.meta.modifiedByProjSub = :projSub" + " or + * modSub.meta.modifiedByProjSub = :projSub" + " or + * transSub.meta.modifiedByProjSub = :projSub" + " or + * relSub.meta.modifiedByProjSub = :projSub" + " or + * passSub.meta.modifiedByProjSub = :projSub" + " or + * regSub.meta.modifiedByProjSub = :projSub" + " or + * etyTrans.meta.modifiedByProjSub = :projSub" + " or + * defTrans.meta.modifiedByProjSub = :projSub" + " or + * modTrans.meta.modifiedByProjSub = :projSub" + " or + * passTrans.meta.modifiedByProjSub = :projSub" + " or + * subTrans.meta.modifiedByProjSub = :projSub" + " or + * modDefTrans.meta.modifiedByProjSub = :projSub" + " or + * passDefTrans.meta.modifiedByProjSub = :projSub" + " or + * modSubTrans.meta.modifiedByProjSub = :projSub" + " or + * passSubTrans.meta.modifiedByProjSub = :projSub"; + */ + diff --git a/src/java/org/thdl/lex/LexConstants.java b/src/java/org/thdl/lex/LexConstants.java new file mode 100644 index 0000000..f37d601 --- /dev/null +++ b/src/java/org/thdl/lex/LexConstants.java @@ -0,0 +1,314 @@ +package org.thdl.lex; + +import org.thdl.lex.component.AnalyticalNote; +import org.thdl.lex.component.Definition; +import org.thdl.lex.component.EncyclopediaArticle; +import org.thdl.lex.component.Etymology; +import org.thdl.lex.component.Gloss; +import org.thdl.lex.component.GrammaticalFunction; +import org.thdl.lex.component.Keyword; +import org.thdl.lex.component.ModelSentence; +import org.thdl.lex.component.Passage; +import org.thdl.lex.component.Pronunciation; +import org.thdl.lex.component.RelatedTerm; +import org.thdl.lex.component.SpeechRegister; +import org.thdl.lex.component.Spelling; +import org.thdl.lex.component.Subdefinition; +import org.thdl.lex.component.TransitionalData; +import org.thdl.lex.component.TranslationEquivalent; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class LexConstants { + /* + * REQUEST PARAM/ATTR NAMES AND VALUES USED BY LexComponentFilter.java + */ + //form field req params + /** + * Description of the Field + */ + public final static String LABEL_REQ_PARAM = "comp"; + + /** + * Description of the Field + */ + public final static String TERMLABEL_VALUE = "term"; + + /** + * Description of the Field + */ + public final static String PRONUNCIATIONLABEL_VALUE = new Pronunciation() + .getLabel(); + + /** + * Description of the Field + */ + public final static String SPELLINGLABEL_VALUE = new Spelling().getLabel(); + + /** + * Description of the Field + */ + public final static String ETYMOLOGYLABEL_VALUE = new Etymology() + .getLabel(); + + /** + * Description of the Field + */ + public final static String FUNCTIONLABEL_VALUE = new GrammaticalFunction() + .getLabel(); + + /** + * Description of the Field + */ + public final static String ENCYCLOPEDIA_ARTICLE_LABEL_VALUE = new EncyclopediaArticle() + .getLabel(); + + /** + * Description of the Field + */ + public final static String DEFINITIONLABEL_VALUE = new Definition() + .getLabel(); + + /** + * Description of the Field + */ + public final static String SUBDEFINITIONLABEL_VALUE = new Subdefinition() + .getLabel(); + + /** + * Description of the Field + */ + public final static String MODELSENTENCELABEL_VALUE = new ModelSentence() + .getLabel(); + + /** + * Description of the Field + */ + public final static String PASSAGELABEL_VALUE = new Passage().getLabel(); + + /** + * Description of the Field + */ + public final static String TRANSLATIONLABEL_VALUE = new TranslationEquivalent() + .getLabel(); + + /** + * Description of the Field + */ + public final static String RELATEDTERMLABEL_VALUE = new RelatedTerm() + .getLabel(); + + /** + * Description of the Field + */ + public final static String REGISTERLABEL_VALUE = new SpeechRegister() + .getLabel(); + + /** + * Description of the Field + */ + public final static String KEYWORDLABEL_VALUE = new Keyword().getLabel(); + + /** + * Description of the Field + */ + public final static String PREFERENCESLABEL_VALUE = "preferences"; + + /** + * Description of the Field + */ + public final static String ANALYTICALNOTELABEL_VALUE = new AnalyticalNote() + .getLabel(); + + /** + * Description of the Field + */ + public final static String TRANSITIONALDATALABEL_VALUE = new TransitionalData() + .getLabel(); + + /** + * Description of the Field + */ + public final static String GLOSSLABEL_VALUE = new Gloss().getLabel(); + + /* + * REQUEST PARAM NAMES AND VALUES USED BY LexActionServlet.java + */ + /** + * Description of the Field + */ + public final static String COMMAND_REQ_PARAM = "cmd"; + + /* + * REQUEST PARAM NAMES AND VALUES USED BY LoginServlet.java + */ + /** + * Description of the Field + */ + public final static String USERNAME_REQ_PARAM = "username"; + + /** + * Description of the Field + */ + public final static String PASSWORD_REQ_PARAM = "password"; + + /* + * -------------------------- REQUEST PARAM NAMES USED BY + * LexComponent.scrapeRequest(req) METHODS -------------------------- + */ + //Meta Data Request Params + /** + * Description of the Field + */ + public final static String NOTE_REQ_PARAM = "note"; + + /** + * Description of the Field + */ + public final static String LANGUAGE_REQ_PARAM = "language"; + + /** + * Description of the Field + */ + public final static String TRANSLATIONOF_REQ_PARAM = "translationOf"; + + /** + * Description of the Field + */ + public final static String DIALECT_REQ_PARAM = "dialect"; + + /** + * Description of the Field + */ + public final static String SOURCE_REQ_PARAM = "source"; + + /** + * Description of the Field + */ + public final static String PROJSUB_REQ_PARAM = "projectSubject"; + + /** + * Description of the Field + */ + public final static String SCRIPT_REQ_PARAM = "script"; + + //Term Data Request Params + /** + * Description of the Field + */ + public final static String TERM_REQ_PARAM = "term"; + + /** + * Description of the Field + */ + public final static String TERMID_REQ_PARAM = "termId"; + + // public static final String SPELLINGNOTE_REQ_PARAM = "spellingNote"; + /** + * Description of the Field + */ + public final static String PRECEDENCE_REQ_PARAM = "precedence"; + + //Definition Data Request Params + /** + * Description of the Field + */ + public final static String SUBDEFINITION_REQ_PARAM = "subdefinition"; + + //outgoing request attributes to jsp + /** + * Description of the Field + */ + public final static String COMPONENT_REQ_ATTR = "component"; + + /** + * Description of the Field + */ + public final static String ORIGINALBEAN_REQ_ATTR = "original"; + + /** + * Description of the Field + */ + public final static String MESSAGE_REQ_ATTR = "message"; + + //session attributes used by filters, servlet, commands and jsp + /** + * Description of the Field + */ + public final static String USER_SESS_ATTR = "user"; + + /** + * Description of the Field + */ + public final static String PREFERENCES_SESS_ATTR = "preferences"; + + /** + * Description of the Field + */ + public final static String LOGINTARGET_SESS_PARAM = "loginTarget"; + + /** + * Description of the Field + */ + public final static String DISPLAYMODE_SESS_ATTR = "displayMode"; + + /** + * Description of the Field + */ + public final static String QUERY_SESS_ATTR = "query"; + + /** + * Description of the Field + */ + public final static String TERMENTRYBEAN_SESS_ATTR = "termEntry"; + + //used by Servlet + /** + * Description of the Field + */ + public final static String JSP_DIR = "/jsp/"; + + /** + * Description of the Field + */ + public final static String WELCOME_PAGE = "action?cmd=menu"; + + /** + * Description of the Field + */ + public final static String ERROR_PAGE = "error.jsp"; + + //used by Repository + /** + * Description of the Field + */ + public final static String DRIVER = "com.mysql.jdbc.Driver"; + + /** + * Description of the Field + */ + public final static String DATASOURCE_NAME = "java:comp/env/jdbc/lex-datasource"; + + /** + * Description of the Field + */ + public final static String HIBERNATE_SESSION_KEY = "hib"; + + /** + * Description of the Field + */ + public final static String VISIT_SESSION_ATTR = "visit"; + + /** + * Description of the Field + */ + public final static String GLOBAL_CONTEXT_ATTR = "global"; + + //public final static String URL = "jdbc:mysql://localhost/LexTorque"; + +} + diff --git a/src/java/org/thdl/lex/LexConstantsSecure.java b/src/java/org/thdl/lex/LexConstantsSecure.java new file mode 100644 index 0000000..2e8e137 --- /dev/null +++ b/src/java/org/thdl/lex/LexConstantsSecure.java @@ -0,0 +1,18 @@ +package org.thdl.lex; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class LexConstantsSecure { + final static String USER = ""; + + final static String PASSWORD = ""; + + final static String URL = "jdbc:mysql://localhost/Lex"; + + //public final static String URL = "jdbc:mysql://localhost/LexTorque"; +} + diff --git a/src/java/org/thdl/lex/LexFlatDataRepository.java b/src/java/org/thdl/lex/LexFlatDataRepository.java new file mode 100644 index 0000000..0ad0822 --- /dev/null +++ b/src/java/org/thdl/lex/LexFlatDataRepository.java @@ -0,0 +1,686 @@ +package org.thdl.lex; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.util.HashMap; + +import org.thdl.users.ThdlUserRepository; + +/** + * Description of the Class + * + * @author travis + * @created December 15, 2003 + */ +public class LexFlatDataRepository { + //attributes + int displayLanguage = 1;//this should default to the id for english from + // Languages table + + private static LexFlatDataRepository instance; + + HashMap users; + + HashMap userRoles; + + HashMap projectSubjects; + + HashMap sources; + + HashMap languages; + + HashMap scripts; + + HashMap literarySources; + + HashMap transitionalDataLabels; + + HashMap dialects;//represents merge table + + HashMap majorDialectFamilies; + + HashMap specificDialects; + + HashMap functionsGeneral; + + HashMap functionsSpecific; + + HashMap spellingTypes; + + HashMap phoneticsTypes; + + HashMap relatedTermTypes; + + HashMap etymologyTypes; + + HashMap registers; + + HashMap commentTypes; + + //accessors + /** + * Gets the instance attribute of the LexFlatDataRepository class + * + * @return The instance value + */ + public static LexFlatDataRepository getInstance() { + if (null == instance) { + instance = new LexFlatDataRepository(); + } + return instance; + } + + /** + * Sets the transitionalDataLabels attribute of the LexFlatDataRepository + * object + */ + public void setTransitionalDataLabels() { + String sql = "SELECT id, transitionalDataLabel FROM TransitionalDataLabels"; + setTransitionalDataLabels(createMap(sql)); + } + + /** + * Sets the transitionalDataLabels attribute of the LexFlatDataRepository + * object + * + * @param transitionalDataLabels + * The new transitionalDataLabels value + */ + public void setTransitionalDataLabels(HashMap transitionalDataLabels) { + this.transitionalDataLabels = transitionalDataLabels; + } + + /** + * Gets the transitionalDataLabels attribute of the LexFlatDataRepository + * object + * + * @return The transitionalDataLabels value + */ + public HashMap getTransitionalDataLabels() { + return transitionalDataLabels; + } + + /** + * Sets the literarySources attribute of the LexFlatDataRepository object + * + * @param literarySources + * The new literarySources value + */ + public void setLiterarySources(HashMap literarySources) { + this.literarySources = literarySources; + } + + /** + * Sets the literarySources attribute of the LexFlatDataRepository object + */ + public void setLiterarySources() { + String sql = "SELECT id, sourceNormalizedTitle FROM LiterarySources"; + setLiterarySources(createMap(sql)); + } + + /** + * Gets the literarySources attribute of the LexFlatDataRepository object + * + * @return The literarySources value + */ + public HashMap getLiterarySources() { + return literarySources; + } + + /** + * Sets the users attribute of the LexFlatDataRepository object + * + * @param users + * The new users value + */ + public void setUsers(HashMap users) { + this.users = users; + } + + /** + * Sets the users attribute of the LexFlatDataRepository object + * + * @exception LexRepositoryException + * Description of the Exception + */ + public void setUsers() throws LexRepositoryException { + try { + ThdlUserRepository tr = ThdlUserRepository.getInstance(); + setUsers(tr.getUsernameMap()); + } catch (Exception e) { + throw new LexRepositoryException(e); + } + } + + /** + * Sets the projectSubjects attribute of the LexFlatDataRepository object + * + * @param projectSubjects + * The new projectSubjects value + */ + public void setProjectSubjects(HashMap projectSubjects) { + this.projectSubjects = projectSubjects; + } + + /** + * Sets the projectSubjects attribute of the LexFlatDataRepository object + */ + public void setProjectSubjects() { + String sql = "SELECT id, projectSubject FROM ProjectSubjects"; + setProjectSubjects(createMap(sql)); + } + + /** + * Sets the sources attribute of the LexFlatDataRepository object + * + * @param sources + * The new sources value + */ + public void setSources(HashMap sources) { + this.sources = sources; + } + + /** + * Sets the sources attribute of the LexFlatDataRepository object + */ + public void setSources() { + String sql = "SELECT id, sourceTitle FROM Sources"; + setSources(createMap(sql)); + } + + /** + * Sets the languages attribute of the LexFlatDataRepository object + * + * @param languages + * The new languages value + */ + public void setLanguages(HashMap languages) { + this.languages = languages; + } + + /** + * Sets the languages attribute of the LexFlatDataRepository object + */ + public void setLanguages() { + String sql = "SELECT id,Language FROM Languages"; + setLanguages(createMap(sql)); + } + + /** + * Sets the scripts attribute of the LexFlatDataRepository object + * + * @param scripts + * The new scripts value + */ + public void setScripts(HashMap scripts) { + this.scripts = scripts; + } + + /** + * Sets the scripts attribute of the LexFlatDataRepository object + */ + public void setScripts() { + String sql = "SELECT id,script FROM Scripts"; + setScripts(createMap(sql)); + } + + /** + * Gets the users attribute of the LexFlatDataRepository object + * + * @return The users value + * @exception LexRepositoryException + * Description of the Exception + */ + public HashMap getUsers() throws LexRepositoryException { + if (null == users) { + setUsers(); + } + return users; + } + + /** + * Gets the projectSubjects attribute of the LexFlatDataRepository object + * + * @return The projectSubjects value + */ + public HashMap getProjectSubjects() { + return projectSubjects; + } + + /** + * Gets the sources attribute of the LexFlatDataRepository object + * + * @return The sources value + */ + public HashMap getSources() { + return sources; + } + + /** + * Gets the languages attribute of the LexFlatDataRepository object + * + * @return The languages value + */ + public HashMap getLanguages() { + return languages; + } + + /** + * Gets the scripts attribute of the LexFlatDataRepository object + * + * @return The scripts value + */ + public HashMap getScripts() { + return scripts; + } + + /** + * Sets the etymologyTypes attribute of the LexFlatDataRepository object + * + * @param etymologyTypes + * The new etymologyTypes value + */ + public void setEtymologyTypes(HashMap etymologyTypes) { + this.etymologyTypes = etymologyTypes; + } + + /** + * Sets the etymologyTypes attribute of the LexFlatDataRepository object + */ + public void setEtymologyTypes() { + String sql = "SELECT id, etymologyType FROM EtymologyTypes"; + setEtymologyTypes(createMap(sql)); + } + + /** + * Gets the etymologyTypes attribute of the LexFlatDataRepository object + * + * @return The etymologyTypes value + */ + public HashMap getEtymologyTypes() { + return etymologyTypes; + } + + /** + * Sets the spellingTypes attribute of the LexFlatDataRepository object + */ + public void setSpellingTypes() { + String sql = "SELECT id, spellingType FROM SpellingTypes"; + setSpellingTypes(createMap(sql)); + } + + /** + * Sets the spellingTypes attribute of the LexFlatDataRepository object + * + * @param spellingTypes + * The new spellingTypes value + */ + public void setSpellingTypes(HashMap spellingTypes) { + this.spellingTypes = spellingTypes; + } + + /** + * Gets the spellingTypes attribute of the LexFlatDataRepository object + * + * @return The spellingTypes value + */ + public HashMap getSpellingTypes() { + return spellingTypes; + } + + /** + * Sets the phoneticsTypes attribute of the LexFlatDataRepository object + */ + public void setPhoneticsTypes() { + String sql = "SELECT id, phoneticsType FROM PhoneticsTypes"; + setPhoneticsTypes(createMap(sql)); + } + + /** + * Sets the phoneticsTypes attribute of the LexFlatDataRepository object + * + * @param phoneticsTypes + * The new phoneticsTypes value + */ + public void setPhoneticsTypes(HashMap phoneticsTypes) { + this.phoneticsTypes = phoneticsTypes; + } + + /** + * Gets the phoneticsTypes attribute of the LexFlatDataRepository object + * + * @return The phoneticsTypes value + */ + public HashMap getPhoneticsTypes() { + return phoneticsTypes; + } + + /** + * Sets the relatedTermTypes attribute of the LexFlatDataRepository object + */ + public void setRelatedTermTypes() { + String sql = "SELECT id, relatedTermType FROM RelatedTermTypes"; + setRelatedTermTypes(createMap(sql)); + } + + /** + * Sets the relatedTermTypes attribute of the LexFlatDataRepository object + * + * @param relatedTermTypes + * The new relatedTermTypes value + */ + public void setRelatedTermTypes(HashMap relatedTermTypes) { + this.relatedTermTypes = relatedTermTypes; + } + + /** + * Gets the relatedTermTypes attribute of the LexFlatDataRepository object + * + * @return The relatedTermTypes value + */ + public HashMap getRelatedTermTypes() { + return relatedTermTypes; + } + + /** + * Sets the registers attribute of the LexFlatDataRepository object + */ + public void setRegisters() { + String sql = "SELECT id, register FROM Registers"; + setRegisters(createMap(sql)); + } + + /** + * Sets the registers attribute of the LexFlatDataRepository object + * + * @param registers + * The new registers value + */ + public void setRegisters(HashMap registers) { + this.registers = registers; + } + + /** + * Gets the registers attribute of the LexFlatDataRepository object + * + * @return The registers value + */ + public HashMap getRegisters() { + return registers; + } + + /** + * Sets the functionsGeneral attribute of the LexFlatDataRepository object + */ + public void setFunctionsGeneral() { + String sql = "SELECT id, functionGeneral FROM FunctionsGeneral"; + setFunctionsGeneral(createMap(sql)); + } + + /** + * Sets the functionsGeneral attribute of the LexFlatDataRepository object + * + * @param functionsGeneral + * The new functionsGeneral value + */ + public void setFunctionsGeneral(HashMap functionsGeneral) { + this.functionsGeneral = functionsGeneral; + } + + /** + * Gets the functionsGeneral attribute of the LexFlatDataRepository object + * + * @return The functionsGeneral value + */ + public HashMap getFunctionsGeneral() { + return functionsGeneral; + } + + /** + * Sets the majorDialectFamilies attribute of the LexFlatDataRepository + * object + */ + public void setMajorDialectFamilies() { + String sql = "SELECT id, majorDialectFamily FROM MajorDialectFamilies"; + setMajorDialectFamilies(createMap(sql)); + } + + /** + * Sets the majorDialectFamilies attribute of the LexFlatDataRepository + * object + * + * @param majorDialectFamilies + * The new majorDialectFamilies value + */ + public void setMajorDialectFamilies(HashMap majorDialectFamilies) { + this.majorDialectFamilies = majorDialectFamilies; + } + + /** + * Gets the majorDialectFamilies attribute of the LexFlatDataRepository + * object + * + * @return The majorDialectFamilies value + */ + public HashMap getMajorDialectFamilies() { + return majorDialectFamilies; + } + + // accessor methods for HashMap items + + /** + * Gets the user attribute of the LexFlatDataRepository object + * + * @param userId + * Description of the Parameter + * @return The user value + * @exception LexRepositoryException + * Description of the Exception + */ + public String getUser(int userId) throws LexRepositoryException { + return (String) getUsers().get(new Integer(userId)); + } + + /** + * Gets the projectSubject attribute of the LexFlatDataRepository object + * + * @param projSubId + * Description of the Parameter + * @return The projectSubject value + */ + public String getProjectSubject(int projSubId) { + return (String) getProjectSubjects().get(new Integer(projSubId)); + } + + /** + * Gets the source attribute of the LexFlatDataRepository object + * + * @param sourceId + * Description of the Parameter + * @return The source value + */ + public String getSource(int sourceId) { + return (String) getSources().get(new Integer(sourceId)); + } + + /** + * Gets the language attribute of the LexFlatDataRepository object + * + * @param langId + * Description of the Parameter + * @return The language value + */ + public String getLanguage(int langId) { + return (String) getLanguages().get(new Integer(langId)); + } + + /** + * Gets the script attribute of the LexFlatDataRepository object + * + * @param scriptId + * Description of the Parameter + * @return The script value + */ + public String getScript(int scriptId) { + return (String) getScripts().get(new Integer(scriptId)); + } + + /** + * Gets the literarySource attribute of the LexFlatDataRepository object + * + * @param litSourceId + * Description of the Parameter + * @return The literarySource value + */ + public String getLiterarySource(int litSourceId) { + return (String) getLiterarySources().get(new Integer(litSourceId)); + } + + /** + * Gets the etymologyType attribute of the LexFlatDataRepository object + * + * @param etymType + * Description of the Parameter + * @return The etymologyType value + */ + public String getEtymologyType(int etymType) { + return (String) getEtymologyTypes().get(new Integer(etymType)); + } + + /** + * Gets the spellingType attribute of the LexFlatDataRepository object + * + * @param varType + * Description of the Parameter + * @return The spellingType value + */ + public String getSpellingType(int varType) { + return (String) getSpellingTypes().get(new Integer(varType)); + } + + /** + * Gets the register attribute of the LexFlatDataRepository object + * + * @param reg + * Description of the Parameter + * @return The register value + */ + public String getRegister(int reg) { + return (String) getRegisters().get(new Integer(reg)); + } + + /** + * Gets the functionGeneral attribute of the LexFlatDataRepository object + * + * @param funcGen + * Description of the Parameter + * @return The functionGeneral value + */ + public String getFunctionGeneral(int funcGen) { + return (String) getFunctionsGeneral().get(new Integer(funcGen)); + } + + /** + * Gets the majorDialectFamily attribute of the LexFlatDataRepository object + * + * @param dial + * Description of the Parameter + * @return The majorDialectFamily value + */ + public String getMajorDialectFamily(int dial) { + return (String) getMajorDialectFamilies().get(new Integer(dial)); + } + + /** + * Gets the transitionalDataLabel attribute of the LexFlatDataRepository + * object + * + * @param label + * Description of the Parameter + * @return The transitionalDataLabel value + */ + public String getTransitionalDataLabel(int label) { + return (String) getTransitionalDataLabels().get(new Integer(label)); + } + + //helpers + + /** + * Description of the Method + * + * @param sql + * Description of the Parameter + * @return Description of the Return Value + */ + public HashMap createMap(String sql) { + ResultSet rs = null; + HashMap map = new HashMap(); + try { + LexRepository lr = LexRepository.getInstance(); + Connection con = lr.getDataSource().getConnection(); + rs = con.createStatement().executeQuery(sql); + if (null != rs) { + int i = 0; + Integer key = null; + String value = ""; + while (rs.next()) { + i = rs.getInt(1); + key = new Integer(i); + value = rs.getString(2); + ResultSetMetaData rsmd = rs.getMetaData(); + int columnCount = rsmd.getColumnCount(); + for (int x = 3; x <= columnCount; x++) { + value = value + " " + rs.getString(x); + } + map.put(key, value); + } + } + con.close(); + } catch (LexRepositoryException lre) { + lre.printStackTrace(); + } catch (SQLException sqle) { + sqle.printStackTrace(); + } + return map; + } + + //constructors + /** + * Constructor for the LexFlatDataRepository object + */ + public LexFlatDataRepository() { + setProjectSubjects(); + setSources(); + setLanguages(); + setScripts(); + setLiterarySources(); + setEtymologyTypes(); + setSpellingTypes(); + setPhoneticsTypes(); + setRelatedTermTypes(); + setRegisters(); + setFunctionsGeneral(); + setMajorDialectFamilies(); + setTransitionalDataLabels(); + } + + //main + + /** + * The main program for the LexFlatDataRepository class + * + * @param args + * The command line arguments + */ + public static void main(String[] args) { + LexFlatDataRepository lfdr = new LexFlatDataRepository(); + //System.out.println( lfdr.getUser( 1 ) ); + System.out.println(lfdr.getProjectSubject(6)); + System.out.println(lfdr.getSource(1)); + System.out.println(lfdr.getLanguage(1)); + System.out.println(lfdr.getEtymologyType(1)); + } +} + diff --git a/src/java/org/thdl/lex/LexLogger.java b/src/java/org/thdl/lex/LexLogger.java new file mode 100644 index 0000000..28a2d64 --- /dev/null +++ b/src/java/org/thdl/lex/LexLogger.java @@ -0,0 +1,223 @@ +package org.thdl.lex; + +import java.io.PrintWriter; +import java.io.StringWriter; +import java.util.Arrays; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.beanutils.BeanUtils; +import org.apache.log4j.Logger; +import org.thdl.lex.component.ILexComponent; +import org.thdl.lex.component.ITerm; + +/** + * Description of the Class + * + * @author travis + * @created October 9, 2003 + */ +public class LexLogger { + private final static Logger LOGGER = Logger.getLogger("org.thdl.lex"); + + private final static List EXCLUDED_PARAMS = Arrays.asList(new String[] { + "org.apache.catalina.jsp_classpath", + "javax.servlet.context.tempdir", + "org.apache.catalina.WELCOME_FILES" }); + + /** + * Description of the Method + * + * @param req + * Description of the Parameter + */ + public static void logRequestState(HttpServletRequest req) { + + Iterator it; + LOGGER.debug("authType: " + req.getAuthType()); + LOGGER.debug("characterEncoding: " + req.getCharacterEncoding()); + LOGGER.debug("contentLength: " + req.getContentLength()); + LOGGER.debug("contentType: " + req.getContentType()); + LOGGER.debug("method: " + req.getMethod()); + LOGGER.debug("pathInfo: " + req.getPathInfo()); + LOGGER.debug("pathTranslated: " + req.getPathTranslated()); + LOGGER.debug("protocol: " + req.getProtocol()); + LOGGER.debug("queryString: " + req.getQueryString()); + LOGGER.debug("remoteAddr: " + req.getRemoteAddr()); + LOGGER.debug("remoteHost: " + req.getRemoteHost()); + LOGGER.debug("remoteUser: " + req.getRemoteUser()); + LOGGER.debug("requestedSessionId: " + req.getRequestedSessionId()); + LOGGER.debug("requestedSessionIdFromCookie: " + + req.isRequestedSessionIdFromCookie()); + LOGGER.debug("requestedSessionIdFromURL: " + + req.isRequestedSessionIdFromURL()); + LOGGER.debug("requestedSessionIdValid: " + + req.isRequestedSessionIdValid()); + LOGGER.debug("requestURI: " + req.getRequestURI()); + LOGGER.debug("scheme: " + req.getScheme()); + LOGGER.debug("serverName: " + req.getServerName()); + LOGGER.debug("serverPort: " + req.getServerPort()); + LOGGER.debug("contextPath: " + req.getContextPath()); + LOGGER.debug("servletPath: " + req.getServletPath()); + Enumeration enumeration = req.getParameterNames(); + while (enumeration.hasMoreElements()) { + String parm = (String) enumeration.nextElement(); + LOGGER.debug("Request Parameter: " + parm + " = '" + + req.getParameter(parm) + "'"); + } + enumeration = req.getAttributeNames(); + while (enumeration.hasMoreElements()) { + String att = (String) enumeration.nextElement(); + LOGGER.debug("Request Attribute: " + att + " =: " + + req.getAttribute(att)); + } + } + + /** + * Description of the Method + * + * @param resp + * Description of the Parameter + */ + public static void logResponseState(HttpServletResponse resp) { + LOGGER.debug("RESPONSE STATE"); + LOGGER.debug("characterEncoding: " + resp.getCharacterEncoding()); + } + + /** + * Description of the Method + * + * @param req + * Description of the Parameter + */ + public static void logSessionState(HttpServletRequest req) { + HttpSession ses = req.getSession(false); + if (null == ses) { + LOGGER.debug("Session was null"); + return; + } + Visit visit = UserSessionManager.getInstance().getVisit( + req.getSession(true)); + Enumeration enumeration = ses.getAttributeNames(); + while (enumeration.hasMoreElements()) { + String att = (String) enumeration.nextElement(); + LOGGER.debug("Session Attribute: " + att + " =: " + + ses.getAttribute(att)); + } + + if (null == visit) { + LOGGER.debug("Visit was null"); + return; + } + debugComponent(visit); + debugComponent(visit.getQuery()); + debugComponent(visit.getUser()); + } + + /** + * Description of the Method + * + * @param context + * Description of the Parameter + */ + public static void logContextState(ServletContext context) { + Enumeration enumeration = context.getAttributeNames(); + while (enumeration.hasMoreElements()) { + String att = (String) enumeration.nextElement(); + if (!EXCLUDED_PARAMS.contains(att)) { + LOGGER.debug("Context Attribute: " + att + " =: " + + context.getAttribute(att)); + } + } + debugComponent(context.getAttribute(LexConstants.GLOBAL_CONTEXT_ATTR)); + } + + /** + * Description of the Method + * + * @param msg + * Description of the Parameter + */ + public static void info(String msg) { + LOGGER.info(msg); + } + + /** + * Description of the Method + * + * @param msg + * Description of the Parameter + */ + public static void debug(String msg) { + LOGGER.debug(msg); + } + + /** + * Description of the Method + * + * @param msg + * Description of the Parameter + */ + public static void warn(String msg) { + LOGGER.warn(msg); + } + + /** + * Description of the Method + * + * @param msg + * Description of the Parameter + */ + public static void error(String msg) { + LOGGER.error(msg); + } + + /** + * Constructor for the debugComponent object + * + * @param component + * Description of the Parameter + */ + public static void debugComponent(Object component) { + if (null == component) { + debug("debugComponent was just handed a null component"); + return; + } + try { + LOGGER.debug("Describing: " + component); + String label = component instanceof ILexComponent ? ((ILexComponent) component) + .getLabel() + : component.toString(); + Iterator it = BeanUtils.describe(component).entrySet().iterator(); + while (it.hasNext()) { + Map.Entry entry = (Map.Entry) it.next(); + LOGGER.debug(label + " property: " + entry.getKey() + " = '" + + entry.getValue() + "'"); + } + } catch (Exception e) { + StringWriter writer = new StringWriter(); + e.printStackTrace(new PrintWriter(writer)); + String stackTrace = writer.getBuffer().toString(); + LOGGER.debug("LexLogger caught an Exception: " + stackTrace); + } + } + + /** + * Description of the Method + * + * @param term + * Description of the Parameter + */ + public static void debugTerm(ITerm term) { + debugComponent(term); + } + +} + diff --git a/src/java/org/thdl/lex/LexQuery.hbm.xml b/src/java/org/thdl/lex/LexQuery.hbm.xml new file mode 100644 index 0000000..e6ed70c --- /dev/null +++ b/src/java/org/thdl/lex/LexQuery.hbm.xml @@ -0,0 +1,16 @@ + + + + + + + + org.thdl.lex.components.BaseLexQuery + + + + + + diff --git a/src/java/org/thdl/lex/LexQuery.java b/src/java/org/thdl/lex/LexQuery.java new file mode 100644 index 0000000..1b85580 --- /dev/null +++ b/src/java/org/thdl/lex/LexQuery.java @@ -0,0 +1,221 @@ +package org.thdl.lex; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.beanutils.BeanUtils; +import org.thdl.lex.component.ILexComponent; +import org.thdl.lex.component.ITerm; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class LexQuery { + private ILexComponent queryComponent; + + private ILexComponent updateComponent; + + private ITerm entry; + + private Map results; + + private String findMode; + + private long duration; + + /** + * Sets the updateComponent attribute of the LexQuery object + * + * @param updateComponent + * The new updateComponent value + */ + public void setUpdateComponent(ILexComponent updateComponent) { + this.updateComponent = updateComponent; + } + + /** + * Sets the duration attribute of the LexQuery object + * + * @param duration + * The new duration value + * @since + */ + public void setDuration(long duration) { + this.duration = duration; + } + + /** + * Sets the queryComponent attribute of the LexQuery object + * + * @param queryComponent + * The new queryComponent value + * @since + */ + public void setQueryComponent(ILexComponent queryComponent) { + this.queryComponent = queryComponent; + } + + /** + * Sets the entry attribute of the LexQuery object + * + * @param entry + * The new entry value + * @since + */ + public void setEntry(ITerm entry) { + this.entry = entry; + } + + /** + * Sets the findMode attribute of the LexQuery object + * + * @param findMode + * The new findMode value + * @since + */ + public void setFindMode(String findMode) { + this.findMode = findMode; + } + + /** + * Sets the results attribute of the LexQuery object + * + * @param results + * The new results value + * @since + */ + public void setResults(Map results) { + this.results = results; + } + + /** + * Gets the updateComponent attribute of the LexQuery object + * + * @return The updateComponent value + */ + public ILexComponent getUpdateComponent() { + return updateComponent; + } + + /** + * Gets the duration attribute of the LexQuery object + * + * @return The duration value + * @since + */ + public long getDuration() { + return duration / 1000; + } + + /** + * Gets the queryComponent attribute of the LexQuery object + * + * @return The queryComponent value + * @since + */ + public ILexComponent getQueryComponent() { + return queryComponent; + } + + /** + * Gets the entry attribute of the LexQuery object + * + * @return The entry value + * @since + */ + public ITerm getEntry() { + return entry; + } + + /** + * Gets the findMode attribute of the LexQuery object + * + * @return The findMode value + * @since + */ + public String getFindMode() { + return findMode; + } + + /** + * Gets the results attribute of the LexQuery object + * + * @return The results value + * @since + */ + public Map getResults() { + if (null == results) { + setResults(new HashMap()); + } + return results; + } + + //helper methods + /** + * Description of the Method + * + * @param parameters + * Description of Parameter + * @exception LexRepositoryException + * Description of Exception + * @since + */ + public void populate(Map parameters) throws LexRepositoryException { + try { + BeanUtils.populate(this, parameters); + } catch (IllegalAccessException iae) { + throw new LexRepositoryException(iae); + } catch (java.lang.reflect.InvocationTargetException ite) { + throw new LexRepositoryException(ite); + } + } + + //constructors + + /** + * Constructor for the LexQuery object + * + * @param findMode + * Description of the Parameter + * @since + */ + public LexQuery(String findMode) { + setFindMode(findMode); + } + + /** + * Constructor for the LexQuery object + */ + public LexQuery() { + this(LexComponentRepository.STARTS_WITH); + } + + /** + * Constructor for the LexQuery object + * + * @param component + * Description of the Parameter + */ + public LexQuery(ILexComponent component) { + this(); + setQueryComponent(component); + } + + /** + * Constructor for the LexQuery object + * + * @param component + * Description of the Parameter + * @param findMode + * Description of the Parameter + */ + public LexQuery(ILexComponent component, String findMode) { + this(findMode); + setQueryComponent(component); + } + +} + diff --git a/src/java/org/thdl/lex/LexRepository.java b/src/java/org/thdl/lex/LexRepository.java new file mode 100644 index 0000000..a479814 --- /dev/null +++ b/src/java/org/thdl/lex/LexRepository.java @@ -0,0 +1,157 @@ +package org.thdl.lex; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; + +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; +import javax.sql.DataSource; + +/** + * Description of the Class + * + * @author travis + * @created September 26, 2002 + */ +public class LexRepository { + //attributes + private static LexRepository instance; + + private DataSource dataSource; + + /** + * Sets the dataSource attribute of the LexRepository object + * + * @param dataSource + * The new dataSource value + */ + public void setDataSource(DataSource dataSource) { + this.dataSource = dataSource; + } + + /** + * Gets the dataSource attribute of the LexRepository object + * + * @return The dataSource value + */ + public DataSource getDataSource() { + return dataSource; + } + + //accessors + + /** + * Gets the instance attribute of the LexRepository class + * + * @return The instance value + * @exception LexRepositoryException + * Description of the Exception + * @since + */ + public static LexRepository getInstance() throws LexRepositoryException { + if (instance == null) { + instance = new LexRepository(); + } + return instance; + } + + //helper methods + + /** + * doUpdate() performs an INSERT/UPDATE/DROP action + * + * @param sql + * Description of the Parameter + * @return Description of the Return Value + * @exception LexRepositoryException + * Description of the Exception + * @since + */ + public int doUpdate(String sql) throws LexRepositoryException { + try { + Connection con = getDataSource().getConnection(); + int i = con.createStatement().executeUpdate(sql); + con.close(); + return i; + } catch (SQLException sqle) { + throw new LexRepositoryException(sqle); + } + } + + /** + * doInsert() is a wrapper for doUpdate() that returns the auto_increment + * primary key value of the newly inserted row + * + * @param sql + * Description of the Parameter + * @return Description of the Return Value + * @exception LexRepositoryException + * Description of the Exception + * @since + */ + public int doInsert(String sql) throws LexRepositoryException { + if (null == sql) { + throw new LexRepositoryException("SQL String was null"); + } + if (sql.equals("")) { + throw new LexRepositoryException("SQL String was empty"); + } + try { + ResultSet rs; + int returnVal = 0; + int i; + i = doUpdate(sql); + if (i > 0) { + Connection con = getDataSource().getConnection(); + rs = con.createStatement().executeQuery( + "SELECT LAST_INSERT_ID()"); + while (rs.next()) { + returnVal = rs.getInt(1); + } + con.close(); + return returnVal; + } else { + returnVal = i; + } + throw new LexRepositoryException( + "Insert affected 0 rows. Sql String was '" + sql + "'"); + } catch (SQLException sqle) { + throw new LexRepositoryException(sqle); + } + } + + //main + /** + * The main program for the LexRepository class. This method tests all other + * methods in this class + * + * @param args + * The command line arguments + * @since + */ + public static void main(String[] args) { + } + + //constructors + /** + * Default Constructor for the LexRepository object + * + * @exception LexRepositoryException + * Description of the Exception + * @since + */ + private LexRepository() throws LexRepositoryException { + try { + Context context = new InitialContext(); + DataSource source = (DataSource) context + .lookup(LexConstants.DATASOURCE_NAME); + setDataSource(source); + } catch (NamingException ne) { + throw new LexRepositoryException(ne); + } + + } +} + diff --git a/src/java/org/thdl/lex/LexRepositoryException.java b/src/java/org/thdl/lex/LexRepositoryException.java new file mode 100644 index 0000000..462f39b --- /dev/null +++ b/src/java/org/thdl/lex/LexRepositoryException.java @@ -0,0 +1,54 @@ +package org.thdl.lex; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class LexRepositoryException extends Exception { + /** + * Constructor for the LexRepositoryException object + * + * @since + */ + public LexRepositoryException() { + super(); + } + + /** + * Constructor for the LexRepositoryException object + * + * @param msg + * Description of Parameter + * @since + */ + public LexRepositoryException(String msg) { + super(msg); + } + + /** + * Constructor for the LexRepositoryException object + * + * @param e + * Description of Parameter + * @since + */ + public LexRepositoryException(Exception e) { + super(e); + } + + /** + * Constructor for the LexRepositoryException object + * + * @param msg + * Description of Parameter + * @param e + * Description of Parameter + * @since + */ + public LexRepositoryException(String msg, Exception e) { + super(msg, e); + } +} + diff --git a/src/java/org/thdl/lex/LexSourceRepository.java b/src/java/org/thdl/lex/LexSourceRepository.java new file mode 100644 index 0000000..770f741 --- /dev/null +++ b/src/java/org/thdl/lex/LexSourceRepository.java @@ -0,0 +1,299 @@ +package org.thdl.lex; + +import org.thdl.users.ThdlUserRepository; + +import java.util.*; +import java.io.*; + +import org.dlese.dpc.oai.harvester.*; +import org.dlese.dpc.datamgr.*; +import org.dlese.dpc.index.*; + +import org.dlese.dpc.oai.harvester.structs.ScheduledHarvest; + +import org.openarchives.oai.x20.oaiDc.DcDocument; +import org.openarchives.oai.x20.oaiDc.OaiDcType; + + +/** + * Description of the Class + * + * @author travis + * @created December 15, 2003 + */ +public class LexSourceRepository +{ +//attributes + private static LexSourceRepository instance; + private ScheduledHarvestManager harvestManager; + private ScheduledHarvest harvest; + + private String oaiServer; + private String oaiMetadataPrefix; + private String oaiHome; + private String oaiLocalCopy; + private int oaiRefreshDelay; + + + /** + * Sets the oaiServer attribute of the LexSourceRepository object + * + * @param oaiServer The new oaiServer value + */ + public void setOaiServer( String oaiServer ) + { + this.oaiServer = oaiServer; + } + + + /** + * Sets the oaiMetadataPrefix attribute of the LexSourceRepository object + * + * @param oaiMetadataPrefix The new oaiMetadataPrefix value + */ + public void setOaiMetadataPrefix( String oaiMetadataPrefix ) + { + this.oaiMetadataPrefix = oaiMetadataPrefix; + } + + + /** + * Sets the oaiHome attribute of the LexSourceRepository object + * + * @param oaiHome The new oaiHome value + */ + public void setOaiHome( String oaiHome ) + { + this.oaiHome = oaiHome; + } + + + /** + * Sets the oaiLocalCopy attribute of the LexSourceRepository object + * + * @param oaiLocalCopy The new oaiLocalCopy value + */ + public void setOaiLocalCopy( String oaiLocalCopy ) + { + this.oaiLocalCopy = oaiLocalCopy; + } + + + /** + * Sets the oaiRefreshDelay attribute of the LexSourceRepository object + * + * @param oaiRefreshDelay The new oaiRefreshDelay value + */ + public void setOaiRefreshDelay( int oaiRefreshDelay ) + { + this.oaiRefreshDelay = oaiRefreshDelay; + } + + + /** + * Gets the oaiServer attribute of the LexSourceRepository object + * + * @return The oaiServer value + */ + public String getOaiServer() + { + return oaiServer; + } + + + /** + * Gets the oaiMetadataPrefix attribute of the LexSourceRepository object + * + * @return The oaiMetadataPrefix value + */ + public String getOaiMetadataPrefix() + { + return oaiMetadataPrefix; + } + + + /** + * Gets the oaiHome attribute of the LexSourceRepository object + * + * @return The oaiHome value + */ + public String getOaiHome() + { + return oaiHome; + } + + + /** + * Gets the oaiLocalCopy attribute of the LexSourceRepository object + * + * @return The oaiLocalCopy value + */ + public String getOaiLocalCopy() + { + return oaiLocalCopy; + } + + + /** + * Gets the oaiRefreshDelay attribute of the LexSourceRepository object + * + * @return The oaiRefreshDelay value + */ + public int getOaiRefreshDelay() + { + return oaiRefreshDelay; + } + + + /** + * Sets the harvest attribute of the LexSourceRepository object + * + * @param harvest The new harvest value + */ + public void setHarvest( ScheduledHarvest harvest ) + { + this.harvest = harvest; + } + + + /** + * Gets the harvest attribute of the LexSourceRepository object + * + * @return The harvest value + */ + public ScheduledHarvest getHarvest() + { + return harvest; + } + + + + /** + * Sets the harvestManager attribute of the LexSourceRepository object + * + * @param harvestManager The new harvestManager value + */ + public void setHarvestManager( ScheduledHarvestManager harvestManager ) + { + this.harvestManager = harvestManager; + } + + + /** + * Gets the harvestManager attribute of the LexSourceRepository object + * + * @return The harvestManager value + */ + public ScheduledHarvestManager getHarvestManager() + { + return harvestManager; + } + + +//accessors + /** + * Gets the instance attribute of the LexSourceRepository class + * + * @return The instance value + * @exception Exception Description of the Exception + */ + public static LexSourceRepository getInstance() throws Exception + { + if ( null == instance ) + { + instance = new LexSourceRepository(); + } + return instance; + } + + + /** + * Description of the Method + * + * @exception LexRepositoryException Description of the Exception + */ + public void refreshSources() throws LexRepositoryException + { + /* + try + { + getHarvest(). + } + catch ( Hexception h ) + { + throw new LexRepositoryException( h ); + } + catch ( OAIErrorException h ) + { + throw new LexRepositoryException( h ); + } + */ + } + + + /** + * Description of the Method + * + * @return Description of the Return Value + * @exception LexRepositoryException Description of the Exception + */ + public String[] xmlTesting() throws LexRepositoryException + { + String[] sa = null; + try + { + File file = new File( "/Users/travis/webapps/lex/dlese-oai/datastore.lib.virginia.edu/tibet/spt/SPT--OAI.php/oai_dc", "oai%3Alib.virginia.edu%3Athdl-267.xml" ); + DcDocument dcd = DcDocument.Factory.parse( file ); + OaiDcType oaiDc = dcd.getDc(); + sa = new String[oaiDc.getTitleArray().length]; + for ( int i = 0; i < sa.length; i++ ) + { + sa[i] = oaiDc.getTitleArray()[i].toString(); + } + } + catch ( Exception e ) + { + throw new LexRepositoryException( e ); + } + return sa; + } +//constructors + + /** + *Constructor for the LexSourceRepository object + * + * @exception Exception Description of the Exception + */ + private LexSourceRepository() throws Exception + { +/* SimpleDataStore dataStore = new SimpleDataStore( "/Users/travis/webapps/lex/dlese-oai/scheduled-harvester", true ); + File initialHarvestDir = new File( "/Users/travis/webapps/lex/dlese-oai/datastore.lib.virginia.edu" ); + SimpleLuceneIndex harvestLogIndex = new SimpleLuceneIndex( "/Users/travis/webapps/lex/dlese-oai/lucene-index" ); + ScheduledHarvestManager manager = new ScheduledHarvestManager( dataStore, initialHarvestDir, harvestLogIndex ); + setHarvestManager( manager ); + + String repositoryName = "SPT"; + String setSpec = ""; + String baseURL = "http://datastore.lib.virginia.edu/tibet/spt/SPT--OAI.php"; + String metadataPrefix = "oai_dc"; + int seconds = 1000 * 1; + String harvestingInterval = Integer.toString( seconds ); + String intervalGranularity = "YYYY -MM-DDThh:mm:ssZ"; + String enabledDisabled = "enabled"; + ScheduledHarvest harvest = new ScheduledHarvest( repositoryName, setSpec, baseURL, metadataPrefix, harvestingInterval, intervalGranularity, enabledDisabled ); + setHarvest( harvest ); + + getHarvestManager().addScheduledHarvest( getHarvest() ); +*/ } +//main + + /** + * The main program for the LexSourceRepository class + * + * @param args The command line arguments + */ + public static void main( String[] args ) + { + } +} + diff --git a/src/java/org/thdl/lex/LexUser.java b/src/java/org/thdl/lex/LexUser.java new file mode 100644 index 0000000..dbbdf6a --- /dev/null +++ b/src/java/org/thdl/lex/LexUser.java @@ -0,0 +1,19 @@ +package org.thdl.lex; + +public class LexUser extends org.thdl.users.ThdlUser { + public boolean isGuest() { + boolean bool = false; + if (hasRole("guest")) { + bool = true; + } + return bool; + } + + public boolean isDeveloper() { + boolean bool = false; + if (hasRole("dev")) { + bool = true; + } + return bool; + } +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/LexUtilities.java b/src/java/org/thdl/lex/LexUtilities.java new file mode 100644 index 0000000..03045f1 --- /dev/null +++ b/src/java/org/thdl/lex/LexUtilities.java @@ -0,0 +1,170 @@ +package org.thdl.lex; + +import java.util.HashMap; +import java.util.StringTokenizer; + +/** + * Description of the Class + * + * @author travis + * @created October 6, 2003 + */ +public class LexUtilities { + /** + * Gets the resultSetSize attribute of the LexUtilities class + * + * @param rs + * Description of the Parameter + * @return The resultSetSize value + * @exception java.sql.SQLException + * Description of the Exception + */ + public static int getResultSetSize(java.sql.ResultSet rs) + throws java.sql.SQLException { + rs.last(); + int i = rs.getRow(); + rs.beforeFirst(); + return i; + } + + /* + * public static String formatTimestamp( Timestamp time ) { SimpleDateFormat + * formatter = new SimpleDateFormat("yyyy.MM.dd 'at' hh:mm:ss a zzz"); Date + * coDate = new Date( getCreatedOn().getTime() ); String dateString = + * formatter.format( coDate ); } + */ + /** + * Description of the Method + * + * @param fromString + * Description of the Parameter + * @return Description of the Return Value + */ + public static String escape(String fromString) { + HashMap map = new HashMap(); + map.put("'", "\\'"); + /* + * map.put("%", "\\%"); map.put("_", "\\_"); map.put("\"", "\\\""); + */ + StringBuffer targetString = new StringBuffer(""); + if (null != fromString) { + StringTokenizer tokens = new StringTokenizer(fromString, "'%_\"", + true); + while (tokens.hasMoreTokens()) { + String temp = tokens.nextToken(); + if (map.containsKey(temp)) { + temp = (String) map.get(temp); + } + targetString.append(temp); + } + } + return targetString.toString(); + } + + /** + * Description of the Method + * + * @param fromString + * Description of the Parameter + * @return Description of the Return Value + */ + public static String hqlEscape(String fromString) { + HashMap map = new HashMap(); + map.put("'", "''"); + StringBuffer targetString = new StringBuffer(""); + if (null != fromString) { + StringTokenizer tokens = new StringTokenizer(fromString, "'%_\"", + true); + while (tokens.hasMoreTokens()) { + String temp = tokens.nextToken(); + if (map.containsKey(temp)) { + temp = (String) map.get(temp); + } + targetString.append(temp); + } + } + return targetString.toString(); + } + + /** + * Description of the Method + * + * @param source + * Description of the Parameter + * @return Description of the Return Value + */ + public static Integer[] convertToIntegerArray(String[] source) { + if (null == source) { + return null; + } + Integer[] target = new Integer[source.length]; + for (int i = 0; i < target.length; i++) { + target[i] = new Integer(source[i]); + } + return target; + } + + /** + * Description of the Method + * + * @param source + * Description of the Parameter + * @return Description of the Return Value + */ + public static Integer[] convertTokensToIntegerArray(String source) { + if (null == source || "null".equals(source)) { + return null; + } + StringTokenizer sourceTokens = new StringTokenizer(source, ":"); + Integer[] target = new Integer[sourceTokens.countTokens()]; + for (int i = 0; sourceTokens.hasMoreTokens(); i++) { + target[i] = new Integer(sourceTokens.nextToken()); + } + return target; + } + + /** + * Description of the Method + * + * @param source + * Description of the Parameter + * @return Description of the Return Value + */ + public static String convertIntegerArrayToTokens(Integer[] source) { + if (null == source) { + return null; + } + StringBuffer target = new StringBuffer(""); + for (int i = 0; i < source.length; i++) { + target.append(source[i].toString()); + if (i < (source.length - 1)) { + target.append(":"); + } + } + return target.toString(); + } + + /** + * The main program for the LexUtilities class + * + * @param args + * The command line arguments + */ + public static void main(String[] args) { + String s = "It's stupid to use a % or a _ in a SQL Statement"; + System.out.println(LexUtilities.escape(s)); + + Integer[] ia = { new Integer(1), new Integer(3) }; + System.out.println(LexUtilities.convertIntegerArrayToTokens(ia)); + + String str = "9:8:7:6:5"; + Integer[] ia2 = LexUtilities.convertTokensToIntegerArray(str); + String newStr = ""; + for (int i = 0; i < 5; i++) { + newStr = newStr + ia2[i] + " "; + } + System.out.println(newStr); + + } +} + diff --git a/src/java/org/thdl/lex/LoginServlet.java b/src/java/org/thdl/lex/LoginServlet.java new file mode 100644 index 0000000..fe3fce9 --- /dev/null +++ b/src/java/org/thdl/lex/LoginServlet.java @@ -0,0 +1,221 @@ +package org.thdl.lex; + +import java.io.IOException; + +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.thdl.lex.component.LexComponentException; +import org.thdl.users.ThdlUser; +import org.thdl.users.ThdlUserRepository; +import org.thdl.users.ThdlUserRepositoryException; + +/** + * Description of the Class + * + * @author travis + * @created October 2, 2003 + */ +public class LoginServlet extends HttpServlet { + //attributes + + private String welcomePage; + + private String loginPage; + + private UserSessionManager sessionManager; + + //accessors + /** + * Sets the welcomePage attribute of the LoginServlet object + * + * @param welcomePage + * The new welcomePage value + * @since + */ + public void setWelcomePage(String welcomePage) { + this.welcomePage = welcomePage; + } + + /** + * Sets the loginPage attribute of the LoginServlet object + * + * @param loginPage + * The new loginPage value + * @since + */ + public void setLoginPage(String loginPage) { + this.loginPage = loginPage; + } + + /** + * Gets the welcomePage attribute of the LoginServlet object + * + * @return The welcomePage value + * @since + */ + public String getWelcomePage() { + return welcomePage; + } + + /** + * Gets the loginPage attribute of the LoginServlet object + * + * @return The loginPage value + * @since + */ + public String getLoginPage() { + return loginPage; + } + + /** + * Gets the sessionManager attribute of the LoginServlet object + * + * @return The sessionManager value + * @since + */ + public UserSessionManager getSessionManager() { + if (null == sessionManager) { + return UserSessionManager.getInstance(); + } else { + return sessionManager; + } + } + + //helper methods + /** + * Description of the Method + * + * @param config + * Description of Parameter + * @exception ServletException + * Description of Exception + * @since + */ + public void init(ServletConfig config) throws ServletException { + setWelcomePage("/action?cmd=menu"); + + if (getWelcomePage() == null) { + throw new ServletException( + "The welcomePage init parameter must be specified."); + } + + setLoginPage(config.getInitParameter("loginPage")); + + if (getLoginPage() == null) { + throw new ServletException( + "The loginPage init parameter must be specified."); + } + + } + + /** + * Description of the Method + * + * @param request + * Description of Parameter + * @param response + * Description of Parameter + * @exception ServletException + * Description of Exception + * @since + */ + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException { + String username = request.getParameter(LexConstants.USERNAME_REQ_PARAM); + + if (username == null) { + throw new ServletException("No Username Specified"); + } + + String password = request.getParameter(LexConstants.PASSWORD_REQ_PARAM); + + if (password == null) { + throw new ServletException("No Password Specified"); + } + + ThdlUser thdlUser = null; + try { + ThdlUser lexUser = new LexUser(); + lexUser.setUsername(username); + lexUser.setPassword(password); + lexUser = ThdlUserRepository.getInstance().validate(lexUser, + "dictionary"); + doLoginSuccess(request, response, lexUser); + } catch (ThdlUserRepositoryException ture) { + doLoginFailure(request, response, username); + //throw new ServletException( ture ); + } catch (Exception e) { + throw new ServletException(e); + } + } + + /** + * Description of the Method + * + * @param response + * Description of Parameter + * @param user + * Description of Parameter + * @param req + * Description of the Parameter + * @exception IOException + * Description of Exception + * @exception LexRepositoryException + * Description of Exception + * @exception LexComponentException + * Description of Exception + * @since + */ + private void doLoginSuccess(HttpServletRequest req, + HttpServletResponse response, ThdlUser user) throws IOException, + LexRepositoryException, LexComponentException { + Visit visit = UserSessionManager.getInstance().getVisit( + req.getSession(true)); + + visit.setUser(user); + + Preferences preferences = new Preferences(user); + visit.setPreferences(preferences); + + visit.setDisplayMode("brief"); + String targetPage = UserSessionManager.getInstance() + .getSessionLoginTarget(req.getSession(true), true); + + if (targetPage == null) { + UserSessionManager.doRedirect(req, response, getWelcomePage()); + } else { + targetPage = response.encodeRedirectURL(targetPage); + response.sendRedirect(targetPage); + } + } + + /** + * Description of the Method + * + * @param request + * Description of Parameter + * @param response + * Description of Parameter + * @param username + * Description of Parameter + * @exception ServletException + * Description of Exception + * @since + */ + private void doLoginFailure(HttpServletRequest request, + HttpServletResponse response, String username) + throws ServletException { + + String loginURL = getLoginPage() + "?retry=true&username=" + username; + try { + UserSessionManager.doRedirect(request, response, loginURL); + } catch (IOException ioe) { + throw new ServletException(ioe); + } + } +} + diff --git a/src/java/org/thdl/lex/LogoutServlet.java b/src/java/org/thdl/lex/LogoutServlet.java new file mode 100644 index 0000000..21c41ab --- /dev/null +++ b/src/java/org/thdl/lex/LogoutServlet.java @@ -0,0 +1,78 @@ +package org.thdl.lex; + +import java.io.IOException; + +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * Description of the Class + * + * @author travis + * @created October 21, 2003 + */ +public class LogoutServlet extends HttpServlet { + private String goodbyePage; + + /** + * Sets the goodbyePage attribute of the LogoutServlet object + * + * @param goodbyePage + * The new goodbyePage value + */ + public void setGoodbyePage(String goodbyePage) { + this.goodbyePage = goodbyePage; + } + + /** + * Gets the goodbyePage attribute of the LogoutServlet object + * + * @return The goodbyePage value + */ + public String getGoodbyePage() { + return goodbyePage; + } + + /** + * Description of the Method + * + * @param config + * Description of the Parameter + * @exception ServletException + * Description of the Exception + */ + public void init(ServletConfig config) throws ServletException { + setGoodbyePage(config.getInitParameter("goodbyePage")); + if (goodbyePage == null) { + throw new ServletException( + "The goodbyePage init parameter must be specified."); + } + } + + /** + * Description of the Method + * + * @param request + * Description of the Parameter + * @param response + * Description of the Parameter + * @exception ServletException + * Description of the Exception + */ + public void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException { + HttpSession session = request.getSession(true); + UserSessionManager.getInstance().removeVisit(session); + try { + String redirect = response.encodeRedirectURL(getGoodbyePage()); + response.sendRedirect(redirect); + } catch (IOException e) { + throw new ServletException("could not redirect to goodbye page"); + } + } +} + diff --git a/src/java/org/thdl/lex/Preferences.java b/src/java/org/thdl/lex/Preferences.java new file mode 100644 index 0000000..b924e2b --- /dev/null +++ b/src/java/org/thdl/lex/Preferences.java @@ -0,0 +1,652 @@ +package org.thdl.lex; + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.thdl.lex.component.LexComponentException; +import org.thdl.users.ThdlUser; + +/** + * Description of the Class + * + * @author travis + * @created October 6, 2003 + */ +public class Preferences { + //attributes + private Integer id; + + private Integer userId; + + private String preferencesName; + + private Integer projectSubject; + + private Integer source; + + private Integer language; + + private Integer script; + + private Integer dialect; + + private String note; + + private boolean useDefaultProjSub; + + private boolean useDefaultSource; + + private boolean useDefaultLanguage; + + private boolean useDefaultScript; + + private boolean useDefaultDialect; + + private boolean useDefaultNote; + + private Integer[] projectSubjectSet; + + private Integer[] sourceSet; + + private Integer[] languageSet; + + private Integer[] scriptSet; + + private Integer[] dialectSet; + + //accessors + + /** + * Sets the id attribute of the Preferences object + * + * @param id + * The new id value + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * Sets the userId attribute of the Preferences object + * + * @param userId + * The new userId value + */ + public void setUserId(Integer userId) { + this.userId = userId; + } + + /** + * Sets the preferencesName attribute of the Preferences object + * + * @param preferencesName + * The new preferencesName value + */ + public void setPreferencesName(String preferencesName) { + this.preferencesName = preferencesName; + } + + /** + * Sets the useDefaultNote attribute of the Preferences object + * + * @param useDefaultNote + * The new useDefaultNote value + */ + public void setUseDefaultNote(boolean useDefaultNote) { + this.useDefaultNote = useDefaultNote; + } + + /** + * Sets the useDefaultProjSub attribute of the Preferences object + * + * @param useDefaultProjSub + * The new useDefaultProjSub value + */ + public void setUseDefaultProjSub(boolean useDefaultProjSub) { + this.useDefaultProjSub = useDefaultProjSub; + } + + /** + * Sets the useDefaultSource attribute of the Preferences object + * + * @param useDefaultSource + * The new useDefaultSource value + */ + public void setUseDefaultSource(boolean useDefaultSource) { + this.useDefaultSource = useDefaultSource; + } + + /** + * Sets the useDefaultLanguage attribute of the Preferences object + * + * @param useDefaultLanguage + * The new useDefaultLanguage value + */ + public void setUseDefaultLanguage(boolean useDefaultLanguage) { + this.useDefaultLanguage = useDefaultLanguage; + } + + /** + * Sets the useDefaultScript attribute of the Preferences object + * + * @param useDefaultScript + * The new useDefaultScript value + */ + public void setUseDefaultScript(boolean useDefaultScript) { + this.useDefaultScript = useDefaultScript; + } + + /** + * Sets the useDefaultDialect attribute of the Preferences object + * + * @param useDefaultDialect + * The new useDefaultDialect value + */ + public void setUseDefaultDialect(boolean useDefaultDialect) { + this.useDefaultDialect = useDefaultDialect; + } + + /** + * Sets the projectSubject attribute of the Preferences object + * + * @param projectSubject + * The new projectSubject value + */ + public void setProjectSubject(Integer projectSubject) { + this.projectSubject = projectSubject; + } + + /** + * Sets the source attribute of the Preferences object + * + * @param source + * The new source value + */ + public void setSource(Integer source) { + this.source = source; + } + + /** + * Sets the language attribute of the Preferences object + * + * @param language + * The new language value + */ + public void setLanguage(Integer language) { + this.language = language; + } + + /** + * Sets the script attribute of the Preferences object + * + * @param script + * The new script value + */ + public void setScript(Integer script) { + this.script = script; + } + + /** + * Sets the dialect attribute of the Preferences object + * + * @param dialect + * The new dialect value + */ + public void setDialect(Integer dialect) { + this.dialect = dialect; + } + + /** + * Sets the projectSubjectSet attribute of the Preferences object + * + * @param projectSubjectSet + * The new projectSubjectSet value + */ + public void setProjectSubjectSet(Integer[] projectSubjectSet) { + this.projectSubjectSet = projectSubjectSet; + } + + /** + * Sets the sourceSet attribute of the Preferences object + * + * @param sourceSet + * The new sourceSet value + */ + public void setSourceSet(Integer[] sourceSet) { + this.sourceSet = sourceSet; + } + + /** + * Sets the languageSet attribute of the Preferences object + * + * @param languageSet + * The new languageSet value + */ + public void setLanguageSet(Integer[] languageSet) { + this.languageSet = languageSet; + } + + /** + * Sets the scriptSet attribute of the Preferences object + * + * @param scriptSet + * The new scriptSet value + */ + public void setScriptSet(Integer[] scriptSet) { + this.scriptSet = scriptSet; + } + + /** + * Sets the dialectSet attribute of the Preferences object + * + * @param dialectSet + * The new dialectSet value + */ + public void setDialectSet(Integer[] dialectSet) { + this.dialectSet = dialectSet; + } + + /** + * Sets the note attribute of the Preferences object + * + * @param note + * The new note value + */ + public void setNote(String note) { + this.note = note; + } + + /** + * Gets the id attribute of the Preferences object + * + * @return The id value + */ + public Integer getId() { + return id; + } + + /** + * Gets the userId attribute of the Preferences object + * + * @return The userId value + */ + public Integer getUserId() { + return userId; + } + + /** + * Gets the preferencesName attribute of the Preferences object + * + * @return The preferencesName value + */ + public String getPreferencesName() { + return preferencesName; + } + + /** + * Gets the useDefaultNote attribute of the Preferences object + * + * @return The useDefaultNote value + */ + public boolean getUseDefaultNote() { + return useDefaultNote; + } + + /** + * Gets the useDefaultProjSub attribute of the Preferences object + * + * @return The useDefaultProjSub value + */ + public boolean getUseDefaultProjSub() { + return useDefaultProjSub; + } + + /** + * Gets the useDefaultSource attribute of the Preferences object + * + * @return The useDefaultSource value + */ + public boolean getUseDefaultSource() { + return useDefaultSource; + } + + /** + * Gets the useDefaultLanguage attribute of the Preferences object + * + * @return The useDefaultLanguage value + */ + public boolean getUseDefaultLanguage() { + return useDefaultLanguage; + } + + /** + * Gets the useDefaultScript attribute of the Preferences object + * + * @return The useDefaultScript value + */ + public boolean getUseDefaultScript() { + return useDefaultScript; + } + + /** + * Gets the useDefaultDialect attribute of the Preferences object + * + * @return The useDefaultDialect value + */ + public boolean getUseDefaultDialect() { + return useDefaultDialect; + } + + /** + * Gets the projectSubject attribute of the Preferences object + * + * @return The projectSubject value + */ + public Integer getProjectSubject() { + return projectSubject; + } + + /** + * Gets the source attribute of the Preferences object + * + * @return The source value + */ + public Integer getSource() { + return source; + } + + /** + * Gets the language attribute of the Preferences object + * + * @return The language value + */ + public Integer getLanguage() { + return language; + } + + /** + * Gets the script attribute of the Preferences object + * + * @return The script value + */ + public Integer getScript() { + return script; + } + + /** + * Gets the dialect attribute of the Preferences object + * + * @return The dialect value + */ + public Integer getDialect() { + return dialect; + } + + /** + * Gets the projectSubjectSet attribute of the Preferences object + * + * @return The projectSubjectSet value + */ + public Integer[] getProjectSubjectSet() { + return projectSubjectSet; + } + + /** + * Gets the sourceSet attribute of the Preferences object + * + * @return The sourceSet value + */ + public Integer[] getSourceSet() { + return sourceSet; + } + + /** + * Gets the languageSet attribute of the Preferences object + * + * @return The languageSet value + */ + public Integer[] getLanguageSet() { + return languageSet; + } + + /** + * Gets the scriptSet attribute of the Preferences object + * + * @return The scriptSet value + */ + public Integer[] getScriptSet() { + return scriptSet; + } + + /** + * Gets the dialectSet attribute of the Preferences object + * + * @return The dialectSet value + */ + public Integer[] getDialectSet() { + return dialectSet; + } + + /** + * Gets the note attribute of the Preferences object + * + * @return The note value + */ + public String getNote() { + return note; + } + + //helpers + + /** + * Description of the Method + * + * @exception LexRepositoryException + * Description of the Exception + * @exception LexComponentException + * Description of the Exception + */ + public void populate() throws LexRepositoryException, LexComponentException { + String sql = "SELECT * FROM Preferences WHERE userId = " + getUserId(); + try { + LexRepository lr = LexRepository.getInstance(); + Connection con = lr.getDataSource().getConnection(); + ResultSet results = con.createStatement().executeQuery(sql); + if (LexUtilities.getResultSetSize(results) > 0) { + results.next(); + setId(new Integer(results.getInt(1))); + setUserId(new Integer(results.getInt(2))); + setPreferencesName(results.getString(3)); + setProjectSubject(new Integer(results.getInt(4))); + setSource(new Integer(results.getInt(5))); + setLanguage(new Integer(results.getInt(6))); + setScript(new Integer(results.getInt(7))); + setDialect(new Integer(results.getInt(8))); + setNote(results.getString(9)); + Boolean bool = Boolean.valueOf(results.getString(10)); + setUseDefaultProjSub(bool.booleanValue()); + bool = Boolean.valueOf(results.getString(11)); + setUseDefaultSource(bool.booleanValue()); + bool = Boolean.valueOf(results.getString(12)); + setUseDefaultLanguage(bool.booleanValue()); + bool = Boolean.valueOf(results.getString(13)); + setUseDefaultScript(bool.booleanValue()); + bool = Boolean.valueOf(results.getString(14)); + setUseDefaultDialect(bool.booleanValue()); + bool = Boolean.valueOf(results.getString(15)); + setUseDefaultNote(bool.booleanValue()); + setProjectSubjectSet(LexUtilities + .convertTokensToIntegerArray(results.getString(16))); + setSourceSet(LexUtilities.convertTokensToIntegerArray(results + .getString(17))); + setLanguageSet(LexUtilities.convertTokensToIntegerArray(results + .getString(18))); + setScriptSet(LexUtilities.convertTokensToIntegerArray(results + .getString(19))); + setDialectSet(LexUtilities.convertTokensToIntegerArray(results + .getString(20))); + } else { + insertNew(); + } + con.close(); + } catch (SQLException sqle) { + throw new LexComponentException(sqle.getMessage()); + } + } + + /** + * Description of the Method + * + * @exception LexComponentException + * Description of the Exception + */ + public void insertNew() throws LexComponentException { + try { + String sql = "INSERT INTO Preferences ( id, userId ) VALUES ( NULL, " + + getUserId() + " )"; + Integer i = new Integer(LexRepository.getInstance().doUpdate(sql)); + setId(i); + } catch (LexRepositoryException lre) { + throw new LexComponentException(lre.getMessage()); + } + } + + /** + * Description of the Method + * + * @exception LexComponentException + * Description of the Exception + */ + public void save() throws LexComponentException { + try { + String sql = "SELECT id FROM Preferences WHERE userId = " + + getUserId(); + LexRepository lr = LexRepository.getInstance(); + Connection con = lr.getDataSource().getConnection(); + ResultSet results = con.createStatement().executeQuery(sql); + + if (LexUtilities.getResultSetSize(results) < 1) { + insertNew(); + } + con.close(); + StringBuffer sqlBuffer = new StringBuffer(); + sqlBuffer.append("UPDATE Preferences SET userId = "); + sqlBuffer.append(getUserId()); + sqlBuffer.append(", preferencesName = '"); + sqlBuffer.append(getPreferencesName()); + sqlBuffer.append("', projectSubject = "); + sqlBuffer.append(getProjectSubject()); + sqlBuffer.append(", source = "); + sqlBuffer.append(getSource()); + sqlBuffer.append(", language = "); + sqlBuffer.append(getLanguage()); + sqlBuffer.append(", script = "); + sqlBuffer.append(getScript()); + sqlBuffer.append(", dialect = "); + sqlBuffer.append(getDialect()); + sqlBuffer.append(", note = '"); + sqlBuffer.append(LexUtilities.escape(getNote())); + sqlBuffer.append("', useDefaultProjSub = '"); + sqlBuffer.append(getUseDefaultProjSub()); + sqlBuffer.append("', useDefaultSource = '"); + sqlBuffer.append(getUseDefaultSource()); + sqlBuffer.append("', useDefaultLanguage = '"); + sqlBuffer.append(getUseDefaultLanguage()); + sqlBuffer.append("', useDefaultScript = '"); + sqlBuffer.append(getUseDefaultScript()); + sqlBuffer.append("', useDefaultDialect = '"); + sqlBuffer.append(getUseDefaultDialect()); + sqlBuffer.append("', useDefaultNote = '"); + sqlBuffer.append(getUseDefaultNote()); + sqlBuffer.append("', projectSubjectSet = '"); + sqlBuffer.append(LexUtilities + .convertIntegerArrayToTokens(getProjectSubjectSet())); + sqlBuffer.append("', sourceSet = '"); + sqlBuffer.append(LexUtilities + .convertIntegerArrayToTokens(getSourceSet())); + sqlBuffer.append("', languageSet = '"); + sqlBuffer.append(LexUtilities + .convertIntegerArrayToTokens(getLanguageSet())); + sqlBuffer.append("', scriptSet = '"); + sqlBuffer.append(LexUtilities + .convertIntegerArrayToTokens(getScriptSet())); + sqlBuffer.append("', dialectSet = '"); + sqlBuffer.append(LexUtilities + .convertIntegerArrayToTokens(getDialectSet())); + sqlBuffer.append("' WHERE id = "); + sqlBuffer.append(getId()); + LexRepository.getInstance().doUpdate(sqlBuffer.toString()); + } catch (LexRepositoryException lre) { + throw new LexComponentException(lre.getMessage()); + } catch (SQLException sqle) { + throw new LexComponentException(sqle.getMessage()); + } + } + + /** + * The main program for the Preferences class + * + * @param args + * The command line arguments + */ + public static void main(String[] args) { + try { + Preferences component = new Preferences(); + component.setUserId(new Integer(2)); + component.save(); + System.out.println(component.getId() + " " + component.getUserId()); + } catch (Exception e) { + e.printStackTrace(); + } + } + + //constructors + /** + * Constructor for the Preferences object + */ + public Preferences() { + setId(new Integer(0)); + setUserId(new Integer(1)); + setProjectSubject(new Integer(1)); + setSource(new Integer(1)); + setLanguage(new Integer(1)); + setScript(new Integer(1)); + setDialect(new Integer(1)); + Integer[] temp = { getProjectSubject() }; + setProjectSubjectSet(temp); + Integer[] temp2 = { getSource() }; + setSourceSet(temp2); + Integer[] temp3 = { getLanguage() }; + setLanguageSet(temp3); + Integer[] temp4 = { getDialect() }; + setDialectSet(temp4); + Integer[] temp5 = { getScript() }; + setScriptSet(temp5); + setNote("Default Note"); + } + + /** + * Constructor for the Preferences object + * + * @param user + * Description of the Parameter + * @exception LexRepositoryException + * Description of the Exception + * @exception LexComponentException + * Description of the Exception + */ + public Preferences(ThdlUser user) throws LexRepositoryException, + LexComponentException { + this(); + setUserId(user.getId()); + populate(); + /* + * setProjectSubject( user.getDefaultProjSub() ); setSource( + * user.getDefaultSource() ); setLanguage( user.getDefaultLanguage() ); + * setScript( user.getDefaultScript() ); setDialect( + * user.getDefaultDialect() ); + */ + } +} + diff --git a/src/java/org/thdl/lex/ThdlUtilities.java b/src/java/org/thdl/lex/ThdlUtilities.java new file mode 100644 index 0000000..a220c40 --- /dev/null +++ b/src/java/org/thdl/lex/ThdlUtilities.java @@ -0,0 +1,145 @@ +package org.thdl.lex; + +import java.util.HashMap; +import java.util.StringTokenizer; + +/** + * Description of the Class + * + * @author travis + * @created October 5, 2003 + */ +public class ThdlUtilities { + /** + * Gets the resultSetSize attribute of the ThdlUtilities class + * + * @param rs + * Description of the Parameter + * @return The resultSetSize value + * @exception java.sql.SQLException + * Description of the Exception + */ + public static int getResultSetSize(java.sql.ResultSet rs) + throws java.sql.SQLException { + rs.last(); + int i = rs.getRow(); + rs.beforeFirst(); + return i; + } + + /* + * public static String formatTimestamp( Timestamp time ) { / + * SimpleDateFormat formatter = new SimpleDateFormat("yyyy.MM.dd 'at' + * hh:mm:ss a zzz"); / Date coDate = new Date( getCreatedOn().getTime() ); / + * String dateString = formatter.format( coDate ); } + */ + /** + * Description of the Method + * + * @param fromString + * Description of the Parameter + * @return Description of the Return Value + */ + public static String escape(String fromString) { + HashMap map = new HashMap(); + map.put("'", "\\'"); + /* + * map.put("%", "\\%"); map.put("_", "\\_"); map.put("\"", "\\\""); + */ + StringBuffer targetString = new StringBuffer(""); + if (null != fromString) { + StringTokenizer tokens = new StringTokenizer(fromString, "'%_\"", + true); + while (tokens.hasMoreTokens()) { + String temp = tokens.nextToken(); + if (map.containsKey(temp)) { + temp = (String) map.get(temp); + } + targetString.append(temp); + } + } + return targetString.toString(); + } + + /** + * Description of the Method + * + * @param source + * Description of the Parameter + * @return Description of the Return Value + */ + public static int[] convertToIntArray(String[] source) { + if (null == source) { + return null; + } + int[] target = new int[source.length]; + for (int i = 0; i < target.length; i++) { + target[i] = Integer.parseInt(source[i]); + } + return target; + } + + /** + * Description of the Method + * + * @param source + * Description of the Parameter + * @return Description of the Return Value + */ + public static int[] convertTokensToIntArray(String source) { + if (null == source) { + return null; + } + StringTokenizer sourceTokens = new StringTokenizer(source, ":"); + int[] target = new int[sourceTokens.countTokens()]; + for (int i = 0; sourceTokens.hasMoreTokens(); i++) { + target[i] = Integer.parseInt(sourceTokens.nextToken()); + } + return target; + } + + /** + * Description of the Method + * + * @param source + * Description of the Parameter + * @return Description of the Return Value + */ + public static String convertIntArrayToTokens(int[] source) { + if (null == source) { + return null; + } + StringBuffer target = new StringBuffer(""); + for (int i = 0; i < source.length; i++) { + target.append(Integer.toString(source[i])); + if (i < (source.length - 1)) { + target.append(":"); + } + } + return target.toString(); + } + + /** + * The main program for the ThdlUtilities class + * + * @param args + * The command line arguments + */ + public static void main(String[] args) { + String s = "It's stupid to use a % or a _ in a SQL Statement"; + System.out.println(ThdlUtilities.escape(s)); + + int[] ia = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + System.out.println(ThdlUtilities.convertIntArrayToTokens(ia)); + + String str = "9:8:7:6:5"; + int[] ia2 = ThdlUtilities.convertTokensToIntArray(str); + String newStr = ""; + for (int i = 0; i < 5; i++) { + newStr = newStr + ia2[i] + " "; + } + System.out.println(newStr); + + } +} + diff --git a/src/java/org/thdl/lex/UserSessionManager.java b/src/java/org/thdl/lex/UserSessionManager.java new file mode 100644 index 0000000..ea47894 --- /dev/null +++ b/src/java/org/thdl/lex/UserSessionManager.java @@ -0,0 +1,127 @@ +package org.thdl.lex; + +import java.io.IOException; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class UserSessionManager { + //attributes + + private static UserSessionManager INSTANCE = new UserSessionManager(); + + /** + * Gets the visit attribute of the UserSessionManager object + * + * @param session + * Description of the Parameter + * @return The visit value + */ + public Visit getVisit(HttpSession session) { + if (null == session.getAttribute(LexConstants.VISIT_SESSION_ATTR)) { + setVisit(session, new Visit(session)); + } + return (Visit) session.getAttribute(LexConstants.VISIT_SESSION_ATTR); + } + + /** + * Sets the visit attribute of the UserSessionManager object + * + * @param session + * The new visit value + * @param visit + * The new visit value + */ + public void setVisit(HttpSession session, Visit visit) { + session.setAttribute(LexConstants.VISIT_SESSION_ATTR, visit); + } + + /** + * Description of the Method + * + * @param session + * Description of the Parameter + */ + public void removeVisit(HttpSession session) { + session.setAttribute(LexConstants.VISIT_SESSION_ATTR, null); + } + + /** + * Sets the sessionLoginTarget attribute of the UserSessionManager object + * + * @param session + * The new sessionLoginTarget value + * @param loginTarget + * The new sessionLoginTarget value + * @since + */ + public void setSessionLoginTarget(HttpSession session, String loginTarget) { + session.setAttribute(LexConstants.LOGINTARGET_SESS_PARAM, loginTarget); + } + + /** + * Gets the instance attribute of the UserSessionManager class + * + * @return The instance value + * @since + */ + public static UserSessionManager getInstance() { + return INSTANCE; + } + + /** + * Gets the sessionLoginTarget attribute of the UserSessionManager object + * + * @param session + * Description of Parameter + * @param clear + * Description of Parameter + * @return The sessionLoginTarget value + * @since + */ + public String getSessionLoginTarget(HttpSession session, boolean clear) { + String target = (String) session + .getAttribute(LexConstants.LOGINTARGET_SESS_PARAM); + if (clear) { + session.removeAttribute(LexConstants.LOGINTARGET_SESS_PARAM); + } + return target; + } + + /** + * Description of the Method + * + * @param request + * Description of Parameter + * @param response + * Description of Parameter + * @param url + * Description of Parameter + * @exception IOException + * Description of Exception + * @since + */ + public static void doRedirect(HttpServletRequest request, + HttpServletResponse response, String url) throws IOException { + String redirect = response.encodeRedirectURL(request.getContextPath() + + url); + response.sendRedirect(redirect); + } + + //constructor + /** + * Constructor for the UserSessionManager object + * + * @since + */ + private UserSessionManager() { + } +} + diff --git a/src/java/org/thdl/lex/Visit.java b/src/java/org/thdl/lex/Visit.java new file mode 100644 index 0000000..0c96488 --- /dev/null +++ b/src/java/org/thdl/lex/Visit.java @@ -0,0 +1,212 @@ +package org.thdl.lex; + +import javax.servlet.http.HttpSession; + +import org.thdl.users.ThdlUser; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class Visit { + //attributes + HttpSession session; + + String token; + + DisplayHelper helper; + + Preferences preferences; + + LexQuery query; + + ThdlUser user; + + 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 + * + * @param session + * The new session value + */ + public void setSession(HttpSession session) { + this.session = session; + } + + /** + * Gets the session attribute of the Visit object + * + * @return The session value + */ + public HttpSession getSession() { + return session; + } + + /** + * Sets the helper attribute of the Visit object + * + * @param helper + * The new helper value + */ + public void setHelper(DisplayHelper helper) { + this.helper = helper; + } + + /** + * Sets the preferences attribute of the Visit object + * + * @param preferences + * The new preferences value + */ + public void setPreferences(Preferences preferences) { + this.preferences = preferences; + } + + /** + * Sets the query attribute of the Visit object + * + * @param query + * The new query value + */ + public void setQuery(LexQuery query) { + this.query = query; + } + + /** + * Sets the user attribute of the Visit object + * + * @param user + * The new user value + */ + public void setUser(ThdlUser user) { + if (user.hasRole("guest")) { + getSession().setMaxInactiveInterval(60 * 5); + } else { + getSession().setMaxInactiveInterval(60 * 60 * 8); + } + this.user = user; + } + + /** + * Sets the displayMode attribute of the Visit object + * + * @param displayMode + * The new displayMode value + */ + public void setDisplayMode(String displayMode) { + this.displayMode = displayMode; + } + + /** + * Gets the helper attribute of the Visit object + * + * @return The helper value + */ + public DisplayHelper getHelper() { + if (null == helper) { + setHelper(new DisplayHelper()); + } + return helper; + } + + /** + * Gets the preferences attribute of the Visit object + * + * @return The preferences value + */ + public Preferences getPreferences() { + if (null == preferences) { + try { + setPreferences(new Preferences(getUser())); + } catch (Exception e) { + setPreferences(new Preferences()); + } + } + return preferences; + } + + /** + * Gets the query attribute of the Visit object + * + * @return The query value + */ + public LexQuery getQuery() { + if (null == query) { + setQuery(new LexQuery()); + } + return query; + } + + /** + * Gets the user attribute of the Visit object + * + * @return The user value + */ + public ThdlUser getUser() { + return user; + } + + /** + * Gets the displayMode attribute of the Visit object + * + * @return The displayMode value + */ + public String getDisplayMode() { + return displayMode; + } + + //constructor + /** + * Constructor for the Visit object + */ + public Visit() { + } + + /** + * Constructor for the Visit object + * + * @param session + * Description of the Parameter + */ + public Visit(HttpSession session) { + this(); + setSession(session); + } + + /** + * Constructor for the Visit object + * + * @param session + * Description of the Parameter + * @param user + * Description of the Parameter + */ + public Visit(HttpSession session, ThdlUser user) { + this(session); + setUser(user); + } + +} + diff --git a/src/java/org/thdl/lex/commands/AbortCommand.java b/src/java/org/thdl/lex/commands/AbortCommand.java new file mode 100644 index 0000000..6fed9d5 --- /dev/null +++ b/src/java/org/thdl/lex/commands/AbortCommand.java @@ -0,0 +1,45 @@ +package org.thdl.lex.commands; + +import javax.servlet.http.HttpServletRequest; + +import org.thdl.lex.component.ILexComponent; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class AbortCommand implements Command { + private String next; + + /** + * Description of the Method + * + * @param req + * Description of Parameter + * @param component + * Description of Parameter + * @return Description of the Returned Value + * @exception CommandException + * Description of Exception + * @since + */ + public String execute(HttpServletRequest req, ILexComponent component) + throws CommandException { + req.setAttribute("termtool.msg", "Operation Aborted"); + return next; + } + + /** + * Constructor for the AbortCommand object + * + * @param next + * Description of Parameter + * @since + */ + public AbortCommand(String next) { + this.next = next; + } +} + diff --git a/src/java/org/thdl/lex/commands/Command.java b/src/java/org/thdl/lex/commands/Command.java new file mode 100644 index 0000000..b49d7d4 --- /dev/null +++ b/src/java/org/thdl/lex/commands/Command.java @@ -0,0 +1,27 @@ +package org.thdl.lex.commands; + +import org.thdl.lex.component.ILexComponent; + +/** + * Description of the Interface + * + * @author travis + * @created October 3, 2003 + */ +public interface Command { + /** + * Description of the Method + * + * @param req + * Description of Parameter + * @param component + * Description of Parameter + * @return Description of the Returned Value + * @exception CommandException + * Description of Exception + * @since + */ + public String execute(javax.servlet.http.HttpServletRequest req, + ILexComponent component) throws CommandException; +} + diff --git a/src/java/org/thdl/lex/commands/CommandException.java b/src/java/org/thdl/lex/commands/CommandException.java new file mode 100644 index 0000000..53dbdb2 --- /dev/null +++ b/src/java/org/thdl/lex/commands/CommandException.java @@ -0,0 +1,54 @@ +package org.thdl.lex.commands; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class CommandException extends Exception { + /** + * Constructor for the CommandException object + * + * @since + */ + public CommandException() { + super(); + } + + /** + * Constructor for the CommandException object + * + * @param msg + * Description of Parameter + * @since + */ + public CommandException(String msg) { + super(msg); + } + + /** + * Constructor for the CommandException object + * + * @param msg + * Description of Parameter + * @param e + * Description of Parameter + * @since + */ + public CommandException(String msg, Exception e) { + super(msg, e); + } + + /** + * Constructor for the CommandException object + * + * @param e + * Description of Parameter + * @since + */ + public CommandException(Exception e) { + super(e); + } +} + diff --git a/src/java/org/thdl/lex/commands/CommandToken.java b/src/java/org/thdl/lex/commands/CommandToken.java new file mode 100644 index 0000000..80a3a16 --- /dev/null +++ b/src/java/org/thdl/lex/commands/CommandToken.java @@ -0,0 +1,79 @@ +package org.thdl.lex.commands; + +import java.security.MessageDigest; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.thdl.lex.UserSessionManager; +import org.thdl.lex.Visit; + +/** + * Description of the Class + * + * @author travis + * @created October 22, 2003 + */ +public class CommandToken { + /** + * Description of the Method + * + * @param req + * Description of the Parameter + */ + public static void set(HttpServletRequest req) { + HttpSession session = req.getSession(true); + Visit visit = UserSessionManager.getInstance().getVisit(session); + long systime = System.currentTimeMillis(); + byte[] time = new Long(systime).toString().getBytes(); + byte[] id = session.getId().getBytes(); + try { + MessageDigest md5 = MessageDigest.getInstance("MD5"); + md5.update(id); + md5.update(time); + String token = toHex(md5.digest()); + req.setAttribute("token", token); + visit.setToken(token); + } catch (Exception e) { + System.err + .println("Unable to calculate MD5 Digests.\nCould not create unique token"); + } + } + + /** + * Gets the valid attribute of the CommandToken class + * + * @param req + * Description of the Parameter + * @return The valid value + */ + public static boolean isValid(HttpServletRequest req) { + 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 { + valid = requestToken.equals(sessionToken); + } + return valid; + } + + /** + * 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 + return buf.toString(); + } +} + diff --git a/src/java/org/thdl/lex/commands/DisplayCommand.java b/src/java/org/thdl/lex/commands/DisplayCommand.java new file mode 100644 index 0000000..d599072 --- /dev/null +++ b/src/java/org/thdl/lex/commands/DisplayCommand.java @@ -0,0 +1,115 @@ +package org.thdl.lex.commands; + +import javax.servlet.http.HttpServletRequest; + +import org.thdl.lex.DisplayHelper; +import org.thdl.lex.LexComponentRepository; +import org.thdl.lex.LexConstants; +import org.thdl.lex.LexLogger; +import org.thdl.lex.LexQuery; +import org.thdl.lex.LexRepositoryException; +import org.thdl.lex.UserSessionManager; +import org.thdl.lex.Visit; +import org.thdl.lex.component.ILexComponent; +import org.thdl.lex.component.ITerm; +import org.thdl.lex.component.LexComponentException; + +/** + * Description of the Class + * + * @author travis + * @created October 3, 2003 + */ +public class DisplayCommand extends LexCommand implements Command { + //helper methods + /** + * Sets the displayMode attribute of the DisplayCommand object + * + * @param req + * The new displayMode value + * @since + */ + public void setDisplayMode(HttpServletRequest req) { + String cmd = req.getParameter(LexConstants.COMMAND_REQ_PARAM); + if (cmd.equals("display")) { + req.getSession(true).setAttribute( + LexConstants.DISPLAYMODE_SESS_ATTR, "brief"); + } else if (cmd.equals("displayFull")) { + req.getSession(true).setAttribute( + LexConstants.DISPLAYMODE_SESS_ATTR, "full"); + } else if (cmd.equals("editEntry")) { + req.getSession(true).setAttribute( + LexConstants.DISPLAYMODE_SESS_ATTR, "edit"); + } + } + + //contract methods + + /** + * Description of the Method + * + * @param req + * Description of Parameter + * @param component + * Description of Parameter + * @return Description of the Returned Value + * @exception CommandException + * Description of Exception + * @since + */ + public String execute(HttpServletRequest req, ILexComponent component) + throws CommandException { + String msg = null; + String next = getNext(); + Visit visit = UserSessionManager.getInstance().getVisit( + req.getSession(true)); + DisplayHelper displayHelper = visit.getHelper(); + try { + LexQuery query = visit.getQuery(); + if (component instanceof ITerm) { + ITerm term = (ITerm) component; + + if (null != query.getEntry() + && term.getMetaId() + .equals(query.getEntry().getMetaId())) { + LexComponentRepository.update(query.getEntry()); + } else { + LexComponentRepository.loadTerm(term); + query.setEntry(term); + if (query.getResults().keySet().size() < 1) { + query.getResults() + .put(term.getMetaId(), term.getTerm()); + } + } + + displayHelper.populate(req.getParameterMap()); + } else { + next = "menu.jsp"; + msg = "The component set for display was not a term."; + LexLogger.error(msg); + } + req.setAttribute(LexConstants.MESSAGE_REQ_ATTR, msg); + + return next; + } catch (LexComponentException e) { + throw new CommandException(e); + } catch (LexRepositoryException e) { + throw new CommandException(e); + } catch (Exception e) { + throw new CommandException(e); + } + } + + //constructors + /** + * Constructor for the DisplayCommand object + * + * @param next + * Description of the Parameter + * @since + */ + public DisplayCommand(String next) { + super(next); + } +} + diff --git a/src/java/org/thdl/lex/commands/FindCommand.java b/src/java/org/thdl/lex/commands/FindCommand.java new file mode 100644 index 0000000..358cad9 --- /dev/null +++ b/src/java/org/thdl/lex/commands/FindCommand.java @@ -0,0 +1,83 @@ +package org.thdl.lex.commands; + +import java.util.Iterator; + +import javax.servlet.http.HttpServletRequest; + +import org.thdl.lex.DisplayHelper; +import org.thdl.lex.LexComponentRepository; +import org.thdl.lex.LexConstants; +import org.thdl.lex.LexQuery; +import org.thdl.lex.LexRepositoryException; +import org.thdl.lex.UserSessionManager; +import org.thdl.lex.Visit; +import org.thdl.lex.component.ILexComponent; +import org.thdl.lex.component.ITerm; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class FindCommand extends LexCommand implements Command { + //helper methods + /** + * Description of the Method + * + * @param req + * Description of Parameter + * @param component + * Description of Parameter + * @return Description of the Returned Value + * @exception CommandException + * Description of Exception + * @since + */ + public String execute(HttpServletRequest req, ILexComponent component) + throws CommandException { + try { + String msg = null; + String next = getNext(); + Visit visit = UserSessionManager.getInstance().getVisit( + req.getSession(true)); + DisplayHelper displayHelper = visit.getHelper(); + LexQuery query = visit.getQuery(); + query.populate(req.getParameterMap()); + + if (component instanceof ITerm) { + ITerm term = (ITerm) component; + + query.setQueryComponent(term); + LexComponentRepository.findTermsByTerm(query); + Iterator iterator = query.getResults().keySet().iterator(); + if (iterator.hasNext()) { + visit.setQuery(query); + msg = "There are " + query.getResults().size() + + " terms matching " + term.getTerm(); + } else { + next = "menu.jsp"; + msg = "There were no terms matching " + term.getTerm(); + } + } + req.setAttribute(LexConstants.MESSAGE_REQ_ATTR, msg); + query.setQueryComponent(null); + return next; + } catch (LexRepositoryException e) { + throw new CommandException(e); + } + } + + //constructors + /** + * Constructor for the FindCommand object + * + * @param next + * Description of the Parameter + * @since + */ + public FindCommand(String next) { + super(next); + } +} + diff --git a/src/java/org/thdl/lex/commands/GetInsertFormCommand.java b/src/java/org/thdl/lex/commands/GetInsertFormCommand.java new file mode 100644 index 0000000..165c743 --- /dev/null +++ b/src/java/org/thdl/lex/commands/GetInsertFormCommand.java @@ -0,0 +1,186 @@ +package org.thdl.lex.commands; + +import java.util.LinkedList; + +import javax.servlet.http.HttpServletRequest; + +import org.thdl.lex.LexComponentRepository; +import org.thdl.lex.LexConstants; +import org.thdl.lex.LexQuery; +import org.thdl.lex.LexRepositoryException; +import org.thdl.lex.LexUser; +import org.thdl.lex.Preferences; +import org.thdl.lex.UserSessionManager; +import org.thdl.lex.Visit; +import org.thdl.lex.component.AnalyticalNote; +import org.thdl.lex.component.ILexComponent; +import org.thdl.lex.component.ITerm; +import org.thdl.lex.component.LexComponent; +import org.thdl.lex.component.LexComponentException; +import org.thdl.lex.component.Meta; +import org.thdl.lex.component.Term; +import org.thdl.lex.component.Translatable; + +/** + * Description of the Class + * + * @author travis + * @created October 6, 2003 + */ +public class GetInsertFormCommand extends LexCommand implements Command { + private boolean termMode; + + /** + * Sets the termMode attribute of the GetInsertFormCommand object + * + * @param termMode + * The new termMode value + */ + public void setTermMode(boolean termMode) { + this.termMode = termMode; + } + + /** + * Gets the termMode attribute of the GetInsertFormCommand object + * + * @return The termMode value + */ + public boolean isTermMode() { + return termMode; + } + + //helper methods + /** + * Description of the Method + * + * @param req + * Description of the Parameter + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception CommandException + * Description of the Exception + */ + public String execute(HttpServletRequest req, ILexComponent component) + throws CommandException { + String next = getNext(); + Visit visit = UserSessionManager.getInstance().getVisit( + req.getSession(true)); + LexQuery query = visit.getQuery(); + ITerm term = query.getEntry(); + String msg = null; + + try { + LexUser user = (LexUser) visit.getUser(); + Preferences prefs = visit.getPreferences(); + + if (isTermMode()) { + Term newTerm = new Term(); + newTerm.populate(component); + query.setQueryComponent(newTerm); + if (termExists(query)) { + msg = newTerm.getTerm() + + " is present in the dictionary, please add to this term."; + next = "displayEntry.jsp"; + visit.setQuery(query); + } + component = newTerm; + } + + Meta meta = new Meta(user, prefs); + meta.populate(req.getParameterMap()); + component.setMeta(meta); + + if (req.getParameter("cmd").equals("getAnnotationForm")) { + AnalyticalNote note = new AnalyticalNote(); + note.setParentId(component.getMetaId()); + //note.setAnalyticalNote( req.getParameter( "analyticalNote" ) + // ); + //note.setPrecedence( new Integer( 0 ) ); + component.setAnalyticalNotes(new LinkedList()); + component.getAnalyticalNotes().add(note); + meta = new Meta(user, prefs); + meta.populate(req.getParameterMap()); + note.setMeta(meta); + req.setAttribute(LexConstants.ORIGINALBEAN_REQ_ATTR, component); + component = note; + } + + req.setAttribute(LexConstants.COMPONENT_REQ_ATTR, component); + + } catch (LexRepositoryException e) { + throw new CommandException(e); + } catch (LexComponentException e) { + throw new CommandException(e); + } + + //if the component is a translation of another component get the + // original as well to assist in editing + if (component instanceof Translatable) { + Translatable translatable = (Translatable) component; + if (null != translatable.getTranslationOf() + && translatable.getTranslationOf().intValue() > 0) { + try { + LexComponent source = (LexComponent) translatable + .getClass().newInstance(); + Integer sourcePk = translatable.getTranslationOf(); + source.setMetaId(sourcePk); + LexComponentRepository.loadByPk(source); + req + .setAttribute(LexConstants.ORIGINALBEAN_REQ_ATTR, + source); + } catch (InstantiationException ie) { + throw new CommandException(ie); + } catch (IllegalAccessException iae) { + throw new CommandException(iae); + } catch (LexRepositoryException lre) { + throw new CommandException(lre); + } + } + } + + msg = "You have reached the Insert Form"; + visit.setDisplayMode("addEditForm"); + + req.setAttribute(LexConstants.MESSAGE_REQ_ATTR, msg); + + return next; + } + + /** + * Description of the Method + * + * @param query + * Description of the Parameter + * @return The newTerm value + * @exception LexRepositoryException + * Description of the Exception + */ + public boolean termExists(LexQuery query) throws LexRepositoryException { + boolean termExists = false; + query.setFindMode(LexComponentRepository.EXACT); + LexComponentRepository.findTermsByTerm(query); + if (query.getResults().keySet().size() > 0) { + termExists = true; + } + query.setFindMode(LexComponentRepository.STARTS_WITH); + return termExists; + } + + //constructors + + /** + * Constructor for the GetInsertFormCommand object + * + * @param next + * Description of the Parameter + * @param termMode + * Description of the Parameter + */ + public GetInsertFormCommand(String next, Boolean termMode) { + super(next); + setTermMode(termMode.booleanValue()); + } + +} + diff --git a/src/java/org/thdl/lex/commands/GetRemoveFormCommand.java b/src/java/org/thdl/lex/commands/GetRemoveFormCommand.java new file mode 100644 index 0000000..cf930ef --- /dev/null +++ b/src/java/org/thdl/lex/commands/GetRemoveFormCommand.java @@ -0,0 +1,148 @@ +package org.thdl.lex.commands; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.thdl.lex.LexComponentRepository; +import org.thdl.lex.LexConstants; +import org.thdl.lex.LexLogger; +import org.thdl.lex.LexQuery; +import org.thdl.lex.LexRepositoryException; +import org.thdl.lex.UserSessionManager; +import org.thdl.lex.Visit; +import org.thdl.lex.component.IAnalyticalNote; +import org.thdl.lex.component.ILexComponent; +import org.thdl.lex.component.ITerm; +import org.thdl.lex.component.LexComponentException; +import org.thdl.lex.component.Translatable; +import org.thdl.users.ThdlUser; + +/** + * Description of the Class + * + * @author travis + * @created October 6, 2003 + */ +public class GetRemoveFormCommand extends LexCommand implements Command { + private boolean termMode; + + /** + * Sets the termMode attribute of the GetFormCommand object + * + * @param termMode + * The new termMode value + */ + public void setTermMode(boolean termMode) { + this.termMode = termMode; + } + + /** + * Gets the termMode attribute of the GetFormCommand object + * + * @return The termMode value + */ + public boolean isTermMode() { + return termMode; + } + + //helper methods + /** + * Description of the Method + * + * @param req + * Description of the Parameter + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception CommandException + * Description of the Exception + */ + public String execute(HttpServletRequest req, ILexComponent component) + throws CommandException { + String next = getNext(); + Visit visit = UserSessionManager.getInstance().getVisit( + req.getSession(true)); + LexQuery query = visit.getQuery(); + ITerm term = query.getEntry(); + String msg = null; + ThdlUser user = visit.getUser(); + if (validate(user, component)) { + + try { + + LexLogger + .debug("Checking component state from GetRemoveFormCommand BEFORE component assignment"); + LexLogger.debugComponent(component); + if (isTermMode()) { + component = query.getEntry(); + } else if (component instanceof IAnalyticalNote) { + ILexComponent parent = term.findParent(component + .getParentId()); + List notes = parent.getAnalyticalNotes(); + int index = notes.indexOf(component); + component = (ILexComponent) notes.get(index); + } else if (component instanceof Translatable + && null != ((Translatable) component) + .getTranslationOf()) { + LexComponentRepository.update(term); + Translatable translation = (Translatable) component; + Translatable source = null; + try { + source = (Translatable) translation.getClass() + .newInstance(); + } catch (Exception e) { + throw new CommandException(e); + } + source.setMetaId(translation.getTranslationOf()); + source.setParentId(translation.getParentId()); + source = (Translatable) term.findChild(source); + List translationList = source.getTranslations(); + component = (ILexComponent) translationList + .get(translationList.indexOf(translation)); + req + .setAttribute(LexConstants.ORIGINALBEAN_REQ_ATTR, + source); + } else { + LexComponentRepository.update(term); + component = term.findChild(component.getMetaId()); + } + req.setAttribute(LexConstants.COMPONENT_REQ_ATTR, component); + LexLogger + .debug("Checking component state from GetRemoveFormCommand AFTER component assignment"); + LexLogger.debugComponent(component); + } catch (LexRepositoryException e) { + throw new CommandException(e); + } catch (LexComponentException e) { + throw new CommandException(e); + } + + msg = "You have reached the Remove Form"; + visit.setDisplayMode("addEditForm"); + } else { + msg = "A dictionary component can only be removed by the person who created it or an administrator."; + next = "displayEntry.jsp"; + } + + req.setAttribute(LexConstants.MESSAGE_REQ_ATTR, msg); + + return next; + } + + //constructors + + /** + * Constructor for the GetFormCommand object + * + * @param next + * Description of the Parameter + * @param termMode + * Description of the Parameter + */ + public GetRemoveFormCommand(String next, Boolean termMode) { + super(next); + setTermMode(termMode.booleanValue()); + } + +} + diff --git a/src/java/org/thdl/lex/commands/GetUpdateFormCommand.java b/src/java/org/thdl/lex/commands/GetUpdateFormCommand.java new file mode 100644 index 0000000..4e0aab0 --- /dev/null +++ b/src/java/org/thdl/lex/commands/GetUpdateFormCommand.java @@ -0,0 +1,151 @@ +package org.thdl.lex.commands; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.thdl.lex.LexComponentRepository; +import org.thdl.lex.LexConstants; +import org.thdl.lex.LexLogger; +import org.thdl.lex.LexQuery; +import org.thdl.lex.LexRepositoryException; +import org.thdl.lex.UserSessionManager; +import org.thdl.lex.Visit; +import org.thdl.lex.component.IAnalyticalNote; +import org.thdl.lex.component.ILexComponent; +import org.thdl.lex.component.ITerm; +import org.thdl.lex.component.LexComponentException; +import org.thdl.lex.component.Translatable; +import org.thdl.users.ThdlUser; + +/** + * Description of the Class + * + * @author travis + * @created October 6, 2003 + */ +public class GetUpdateFormCommand extends LexCommand implements Command { + private boolean termMode; + + /** + * Sets the termMode attribute of the GetFormCommand object + * + * @param termMode + * The new termMode value + */ + public void setTermMode(boolean termMode) { + this.termMode = termMode; + } + + /** + * Gets the termMode attribute of the GetFormCommand object + * + * @return The termMode value + */ + public boolean isTermMode() { + return termMode; + } + + //helper methods + /** + * Description of the Method + * + * @param req + * Description of the Parameter + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception CommandException + * Description of the Exception + */ + public String execute(HttpServletRequest req, ILexComponent component) + throws CommandException { + String next = getNext(); + Visit visit = UserSessionManager.getInstance().getVisit( + req.getSession(true)); + LexQuery query = visit.getQuery(); + ITerm term = query.getEntry(); + String msg = null; + ThdlUser user = visit.getUser(); + if (validate(user, component)) { + + try { + + if (isTermMode()) { + component = query.getEntry(); + } else if (component instanceof IAnalyticalNote) { + ILexComponent parent = term.findParent(component + .getParentId()); + List notes = parent.getAnalyticalNotes(); + int index = notes.indexOf(component); + component = (ILexComponent) notes.get(index); + LexLogger + .debug("Checking component state from getUpdateFormCommand AFTER assignment to analytical Note"); + LexLogger.debugComponent(component); + } else if (component instanceof Translatable + && null != ((Translatable) component) + .getTranslationOf()) { + LexComponentRepository.update(term); + Translatable translation = (Translatable) component; + Translatable source = null; + try { + source = (Translatable) translation.getClass() + .newInstance(); + } catch (Exception e) { + throw new CommandException(e); + } + source.setMetaId(translation.getTranslationOf()); + source.setParentId(translation.getParentId()); + source = (Translatable) term.findChild(source); + List translationList = source.getTranslations(); + component = (ILexComponent) translationList + .get(translationList.indexOf(translation)); + req + .setAttribute(LexConstants.ORIGINALBEAN_REQ_ATTR, + source); + } else { + LexComponentRepository.update(term); + component = term.findChild(component.getMetaId()); + } + req.setAttribute(LexConstants.COMPONENT_REQ_ATTR, component); + LexLogger + .debug("Checking component state from getUpdateFormCommand AFTER component assignment"); + LexLogger.debugComponent(component); + } catch (LexRepositoryException e) { + throw new CommandException(e); + } catch (LexComponentException e) { + throw new CommandException(e); + } + + //if the component is a translation of another component get the + // original as well to assist in editing + + msg = "You have reached the Update Form"; + visit.setDisplayMode("addEditForm"); + } else { + msg = "A dictionary component can only be edited by the person who created it or an administrator."; + next = "displayEntry.jsp"; + } + + req.setAttribute(LexConstants.MESSAGE_REQ_ATTR, msg); + + return next; + } + + //constructors + + /** + * Constructor for the GetFormCommand object + * + * @param next + * Description of the Parameter + * @param termMode + * Description of the Parameter + */ + public GetUpdateFormCommand(String next, Boolean termMode) { + super(next); + setTermMode(termMode.booleanValue()); + } + +} + diff --git a/src/java/org/thdl/lex/commands/InsertCommand.java b/src/java/org/thdl/lex/commands/InsertCommand.java new file mode 100644 index 0000000..3e74c38 --- /dev/null +++ b/src/java/org/thdl/lex/commands/InsertCommand.java @@ -0,0 +1,205 @@ +package org.thdl.lex.commands; + +import java.util.Date; +import java.util.LinkedList; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.thdl.lex.DisplayHelper; +import org.thdl.lex.LexComponentRepository; +import org.thdl.lex.LexConstants; +import org.thdl.lex.LexLogger; +import org.thdl.lex.LexQuery; +import org.thdl.lex.LexRepositoryException; +import org.thdl.lex.LexUser; +import org.thdl.lex.Preferences; +import org.thdl.lex.UserSessionManager; +import org.thdl.lex.Visit; +import org.thdl.lex.component.AnalyticalNote; +import org.thdl.lex.component.ILexComponent; +import org.thdl.lex.component.ITerm; +import org.thdl.lex.component.LexComponentException; +import org.thdl.lex.component.Meta; +import org.thdl.lex.component.Translatable; + +/** + * Description of the Class + * + * @author travis + * @created October 6, 2003 + */ +public class InsertCommand extends LexCommand implements Command { + + private boolean termMode; + + /** + * Sets the termMode attribute of the GetFormCommand object + * + * @param termMode + * The new termMode value + */ + public void setTermMode(boolean termMode) { + this.termMode = termMode; + } + + /** + * Gets the termMode attribute of the GetFormCommand object + * + * @return The termMode value + */ + public boolean isTermMode() { + return termMode; + } + + //helper methods + /** + * Description of the Method + * + * @param req + * Description of the Parameter + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception CommandException + * Description of the Exception + */ + public String execute(HttpServletRequest req, ILexComponent component) + throws CommandException { + String msg = null; + String next = getNext(); + Visit visit = UserSessionManager.getInstance().getVisit( + req.getSession(true)); + DisplayHelper displayHelper = visit.getHelper(); + try { + HttpSession ses = req.getSession(false); + if (null == ses) { + throw new CommandException( + "Could not update component, user's session has expired"); + } + + LexQuery query = visit.getQuery(); + ITerm term = query.getEntry(); + LexUser user = (LexUser) visit.getUser(); + Preferences prefs = visit.getPreferences(); + + if (CommandToken.isValid(req) && validate(user, component)) { + if (!isTermMode()) { + LexComponentRepository.update(term); + } + + if (isTermMode()) { + query.setEntry((ITerm) component); + term = query.getEntry(); + } else if (component instanceof AnalyticalNote) { + LexLogger + .debug("Debugging Component before inserting analytical note"); + LexLogger.debugComponent(component); + ILexComponent parent = term.findParent(component + .getParentId()); + List list = parent.getAnalyticalNotes(); + if (null == list) { + list = new LinkedList(); + } + list.add(component); + parent.setAnalyticalNotes(list); + //term.addSiblingList( parent, component, list ); + } else if (component instanceof Translatable + && null != ((Translatable) component) + .getTranslationOf()) { + Translatable translation = (Translatable) component; + Translatable source = null; + try { + source = (Translatable) translation.getClass() + .newInstance(); + } catch (Exception e) { + throw new CommandException(e); + } + source.setMetaId(translation.getTranslationOf()); + source.setParentId(translation.getParentId()); + source = (Translatable) term.findChild(source); + List list = source.getTranslations(); + if (null == list) { + list = new LinkedList(); + } + list.add(translation); + source.setTranslations(list); + } else { + term.addChild(component); + } + + Meta meta = new Meta(user, prefs); + meta.populate(req.getParameterMap()); + component.setMeta(meta); + + Date now = new Date(System.currentTimeMillis()); + component.getMeta().setCreatedOn(now); + component.getMeta().setModifiedOn(now); + component.getMeta().setCreatedBy(user.getId()); + component.getMeta().setModifiedBy(user.getId()); + + LexComponentRepository.save(term); + + if (!isTermMode()) { + term.getMeta().setModifiedOn(now); + term.getMeta().setModifiedBy(user.getId()); + } + + if (!(component instanceof AnalyticalNote) + && null != req.getParameter("analyticalNote") + && req.getParameter("analyticalNote").length() > 0) { + AnalyticalNote note = new AnalyticalNote(); + note.setAnalyticalNote(req.getParameter("analyticalNote")); + note.setParentId(component.getMetaId()); + //note.setPrecedence( new Integer( 0 ) ); + component.setAnalyticalNotes(new LinkedList()); + component.getAnalyticalNotes().add(note); + meta = new Meta(user, prefs); + meta.populate(req.getParameterMap()); + note.setMeta(meta); + LexLogger.debug("Adding analytical note to " + + component.getLabel()); + } + + LexLogger.debugComponent(component); + LexLogger.debugComponent(term); + + LexComponentRepository.update(term); + msg = "Successful Update"; + visit.setDisplayMode("edit"); + + } else { + msg = CommandToken.isValid(req) ? "Unauthorized update attempted" + : "Invalid reload attempted."; + } + return next; + } catch (LexComponentException e) { + throw new CommandException(e); + } catch (LexRepositoryException e) { + throw new CommandException("Command had trouble processing " + + component, e); + } finally { + req.setAttribute(LexConstants.MESSAGE_REQ_ATTR, msg); + LexLogger + .debug("Showing Term Map at end of InsertCommand.execute()"); + LexLogger.debugTerm(((Visit) req.getSession(false).getAttribute( + "visit")).getQuery().getEntry()); + } + } + + //constructors + /** + * Constructor for the GetFormCommand object + * + * @param next + * Description of the Parameter + * @param termMode + * Description of the Parameter + */ + public InsertCommand(String next, Boolean termMode) { + super(next); + setTermMode(termMode.booleanValue()); + } +} + diff --git a/src/java/org/thdl/lex/commands/LexCommand.java b/src/java/org/thdl/lex/commands/LexCommand.java new file mode 100644 index 0000000..df00880 --- /dev/null +++ b/src/java/org/thdl/lex/commands/LexCommand.java @@ -0,0 +1,111 @@ +package org.thdl.lex.commands; + +import org.thdl.lex.UserSessionManager; +import org.thdl.lex.component.ILexComponent; +import org.thdl.users.ThdlUser; + +/** + * Description of the Class + * + * @author travis + * @created October 3, 2003 + */ +public abstract class LexCommand implements Command { + //attributes + private String next; + + private UserSessionManager sessionManager; + + //accessors + /** + * Sets the sessionManager attribute of the LexCommand object + * + * @param sessionManager + * The new sessionManager value + * @since + */ + public void setSessionManager(UserSessionManager sessionManager) { + this.sessionManager = sessionManager; + } + + /** + * Sets the next attribute of the LexCommand object + * + * @param next + * The new next value + * @since + */ + public void setNext(String next) { + this.next = next; + } + + /** + * Gets the sessionManager attribute of the LexCommand object + * + * @return The sessionManager value + * @since + */ + public UserSessionManager getSessionManager() { + if (null == sessionManager) { + setSessionManager(UserSessionManager.getInstance()); + } + return sessionManager; + } + + /** + * Gets the next attribute of the LexCommand object + * + * @return The next value + * @since + */ + public String getNext() { + return next; + } + + /** + * Gets the component attribute of the LexCommand object + * + * @param user + * Description of the Parameter + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @since + */ + /* + * public ILexComponent getComponent() { return component; } + */ + //helpers + public boolean validate(ThdlUser user, ILexComponent component) { + boolean valid = false; + Integer creator = component.getMeta().getCreatedBy(); + + if (user.getId().equals(creator) || user.hasRole("admin") + || user.hasRole("dev")) { + valid = true; + } + return valid; + } + + //constructors + + /** + * Constructor for the LexCommand object + * + * @param next + * Description of Parameter + * @since + */ + public LexCommand(String next) { + setNext(next); + } + + /** + * Constructor for the LexCommand object + * + * @since + */ + public LexCommand() { + } +} + diff --git a/src/java/org/thdl/lex/commands/LexCommandException.java b/src/java/org/thdl/lex/commands/LexCommandException.java new file mode 100644 index 0000000..42e7b2d --- /dev/null +++ b/src/java/org/thdl/lex/commands/LexCommandException.java @@ -0,0 +1,54 @@ +package org.thdl.lex.commands; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class LexCommandException extends Exception { + /** + * Constructor for the LexCommandException object + * + * @since + */ + public LexCommandException() { + super(); + } + + /** + * Constructor for the LexCommandException object + * + * @param msg + * Description of Parameter + * @since + */ + public LexCommandException(String msg) { + super(msg); + } + + /** + * Constructor for the LexCommandException object + * + * @param e + * Description of Parameter + * @since + */ + public LexCommandException(Exception e) { + super(e); + } + + /** + * Constructor for the LexCommandException object + * + * @param msg + * Description of Parameter + * @param e + * Description of Parameter + * @since + */ + public LexCommandException(String msg, Exception e) { + super(msg, e); + } +} + diff --git a/src/java/org/thdl/lex/commands/NullCommand.java b/src/java/org/thdl/lex/commands/NullCommand.java new file mode 100644 index 0000000..6c0d12f --- /dev/null +++ b/src/java/org/thdl/lex/commands/NullCommand.java @@ -0,0 +1,48 @@ +package org.thdl.lex.commands; + +import javax.servlet.http.HttpServletRequest; + +import org.thdl.lex.component.ILexComponent; + +/** + * Description of the Class + * + * @author travis + * @created October 21, 2003 + */ +public class NullCommand extends LexCommand implements Command { + /** + * Description of the Method + * + * @param req + * Description of the Parameter + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception CommandException + * Description of the Exception + */ + public String execute(HttpServletRequest req, ILexComponent component) + throws CommandException { + /* + * Visit visit = UserSessionManager.getInstance().getVisit( + * req.getSession( true ) ); if( null == req.getParameter( + * LexConstants.COMMAND_REQ_PARAM ) ) req.setAttribute( + * LexConstants.MESSAGE_REQ_ATTR, "Start from here." ); if( "login" == + * req.getParameter( LexConstants.COMMAND_REQ_PARAM ) && null != + * visit.getUser()) setNext("menu.jsp"); + */ + return getNext(); + } + + /** + * Constructor for the NullCommand object + * + * @param next + * Description of the Parameter + */ + public NullCommand(String next) { + super(next); + } +} + diff --git a/src/java/org/thdl/lex/commands/PreferencesCommand.java b/src/java/org/thdl/lex/commands/PreferencesCommand.java new file mode 100644 index 0000000..f74a789 --- /dev/null +++ b/src/java/org/thdl/lex/commands/PreferencesCommand.java @@ -0,0 +1,116 @@ +package org.thdl.lex.commands; + +import javax.servlet.http.HttpServletRequest; + +import org.thdl.lex.LexConstants; +import org.thdl.lex.LexUtilities; +import org.thdl.lex.Preferences; +import org.thdl.lex.UserSessionManager; +import org.thdl.lex.Visit; +import org.thdl.lex.component.ILexComponent; +import org.thdl.lex.component.LexComponentException; + +/** + * Description of the Class + * + * @author travis + * @created October 6, 2003 + */ +public class PreferencesCommand extends LexCommand implements Command { + /** + * Description of the Method + * + * @param req + * Description of the Parameter + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception CommandException + * Description of the Exception + */ + public String execute(HttpServletRequest req, ILexComponent component) + throws CommandException { + try { + Visit visit = UserSessionManager.getInstance().getVisit( + req.getSession(true)); + + Preferences isb = visit.getPreferences(); + if (req.getParameter(LexConstants.COMMAND_REQ_PARAM).equals( + "setMetaPrefs")) { + isb.setLanguageSet(LexUtilities.convertToIntegerArray(req + .getParameterValues("languages"))); + isb.setDialectSet(LexUtilities.convertToIntegerArray(req + .getParameterValues("dialects"))); + isb.setSourceSet(LexUtilities.convertToIntegerArray(req + .getParameterValues("sources"))); + isb.setProjectSubjectSet(LexUtilities.convertToIntegerArray(req + .getParameterValues("projectSubjects"))); + isb.setScriptSet(LexUtilities.convertToIntegerArray(req + .getParameterValues("scripts"))); + } else if (req.getParameter(LexConstants.COMMAND_REQ_PARAM).equals( + "setMetaDefaults")) { + isb.setLanguage(new Integer(req.getParameter("language"))); + isb.setDialect(new Integer(req.getParameter("dialect"))); + isb.setSource(new Integer(req.getParameter("source"))); + isb.setProjectSubject(new Integer(req + .getParameter("projectSubject"))); + isb.setScript(new Integer(req.getParameter("script"))); + isb.setNote(req.getParameter("note")); + if (null != req.getParameter("useDefaultLanguage") + && req.getParameter("useDefaultLanguage") + .equals("true")) { + isb.setUseDefaultLanguage(true); + } else { + isb.setUseDefaultLanguage(false); + } + if (null != req.getParameter("useDefaultDialect") + && req.getParameter("useDefaultDialect").equals("true")) { + isb.setUseDefaultDialect(true); + } else { + isb.setUseDefaultDialect(false); + } + if (null != req.getParameter("useDefaultSource") + && req.getParameter("useDefaultSource").equals("true")) { + isb.setUseDefaultSource(true); + } else { + isb.setUseDefaultSource(false); + } + if (null != req.getParameter("useDefaultProjSub") + && req.getParameter("useDefaultProjSub").equals("true")) { + isb.setUseDefaultProjSub(true); + } else { + isb.setUseDefaultProjSub(false); + } + if (null != req.getParameter("useDefaultScript") + && req.getParameter("useDefaultScript").equals("true")) { + isb.setUseDefaultScript(true); + } else { + isb.setUseDefaultScript(false); + } + if (null != req.getParameter("useDefaultNote") + && req.getParameter("useDefaultNote").equals("true")) { + isb.setUseDefaultNote(true); + } else { + isb.setUseDefaultNote(false); + } + } + isb.save(); + } catch (LexComponentException lre) { + throw new CommandException("LexComponentException says: " + + lre.getMessage()); + } + + return getNext(); + } + + /** + * Constructor for the PreferencesCommand object + * + * @param next + * Description of the Parameter + */ + public PreferencesCommand(String next) { + super(next); + } +} + diff --git a/src/java/org/thdl/lex/commands/RefreshSourcesCommand.java b/src/java/org/thdl/lex/commands/RefreshSourcesCommand.java new file mode 100644 index 0000000..fd3f58f --- /dev/null +++ b/src/java/org/thdl/lex/commands/RefreshSourcesCommand.java @@ -0,0 +1,52 @@ +package org.thdl.lex.commands; + +import javax.servlet.http.HttpServletRequest; + +import org.thdl.lex.*; +import org.thdl.lex.component.*; + + +/** + * Description of the Class + * + * @author travis + * @created October 6, 2003 + */ +public class RefreshSourcesCommand extends LexCommand implements Command +{ + /** + * Description of the Method + * + * @param req Description of the Parameter + * @param component Description of the Parameter + * @return Description of the Return Value + * @exception CommandException Description of the Exception + */ + public String execute( HttpServletRequest req, ILexComponent component ) throws CommandException + { + try + { + LexSourceRepository lcr = LexSourceRepository.getInstance(); + req.setAttribute( "testArray", lcr.xmlTesting() ); + + } + catch ( Exception lre ) + { + throw new CommandException( lre ); + } + return getNext(); + } + + + + /** + *Constructor for the PreferencesCommand object + * + * @param next Description of the Parameter + */ + public RefreshSourcesCommand( String next ) + { + super( next ); + } +} + diff --git a/src/java/org/thdl/lex/commands/RemoveCommand.java b/src/java/org/thdl/lex/commands/RemoveCommand.java new file mode 100644 index 0000000..2ca5b41 --- /dev/null +++ b/src/java/org/thdl/lex/commands/RemoveCommand.java @@ -0,0 +1,165 @@ +package org.thdl.lex.commands; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.thdl.lex.LexComponentRepository; +import org.thdl.lex.LexConstants; +import org.thdl.lex.LexLogger; +import org.thdl.lex.LexQuery; +import org.thdl.lex.LexRepositoryException; +import org.thdl.lex.UserSessionManager; +import org.thdl.lex.Visit; +import org.thdl.lex.component.AnalyticalNote; +import org.thdl.lex.component.ILexComponent; +import org.thdl.lex.component.ITerm; +import org.thdl.lex.component.LexComponentException; +import org.thdl.lex.component.Translatable; +import org.thdl.users.ThdlUser; + +/** + * Description of the Class + * + * @author travis + * @created October 6, 2003 + */ +public class RemoveCommand extends LexCommand implements Command { + + private boolean termMode; + + /** + * Sets the termMode attribute of the GetFormCommand object + * + * @param termMode + * The new termMode value + */ + public void setTermMode(boolean termMode) { + this.termMode = termMode; + } + + /** + * Gets the termMode attribute of the GetFormCommand object + * + * @return The termMode value + */ + public boolean isTermMode() { + return termMode; + } + + //helper methods + /** + * Description of the Method + * + * @param req + * Description of the Parameter + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception CommandException + * Description of the Exception + */ + public String execute(HttpServletRequest req, ILexComponent component) + throws CommandException { + String msg = null; + String next = getNext(); + Visit visit = UserSessionManager.getInstance().getVisit( + req.getSession(true)); + + try { + HttpSession ses = req.getSession(false); + if (null == ses) { + throw new CommandException( + "Could not remove component, user's session has expired"); + } + + ThdlUser user = visit.getUser(); + LexQuery query = visit.getQuery(); + ITerm term = query.getEntry(); + LexComponentRepository.update(term); + + if (CommandToken.isValid(req) && validate(user, component)) { + if (isTermMode()) { + term.setDeleted(Boolean.TRUE); + LexComponentRepository.update(term); + query.setEntry(null); + } else if (component instanceof AnalyticalNote) { + LexLogger + .debug("Debugging Component before inserting analytical note"); + LexLogger.debugComponent(component); + ILexComponent parent = term.findParent(component + .getParentId()); + List notes = parent.getAnalyticalNotes(); + notes.remove(component); + } else if (component instanceof Translatable + && null != ((Translatable) component) + .getTranslationOf()) { + Translatable translation = (Translatable) component; + LexLogger + .debug("Checking translation state before looking for its source"); + LexLogger.debugComponent(translation); + + Translatable source = null; + try { + source = (Translatable) translation.getClass() + .newInstance(); + } catch (Exception e) { + throw new CommandException(e); + } + source.setMetaId(translation.getTranslationOf()); + source.setParentId(translation.getParentId()); + source = (Translatable) term.findChild(source); + LexLogger + .debug("Checking source state before looking for its translation list"); + LexLogger.debugComponent(source); + + List translationList = source.getTranslations(); + ILexComponent doomedComponent = (ILexComponent) translationList + .get(translationList.indexOf(translation)); + doomedComponent.setDeleted(Boolean.TRUE); + LexComponentRepository.update(doomedComponent); + translationList.remove(doomedComponent); + LexComponentRepository.update(term); + } else { + LexLogger + .debug("Checking component state from updateCommand BEFORE component assignment"); + LexLogger.debugComponent(component); + ILexComponent doomedComponent = term.findChild(component); + doomedComponent.setDeleted(Boolean.TRUE); + LexComponentRepository.update(doomedComponent); + term.removeChild(doomedComponent); + LexComponentRepository.update(term); + } + msg = "Successfully removed component"; + } else { + msg = CommandToken.isValid(req) ? "Unauthorized update attempted" + : "Invalid reload attempted."; + } + return next; + } catch (LexComponentException e) { + throw new CommandException("Command had trouble processing " + + component, e); + } catch (LexRepositoryException e) { + throw new CommandException("Command had trouble processing " + + component, e); + } finally { + req.setAttribute(LexConstants.MESSAGE_REQ_ATTR, msg); + } + } + + //constructors + /** + * Constructor for the GetFormCommand object + * + * @param next + * Description of the Parameter + * @param termMode + * Description of the Parameter + */ + public RemoveCommand(String next, Boolean termMode) { + super(next); + setTermMode(termMode.booleanValue()); + } +} + diff --git a/src/java/org/thdl/lex/commands/UpdateCommand.java b/src/java/org/thdl/lex/commands/UpdateCommand.java new file mode 100644 index 0000000..7b340b8 --- /dev/null +++ b/src/java/org/thdl/lex/commands/UpdateCommand.java @@ -0,0 +1,175 @@ +package org.thdl.lex.commands; + +import java.util.Date; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.thdl.lex.DisplayHelper; +import org.thdl.lex.LexComponentRepository; +import org.thdl.lex.LexConstants; +import org.thdl.lex.LexLogger; +import org.thdl.lex.LexQuery; +import org.thdl.lex.LexRepositoryException; +import org.thdl.lex.UserSessionManager; +import org.thdl.lex.Visit; +import org.thdl.lex.component.AnalyticalNote; +import org.thdl.lex.component.ILexComponent; +import org.thdl.lex.component.ITerm; +import org.thdl.lex.component.LexComponentException; +import org.thdl.lex.component.Translatable; +import org.thdl.users.ThdlUser; + +/** + * Description of the Class + * + * @author travis + * @created October 6, 2003 + */ +public class UpdateCommand extends LexCommand implements Command { + + private boolean termMode; + + /** + * Sets the termMode attribute of the GetFormCommand object + * + * @param termMode + * The new termMode value + */ + public void setTermMode(boolean termMode) { + this.termMode = termMode; + } + + /** + * Gets the termMode attribute of the GetFormCommand object + * + * @return The termMode value + */ + public boolean isTermMode() { + return termMode; + } + + //helper methods + /** + * Description of the Method + * + * @param req + * Description of the Parameter + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception CommandException + * Description of the Exception + */ + public String execute(HttpServletRequest req, ILexComponent component) + throws CommandException { + String msg = null; + String next = getNext(); + Visit visit = UserSessionManager.getInstance().getVisit( + req.getSession(true)); + + DisplayHelper displayHelper = visit.getHelper(); + try { + HttpSession ses = req.getSession(false); + if (null == ses) { + throw new CommandException( + "Could not update component, user's session has expired"); + } + + ThdlUser user = visit.getUser(); + LexQuery query = visit.getQuery(); + ITerm term = query.getEntry(); + + if (CommandToken.isValid(req) && validate(user, component)) { + LexComponentRepository.update(term); + + LexLogger + .debug("Checking component state from updateCommand BEFORE component assignment"); + LexLogger.debugComponent(component); + if (isTermMode()) { + term.populate(req.getParameterMap()); + term.getMeta().populate(req.getParameterMap()); + component = term; + } else if (component instanceof AnalyticalNote) { + LexLogger + .debug("Debugging Component before updating analytical note"); + LexLogger.debugComponent(component); + ILexComponent parent = term.findParent(component + .getParentId()); + List notes = parent.getAnalyticalNotes(); + ILexComponent ilc = (ILexComponent) notes.get(notes + .indexOf(component)); + ilc.populate(component); + } else if (component instanceof Translatable + && null != ((Translatable) component) + .getTranslationOf()) { + Translatable translation = (Translatable) component; + Translatable source = null; + try { + source = (Translatable) translation.getClass() + .newInstance(); + } catch (Exception e) { + throw new CommandException(e); + } + source.setMetaId(translation.getTranslationOf()); + source.setParentId(translation.getParentId()); + source = (Translatable) term.findChild(source); + List translationList = source.getTranslations(); + component = (ILexComponent) translationList + .get(translationList.indexOf(translation)); + component.populate(req.getParameterMap()); + component.getMeta().populate(req.getParameterMap()); + } else { + ILexComponent ilc = term.findChild(component.getMetaId()); + ilc.populate(req.getParameterMap()); + ilc.getMeta().populate(req.getParameterMap()); + component = ilc; + } + LexLogger + .debug("Checking component state from updateCommand AFTER component assignment"); + LexLogger.debugComponent(component); + + Date now = new Date(System.currentTimeMillis()); + component.getMeta().setModifiedOn(now); + component.getMeta().setModifiedBy(user.getId()); + term.getMeta().setModifiedOn(now); + term.getMeta().setModifiedBy(user.getId()); + + LexLogger.debugComponent(component); + LexLogger.debugComponent(term); + + LexComponentRepository.update(term); + msg = "Successful Update"; + visit.setDisplayMode("edit"); + } else { + msg = CommandToken.isValid(req) ? "Unauthorized update attempted" + : "Invalid reload attempted."; + } + return next; + } catch (LexComponentException e) { + throw new CommandException(e); + } catch (LexRepositoryException e) { + throw new CommandException("Command had trouble processing " + + component, e); + } finally { + req.setAttribute(LexConstants.MESSAGE_REQ_ATTR, msg); + } + } + + //constructors + /** + * Constructor for the GetFormCommand object + * + * @param next + * Description of the Parameter + * @param termMode + * Description of the Parameter + */ + public UpdateCommand(String next, Boolean termMode) { + super(next); + setTermMode(termMode.booleanValue()); + } + +} + diff --git a/src/java/org/thdl/lex/component/AnalyticalNote.java b/src/java/org/thdl/lex/component/AnalyticalNote.java new file mode 100644 index 0000000..da5dd8a --- /dev/null +++ b/src/java/org/thdl/lex/component/AnalyticalNote.java @@ -0,0 +1,7 @@ +package org.thdl.lex.component; + +import java.io.Serializable; + +public class AnalyticalNote extends BaseAnalyticalNote implements Serializable { + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseAnalyticalNote.java b/src/java/org/thdl/lex/component/BaseAnalyticalNote.java new file mode 100644 index 0000000..0ee868b --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseAnalyticalNote.java @@ -0,0 +1,70 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseAnalyticalNote extends LexComponent implements + Serializable, org.thdl.lex.component.IAnalyticalNote { + + /** nullable persistent field */ + private Integer parentId; + + /** nullable persistent field */ + private String analyticalNote; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** full constructor */ + public BaseAnalyticalNote(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, + String analyticalNote, org.thdl.lex.component.ILexComponent parent) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.analyticalNote = analyticalNote; + this.parent = parent; + } + + /** default constructor */ + public BaseAnalyticalNote() { + } + + /** minimal constructor */ + public BaseAnalyticalNote(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta) { + super(deleted, analyticalNotes, meta); + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public String getAnalyticalNote() { + return this.analyticalNote; + } + + public void setAnalyticalNote(String analyticalNote) { + this.analyticalNote = analyticalNote; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseDefinition.java b/src/java/org/thdl/lex/component/BaseDefinition.java new file mode 100644 index 0000000..d8635b2 --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseDefinition.java @@ -0,0 +1,208 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseDefinition extends LexComponent implements + org.thdl.lex.component.IDefinition, + org.thdl.lex.component.Translatable, + org.thdl.lex.component.LexComponentNode, Serializable { + + /** nullable persistent field */ + private Integer parentId; + + /** nullable persistent field */ + private String definition; + + /** nullable persistent field */ + private Integer translationOf; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** persistent field */ + private List translations; + + /** persistent field */ + private List subdefinitions; + + /** persistent field */ + private List glosses; + + /** persistent field */ + private List keywords; + + /** persistent field */ + private List modelSentences; + + /** persistent field */ + private List translationEquivalents; + + /** persistent field */ + private List relatedTerms; + + /** persistent field */ + private List passages; + + /** persistent field */ + private List registers; + + /** full constructor */ + public BaseDefinition(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, + String definition, Integer translationOf, + org.thdl.lex.component.ILexComponent parent, List translations, + List subdefinitions, List glosses, List keywords, + List modelSentences, List translationEquivalents, + List relatedTerms, List passages, List registers) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.definition = definition; + this.translationOf = translationOf; + this.parent = parent; + this.translations = translations; + this.subdefinitions = subdefinitions; + this.glosses = glosses; + this.keywords = keywords; + this.modelSentences = modelSentences; + this.translationEquivalents = translationEquivalents; + this.relatedTerms = relatedTerms; + this.passages = passages; + this.registers = registers; + } + + /** default constructor */ + public BaseDefinition() { + } + + /** minimal constructor */ + public BaseDefinition(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, List translations, + List subdefinitions, List glosses, List keywords, + List modelSentences, List translationEquivalents, + List relatedTerms, List passages, List registers) { + super(deleted, analyticalNotes, meta); + this.translations = translations; + this.subdefinitions = subdefinitions; + this.glosses = glosses; + this.keywords = keywords; + this.modelSentences = modelSentences; + this.translationEquivalents = translationEquivalents; + this.relatedTerms = relatedTerms; + this.passages = passages; + this.registers = registers; + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public String getDefinition() { + return this.definition; + } + + public void setDefinition(String definition) { + this.definition = definition; + } + + public Integer getTranslationOf() { + return this.translationOf; + } + + public void setTranslationOf(Integer translationOf) { + this.translationOf = translationOf; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public List getTranslations() { + return this.translations; + } + + public void setTranslations(List translations) { + this.translations = translations; + } + + public List getSubdefinitions() { + return this.subdefinitions; + } + + public void setSubdefinitions(List subdefinitions) { + this.subdefinitions = subdefinitions; + } + + public List getGlosses() { + return this.glosses; + } + + public void setGlosses(List glosses) { + this.glosses = glosses; + } + + public List getKeywords() { + return this.keywords; + } + + public void setKeywords(List keywords) { + this.keywords = keywords; + } + + public List getModelSentences() { + return this.modelSentences; + } + + public void setModelSentences(List modelSentences) { + this.modelSentences = modelSentences; + } + + public List getTranslationEquivalents() { + return this.translationEquivalents; + } + + public void setTranslationEquivalents(List translationEquivalents) { + this.translationEquivalents = translationEquivalents; + } + + public List getRelatedTerms() { + return this.relatedTerms; + } + + public void setRelatedTerms(List relatedTerms) { + this.relatedTerms = relatedTerms; + } + + public List getPassages() { + return this.passages; + } + + public void setPassages(List passages) { + this.passages = passages; + } + + public List getRegisters() { + return this.registers; + } + + public void setRegisters(List registers) { + this.registers = registers; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseEncyclopediaArticle.java b/src/java/org/thdl/lex/component/BaseEncyclopediaArticle.java new file mode 100644 index 0000000..d882538 --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseEncyclopediaArticle.java @@ -0,0 +1,85 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseEncyclopediaArticle extends LexComponent implements + org.thdl.lex.component.IEncyclopediaArticle, Serializable { + + /** nullable persistent field */ + private Integer parentId; + + /** persistent field */ + private String article; + + /** persistent field */ + private String articleTitle; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** full constructor */ + public BaseEncyclopediaArticle(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, String article, + String articleTitle, org.thdl.lex.component.ILexComponent parent) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.article = article; + this.articleTitle = articleTitle; + this.parent = parent; + } + + /** default constructor */ + public BaseEncyclopediaArticle() { + } + + /** minimal constructor */ + public BaseEncyclopediaArticle(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, String article, + String articleTitle) { + super(deleted, analyticalNotes, meta); + this.article = article; + this.articleTitle = articleTitle; + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public String getArticle() { + return this.article; + } + + public void setArticle(String article) { + this.article = article; + } + + public String getArticleTitle() { + return this.articleTitle; + } + + public void setArticleTitle(String articleTitle) { + this.articleTitle = articleTitle; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseEtymology.java b/src/java/org/thdl/lex/component/BaseEtymology.java new file mode 100644 index 0000000..2956083 --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseEtymology.java @@ -0,0 +1,138 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseEtymology extends LexComponent implements + org.thdl.lex.component.Translatable, Serializable, + org.thdl.lex.component.IEtymology { + + /** nullable persistent field */ + private Integer parentId; + + /** nullable persistent field */ + private Integer loanLanguage; + + /** persistent field */ + private Integer etymologyType; + + /** persistent field */ + private String derivation; + + /** persistent field */ + private String etymologyDescription; + + /** nullable persistent field */ + private Integer translationOf; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** persistent field */ + private List translations; + + /** full constructor */ + public BaseEtymology(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, + Integer loanLanguage, Integer etymologyType, String derivation, + String etymologyDescription, Integer translationOf, + org.thdl.lex.component.ILexComponent parent, List translations) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.loanLanguage = loanLanguage; + this.etymologyType = etymologyType; + this.derivation = derivation; + this.etymologyDescription = etymologyDescription; + this.translationOf = translationOf; + this.parent = parent; + this.translations = translations; + } + + /** default constructor */ + public BaseEtymology() { + } + + /** minimal constructor */ + public BaseEtymology(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer etymologyType, + String derivation, String etymologyDescription, List translations) { + super(deleted, analyticalNotes, meta); + this.etymologyType = etymologyType; + this.derivation = derivation; + this.etymologyDescription = etymologyDescription; + this.translations = translations; + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public Integer getLoanLanguage() { + return this.loanLanguage; + } + + public void setLoanLanguage(Integer loanLanguage) { + this.loanLanguage = loanLanguage; + } + + public Integer getEtymologyType() { + return this.etymologyType; + } + + public void setEtymologyType(Integer etymologyType) { + this.etymologyType = etymologyType; + } + + public String getDerivation() { + return this.derivation; + } + + public void setDerivation(String derivation) { + this.derivation = derivation; + } + + public String getEtymologyDescription() { + return this.etymologyDescription; + } + + public void setEtymologyDescription(String etymologyDescription) { + this.etymologyDescription = etymologyDescription; + } + + public Integer getTranslationOf() { + return this.translationOf; + } + + public void setTranslationOf(Integer translationOf) { + this.translationOf = translationOf; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public List getTranslations() { + return this.translations; + } + + public void setTranslations(List translations) { + this.translations = translations; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseGloss.java b/src/java/org/thdl/lex/component/BaseGloss.java new file mode 100644 index 0000000..100a2a7 --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseGloss.java @@ -0,0 +1,82 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseGloss extends LexComponent implements + org.thdl.lex.component.IGloss, Serializable { + + /** nullable persistent field */ + private Integer parentId; + + /** nullable persistent field */ + private String gloss; + + /** nullable persistent field */ + private String translation; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** full constructor */ + public BaseGloss(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, String gloss, + String translation, org.thdl.lex.component.ILexComponent parent) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.gloss = gloss; + this.translation = translation; + this.parent = parent; + } + + /** default constructor */ + public BaseGloss() { + } + + /** minimal constructor */ + public BaseGloss(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta) { + super(deleted, analyticalNotes, meta); + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public String getGloss() { + return this.gloss; + } + + public void setGloss(String gloss) { + this.gloss = gloss; + } + + public String getTranslation() { + return this.translation; + } + + public void setTranslation(String translation) { + this.translation = translation; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseGrammaticalFunction.java b/src/java/org/thdl/lex/component/BaseGrammaticalFunction.java new file mode 100644 index 0000000..22e1f75 --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseGrammaticalFunction.java @@ -0,0 +1,71 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseGrammaticalFunction extends LexComponent implements + org.thdl.lex.component.IFunction, Serializable { + + /** nullable persistent field */ + private Integer parentId; + + /** persistent field */ + private Integer function; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** full constructor */ + public BaseGrammaticalFunction(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, + Integer function, org.thdl.lex.component.ILexComponent parent) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.function = function; + this.parent = parent; + } + + /** default constructor */ + public BaseGrammaticalFunction() { + } + + /** minimal constructor */ + public BaseGrammaticalFunction(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer function) { + super(deleted, analyticalNotes, meta); + this.function = function; + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public Integer getFunction() { + return this.function; + } + + public void setFunction(Integer function) { + this.function = function; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseKeyword.java b/src/java/org/thdl/lex/component/BaseKeyword.java new file mode 100644 index 0000000..e25871d --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseKeyword.java @@ -0,0 +1,70 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseKeyword extends LexComponent implements + org.thdl.lex.component.IKeyword, Serializable { + + /** nullable persistent field */ + private Integer parentId; + + /** nullable persistent field */ + private String keyword; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** full constructor */ + public BaseKeyword(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, String keyword, + org.thdl.lex.component.ILexComponent parent) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.keyword = keyword; + this.parent = parent; + } + + /** default constructor */ + public BaseKeyword() { + } + + /** minimal constructor */ + public BaseKeyword(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta) { + super(deleted, analyticalNotes, meta); + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public String getKeyword() { + return this.keyword; + } + + public void setKeyword(String keyword) { + this.keyword = keyword; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseLexComponent.java b/src/java/org/thdl/lex/component/BaseLexComponent.java new file mode 100644 index 0000000..3fb54b6 --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseLexComponent.java @@ -0,0 +1,87 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseLexComponent implements + org.thdl.lex.component.ILexComponent, Serializable { + + /** identifier field */ + private Integer metaId; + + /** persistent field */ + private Boolean deleted; + + /** persistent field */ + private List analyticalNotes; + + /** persistent field */ + private org.thdl.lex.component.Meta meta; + + /** full constructor */ + public BaseLexComponent(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta) { + this.deleted = deleted; + this.analyticalNotes = analyticalNotes; + this.meta = meta; + } + + /** default constructor */ + public BaseLexComponent() { + } + + public Integer getMetaId() { + return this.metaId; + } + + public void setMetaId(Integer metaId) { + this.metaId = metaId; + } + + public Boolean getDeleted() { + return this.deleted; + } + + public void setDeleted(Boolean deleted) { + this.deleted = deleted; + } + + public List getAnalyticalNotes() { + return this.analyticalNotes; + } + + public void setAnalyticalNotes(List analyticalNotes) { + this.analyticalNotes = analyticalNotes; + } + + public org.thdl.lex.component.Meta getMeta() { + return this.meta; + } + + public void setMeta(org.thdl.lex.component.Meta meta) { + this.meta = meta; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof BaseLexComponent)) + return false; + BaseLexComponent castOther = (BaseLexComponent) other; + return new EqualsBuilder().append(this.getMetaId(), + castOther.getMetaId()).isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getMetaId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseMeta.java b/src/java/org/thdl/lex/component/BaseMeta.java new file mode 100644 index 0000000..0803a47 --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseMeta.java @@ -0,0 +1,172 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.Date; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseMeta implements Serializable { + + /** persistent field */ + private Integer createdBy; + + /** persistent field */ + private Integer modifiedBy; + + /** persistent field */ + private Integer createdByProjSub; + + /** persistent field */ + private Integer modifiedByProjSub; + + /** nullable persistent field */ + private Date createdOn; + + /** nullable persistent field */ + private Date modifiedOn; + + /** persistent field */ + private Integer source; + + /** persistent field */ + private Integer language; + + /** persistent field */ + private Integer script; + + /** persistent field */ + private Integer dialect; + + /** nullable persistent field */ + private String note; + + /** full constructor */ + public BaseMeta(Integer createdBy, Integer modifiedBy, + Integer createdByProjSub, Integer modifiedByProjSub, + Date createdOn, Date modifiedOn, Integer source, Integer language, + Integer script, Integer dialect, String note) { + this.createdBy = createdBy; + this.modifiedBy = modifiedBy; + this.createdByProjSub = createdByProjSub; + this.modifiedByProjSub = modifiedByProjSub; + this.createdOn = createdOn; + this.modifiedOn = modifiedOn; + this.source = source; + this.language = language; + this.script = script; + this.dialect = dialect; + this.note = note; + } + + /** default constructor */ + public BaseMeta() { + } + + /** minimal constructor */ + public BaseMeta(Integer createdBy, Integer modifiedBy, + Integer createdByProjSub, Integer modifiedByProjSub, + Integer source, Integer language, Integer script, Integer dialect) { + this.createdBy = createdBy; + this.modifiedBy = modifiedBy; + this.createdByProjSub = createdByProjSub; + this.modifiedByProjSub = modifiedByProjSub; + this.source = source; + this.language = language; + this.script = script; + this.dialect = dialect; + } + + public Integer getCreatedBy() { + return this.createdBy; + } + + public void setCreatedBy(Integer createdBy) { + this.createdBy = createdBy; + } + + public Integer getModifiedBy() { + return this.modifiedBy; + } + + public void setModifiedBy(Integer modifiedBy) { + this.modifiedBy = modifiedBy; + } + + public Integer getCreatedByProjSub() { + return this.createdByProjSub; + } + + public void setCreatedByProjSub(Integer createdByProjSub) { + this.createdByProjSub = createdByProjSub; + } + + public Integer getModifiedByProjSub() { + return this.modifiedByProjSub; + } + + public void setModifiedByProjSub(Integer modifiedByProjSub) { + this.modifiedByProjSub = modifiedByProjSub; + } + + public Date getCreatedOn() { + return this.createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public Date getModifiedOn() { + return this.modifiedOn; + } + + public void setModifiedOn(Date modifiedOn) { + this.modifiedOn = modifiedOn; + } + + public Integer getSource() { + return this.source; + } + + public void setSource(Integer source) { + this.source = source; + } + + public Integer getLanguage() { + return this.language; + } + + public void setLanguage(Integer language) { + this.language = language; + } + + public Integer getScript() { + return this.script; + } + + public void setScript(Integer script) { + this.script = script; + } + + public Integer getDialect() { + return this.dialect; + } + + public void setDialect(Integer dialect) { + this.dialect = dialect; + } + + public String getNote() { + return this.note; + } + + public void setNote(String note) { + this.note = note; + } + + public String toString() { + return new ToStringBuilder(this).toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseModelSentence.java b/src/java/org/thdl/lex/component/BaseModelSentence.java new file mode 100644 index 0000000..5a16b39 --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseModelSentence.java @@ -0,0 +1,97 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseModelSentence extends LexComponent implements + org.thdl.lex.component.IModelSentence, Serializable, + org.thdl.lex.component.Translatable { + + /** nullable persistent field */ + private Integer parentId; + + /** nullable persistent field */ + private String modelSentence; + + /** nullable persistent field */ + private Integer translationOf; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** persistent field */ + private List translations; + + /** full constructor */ + public BaseModelSentence(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, + String modelSentence, Integer translationOf, + org.thdl.lex.component.ILexComponent parent, List translations) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.modelSentence = modelSentence; + this.translationOf = translationOf; + this.parent = parent; + this.translations = translations; + } + + /** default constructor */ + public BaseModelSentence() { + } + + /** minimal constructor */ + public BaseModelSentence(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, List translations) { + super(deleted, analyticalNotes, meta); + this.translations = translations; + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public String getModelSentence() { + return this.modelSentence; + } + + public void setModelSentence(String modelSentence) { + this.modelSentence = modelSentence; + } + + public Integer getTranslationOf() { + return this.translationOf; + } + + public void setTranslationOf(Integer translationOf) { + this.translationOf = translationOf; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public List getTranslations() { + return this.translations; + } + + public void setTranslations(List translations) { + this.translations = translations; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BasePassage.java b/src/java/org/thdl/lex/component/BasePassage.java new file mode 100644 index 0000000..04afbc8 --- /dev/null +++ b/src/java/org/thdl/lex/component/BasePassage.java @@ -0,0 +1,134 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BasePassage extends LexComponent implements + org.thdl.lex.component.IPassage, org.thdl.lex.component.Translatable, + Serializable { + + /** nullable persistent field */ + private Integer parentId; + + /** nullable persistent field */ + private String literarySource; + + /** nullable persistent field */ + private String spelling; + + /** nullable persistent field */ + private String pagination; + + /** nullable persistent field */ + private String passage; + + /** nullable persistent field */ + private Integer translationOf; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** persistent field */ + private List translations; + + /** full constructor */ + public BasePassage(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, + String literarySource, String spelling, String pagination, + String passage, Integer translationOf, + org.thdl.lex.component.ILexComponent parent, List translations) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.literarySource = literarySource; + this.spelling = spelling; + this.pagination = pagination; + this.passage = passage; + this.translationOf = translationOf; + this.parent = parent; + this.translations = translations; + } + + /** default constructor */ + public BasePassage() { + } + + /** minimal constructor */ + public BasePassage(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, List translations) { + super(deleted, analyticalNotes, meta); + this.translations = translations; + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public String getLiterarySource() { + return this.literarySource; + } + + public void setLiterarySource(String literarySource) { + this.literarySource = literarySource; + } + + public String getSpelling() { + return this.spelling; + } + + public void setSpelling(String spelling) { + this.spelling = spelling; + } + + public String getPagination() { + return this.pagination; + } + + public void setPagination(String pagination) { + this.pagination = pagination; + } + + public String getPassage() { + return this.passage; + } + + public void setPassage(String passage) { + this.passage = passage; + } + + public Integer getTranslationOf() { + return this.translationOf; + } + + public void setTranslationOf(Integer translationOf) { + this.translationOf = translationOf; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public List getTranslations() { + return this.translations; + } + + public void setTranslations(List translations) { + this.translations = translations; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BasePronunciation.java b/src/java/org/thdl/lex/component/BasePronunciation.java new file mode 100644 index 0000000..fb5d71d --- /dev/null +++ b/src/java/org/thdl/lex/component/BasePronunciation.java @@ -0,0 +1,86 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BasePronunciation extends LexComponent implements + org.thdl.lex.component.IPronunciation, Serializable { + + /** nullable persistent field */ + private Integer parentId; + + /** persistent field */ + private String phonetics; + + /** persistent field */ + private Integer phoneticsType; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** full constructor */ + public BasePronunciation(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, + String phonetics, Integer phoneticsType, + org.thdl.lex.component.ILexComponent parent) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.phonetics = phonetics; + this.phoneticsType = phoneticsType; + this.parent = parent; + } + + /** default constructor */ + public BasePronunciation() { + } + + /** minimal constructor */ + public BasePronunciation(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, String phonetics, + Integer phoneticsType) { + super(deleted, analyticalNotes, meta); + this.phonetics = phonetics; + this.phoneticsType = phoneticsType; + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public String getPhonetics() { + return this.phonetics; + } + + public void setPhonetics(String phonetics) { + this.phonetics = phonetics; + } + + public Integer getPhoneticsType() { + return this.phoneticsType; + } + + public void setPhoneticsType(Integer phoneticsType) { + this.phoneticsType = phoneticsType; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseRelatedTerm.java b/src/java/org/thdl/lex/component/BaseRelatedTerm.java new file mode 100644 index 0000000..23eae2e --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseRelatedTerm.java @@ -0,0 +1,84 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseRelatedTerm extends LexComponent implements + Serializable, org.thdl.lex.component.IRelatedTerm { + + /** nullable persistent field */ + private Integer parentId; + + /** nullable persistent field */ + private String relatedTerm; + + /** persistent field */ + private Integer relatedTermType; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** full constructor */ + public BaseRelatedTerm(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, + String relatedTerm, Integer relatedTermType, + org.thdl.lex.component.ILexComponent parent) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.relatedTerm = relatedTerm; + this.relatedTermType = relatedTermType; + this.parent = parent; + } + + /** default constructor */ + public BaseRelatedTerm() { + } + + /** minimal constructor */ + public BaseRelatedTerm(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer relatedTermType) { + super(deleted, analyticalNotes, meta); + this.relatedTermType = relatedTermType; + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public String getRelatedTerm() { + return this.relatedTerm; + } + + public void setRelatedTerm(String relatedTerm) { + this.relatedTerm = relatedTerm; + } + + public Integer getRelatedTermType() { + return this.relatedTermType; + } + + public void setRelatedTermType(Integer relatedTermType) { + this.relatedTermType = relatedTermType; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseSpeechRegister.java b/src/java/org/thdl/lex/component/BaseSpeechRegister.java new file mode 100644 index 0000000..6317e31 --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseSpeechRegister.java @@ -0,0 +1,71 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseSpeechRegister extends LexComponent implements + org.thdl.lex.component.IRegister, Serializable { + + /** nullable persistent field */ + private Integer parentId; + + /** persistent field */ + private Integer register; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** full constructor */ + public BaseSpeechRegister(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, + Integer register, org.thdl.lex.component.ILexComponent parent) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.register = register; + this.parent = parent; + } + + /** default constructor */ + public BaseSpeechRegister() { + } + + /** minimal constructor */ + public BaseSpeechRegister(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer register) { + super(deleted, analyticalNotes, meta); + this.register = register; + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public Integer getRegister() { + return this.register; + } + + public void setRegister(Integer register) { + this.register = register; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseSpelling.java b/src/java/org/thdl/lex/component/BaseSpelling.java new file mode 100644 index 0000000..50dffff --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseSpelling.java @@ -0,0 +1,86 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseSpelling extends LexComponent implements + Serializable, org.thdl.lex.component.ISpelling { + + /** nullable persistent field */ + private Integer parentId; + + /** persistent field */ + private String spelling; + + /** persistent field */ + private Integer spellingType; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** full constructor */ + public BaseSpelling(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, + String spelling, Integer spellingType, + org.thdl.lex.component.ILexComponent parent) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.spelling = spelling; + this.spellingType = spellingType; + this.parent = parent; + } + + /** default constructor */ + public BaseSpelling() { + } + + /** minimal constructor */ + public BaseSpelling(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, String spelling, + Integer spellingType) { + super(deleted, analyticalNotes, meta); + this.spelling = spelling; + this.spellingType = spellingType; + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public String getSpelling() { + return this.spelling; + } + + public void setSpelling(String spelling) { + this.spelling = spelling; + } + + public Integer getSpellingType() { + return this.spellingType; + } + + public void setSpellingType(Integer spellingType) { + this.spellingType = spellingType; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseSubdefinition.java b/src/java/org/thdl/lex/component/BaseSubdefinition.java new file mode 100644 index 0000000..85c038c --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseSubdefinition.java @@ -0,0 +1,194 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseSubdefinition extends LexComponent implements + org.thdl.lex.component.ISubdefinition, + org.thdl.lex.component.Translatable, + org.thdl.lex.component.LexComponentNode, Serializable { + + /** nullable persistent field */ + private Integer parentId; + + /** nullable persistent field */ + private String subdefinition; + + /** nullable persistent field */ + private Integer translationOf; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** persistent field */ + private List translations; + + /** persistent field */ + private List glosses; + + /** persistent field */ + private List keywords; + + /** persistent field */ + private List modelSentences; + + /** persistent field */ + private List translationEquivalents; + + /** persistent field */ + private List relatedTerms; + + /** persistent field */ + private List passages; + + /** persistent field */ + private List registers; + + /** full constructor */ + public BaseSubdefinition(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, + String subdefinition, Integer translationOf, + org.thdl.lex.component.ILexComponent parent, List translations, + List glosses, List keywords, List modelSentences, + List translationEquivalents, List relatedTerms, List passages, + List registers) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.subdefinition = subdefinition; + this.translationOf = translationOf; + this.parent = parent; + this.translations = translations; + this.glosses = glosses; + this.keywords = keywords; + this.modelSentences = modelSentences; + this.translationEquivalents = translationEquivalents; + this.relatedTerms = relatedTerms; + this.passages = passages; + this.registers = registers; + } + + /** default constructor */ + public BaseSubdefinition() { + } + + /** minimal constructor */ + public BaseSubdefinition(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, List translations, List glosses, + List keywords, List modelSentences, List translationEquivalents, + List relatedTerms, List passages, List registers) { + super(deleted, analyticalNotes, meta); + this.translations = translations; + this.glosses = glosses; + this.keywords = keywords; + this.modelSentences = modelSentences; + this.translationEquivalents = translationEquivalents; + this.relatedTerms = relatedTerms; + this.passages = passages; + this.registers = registers; + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public String getSubdefinition() { + return this.subdefinition; + } + + public void setSubdefinition(String subdefinition) { + this.subdefinition = subdefinition; + } + + public Integer getTranslationOf() { + return this.translationOf; + } + + public void setTranslationOf(Integer translationOf) { + this.translationOf = translationOf; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public List getTranslations() { + return this.translations; + } + + public void setTranslations(List translations) { + this.translations = translations; + } + + public List getGlosses() { + return this.glosses; + } + + public void setGlosses(List glosses) { + this.glosses = glosses; + } + + public List getKeywords() { + return this.keywords; + } + + public void setKeywords(List keywords) { + this.keywords = keywords; + } + + public List getModelSentences() { + return this.modelSentences; + } + + public void setModelSentences(List modelSentences) { + this.modelSentences = modelSentences; + } + + public List getTranslationEquivalents() { + return this.translationEquivalents; + } + + public void setTranslationEquivalents(List translationEquivalents) { + this.translationEquivalents = translationEquivalents; + } + + public List getRelatedTerms() { + return this.relatedTerms; + } + + public void setRelatedTerms(List relatedTerms) { + this.relatedTerms = relatedTerms; + } + + public List getPassages() { + return this.passages; + } + + public void setPassages(List passages) { + this.passages = passages; + } + + public List getRegisters() { + return this.registers; + } + + public void setRegisters(List registers) { + this.registers = registers; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseTerm.java b/src/java/org/thdl/lex/component/BaseTerm.java new file mode 100644 index 0000000..ac9edd8 --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseTerm.java @@ -0,0 +1,213 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseTerm extends LexComponent implements + org.thdl.lex.component.ITerm, Serializable, + org.thdl.lex.component.LexComponentNode { + + /** persistent field */ + private String term; + + /** persistent field */ + private List pronunciations; + + /** persistent field */ + private List etymologies; + + /** persistent field */ + private List spellings; + + /** persistent field */ + private List functions; + + /** persistent field */ + private List encyclopediaArticles; + + /** persistent field */ + private List transitionalData; + + /** persistent field */ + private List definitions; + + /** persistent field */ + private List glosses; + + /** persistent field */ + private List keywords; + + /** persistent field */ + private List modelSentences; + + /** persistent field */ + private List translationEquivalents; + + /** persistent field */ + private List relatedTerms; + + /** persistent field */ + private List passages; + + /** persistent field */ + private List registers; + + /** full constructor */ + public BaseTerm(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, String term, List pronunciations, + List etymologies, List spellings, List functions, + List encyclopediaArticles, List transitionalData, List definitions, + List glosses, List keywords, List modelSentences, + List translationEquivalents, List relatedTerms, List passages, + List registers) { + super(deleted, analyticalNotes, meta); + this.term = term; + this.pronunciations = pronunciations; + this.etymologies = etymologies; + this.spellings = spellings; + this.functions = functions; + this.encyclopediaArticles = encyclopediaArticles; + this.transitionalData = transitionalData; + this.definitions = definitions; + this.glosses = glosses; + this.keywords = keywords; + this.modelSentences = modelSentences; + this.translationEquivalents = translationEquivalents; + this.relatedTerms = relatedTerms; + this.passages = passages; + this.registers = registers; + } + + /** default constructor */ + public BaseTerm() { + } + + public String getTerm() { + return this.term; + } + + public void setTerm(String term) { + this.term = term; + } + + public List getPronunciations() { + return this.pronunciations; + } + + public void setPronunciations(List pronunciations) { + this.pronunciations = pronunciations; + } + + public List getEtymologies() { + return this.etymologies; + } + + public void setEtymologies(List etymologies) { + this.etymologies = etymologies; + } + + public List getSpellings() { + return this.spellings; + } + + public void setSpellings(List spellings) { + this.spellings = spellings; + } + + public List getFunctions() { + return this.functions; + } + + public void setFunctions(List functions) { + this.functions = functions; + } + + public List getEncyclopediaArticles() { + return this.encyclopediaArticles; + } + + public void setEncyclopediaArticles(List encyclopediaArticles) { + this.encyclopediaArticles = encyclopediaArticles; + } + + public List getTransitionalData() { + return this.transitionalData; + } + + public void setTransitionalData(List transitionalData) { + this.transitionalData = transitionalData; + } + + public List getDefinitions() { + return this.definitions; + } + + public void setDefinitions(List definitions) { + this.definitions = definitions; + } + + public List getGlosses() { + return this.glosses; + } + + public void setGlosses(List glosses) { + this.glosses = glosses; + } + + public List getKeywords() { + return this.keywords; + } + + public void setKeywords(List keywords) { + this.keywords = keywords; + } + + public List getModelSentences() { + return this.modelSentences; + } + + public void setModelSentences(List modelSentences) { + this.modelSentences = modelSentences; + } + + public List getTranslationEquivalents() { + return this.translationEquivalents; + } + + public void setTranslationEquivalents(List translationEquivalents) { + this.translationEquivalents = translationEquivalents; + } + + public List getRelatedTerms() { + return this.relatedTerms; + } + + public void setRelatedTerms(List relatedTerms) { + this.relatedTerms = relatedTerms; + } + + public List getPassages() { + return this.passages; + } + + public void setPassages(List passages) { + this.passages = passages; + } + + public List getRegisters() { + return this.registers; + } + + public void setRegisters(List registers) { + this.registers = registers; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseTransitionalData.java b/src/java/org/thdl/lex/component/BaseTransitionalData.java new file mode 100644 index 0000000..daf588b --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseTransitionalData.java @@ -0,0 +1,97 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseTransitionalData extends LexComponent implements + org.thdl.lex.component.ITransitionalData, Serializable { + + /** nullable persistent field */ + private Integer parentId; + + /** nullable persistent field */ + private Integer transitionalDataLabel; + + /** persistent field */ + private String forPublicConsumption; + + /** nullable persistent field */ + private String transitionalDataText; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** full constructor */ + public BaseTransitionalData(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, + Integer transitionalDataLabel, String forPublicConsumption, + String transitionalDataText, + org.thdl.lex.component.ILexComponent parent) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.transitionalDataLabel = transitionalDataLabel; + this.forPublicConsumption = forPublicConsumption; + this.transitionalDataText = transitionalDataText; + this.parent = parent; + } + + /** default constructor */ + public BaseTransitionalData() { + } + + /** minimal constructor */ + public BaseTransitionalData(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, String forPublicConsumption) { + super(deleted, analyticalNotes, meta); + this.forPublicConsumption = forPublicConsumption; + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public Integer getTransitionalDataLabel() { + return this.transitionalDataLabel; + } + + public void setTransitionalDataLabel(Integer transitionalDataLabel) { + this.transitionalDataLabel = transitionalDataLabel; + } + + public String getForPublicConsumption() { + return this.forPublicConsumption; + } + + public void setForPublicConsumption(String forPublicConsumption) { + this.forPublicConsumption = forPublicConsumption; + } + + public String getTransitionalDataText() { + return this.transitionalDataText; + } + + public void setTransitionalDataText(String transitionalDataText) { + this.transitionalDataText = transitionalDataText; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/BaseTranslationEquivalent.java b/src/java/org/thdl/lex/component/BaseTranslationEquivalent.java new file mode 100644 index 0000000..b1f787a --- /dev/null +++ b/src/java/org/thdl/lex/component/BaseTranslationEquivalent.java @@ -0,0 +1,71 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +abstract public class BaseTranslationEquivalent extends LexComponent implements + org.thdl.lex.component.ITranslationEquivalent, Serializable { + + /** nullable persistent field */ + private Integer parentId; + + /** nullable persistent field */ + private String translationEquivalent; + + /** nullable persistent field */ + private org.thdl.lex.component.ILexComponent parent; + + /** full constructor */ + public BaseTranslationEquivalent(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta, Integer parentId, + String translationEquivalent, + org.thdl.lex.component.ILexComponent parent) { + super(deleted, analyticalNotes, meta); + this.parentId = parentId; + this.translationEquivalent = translationEquivalent; + this.parent = parent; + } + + /** default constructor */ + public BaseTranslationEquivalent() { + } + + /** minimal constructor */ + public BaseTranslationEquivalent(Boolean deleted, List analyticalNotes, + org.thdl.lex.component.Meta meta) { + super(deleted, analyticalNotes, meta); + } + + public Integer getParentId() { + return this.parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public String getTranslationEquivalent() { + return this.translationEquivalent; + } + + public void setTranslationEquivalent(String translationEquivalent) { + this.translationEquivalent = translationEquivalent; + } + + public org.thdl.lex.component.ILexComponent getParent() { + return this.parent; + } + + public void setParent(org.thdl.lex.component.ILexComponent parent) { + this.parent = parent; + } + + public String toString() { + return new ToStringBuilder(this).append("metaId", getMetaId()) + .toString(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/Definition.java b/src/java/org/thdl/lex/component/Definition.java new file mode 100644 index 0000000..194306d --- /dev/null +++ b/src/java/org/thdl/lex/component/Definition.java @@ -0,0 +1,187 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; + +import org.thdl.lex.LexConstants; +import org.thdl.lex.LexLogger; + +/** + * Description of the Class + * + * @author travis + * @created October 13, 2003 + */ +public class Definition extends BaseDefinition implements Serializable, + Translatable, LexComponentNode { + private HashMap childMap; + + /** + * Sets the childMap attribute of the Term object + * + * @param childMap + * The new childMap value + */ + public void setChildMap(HashMap childMap) { + this.childMap = childMap; + } + + /** + * Gets the childMap attribute of the Term object + * + * @return The childMap value + */ + public HashMap getChildMap() { + if (null == childMap) { + initChildMap(); + } + return childMap; + } + + //helpers + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public List findSiblings(ILexComponent component) + throws LexComponentException { + List list = null; + if (null == component.getParent()) { + component.setParent(findParent(component.getParentId())); + } + LexComponentNode node = (LexComponentNode) component.getParent(); + list = (List) node.getChildMap().get(component.getLabel()); + LexLogger.debug("[Definition] List derived from " + node + ": " + list); + + if (null == list) { + if (null != getSubdefinitions()) { + Iterator it = getSubdefinitions().iterator(); + while (it.hasNext()) { + ISubdefinition subdef = (ISubdefinition) it.next(); + list = subdef.findSiblings(component); + } + } + } + + return list; + } + + /** + * Description of the Method + * + * @param parentPk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findParent(Integer parentPk) + throws LexComponentException { + LexLogger.debug("Finding Parent..."); + ILexComponent parent = null; + if (parentPk.equals(this.getMetaId())) { + parent = this; + } else { + parent = findChild(parentPk); + } + return parent; + } + + /** + * Gets the persistentChild attribute of the Term object + * + * @param child + * Description of the Parameter + * @return The persistentChild value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(ILexComponent child) + throws LexComponentException { + List list = findSiblings(child); + child = findChild(list, child.getMetaId()); + return child; + } + + /** + * Description of the Method + * + * @param pk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(Integer pk) throws LexComponentException { + ILexComponent child = null; + + Iterator childMapValues = getChildMap().values().iterator(); + while (childMapValues.hasNext() && null == child) { + List list = (List) childMapValues.next(); + child = findChild(list, pk); + } + + if (null != getSubdefinitions()) { + Iterator subdefinitions = getSubdefinitions().iterator(); + while (subdefinitions.hasNext() && null == child) { + ISubdefinition def = (ISubdefinition) subdefinitions.next(); + child = def.findChild(pk); + } + } + return child; + } + + /** + * Description of the Method + * + * @param list + * Description of the Parameter + * @param pk + * Description of the Parameter + * @return Description of the Return Value + */ + public ILexComponent findChild(List list, Integer pk) { + ILexComponent child = null; + if (null != list) { + for (Iterator it = list.iterator(); it.hasNext();) { + ILexComponent lc = (LexComponent) it.next(); + if (lc.getMetaId().equals(pk)) { + child = lc; + break; + } + } + } + return child; + } + + /** + * Description of the Method + */ + private void initChildMap() { + setChildMap(new HashMap()); + getChildMap().put(LexConstants.SUBDEFINITIONLABEL_VALUE, + getSubdefinitions()); + getChildMap().put(LexConstants.MODELSENTENCELABEL_VALUE, + getModelSentences()); + getChildMap().put(LexConstants.PASSAGELABEL_VALUE, getPassages()); + getChildMap().put(LexConstants.TRANSLATIONLABEL_VALUE, + getTranslations()); + getChildMap().put(LexConstants.RELATEDTERMLABEL_VALUE, + getRelatedTerms()); + getChildMap().put(LexConstants.REGISTERLABEL_VALUE, getRegisters()); + getChildMap().put(LexConstants.KEYWORDLABEL_VALUE, getKeywords()); + getChildMap().put(LexConstants.ANALYTICALNOTELABEL_VALUE, + getAnalyticalNotes()); + getChildMap().put(LexConstants.TRANSLATIONLABEL_VALUE, + getTranslationEquivalents()); + } + +} + diff --git a/src/java/org/thdl/lex/component/EncyclopediaArticle.java b/src/java/org/thdl/lex/component/EncyclopediaArticle.java new file mode 100644 index 0000000..6d7b87f --- /dev/null +++ b/src/java/org/thdl/lex/component/EncyclopediaArticle.java @@ -0,0 +1,8 @@ +package org.thdl.lex.component; + +import java.io.Serializable; + +public class EncyclopediaArticle extends BaseEncyclopediaArticle implements + Serializable { + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/Etymology.java b/src/java/org/thdl/lex/component/Etymology.java new file mode 100644 index 0000000..a091b15 --- /dev/null +++ b/src/java/org/thdl/lex/component/Etymology.java @@ -0,0 +1,8 @@ +package org.thdl.lex.component; + +import java.io.Serializable; + +public class Etymology extends BaseEtymology implements Serializable, + Translatable { + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/Gloss.java b/src/java/org/thdl/lex/component/Gloss.java new file mode 100644 index 0000000..ab9bed2 --- /dev/null +++ b/src/java/org/thdl/lex/component/Gloss.java @@ -0,0 +1,7 @@ +package org.thdl.lex.component; + +import java.io.Serializable; + +public class Gloss extends BaseGloss implements Serializable { + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/GrammaticalFunction.java b/src/java/org/thdl/lex/component/GrammaticalFunction.java new file mode 100644 index 0000000..f8a5244 --- /dev/null +++ b/src/java/org/thdl/lex/component/GrammaticalFunction.java @@ -0,0 +1,15 @@ +package org.thdl.lex.component; + +import java.io.Serializable; + +/** + * Description of the Class + * + * @author travis + * @created October 5, 2003 + */ +public class GrammaticalFunction extends BaseGrammaticalFunction implements + Serializable { + +} + diff --git a/src/java/org/thdl/lex/component/IAnalyticalNote.java b/src/java/org/thdl/lex/component/IAnalyticalNote.java new file mode 100644 index 0000000..80d2008 --- /dev/null +++ b/src/java/org/thdl/lex/component/IAnalyticalNote.java @@ -0,0 +1,60 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 3, 2003 + */ +public interface IAnalyticalNote extends ILexComponent { + /** + * Gets the parent attribute of the IAnalyticalNote object + * + * @param comp + * The new parent value + * @since + */ + + /** + * Sets the parent attribute of the IAnalyticalNote object + * + * @param comp + * The new parent value + * @since + */ + + /** + * Gets the parentId attribute of the IAnalyticalNote object + * + * @return The parentId value + * @since + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the IAnalyticalNote object + * + * @param parentId + * The new parentId value + * @since + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the analyticalNote attribute of the IAnalyticalNote object + * + * @return The analyticalNote value + * @since + */ + public java.lang.String getAnalyticalNote(); + + /** + * Sets the analyticalNote attribute of the IAnalyticalNote object + * + * @param analyticalNote + * The new analyticalNote value + * @since + */ + public void setAnalyticalNote(java.lang.String analyticalNote); +} + diff --git a/src/java/org/thdl/lex/component/IDefinition.java b/src/java/org/thdl/lex/component/IDefinition.java new file mode 100644 index 0000000..22c319c --- /dev/null +++ b/src/java/org/thdl/lex/component/IDefinition.java @@ -0,0 +1,239 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 1, 2003 + */ +public interface IDefinition extends LexComponentNode { + /** + * Gets the parent attribute of the IDefinition object + * + * @return The parentId value + */ + + /** + * Sets the parent attribute of the IDefinition object + * + * @return The parentId value + */ + + /** + * Gets the parentId attribute of the IDefinition object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the IDefinition object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the definition attribute of the IDefinition object + * + * @return The definition value + * @since + */ + public java.lang.String getDefinition(); + + /** + * Sets the definition attribute of the IDefinition object + * + * @param definition + * The new definition value + * @since + */ + public void setDefinition(java.lang.String definition); + + /** + * Gets the subdefinitions attribute of the IDefinition object + * + * @return The subdefinitions value + * @since + */ + public java.util.List getSubdefinitions(); + + /** + * Sets the subdefinitions attribute of the IDefinition object + * + * @param subdefinitions + * The new subdefinitions value + * @since + */ + public void setSubdefinitions(java.util.List subdefinitions); + + /** + * Gets the glosses attribute of the IDefinition object + * + * @return The glosses value + * @since + */ + public java.util.List getGlosses(); + + /** + * Sets the glosses attribute of the IDefinition object + * + * @param glosses + * The new glosses value + * @since + */ + public void setGlosses(java.util.List glosses); + + /** + * Gets the keywords attribute of the IDefinition object + * + * @return The keywords value + * @since + */ + public java.util.List getKeywords(); + + /** + * Sets the keywords attribute of the IDefinition object + * + * @param keywords + * The new keywords value + * @since + */ + public void setKeywords(java.util.List keywords); + + /** + * Gets the modelSentences attribute of the IDefinition object + * + * @return The modelSentences value + * @since + */ + public java.util.List getModelSentences(); + + /** + * Sets the modelSentences attribute of the IDefinition object + * + * @param modelSentences + * The new modelSentences value + * @since + */ + public void setModelSentences(java.util.List modelSentences); + + /** + * Gets the translationEquivalents attribute of the IDefinition object + * + * @return The translationEquivalents value + * @since + */ + public java.util.List getTranslationEquivalents(); + + /** + * Sets the translationEquivalents attribute of the IDefinition object + * + * @param translationEquivalents + * The new translationEquivalents value + * @since + */ + public void setTranslationEquivalents(java.util.List translationEquivalents); + + /** + * Gets the relatedTerms attribute of the IDefinition object + * + * @return The relatedTerms value + * @since + */ + public java.util.List getRelatedTerms(); + + /** + * Sets the relatedTerms attribute of the IDefinition object + * + * @param relatedTerms + * The new relatedTerms value + * @since + */ + public void setRelatedTerms(java.util.List relatedTerms); + + /** + * Gets the passages attribute of the IDefinition object + * + * @return The passages value + * @since + */ + public java.util.List getPassages(); + + /** + * Sets the passages attribute of the IDefinition object + * + * @param passages + * The new passages value + * @since + */ + public void setPassages(java.util.List passages); + + /** + * Gets the registers attribute of the IDefinition object + * + * @return The registers value + * @since + */ + public java.util.List getRegisters(); + + /** + * Sets the registers attribute of the IDefinition object + * + * @param registers + * The new registers value + * @since + */ + public void setRegisters(java.util.List registers); + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(ILexComponent component) + throws LexComponentException; + + /** + * Description of the Method + * + * @param list + * Description of the Parameter + * @param pk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(java.util.List list, Integer pk) + throws LexComponentException; + + /** + * Description of the Method + * + * @param pk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(Integer pk) throws LexComponentException; + + /** + * Description of the Method + * + * @param parentPk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findParent(Integer parentPk) + throws LexComponentException; +} + diff --git a/src/java/org/thdl/lex/component/IEncyclopediaArticle.java b/src/java/org/thdl/lex/component/IEncyclopediaArticle.java new file mode 100644 index 0000000..2ad2922 --- /dev/null +++ b/src/java/org/thdl/lex/component/IEncyclopediaArticle.java @@ -0,0 +1,62 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 16, 2003 + */ +public interface IEncyclopediaArticle extends ILexComponent { + /** + * Sets the parent attribute of the IEncyclopediaArticle object + * + * @param comp + * The new parent value + */ + + /** + * Gets the parentId attribute of the IEncyclopediaArticle object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the IEncyclopediaArticle object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the article attribute of the IEncyclopediaArticle object + * + * @return The article value + */ + public java.lang.String getArticle(); + + /** + * Sets the article attribute of the IEncyclopediaArticle object + * + * @param article + * The new article value + */ + public void setArticle(java.lang.String article); + + /** + * Gets the articleTitle attribute of the IEncyclopediaArticle object + * + * @return The articleTitle value + */ + public java.lang.String getArticleTitle(); + + /** + * Sets the articleTitle attribute of the IEncyclopediaArticle object + * + * @param articleTitle + * The new articleTitle value + */ + public void setArticleTitle(java.lang.String articleTitle); +} + diff --git a/src/java/org/thdl/lex/component/IEtymology.java b/src/java/org/thdl/lex/component/IEtymology.java new file mode 100644 index 0000000..ab48e9e --- /dev/null +++ b/src/java/org/thdl/lex/component/IEtymology.java @@ -0,0 +1,92 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 16, 2003 + */ +public interface IEtymology extends Translatable { + /** + * Sets the parent attribute of the IEtymology object + * + * @param comp + * The new parent value + */ + + /** + * Gets the parentId attribute of the IEtymology object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the IEtymology object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the loanLanguage attribute of the IEtymology object + * + * @return The loanLanguage value + */ + public java.lang.Integer getLoanLanguage(); + + /** + * Sets the loanLanguage attribute of the IEtymology object + * + * @param loanLanguage + * The new loanLanguage value + */ + public void setLoanLanguage(java.lang.Integer loanLanguage); + + /** + * Gets the etymologyType attribute of the IEtymology object + * + * @return The etymologyType value + */ + public java.lang.Integer getEtymologyType(); + + /** + * Sets the etymologyType attribute of the IEtymology object + * + * @param etymologyType + * The new etymologyType value + */ + public void setEtymologyType(java.lang.Integer etymologyType); + + /** + * Gets the derivation attribute of the IEtymology object + * + * @return The derivation value + */ + public java.lang.String getDerivation(); + + /** + * Sets the derivation attribute of the IEtymology object + * + * @param derivation + * The new derivation value + */ + public void setDerivation(java.lang.String derivation); + + /** + * Gets the etymologyDescription attribute of the IEtymology object + * + * @return The etymologyDescription value + */ + public java.lang.String getEtymologyDescription(); + + /** + * Sets the etymologyDescription attribute of the IEtymology object + * + * @param etymologyDescription + * The new etymologyDescription value + */ + public void setEtymologyDescription(java.lang.String etymologyDescription); +} + diff --git a/src/java/org/thdl/lex/component/IFunction.java b/src/java/org/thdl/lex/component/IFunction.java new file mode 100644 index 0000000..f290498 --- /dev/null +++ b/src/java/org/thdl/lex/component/IFunction.java @@ -0,0 +1,47 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 16, 2003 + */ +public interface IFunction extends ILexComponent { + /** + * Sets the parent attribute of the IFunction object + * + * @param comp + * The new parent value + */ + + /** + * Gets the parentId attribute of the IFunction object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the IFunction object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the function attribute of the IFunction object + * + * @return The function value + */ + public java.lang.Integer getFunction(); + + /** + * Sets the function attribute of the IFunction object + * + * @param function + * The new function value + */ + public void setFunction(java.lang.Integer function); +} + diff --git a/src/java/org/thdl/lex/component/IGloss.java b/src/java/org/thdl/lex/component/IGloss.java new file mode 100644 index 0000000..3b2e8d1 --- /dev/null +++ b/src/java/org/thdl/lex/component/IGloss.java @@ -0,0 +1,62 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 16, 2003 + */ +public interface IGloss extends ILexComponent { + /** + * Sets the parent attribute of the IGloss object + * + * @param comp + * The new parent value + */ + + /** + * Gets the parentId attribute of the IGloss object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the IGloss object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the gloss attribute of the IGloss object + * + * @return The gloss value + */ + public java.lang.String getGloss(); + + /** + * Sets the gloss attribute of the IGloss object + * + * @param gloss + * The new gloss value + */ + public void setGloss(java.lang.String gloss); + + /** + * Gets the translation attribute of the IGloss object + * + * @return The translation value + */ + public java.lang.String getTranslation(); + + /** + * Sets the translation attribute of the IGloss object + * + * @param translation + * The new translation value + */ + public void setTranslation(java.lang.String translation); +} + diff --git a/src/java/org/thdl/lex/component/IKeyword.java b/src/java/org/thdl/lex/component/IKeyword.java new file mode 100644 index 0000000..81e07ba --- /dev/null +++ b/src/java/org/thdl/lex/component/IKeyword.java @@ -0,0 +1,47 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 16, 2003 + */ +public interface IKeyword extends ILexComponent { + /** + * Sets the parent attribute of the IKeyword object + * + * @param comp + * The new parent value + */ + + /** + * Gets the parentId attribute of the IKeyword object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the IKeyword object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the keyword attribute of the IKeyword object + * + * @return The keyword value + */ + public java.lang.String getKeyword(); + + /** + * Sets the keyword attribute of the IKeyword object + * + * @param keyword + * The new keyword value + */ + public void setKeyword(java.lang.String keyword); +} + diff --git a/src/java/org/thdl/lex/component/ILexComponent.java b/src/java/org/thdl/lex/component/ILexComponent.java new file mode 100644 index 0000000..cf92556 --- /dev/null +++ b/src/java/org/thdl/lex/component/ILexComponent.java @@ -0,0 +1,178 @@ +package org.thdl.lex.component; + +import java.util.List; + +/** + * Description of the Interface + * + * @author travis + * @created October 1, 2003 + */ +public interface ILexComponent { + + /** + * Sets the parent attribute of the ILexComponent object + * + * @param parent + * The new parent value + */ + public void setParent(ILexComponent parent); + + /** + * Gets the parent attribute of the ILexComponent object + * + * @return The parent value + */ + public ILexComponent getParent(); + + /** + * Sets the parentId attribute of the LexComponent object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the parent attribute of the LexComponent object + * + * @return The parent value + */ + + /** + * Gets the parentId attribute of the LexComponent object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Gets the label attribute of the ILexComponent object + * + * @return The label value + * @since + */ + public java.lang.String getLabel(); + + /** + * Gets the metaId attribute of the ILexComponent object + * + * @return The metaId value + * @since + */ + public java.lang.Integer getMetaId(); + + /** + * Sets the metaId attribute of the ILexComponent object + * + * @param metaId + * The new metaId value + * @since + */ + public void setMetaId(java.lang.Integer metaId); + + /** + * Gets the translations attribute of the ILexComponent object + * + * @return The translations value + * @since + */ + // public java.util.Set getTranslations(); + + /** + * Sets the translations attribute of the ILexComponent object + * + * @return The deleted value + * @since + */ + //public void setTranslations( java.util.Set translations ); + + /** + * Gets the deleted attribute of the ILexComponent object + * + * @return The deleted value + * @since + */ + public java.lang.Boolean getDeleted(); + + /** + * Sets the deleted attribute of the ILexComponent object + * + * @param deleted + * The new deleted value + * @since + */ + public void setDeleted(java.lang.Boolean deleted); + + /** + * Gets the analyticalNotes attribute of the ILexComponent object + * + * @return The analyticalNotes value + * @since + */ + public java.util.List getAnalyticalNotes(); + + /** + * Sets the analyticalNotes attribute of the ILexComponent object + * + * @param analyticalNotes + * The new analyticalNotes value + * @since + */ + public void setAnalyticalNotes(java.util.List analyticalNotes); + + /** + * Gets the meta attribute of the ILexComponent object + * + * @return The meta value + * @since + */ + public org.thdl.lex.component.Meta getMeta(); + + /** + * Sets the meta attribute of the ILexComponent object + * + * @param meta + * The new meta value + * @since + */ + public void setMeta(org.thdl.lex.component.Meta meta); + + /** + * Description of the Method + * + * @param properties + * Description of Parameter + * @exception LexComponentException + * Description of Exception + * @since + */ + public void populate(java.util.Map properties) throws LexComponentException; + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @exception LexComponentException + * Description of the Exception + */ + public void populate(ILexComponent component) throws LexComponentException; + + /** + * Adds a feature to the SiblingList attribute of the LexComponentNode + * object + * + * @param component + * The feature to be added to the SiblingList attribute + * @param list + * The feature to be added to the SiblingList attribute + * @param parent + * The feature to be added to the SiblingList attribute + * @exception LexComponentException + * Description of the Exception + */ + public void addSiblingList(ILexComponent parent, ILexComponent component, + List list) throws LexComponentException; +} + diff --git a/src/java/org/thdl/lex/component/IMeta.java b/src/java/org/thdl/lex/component/IMeta.java new file mode 100644 index 0000000..9defa85 --- /dev/null +++ b/src/java/org/thdl/lex/component/IMeta.java @@ -0,0 +1,197 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 16, 2003 + */ +public interface IMeta extends ILexComponent { + /** + * Sets the parent attribute of the IMeta object + * + * @param comp + * The new parent value + */ + + /** + * Gets the parentId attribute of the IMeta object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the IMeta object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the createdBy attribute of the IMeta object + * + * @return The createdBy value + */ + public java.lang.Integer getCreatedBy(); + + /** + * Sets the createdBy attribute of the IMeta object + * + * @param createdBy + * The new createdBy value + */ + public void setCreatedBy(java.lang.Integer createdBy); + + /** + * Gets the modifiedBy attribute of the IMeta object + * + * @return The modifiedBy value + */ + public java.lang.Integer getModifiedBy(); + + /** + * Sets the modifiedBy attribute of the IMeta object + * + * @param modifiedBy + * The new modifiedBy value + */ + public void setModifiedBy(java.lang.Integer modifiedBy); + + /** + * Gets the createdByProjSub attribute of the IMeta object + * + * @return The createdByProjSub value + */ + public java.lang.Integer getCreatedByProjSub(); + + /** + * Sets the createdByProjSub attribute of the IMeta object + * + * @param createdByProjSub + * The new createdByProjSub value + */ + public void setCreatedByProjSub(java.lang.Integer createdByProjSub); + + /** + * Gets the modifiedByProjSub attribute of the IMeta object + * + * @return The modifiedByProjSub value + */ + public java.lang.Integer getModifiedByProjSub(); + + /** + * Sets the modifiedByProjSub attribute of the IMeta object + * + * @param modifiedByProjSub + * The new modifiedByProjSub value + */ + public void setModifiedByProjSub(java.lang.Integer modifiedByProjSub); + + /** + * Gets the createdOn attribute of the IMeta object + * + * @return The createdOn value + */ + public java.util.Date getCreatedOn(); + + /** + * Sets the createdOn attribute of the IMeta object + * + * @param createdOn + * The new createdOn value + */ + public void setCreatedOn(java.util.Date createdOn); + + /** + * Gets the modifiedOn attribute of the IMeta object + * + * @return The modifiedOn value + */ + public java.util.Date getModifiedOn(); + + /** + * Sets the modifiedOn attribute of the IMeta object + * + * @param modifiedOn + * The new modifiedOn value + */ + public void setModifiedOn(java.util.Date modifiedOn); + + /** + * Gets the source attribute of the IMeta object + * + * @return The source value + */ + public java.lang.Integer getSource(); + + /** + * Sets the source attribute of the IMeta object + * + * @param source + * The new source value + */ + public void setSource(java.lang.Integer source); + + /** + * Gets the language attribute of the IMeta object + * + * @return The language value + */ + public java.lang.Integer getLanguage(); + + /** + * Sets the language attribute of the IMeta object + * + * @param language + * The new language value + */ + public void setLanguage(java.lang.Integer language); + + /** + * Gets the script attribute of the IMeta object + * + * @return The script value + */ + public java.lang.Integer getScript(); + + /** + * Sets the script attribute of the IMeta object + * + * @param script + * The new script value + */ + public void setScript(java.lang.Integer script); + + /** + * Gets the dialect attribute of the IMeta object + * + * @return The dialect value + */ + public java.lang.Integer getDialect(); + + /** + * Sets the dialect attribute of the IMeta object + * + * @param dialect + * The new dialect value + */ + public void setDialect(java.lang.Integer dialect); + + /** + * Gets the note attribute of the IMeta object + * + * @return The note value + */ + public java.lang.String getNote(); + + /** + * Sets the note attribute of the IMeta object + * + * @param note + * The new note value + */ + public void setNote(java.lang.String note); +} + diff --git a/src/java/org/thdl/lex/component/IModelSentence.java b/src/java/org/thdl/lex/component/IModelSentence.java new file mode 100644 index 0000000..1fb0ceb --- /dev/null +++ b/src/java/org/thdl/lex/component/IModelSentence.java @@ -0,0 +1,46 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 16, 2003 + */ +public interface IModelSentence extends Translatable { + /** + * Sets the parent attribute of the IModelSentence object + * + * @return The parentId value + */ + + /** + * Gets the parentId attribute of the IModelSentence object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the IModelSentence object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the modelSentence attribute of the IModelSentence object + * + * @return The modelSentence value + */ + public java.lang.String getModelSentence(); + + /** + * Sets the modelSentence attribute of the IModelSentence object + * + * @param modelSentence + * The new modelSentence value + */ + public void setModelSentence(java.lang.String modelSentence); +} + diff --git a/src/java/org/thdl/lex/component/IPassage.java b/src/java/org/thdl/lex/component/IPassage.java new file mode 100644 index 0000000..e258db3 --- /dev/null +++ b/src/java/org/thdl/lex/component/IPassage.java @@ -0,0 +1,99 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 13, 2003 + */ +public interface IPassage extends Translatable { + /** + * Gets the parent attribute of the IPassage object + * + * @param comp + * The new parent value + */ + + /** + * Sets the parent attribute of the IPassage object + * + * @param comp + * The new parent value + */ + + /** + * Gets the parentId attribute of the IPassage object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the IPassage object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the literarySource attribute of the IPassage object + * + * @return The literarySource value + */ + public java.lang.String getLiterarySource(); + + /** + * Sets the literarySource attribute of the IPassage object + * + * @param literarySource + * The new literarySource value + */ + public void setLiterarySource(java.lang.String literarySource); + + /** + * Gets the spelling attribute of the IPassage object + * + * @return The spelling value + */ + public java.lang.String getSpelling(); + + /** + * Sets the spelling attribute of the IPassage object + * + * @param spelling + * The new spelling value + */ + public void setSpelling(java.lang.String spelling); + + /** + * Gets the pagination attribute of the IPassage object + * + * @return The pagination value + */ + public java.lang.String getPagination(); + + /** + * Sets the pagination attribute of the IPassage object + * + * @param pagination + * The new pagination value + */ + public void setPagination(java.lang.String pagination); + + /** + * Gets the passage attribute of the IPassage object + * + * @return The passage value + */ + public java.lang.String getPassage(); + + /** + * Sets the passage attribute of the IPassage object + * + * @param passage + * The new passage value + */ + public void setPassage(java.lang.String passage); +} + diff --git a/src/java/org/thdl/lex/component/IPronunciation.java b/src/java/org/thdl/lex/component/IPronunciation.java new file mode 100644 index 0000000..5d45c7e --- /dev/null +++ b/src/java/org/thdl/lex/component/IPronunciation.java @@ -0,0 +1,62 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 16, 2003 + */ +public interface IPronunciation extends ILexComponent { + /** + * Sets the parent attribute of the IPronunciation object + * + * @param comp + * The new parent value + */ + + /** + * Gets the parentId attribute of the IPronunciation object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the IPronunciation object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the phonetics attribute of the IPronunciation object + * + * @return The phonetics value + */ + public java.lang.String getPhonetics(); + + /** + * Sets the phonetics attribute of the IPronunciation object + * + * @param phonetics + * The new phonetics value + */ + public void setPhonetics(java.lang.String phonetics); + + /** + * Gets the phoneticsType attribute of the IPronunciation object + * + * @return The phoneticsType value + */ + public java.lang.Integer getPhoneticsType(); + + /** + * Sets the phoneticsType attribute of the IPronunciation object + * + * @param phoneticsType + * The new phoneticsType value + */ + public void setPhoneticsType(java.lang.Integer phoneticsType); +} + diff --git a/src/java/org/thdl/lex/component/IRegister.java b/src/java/org/thdl/lex/component/IRegister.java new file mode 100644 index 0000000..a5b258f --- /dev/null +++ b/src/java/org/thdl/lex/component/IRegister.java @@ -0,0 +1,47 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 16, 2003 + */ +public interface IRegister extends ILexComponent { + /** + * Sets the parent attribute of the IRegister object + * + * @param comp + * The new parent value + */ + + /** + * Gets the parentId attribute of the IRegister object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the IRegister object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the register attribute of the IRegister object + * + * @return The register value + */ + public java.lang.Integer getRegister(); + + /** + * Sets the register attribute of the IRegister object + * + * @param register + * The new register value + */ + public void setRegister(java.lang.Integer register); +} + diff --git a/src/java/org/thdl/lex/component/IRelatedTerm.java b/src/java/org/thdl/lex/component/IRelatedTerm.java new file mode 100644 index 0000000..0051531 --- /dev/null +++ b/src/java/org/thdl/lex/component/IRelatedTerm.java @@ -0,0 +1,62 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 16, 2003 + */ +public interface IRelatedTerm extends ILexComponent { + /** + * Sets the parent attribute of the IRelatedTerm object + * + * @param comp + * The new parent value + */ + + /** + * Gets the parentId attribute of the IRelatedTerm object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the IRelatedTerm object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the relatedTerm attribute of the IRelatedTerm object + * + * @return The relatedTerm value + */ + public java.lang.String getRelatedTerm(); + + /** + * Sets the relatedTerm attribute of the IRelatedTerm object + * + * @param relatedTerm + * The new relatedTerm value + */ + public void setRelatedTerm(java.lang.String relatedTerm); + + /** + * Gets the relatedTermType attribute of the IRelatedTerm object + * + * @return The relatedTermType value + */ + public java.lang.Integer getRelatedTermType(); + + /** + * Sets the relatedTermType attribute of the IRelatedTerm object + * + * @param relatedTermType + * The new relatedTermType value + */ + public void setRelatedTermType(java.lang.Integer relatedTermType); +} + diff --git a/src/java/org/thdl/lex/component/ISpelling.java b/src/java/org/thdl/lex/component/ISpelling.java new file mode 100644 index 0000000..f5dbb81 --- /dev/null +++ b/src/java/org/thdl/lex/component/ISpelling.java @@ -0,0 +1,62 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 16, 2003 + */ +public interface ISpelling extends ILexComponent { + /** + * Sets the parent attribute of the ISpelling object + * + * @param comp + * The new parent value + */ + + /** + * Gets the parentId attribute of the ISpelling object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the ISpelling object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the spelling attribute of the ISpelling object + * + * @return The spelling value + */ + public java.lang.String getSpelling(); + + /** + * Sets the spelling attribute of the ISpelling object + * + * @param spelling + * The new spelling value + */ + public void setSpelling(java.lang.String spelling); + + /** + * Gets the spellingType attribute of the ISpelling object + * + * @return The spellingType value + */ + public java.lang.Integer getSpellingType(); + + /** + * Sets the spellingType attribute of the ISpelling object + * + * @param spellingType + * The new spellingType value + */ + public void setSpellingType(java.lang.Integer spellingType); +} + diff --git a/src/java/org/thdl/lex/component/ISubdefinition.java b/src/java/org/thdl/lex/component/ISubdefinition.java new file mode 100644 index 0000000..964ffb6 --- /dev/null +++ b/src/java/org/thdl/lex/component/ISubdefinition.java @@ -0,0 +1,207 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 13, 2003 + */ +public interface ISubdefinition extends LexComponentNode { + /** + * Gets the parent attribute of the ISubdefinition object + * + * @return The parentId value + */ + + /** + * Sets the parent attribute of the ISubdefinition object + * + * @return The parentId value + */ + + /** + * Gets the parentId attribute of the ISubdefinition object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the ISubdefinition object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the subdefinition attribute of the ISubdefinition object + * + * @return The subdefinition value + */ + public java.lang.String getSubdefinition(); + + /** + * Sets the subdefinition attribute of the ISubdefinition object + * + * @param subdefinition + * The new subdefinition value + */ + public void setSubdefinition(java.lang.String subdefinition); + + /** + * Gets the glosses attribute of the ISubdefinition object + * + * @return The glosses value + */ + public java.util.List getGlosses(); + + /** + * Sets the glosses attribute of the ISubdefinition object + * + * @param glosses + * The new glosses value + */ + public void setGlosses(java.util.List glosses); + + /** + * Gets the keywords attribute of the ISubdefinition object + * + * @return The keywords value + */ + public java.util.List getKeywords(); + + /** + * Sets the keywords attribute of the ISubdefinition object + * + * @param keywords + * The new keywords value + */ + public void setKeywords(java.util.List keywords); + + /** + * Gets the modelSentences attribute of the ISubdefinition object + * + * @return The modelSentences value + */ + public java.util.List getModelSentences(); + + /** + * Sets the modelSentences attribute of the ISubdefinition object + * + * @param modelSentences + * The new modelSentences value + */ + public void setModelSentences(java.util.List modelSentences); + + /** + * Gets the translationEquivalents attribute of the ISubdefinition object + * + * @return The translationEquivalents value + */ + public java.util.List getTranslationEquivalents(); + + /** + * Sets the translationEquivalents attribute of the ISubdefinition object + * + * @param translationEquivalents + * The new translationEquivalents value + */ + public void setTranslationEquivalents(java.util.List translationEquivalents); + + /** + * Gets the relatedTerms attribute of the ISubdefinition object + * + * @return The relatedTerms value + */ + public java.util.List getRelatedTerms(); + + /** + * Sets the relatedTerms attribute of the ISubdefinition object + * + * @param relatedTerms + * The new relatedTerms value + */ + public void setRelatedTerms(java.util.List relatedTerms); + + /** + * Gets the passages attribute of the ISubdefinition object + * + * @return The passages value + */ + public java.util.List getPassages(); + + /** + * Sets the passages attribute of the ISubdefinition object + * + * @param passages + * The new passages value + */ + public void setPassages(java.util.List passages); + + /** + * Gets the registers attribute of the ISubdefinition object + * + * @return The registers value + */ + public java.util.List getRegisters(); + + /** + * Sets the registers attribute of the ISubdefinition object + * + * @param registers + * The new registers value + */ + public void setRegisters(java.util.List registers); + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(ILexComponent component) + throws LexComponentException; + + /** + * Description of the Method + * + * @param list + * Description of the Parameter + * @param pk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(java.util.List list, Integer pk) + throws LexComponentException; + + /** + * Description of the Method + * + * @param pk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(Integer pk) throws LexComponentException; + + /** + * Description of the Method + * + * @param parentPk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findParent(Integer parentPk) + throws LexComponentException; + +} + diff --git a/src/java/org/thdl/lex/component/ITerm.java b/src/java/org/thdl/lex/component/ITerm.java new file mode 100644 index 0000000..2c831ec --- /dev/null +++ b/src/java/org/thdl/lex/component/ITerm.java @@ -0,0 +1,335 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 1, 2003 + */ +public interface ITerm extends LexComponentNode { + /** + * Gets the term attribute of the ITerm object + * + * @return The term value + * @since + */ + public java.lang.String getTerm(); + + /** + * Sets the term attribute of the ITerm object + * + * @param term + * The new term value + * @since + */ + public void setTerm(java.lang.String term); + + /** + * Gets the pronunciations attribute of the ITerm object + * + * @return The pronunciations value + * @since + */ + public java.util.List getPronunciations(); + + /** + * Sets the pronunciations attribute of the ITerm object + * + * @param pronunciations + * The new pronunciations value + * @since + */ + public void setPronunciations(java.util.List pronunciations); + + /** + * Gets the etymologies attribute of the ITerm object + * + * @return The etymologies value + * @since + */ + public java.util.List getEtymologies(); + + /** + * Sets the etymologies attribute of the ITerm object + * + * @param etymologies + * The new etymologies value + * @since + */ + public void setEtymologies(java.util.List etymologies); + + /** + * Gets the spellings attribute of the ITerm object + * + * @return The spellings value + * @since + */ + public java.util.List getSpellings(); + + /** + * Sets the spellings attribute of the ITerm object + * + * @param spellings + * The new spellings value + * @since + */ + public void setSpellings(java.util.List spellings); + + /** + * Gets the functions attribute of the ITerm object + * + * @return The functions value + * @since + */ + public java.util.List getFunctions(); + + /** + * Sets the functions attribute of the ITerm object + * + * @param functions + * The new functions value + * @since + */ + public void setFunctions(java.util.List functions); + + /** + * Gets the encyclopediaArticles attribute of the ITerm object + * + * @return The encyclopediaArticles value + * @since + */ + public java.util.List getEncyclopediaArticles(); + + /** + * Sets the encyclopediaArticles attribute of the ITerm object + * + * @param encyclopediaArticles + * The new encyclopediaArticles value + * @since + */ + public void setEncyclopediaArticles(java.util.List encyclopediaArticles); + + /** + * Gets the transitionalData attribute of the ITerm object + * + * @return The transitionalData value + * @since + */ + public java.util.List getTransitionalData(); + + /** + * Sets the transitionalData attribute of the ITerm object + * + * @param transitionalData + * The new transitionalData value + * @since + */ + public void setTransitionalData(java.util.List transitionalData); + + /** + * Gets the definitions attribute of the ITerm object + * + * @return The definitions value + * @since + */ + public java.util.List getDefinitions(); + + /** + * Sets the definitions attribute of the ITerm object + * + * @param definitions + * The new definitions value + * @since + */ + public void setDefinitions(java.util.List definitions); + + /** + * Gets the glosses attribute of the ITerm object + * + * @return The glosses value + * @since + */ + public java.util.List getGlosses(); + + /** + * Sets the glosses attribute of the ITerm object + * + * @param glosses + * The new glosses value + * @since + */ + public void setGlosses(java.util.List glosses); + + /** + * Gets the keywords attribute of the ITerm object + * + * @return The keywords value + * @since + */ + public java.util.List getKeywords(); + + /** + * Sets the keywords attribute of the ITerm object + * + * @param keywords + * The new keywords value + * @since + */ + public void setKeywords(java.util.List keywords); + + /** + * Gets the modelSentences attribute of the ITerm object + * + * @return The modelSentences value + * @since + */ + public java.util.List getModelSentences(); + + /** + * Sets the modelSentences attribute of the ITerm object + * + * @param modelSentences + * The new modelSentences value + * @since + */ + public void setModelSentences(java.util.List modelSentences); + + /** + * Gets the translationEquivalents attribute of the ITerm object + * + * @return The translationEquivalents value + * @since + */ + public java.util.List getTranslationEquivalents(); + + /** + * Sets the translationEquivalents attribute of the ITerm object + * + * @param translationEquivalents + * The new translationEquivalents value + * @since + */ + public void setTranslationEquivalents(java.util.List translationEquivalents); + + /** + * Gets the relatedTerms attribute of the ITerm object + * + * @return The relatedTerms value + * @since + */ + public java.util.List getRelatedTerms(); + + /** + * Sets the relatedTerms attribute of the ITerm object + * + * @param relatedTerms + * The new relatedTerms value + * @since + */ + public void setRelatedTerms(java.util.List relatedTerms); + + /** + * Gets the passages attribute of the ITerm object + * + * @return The passages value + * @since + */ + public java.util.List getPassages(); + + /** + * Sets the passages attribute of the ITerm object + * + * @param passages + * The new passages value + * @since + */ + public void setPassages(java.util.List passages); + + /** + * Gets the registers attribute of the ITerm object + * + * @return The registers value + * @since + */ + public java.util.List getRegisters(); + + /** + * Sets the registers attribute of the ITerm object + * + * @param registers + * The new registers value + * @since + */ + public void setRegisters(java.util.List registers); + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(ILexComponent component) + throws LexComponentException; + + /** + * Description of the Method + * + * @param list + * Description of the Parameter + * @param pk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(java.util.List list, Integer pk) + throws LexComponentException; + + /** + * Description of the Method + * + * @param pk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(Integer pk) throws LexComponentException; + + /** + * Description of the Method + * + * @param parentPk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findParent(Integer parentPk) + throws LexComponentException; + + /** + * Adds a feature to the Child attribute of the ITerm object + * + * @param component + * The feature to be added to the Child attribute + * @exception LexComponentException + * Description of the Exception + */ + public void addChild(ILexComponent component) throws LexComponentException; + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @exception LexComponentException + * Description of the Exception + */ + public void removeChild(ILexComponent component) + throws LexComponentException; +} + diff --git a/src/java/org/thdl/lex/component/ITransitionalData.java b/src/java/org/thdl/lex/component/ITransitionalData.java new file mode 100644 index 0000000..b1423be --- /dev/null +++ b/src/java/org/thdl/lex/component/ITransitionalData.java @@ -0,0 +1,71 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 16, 2003 + */ +public interface ITransitionalData extends ILexComponent { + + /** + * Gets the parentId attribute of the ITransitionalData object + * + * @return The parentId value + */ + public java.lang.Integer getParentId(); + + /** + * Sets the parentId attribute of the ITransitionalData object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId); + + /** + * Gets the transitionalDataLabel attribute of the ITransitionalData object + * + * @return The transitionalDataLabel value + */ + public java.lang.Integer getTransitionalDataLabel(); + + /** + * Sets the transitionalDataLabel attribute of the ITransitionalData object + * + * @param transitionalDataLabel + * The new transitionalDataLabel value + */ + public void setTransitionalDataLabel(java.lang.Integer transitionalDataLabel); + + /** + * Gets the forPublicConsumption attribute of the ITransitionalData object + * + * @return The forPublicConsumption value + */ + public java.lang.String getForPublicConsumption(); + + /** + * Sets the forPublicConsumption attribute of the ITransitionalData object + * + * @param forPublicConsumption + * The new forPublicConsumption value + */ + public void setForPublicConsumption(java.lang.String forPublicConsumption); + + /** + * Gets the transitionalDataText attribute of the ITransitionalData object + * + * @return The transitionalDataText value + */ + public java.lang.String getTransitionalDataText(); + + /** + * Sets the transitionalDataText attribute of the ITransitionalData object + * + * @param transitionalDataText + * The new transitionalDataText value + */ + public void setTransitionalDataText(java.lang.String transitionalDataText); +} + diff --git a/src/java/org/thdl/lex/component/ITranslationEquivalent.java b/src/java/org/thdl/lex/component/ITranslationEquivalent.java new file mode 100644 index 0000000..37955c6 --- /dev/null +++ b/src/java/org/thdl/lex/component/ITranslationEquivalent.java @@ -0,0 +1,30 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 3, 2003 + */ +public interface ITranslationEquivalent extends ILexComponent { + + /** + * Gets the translationEquivalent attribute of the ITranslationEquivalent + * object + * + * @return The translationEquivalent value + * @since + */ + public java.lang.String getTranslationEquivalent(); + + /** + * Sets the translationEquivalent attribute of the ITranslationEquivalent + * object + * + * @param translationEquivalent + * The new translationEquivalent value + * @since + */ + public void setTranslationEquivalent(java.lang.String translationEquivalent); +} + diff --git a/src/java/org/thdl/lex/component/Keyword.java b/src/java/org/thdl/lex/component/Keyword.java new file mode 100644 index 0000000..9b9d0e9 --- /dev/null +++ b/src/java/org/thdl/lex/component/Keyword.java @@ -0,0 +1,7 @@ +package org.thdl.lex.component; + +import java.io.Serializable; + +public class Keyword extends BaseKeyword implements Serializable { + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/LexComponent.hbm.xml b/src/java/org/thdl/lex/component/LexComponent.hbm.xml new file mode 100644 index 0000000..672f973 --- /dev/null +++ b/src/java/org/thdl/lex/component/LexComponent.hbm.xml @@ -0,0 +1,455 @@ + + + + + + + + org.thdl.lex.component.BaseLexComponent + + + + + + + + + + + + + + + + + org.thdl.lex.component.BaseMeta + + + + + + + + + + + + + + + org.thdl.lex.component.BaseAnalyticalNote + + + + + + + + + + + + + org.thdl.lex.component.BaseTerm + org.thdl.lex.component.LexComponentNode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.thdl.lex.component.BaseDefinition + org.thdl.lex.component.Translatable, org.thdl.lex.component.LexComponentNode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.thdl.lex.component.BaseSubdefinition + org.thdl.lex.component.Translatable, org.thdl.lex.component.LexComponentNode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.thdl.lex.component.BasePronunciation + + + + + + + + + + + + + + org.thdl.lex.component.BaseEtymology + org.thdl.lex.component.Translatable + + + + + + + + + + + + + + + + + + + + + + org.thdl.lex.component.BaseSpelling + + + + + + + + + + + + + + org.thdl.lex.component.BaseGrammaticalFunction + + + + + + + + + + + + + org.thdl.lex.component.BaseEncyclopediaArticle + + + + + + + + + + + + + + org.thdl.lex.component.BaseGloss + + + + + + + + + + + + + + org.thdl.lex.component.BaseKeyword + + + + + + + + + + + + + org.thdl.lex.component.BaseModelSentence + org.thdl.lex.component.Translatable + + + + + + + + + + + + + + + + + + + org.thdl.lex.component.BaseTranslationEquivalent + + + + + + + + + + + + + org.thdl.lex.component.BaseRelatedTerm + + + + + + + + + + + + + + org.thdl.lex.component.BasePassage + org.thdl.lex.component.Translatable + + + + + + + + + + + + + + + + + + + + + + org.thdl.lex.component.BaseSpeechRegister + + + + + + + + + + + + + org.thdl.lex.component.BaseTransitionalData + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/LexComponent.java b/src/java/org/thdl/lex/component/LexComponent.java new file mode 100644 index 0000000..e0f87fb --- /dev/null +++ b/src/java/org/thdl/lex/component/LexComponent.java @@ -0,0 +1,252 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; +import java.util.StringTokenizer; + +import org.apache.commons.beanutils.BeanUtils; +import org.apache.commons.beanutils.MethodUtils; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +// public abstract class LexComponent extends BaseLexComponent implements +// Serializable +public abstract class LexComponent extends BaseLexComponent implements + Serializable { + private Meta meta; + + private Integer metaId; + + private Integer parentId; + + /* + * public List getTranslations() { List nullNullNullNull = null; return + * nullNullNullNull; } + */ + /** + * Gets the meta attribute of the LexComponent object + * + * @return The meta value + */ + public Meta getMeta() { + if (null == this.meta) { + setMeta(new Meta()); + } + return this.meta; + } + + /** + * Sets the meta attribute of the LexComponent object + * + * @param meta + * The new meta value + */ + public void setMeta(Meta meta) { + this.meta = meta; + } + + /** + * Sets the metaId attribute of the LexComponent object + * + * @param metaId + * The new metaId value + */ + public void setMetaId(Integer metaId) { + if (metaId.intValue() == 0) { + this.metaId = null; + } + this.metaId = metaId; + } + + /** + * Gets the metaId attribute of the LexComponent object + * + * @return The metaId value + */ + public Integer getMetaId() { + return metaId; + } + + /** + * Sets the parent attribute of the LexComponent object + * + * @param comp + * The new parent value + */ + public abstract void setParent(ILexComponent comp); + + /** + * Sets the parentId attribute of the LexComponent object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId) { + if (parentId.intValue() == 0) { + this.parentId = null; + } + this.parentId = parentId; + } + + /** + * Gets the parent attribute of the LexComponent object + * + * @return The parent value + */ + public abstract ILexComponent getParent(); + + /** + * Gets the parentId attribute of the LexComponent object + * + * @return The parentId value + */ + public java.lang.Integer getParentId() { + return this.parentId; + } + + /** + * Gets the label attribute of the LexComponent object + * + * @return The label value + * @since + */ + public String getLabel() { + String label = null; + StringTokenizer tokens = new StringTokenizer(this.getClass().getName(), + "."); + while (tokens.hasMoreTokens()) { + label = tokens.nextToken(); + } + String first = label.substring(0, 1).toLowerCase(); + String rest = label.substring(1, label.length()); + return first + rest; + } + + //helper methods + /** + * Description of the Method + * + * @param properties + * Description of Parameter + * @exception LexComponentException + * Description of Exception + * @since + */ + public void populate(Map properties) throws LexComponentException { + try { + BeanUtils.populate(this, properties); + } catch (IllegalAccessException iae) { + throw new LexComponentException(iae); + } catch (java.lang.reflect.InvocationTargetException ite) { + throw new LexComponentException(ite); + } + + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @exception LexComponentException + * Description of the Exception + */ + public void populate(ILexComponent component) throws LexComponentException { + try { + BeanUtils.copyProperties(this, component); + } catch (IllegalAccessException iae) { + throw new LexComponentException(iae); + } catch (java.lang.reflect.InvocationTargetException ite) { + throw new LexComponentException(ite); + } + + } + + /** + * Uses component.label to find the correct sibling list in 'parent' and set + * it to 'list' + * + * @param component + * The feature to be added to the SiblingList attribute + * @param list + * The feature to be added to the SiblingList attribute + * @param parent + * The feature to be added to the SiblingList attribute + * @exception LexComponentException + * Description of the Exception + */ + public void addSiblingList(ILexComponent parent, ILexComponent component, + List list) throws LexComponentException { + String label = component.getLabel(); + + if (label.equals("etymology")) { + label = "etymologies"; + } else if (label.equals("transitionalData")) { + label = "transitionalData"; + } else if (label.equals("grammaticalFunction")) { + label = "functions"; + } else if (label.equals("speechRegister")) { + label = "registers"; + } else { + label = label + "s"; + } + char[] chars = label.toCharArray(); + chars[0] = Character.toUpperCase(chars[0]); + label = "set" + new String(chars); + try { + Object iAmVoid = MethodUtils.invokeMethod(parent, label, list); + } catch (Exception e) { + throw new LexComponentException(e); + } + } + + /** + * Description of the Method + * + * @param o + * Description of the Parameter + * @return Description of the Return Value + */ + public boolean equals(Object o) { + boolean rVal = false; + if (o instanceof ILexComponent) { + Integer a = ((ILexComponent) o).getMetaId(); + Integer b = this.getMetaId(); + if (null != a && null != b) { + rVal = a.equals(b); + } + } + return rVal; + } + + //constructors + + /** + * Constructor for the LexComponent object + * + * @param deleted + * Description of the Parameter + * @param analyticalNotes + * Description of the Parameter + * @param meta + * Description of the Parameter + */ + public LexComponent(java.lang.Boolean deleted, + java.util.List analyticalNotes, org.thdl.lex.component.Meta meta) { + super(deleted, analyticalNotes, meta); + } + + /** + * Constructor for the LexComponent object + */ + public LexComponent() { + super(); + setDeleted(Boolean.FALSE); + } +} + diff --git a/src/java/org/thdl/lex/component/LexComponentException.java b/src/java/org/thdl/lex/component/LexComponentException.java new file mode 100644 index 0000000..6b3948b --- /dev/null +++ b/src/java/org/thdl/lex/component/LexComponentException.java @@ -0,0 +1,54 @@ +package org.thdl.lex.component; + +/** + * Description of the Class + * + * @author travis + * @created October 1, 2003 + */ +public class LexComponentException extends Exception { + /** + * Constructor for the LexComponentException object + * + * @since + */ + public LexComponentException() { + super(); + } + + /** + * Constructor for the LexComponentException object + * + * @param msg + * Description of Parameter + * @since + */ + public LexComponentException(String msg) { + super(msg); + } + + /** + * Constructor for the LexComponentException object + * + * @param e + * Description of Parameter + * @since + */ + public LexComponentException(Exception e) { + super(e); + } + + /** + * Constructor for the LexComponentException object + * + * @param msg + * Description of Parameter + * @param e + * Description of Parameter + * @since + */ + public LexComponentException(String msg, Exception e) { + super(msg, e); + } +} + diff --git a/src/java/org/thdl/lex/component/LexComponentNode.java b/src/java/org/thdl/lex/component/LexComponentNode.java new file mode 100644 index 0000000..30b6622 --- /dev/null +++ b/src/java/org/thdl/lex/component/LexComponentNode.java @@ -0,0 +1,35 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 13, 2003 + */ +public interface LexComponentNode extends ILexComponent { + /* + * public ILexComponent findChild( ILexComponent component ) throws + * LexComponentException; public void addChild( ILexComponent component ) + * throws LexComponentException; + */ + /** + * Gets the childMap attribute of the ISubdefinition object + * + * @return The childMap value + */ + public java.util.HashMap getChildMap(); + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public java.util.List findSiblings(ILexComponent component) + throws LexComponentException; + +} + diff --git a/src/java/org/thdl/lex/component/LexEntryException.java b/src/java/org/thdl/lex/component/LexEntryException.java new file mode 100644 index 0000000..ddf17a8 --- /dev/null +++ b/src/java/org/thdl/lex/component/LexEntryException.java @@ -0,0 +1,11 @@ +package org.thdl.lex.component; + +public class LexEntryException extends Exception { + public LexEntryException() { + super(); + } + + public LexEntryException(String msg) { + super(msg); + } +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/Meta.java b/src/java/org/thdl/lex/component/Meta.java new file mode 100644 index 0000000..fb6cc23 --- /dev/null +++ b/src/java/org/thdl/lex/component/Meta.java @@ -0,0 +1,73 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.Map; + +import org.apache.commons.beanutils.BeanUtils; +import org.apache.commons.lang.builder.ToStringBuilder; +import org.thdl.lex.LexUser; +import org.thdl.lex.Preferences; + +/** + * @author Hibernate CodeGenerator + * @created October 10, 2003 + */ +public class Meta extends BaseMeta implements Serializable { + + /** + * Description of the Method + * + * @param properties + * Description of the Parameter + * @exception LexComponentException + * Description of the Exception + */ + public void populate(Map properties) throws LexComponentException { + try { + BeanUtils.populate(this, properties); + } catch (IllegalAccessException iae) { + throw new LexComponentException(iae); + } catch (java.lang.reflect.InvocationTargetException ite) { + throw new LexComponentException(ite); + } + + } + + /** + * Description of the Method + * + * @return Description of the Return Value + */ + public String toString() { + return new ToStringBuilder(this).toString(); + } + + /** + * default constructor + */ + public Meta() { + } + + /** + * Constructor for the Meta object + * + * @param user + * Description of the Parameter + * @param preferences + * Description of the Parameter + */ + public Meta(LexUser user, Preferences preferences) { + setCreatedBy(user.getId()); + setModifiedBy(user.getId()); + setCreatedByProjSub(preferences.getProjectSubject()); + setModifiedByProjSub(preferences.getProjectSubject()); + setSource(preferences.getSource());//default source is Self from + // Lex.Sources + setLanguage(preferences.getLanguage()); + setScript(preferences.getScript()); + setDialect(preferences.getDialect()); + setNote(preferences.getNote()); + } + +} + diff --git a/src/java/org/thdl/lex/component/ModelSentence.java b/src/java/org/thdl/lex/component/ModelSentence.java new file mode 100644 index 0000000..8262be6 --- /dev/null +++ b/src/java/org/thdl/lex/component/ModelSentence.java @@ -0,0 +1,8 @@ +package org.thdl.lex.component; + +import java.io.Serializable; + +public class ModelSentence extends BaseModelSentence implements Serializable, + Translatable { + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/Passage.java b/src/java/org/thdl/lex/component/Passage.java new file mode 100644 index 0000000..475b4b8 --- /dev/null +++ b/src/java/org/thdl/lex/component/Passage.java @@ -0,0 +1,7 @@ +package org.thdl.lex.component; + +import java.io.Serializable; + +public class Passage extends BasePassage implements Serializable, Translatable { + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/Pronunciation.java b/src/java/org/thdl/lex/component/Pronunciation.java new file mode 100644 index 0000000..c3acac5 --- /dev/null +++ b/src/java/org/thdl/lex/component/Pronunciation.java @@ -0,0 +1,7 @@ +package org.thdl.lex.component; + +import java.io.Serializable; + +public class Pronunciation extends BasePronunciation implements Serializable { + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/RelatedTerm.java b/src/java/org/thdl/lex/component/RelatedTerm.java new file mode 100644 index 0000000..aea0e30 --- /dev/null +++ b/src/java/org/thdl/lex/component/RelatedTerm.java @@ -0,0 +1,7 @@ +package org.thdl.lex.component; + +import java.io.Serializable; + +public class RelatedTerm extends BaseRelatedTerm implements Serializable { + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/SpeechRegister.java b/src/java/org/thdl/lex/component/SpeechRegister.java new file mode 100644 index 0000000..159cabf --- /dev/null +++ b/src/java/org/thdl/lex/component/SpeechRegister.java @@ -0,0 +1,14 @@ +package org.thdl.lex.component; + +import java.io.Serializable; + +/** + * Description of the Class + * + * @author travis + * @created October 5, 2003 + */ +public class SpeechRegister extends BaseSpeechRegister implements Serializable { + +} + diff --git a/src/java/org/thdl/lex/component/Spelling.java b/src/java/org/thdl/lex/component/Spelling.java new file mode 100644 index 0000000..925904d --- /dev/null +++ b/src/java/org/thdl/lex/component/Spelling.java @@ -0,0 +1,7 @@ +package org.thdl.lex.component; + +import java.io.Serializable; + +public class Spelling extends BaseSpelling implements Serializable { + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/Subdefinition.java b/src/java/org/thdl/lex/component/Subdefinition.java new file mode 100644 index 0000000..308c4a7 --- /dev/null +++ b/src/java/org/thdl/lex/component/Subdefinition.java @@ -0,0 +1,165 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; + +import org.thdl.lex.LexConstants; +import org.thdl.lex.LexLogger; + +/** + * Description of the Class + * + * @author travis + * @created October 13, 2003 + */ +public class Subdefinition extends BaseSubdefinition implements Serializable, + Translatable, LexComponentNode { + private HashMap childMap; + + /** + * Sets the childMap attribute of the Term object + * + * @param childMap + * The new childMap value + */ + public void setChildMap(HashMap childMap) { + this.childMap = childMap; + } + + /** + * Gets the childMap attribute of the Term object + * + * @return The childMap value + */ + public HashMap getChildMap() { + if (null == childMap) { + initChildMap(); + } + return childMap; + } + + /** + * Description of the Method + * + * @param parentPk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findParent(Integer parentPk) + throws LexComponentException { + LexLogger.debug("Finding Parent..."); + ILexComponent parent = null; + if (parentPk.equals(this.getMetaId())) { + parent = this; + } else { + parent = findChild(parentPk); + } + return parent; + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public List findSiblings(ILexComponent component) + throws LexComponentException { + List list = null; + if (null == component.getParent()) { + component.setParent(findParent(component.getParentId())); + } + LexComponentNode node = (LexComponentNode) component.getParent(); + list = (List) node.getChildMap().get(component.getLabel()); + + return list; + } + + /** + * Gets the persistentChild attribute of the Term object + * + * @param child + * Description of the Parameter + * @return The persistentChild value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(ILexComponent child) + throws LexComponentException { + List list = findSiblings(child); + child = findChild(list, child.getMetaId()); + return child; + } + + /** + * Description of the Method + * + * @param pk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(Integer pk) throws LexComponentException { + ILexComponent child = null; + + Iterator childMapValues = getChildMap().values().iterator(); + while (childMapValues.hasNext() && null == child) { + List list = (List) childMapValues.next(); + child = findChild(list, pk); + } + return child; + } + + /** + * Description of the Method + * + * @param list + * Description of the Parameter + * @param pk + * Description of the Parameter + * @return Description of the Return Value + */ + public ILexComponent findChild(List list, Integer pk) { + ILexComponent child = null; + if (list != null) { + for (Iterator it = list.iterator(); it.hasNext();) { + ILexComponent lc = (LexComponent) it.next(); + if (lc.getMetaId().equals(pk)) { + child = lc; + break; + } + } + } + return child; + } + + /** + * Description of the Method + */ + private void initChildMap() { + setChildMap(new HashMap()); + getChildMap().put(LexConstants.MODELSENTENCELABEL_VALUE, + getModelSentences()); + getChildMap().put(LexConstants.PASSAGELABEL_VALUE, getPassages()); + getChildMap().put(LexConstants.TRANSLATIONLABEL_VALUE, + getTranslations()); + getChildMap().put(LexConstants.RELATEDTERMLABEL_VALUE, + getRelatedTerms()); + getChildMap().put(LexConstants.REGISTERLABEL_VALUE, getRegisters()); + getChildMap().put(LexConstants.KEYWORDLABEL_VALUE, getKeywords()); + getChildMap().put(LexConstants.ANALYTICALNOTELABEL_VALUE, + getAnalyticalNotes()); + getChildMap().put(LexConstants.TRANSLATIONLABEL_VALUE, + getTranslationEquivalents()); + } + +} + diff --git a/src/java/org/thdl/lex/component/Term.java b/src/java/org/thdl/lex/component/Term.java new file mode 100644 index 0000000..b833178 --- /dev/null +++ b/src/java/org/thdl/lex/component/Term.java @@ -0,0 +1,273 @@ +package org.thdl.lex.component; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; + +import org.thdl.lex.LexConstants; +import org.thdl.lex.LexLogger; + +/** + * Description of the Class + * + * @author travis + * @created October 3, 2003 + */ +public class Term extends BaseTerm implements Serializable, LexComponentNode { + private HashMap childMap; + + /** + * Gets the parentId attribute of the Term object + * + * @return The parentId value + */ + public java.lang.Integer getParentId() { + return null; + } + + /** + * Sets the parentId attribute of the Term object + * + * @param parentId + * The new parentId value + */ + public void setParentId(java.lang.Integer parentId) { + return; + } + + /** + * Gets the parent attribute of the Term object + * + * @return The parent value + */ + public org.thdl.lex.component.ILexComponent getParent() { + return null; + } + + /** + * Sets the parent attribute of the Term object + * + * @param parent + * The new parent value + */ + public void setParent(org.thdl.lex.component.ILexComponent parent) { + return; + } + + /** + * Sets the childMap attribute of the Term object + * + * @param childMap + * The new childMap value + */ + public void setChildMap(HashMap childMap) { + this.childMap = childMap; + } + + /** + * Gets the childMap attribute of the Term object + * + * @return The childMap value + */ + public HashMap getChildMap() { + if (null == childMap) { + initChildMap(); + } + return childMap; + } + + /** + * Description of the Method + * + * @param component + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public List findSiblings(ILexComponent component) + throws LexComponentException { + List list = null; + if (null == component.getParent()) { + component.setParent(findParent(component.getParentId())); + } + LexComponentNode node = (LexComponentNode) component.getParent(); + list = (List) node.getChildMap().get(component.getLabel()); + LexLogger.debug("[Term] List derived from " + node + ": " + list); + + if (null == list) { + LexLogger.debug("findSiblings returned a null list"); + LexLogger.debugComponent(component); + + if (null != getDefinitions()) { + Iterator it = getDefinitions().iterator(); + while (it.hasNext()) { + IDefinition def = (IDefinition) it.next(); + list = def.findSiblings(component); + } + } + + } + + return list; + } + + /** + * Description of the Method + * + * @param parentPk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findParent(Integer parentPk) + throws LexComponentException { + LexLogger.debug("Finding Parent..."); + ILexComponent parent = null; + if (parentPk.equals(this.getMetaId())) { + parent = this; + } else { + parent = findChild(parentPk); + } + return parent; + } + + /** + * Gets the persistentChild attribute of the Term object + * + * @param child + * Description of the Parameter + * @return The persistentChild value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(ILexComponent child) + throws LexComponentException { + List list = findSiblings(child); + child = findChild(list, child.getMetaId()); + return child; + } + + /** + * Description of the Method + * + * @param pk + * Description of the Parameter + * @return Description of the Return Value + * @exception LexComponentException + * Description of the Exception + */ + public ILexComponent findChild(Integer pk) throws LexComponentException { + ILexComponent child = null; + Iterator childMapValues = getChildMap().values().iterator(); + while (childMapValues.hasNext() && null == child) { + List list = (List) childMapValues.next(); + child = findChild(list, pk); + } + if (null != getDefinitions()) { + Iterator definitions = getDefinitions().iterator(); + while (definitions.hasNext() && null == child) { + IDefinition def = (IDefinition) definitions.next(); + child = def.findChild(pk); + } + } + return child; + } + + /** + * Description of the Method + * + * @param list + * Description of the Parameter + * @param pk + * Description of the Parameter + * @return Description of the Return Value + */ + + public ILexComponent findChild(List list, Integer pk) { + ILexComponent child = null; + if (list != null) { + for (Iterator it = list.iterator(); it.hasNext();) { + ILexComponent lc = (LexComponent) it.next(); + if (lc.getMetaId().equals(pk)) { + child = lc; + break; + } + } + } + return child; + } + + /** + * Adds a feature to the Child attribute of the Term object + * + * @param component + * The feature to be added to the Child attribute + * @exception LexComponentException + * Description of the Exception + */ + public void addChild(ILexComponent component) throws LexComponentException { + List list = findSiblings(component); + if (list == null) { + list = new LinkedList(); + LexComponentNode parent = (LexComponentNode) component.getParent(); + parent.addSiblingList(parent, component, list); + parent.getChildMap().put(component.getLabel(), list); + } + list.add(component); + } + + /** + * Description of the Method + * + * @param child + * Description of the Parameter + * @exception LexComponentException + * Description of the Exception + */ + public void removeChild(ILexComponent child) throws LexComponentException { + List list = findSiblings(child); + int index = list.indexOf(child); + list.remove(index); + } + + /** + * Description of the Method + */ + private void initChildMap() { + setChildMap(new HashMap()); + getChildMap().put(LexConstants.PRONUNCIATIONLABEL_VALUE, + getPronunciations()); + getChildMap().put(LexConstants.SPELLINGLABEL_VALUE, getSpellings()); + getChildMap().put(LexConstants.ETYMOLOGYLABEL_VALUE, getEtymologies()); + getChildMap().put(LexConstants.FUNCTIONLABEL_VALUE, getFunctions()); + getChildMap().put(LexConstants.ENCYCLOPEDIA_ARTICLE_LABEL_VALUE, + getEncyclopediaArticles()); + getChildMap().put(LexConstants.DEFINITIONLABEL_VALUE, getDefinitions()); + getChildMap().put(LexConstants.MODELSENTENCELABEL_VALUE, + getModelSentences()); + getChildMap().put(LexConstants.PASSAGELABEL_VALUE, getPassages()); + getChildMap().put(LexConstants.RELATEDTERMLABEL_VALUE, + getRelatedTerms()); + getChildMap().put(LexConstants.REGISTERLABEL_VALUE, getRegisters()); + getChildMap().put(LexConstants.KEYWORDLABEL_VALUE, getKeywords()); + getChildMap().put(LexConstants.ANALYTICALNOTELABEL_VALUE, + getAnalyticalNotes()); + getChildMap().put(LexConstants.TRANSLATIONLABEL_VALUE, + getTranslationEquivalents()); + getChildMap().put(LexConstants.TRANSITIONALDATALABEL_VALUE, + getTransitionalData()); + } + + /** + * Constructor for the Term object + */ + public Term() { + super(); + } + +} + diff --git a/src/java/org/thdl/lex/component/TransitionalData.java b/src/java/org/thdl/lex/component/TransitionalData.java new file mode 100644 index 0000000..f9a652e --- /dev/null +++ b/src/java/org/thdl/lex/component/TransitionalData.java @@ -0,0 +1,8 @@ +package org.thdl.lex.component; + +import java.io.Serializable; + +public class TransitionalData extends BaseTransitionalData implements + Serializable { + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/Translatable.java b/src/java/org/thdl/lex/component/Translatable.java new file mode 100644 index 0000000..333ec10 --- /dev/null +++ b/src/java/org/thdl/lex/component/Translatable.java @@ -0,0 +1,41 @@ +package org.thdl.lex.component; + +/** + * Description of the Interface + * + * @author travis + * @created October 13, 2003 + */ +public interface Translatable extends ILexComponent { + /** + * Gets the translationOf attribute of the Translatable object + * + * @return The translationOf value + */ + public Integer getTranslationOf(); + + /** + * Lists the translationOf attribute of the Translatable object + * + * @param pkReference + * The new translationOf value + */ + public void setTranslationOf(Integer pkReference); + + /** + * Gets the translations attribute of the Translatable object + * + * @return The translations value + */ + public java.util.List getTranslations(); + + /** + * Lists the translations attribute of the Translatable object + * + * @param translations + * The new translations value + */ + public void setTranslations(java.util.List translations); + +} + diff --git a/src/java/org/thdl/lex/component/TranslationEquivalent.java b/src/java/org/thdl/lex/component/TranslationEquivalent.java new file mode 100644 index 0000000..5dbe221 --- /dev/null +++ b/src/java/org/thdl/lex/component/TranslationEquivalent.java @@ -0,0 +1,8 @@ +package org.thdl.lex.component; + +import java.io.Serializable; + +public class TranslationEquivalent extends BaseTranslationEquivalent implements + Serializable { + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/Author.hbm.xml b/src/java/org/thdl/lex/component/child/Author.hbm.xml new file mode 100644 index 0000000..fad5753 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Author.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/Author.java b/src/java/org/thdl/lex/component/child/Author.java new file mode 100644 index 0000000..945d9fe --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Author.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class Author implements Serializable { + + /** identifier field */ + private Integer id; + + /** persistent field */ + private String author; + + /** full constructor */ + public Author(String author) { + this.author = author; + } + + /** default constructor */ + public Author() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getAuthor() { + return this.author; + } + + public void setAuthor(String author) { + this.author = author; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof Author)) + return false; + Author castOther = (Author) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/Dialect.hbm.xml b/src/java/org/thdl/lex/component/child/Dialect.hbm.xml new file mode 100644 index 0000000..eae7bab --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Dialect.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/Dialect.java b/src/java/org/thdl/lex/component/child/Dialect.java new file mode 100644 index 0000000..b6a0d6b --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Dialect.java @@ -0,0 +1,71 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class Dialect implements Serializable { + + /** identifier field */ + private Integer id; + + /** persistent field */ + private short majorDialectFamily; + + /** persistent field */ + private short specificDialect; + + /** full constructor */ + public Dialect(short majorDialectFamily, short specificDialect) { + this.majorDialectFamily = majorDialectFamily; + this.specificDialect = specificDialect; + } + + /** default constructor */ + public Dialect() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public short getMajorDialectFamily() { + return this.majorDialectFamily; + } + + public void setMajorDialectFamily(short majorDialectFamily) { + this.majorDialectFamily = majorDialectFamily; + } + + public short getSpecificDialect() { + return this.specificDialect; + } + + public void setSpecificDialect(short specificDialect) { + this.specificDialect = specificDialect; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof Dialect)) + return false; + Dialect castOther = (Dialect) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/EtymologyType.hbm.xml b/src/java/org/thdl/lex/component/child/EtymologyType.hbm.xml new file mode 100644 index 0000000..7410a59 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/EtymologyType.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/EtymologyType.java b/src/java/org/thdl/lex/component/child/EtymologyType.java new file mode 100644 index 0000000..bb2d0bf --- /dev/null +++ b/src/java/org/thdl/lex/component/child/EtymologyType.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class EtymologyType implements Serializable { + + /** identifier field */ + private Short id; + + /** persistent field */ + private String etymologyType; + + /** full constructor */ + public EtymologyType(String etymologyType) { + this.etymologyType = etymologyType; + } + + /** default constructor */ + public EtymologyType() { + } + + public Short getId() { + return this.id; + } + + public void setId(Short id) { + this.id = id; + } + + public String getEtymologyType() { + return this.etymologyType; + } + + public void setEtymologyType(String etymologyType) { + this.etymologyType = etymologyType; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof EtymologyType)) + return false; + EtymologyType castOther = (EtymologyType) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/Function.hbm.xml b/src/java/org/thdl/lex/component/child/Function.hbm.xml new file mode 100644 index 0000000..436e846 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Function.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/Function.java b/src/java/org/thdl/lex/component/child/Function.java new file mode 100644 index 0000000..813c5da --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Function.java @@ -0,0 +1,71 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class Function implements Serializable { + + /** identifier field */ + private Short id; + + /** persistent field */ + private short functionGeneral; + + /** persistent field */ + private short functionSpecific; + + /** full constructor */ + public Function(short functionGeneral, short functionSpecific) { + this.functionGeneral = functionGeneral; + this.functionSpecific = functionSpecific; + } + + /** default constructor */ + public Function() { + } + + public Short getId() { + return this.id; + } + + public void setId(Short id) { + this.id = id; + } + + public short getFunctionGeneral() { + return this.functionGeneral; + } + + public void setFunctionGeneral(short functionGeneral) { + this.functionGeneral = functionGeneral; + } + + public short getFunctionSpecific() { + return this.functionSpecific; + } + + public void setFunctionSpecific(short functionSpecific) { + this.functionSpecific = functionSpecific; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof Function)) + return false; + Function castOther = (Function) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/FunctionGeneral.java b/src/java/org/thdl/lex/component/child/FunctionGeneral.java new file mode 100644 index 0000000..89623df --- /dev/null +++ b/src/java/org/thdl/lex/component/child/FunctionGeneral.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class FunctionGeneral implements Serializable { + + /** identifier field */ + private Short id; + + /** persistent field */ + private String functionGeneral; + + /** full constructor */ + public FunctionGeneral(String functionGeneral) { + this.functionGeneral = functionGeneral; + } + + /** default constructor */ + public FunctionGeneral() { + } + + public Short getId() { + return this.id; + } + + public void setId(Short id) { + this.id = id; + } + + public String getFunctionGeneral() { + return this.functionGeneral; + } + + public void setFunctionGeneral(String functionGeneral) { + this.functionGeneral = functionGeneral; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof FunctionGeneral)) + return false; + FunctionGeneral castOther = (FunctionGeneral) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/FunctionPrimitive.java b/src/java/org/thdl/lex/component/child/FunctionPrimitive.java new file mode 100644 index 0000000..a815230 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/FunctionPrimitive.java @@ -0,0 +1,71 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class FunctionPrimitive implements Serializable { + + /** identifier field */ + private java.lang.Short id; + + /** persistent field */ + private short functionGeneral; + + /** persistent field */ + private short functionSpecific; + + /** full constructor */ + public FunctionPrimitive(short functionGeneral, short functionSpecific) { + this.functionGeneral = functionGeneral; + this.functionSpecific = functionSpecific; + } + + /** default constructor */ + public FunctionPrimitive() { + } + + public java.lang.Short getId() { + return this.id; + } + + public void setId(java.lang.Short id) { + this.id = id; + } + + public short getFunctionGeneral() { + return this.functionGeneral; + } + + public void setFunctionGeneral(short functionGeneral) { + this.functionGeneral = functionGeneral; + } + + public short getFunctionSpecific() { + return this.functionSpecific; + } + + public void setFunctionSpecific(short functionSpecific) { + this.functionSpecific = functionSpecific; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof FunctionPrimitive)) + return false; + FunctionPrimitive castOther = (FunctionPrimitive) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/FunctionSpecific.java b/src/java/org/thdl/lex/component/child/FunctionSpecific.java new file mode 100644 index 0000000..16facea --- /dev/null +++ b/src/java/org/thdl/lex/component/child/FunctionSpecific.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class FunctionSpecific implements Serializable { + + /** identifier field */ + private Short id; + + /** persistent field */ + private String functionSpecific; + + /** full constructor */ + public FunctionSpecific(String functionSpecific) { + this.functionSpecific = functionSpecific; + } + + /** default constructor */ + public FunctionSpecific() { + } + + public Short getId() { + return this.id; + } + + public void setId(Short id) { + this.id = id; + } + + public String getFunctionSpecific() { + return this.functionSpecific; + } + + public void setFunctionSpecific(String functionSpecific) { + this.functionSpecific = functionSpecific; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof FunctionSpecific)) + return false; + FunctionSpecific castOther = (FunctionSpecific) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/FunctionsGeneral.hbm.xml b/src/java/org/thdl/lex/component/child/FunctionsGeneral.hbm.xml new file mode 100644 index 0000000..9dee4c7 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/FunctionsGeneral.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/FunctionsGeneral.java b/src/java/org/thdl/lex/component/child/FunctionsGeneral.java new file mode 100644 index 0000000..dd6a5dc --- /dev/null +++ b/src/java/org/thdl/lex/component/child/FunctionsGeneral.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class FunctionsGeneral implements Serializable { + + /** identifier field */ + private java.lang.Short id; + + /** persistent field */ + private java.lang.String functionGeneral; + + /** full constructor */ + public FunctionsGeneral(java.lang.String functionGeneral) { + this.functionGeneral = functionGeneral; + } + + /** default constructor */ + public FunctionsGeneral() { + } + + public java.lang.Short getId() { + return this.id; + } + + public void setId(java.lang.Short id) { + this.id = id; + } + + public java.lang.String getFunctionGeneral() { + return this.functionGeneral; + } + + public void setFunctionGeneral(java.lang.String functionGeneral) { + this.functionGeneral = functionGeneral; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof FunctionsGeneral)) + return false; + FunctionsGeneral castOther = (FunctionsGeneral) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/FunctionsSpecific.hbm.xml b/src/java/org/thdl/lex/component/child/FunctionsSpecific.hbm.xml new file mode 100644 index 0000000..fa02429 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/FunctionsSpecific.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/FunctionsSpecific.java b/src/java/org/thdl/lex/component/child/FunctionsSpecific.java new file mode 100644 index 0000000..83304d3 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/FunctionsSpecific.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class FunctionsSpecific implements Serializable { + + /** identifier field */ + private java.lang.Short id; + + /** persistent field */ + private java.lang.String functionSpecific; + + /** full constructor */ + public FunctionsSpecific(java.lang.String functionSpecific) { + this.functionSpecific = functionSpecific; + } + + /** default constructor */ + public FunctionsSpecific() { + } + + public java.lang.Short getId() { + return this.id; + } + + public void setId(java.lang.Short id) { + this.id = id; + } + + public java.lang.String getFunctionSpecific() { + return this.functionSpecific; + } + + public void setFunctionSpecific(java.lang.String functionSpecific) { + this.functionSpecific = functionSpecific; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof FunctionsSpecific)) + return false; + FunctionsSpecific castOther = (FunctionsSpecific) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/Language.hbm.xml b/src/java/org/thdl/lex/component/child/Language.hbm.xml new file mode 100644 index 0000000..cd11a16 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Language.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/Language.java b/src/java/org/thdl/lex/component/child/Language.java new file mode 100644 index 0000000..8312a15 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Language.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class Language implements Serializable { + + /** identifier field */ + private Short id; + + /** persistent field */ + private String language; + + /** full constructor */ + public Language(String language) { + this.language = language; + } + + /** default constructor */ + public Language() { + } + + public Short getId() { + return this.id; + } + + public void setId(Short id) { + this.id = id; + } + + public String getLanguage() { + return this.language; + } + + public void setLanguage(String language) { + this.language = language; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof Language)) + return false; + Language castOther = (Language) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/LiteraryForm.hbm.xml b/src/java/org/thdl/lex/component/child/LiteraryForm.hbm.xml new file mode 100644 index 0000000..5d7ef1b --- /dev/null +++ b/src/java/org/thdl/lex/component/child/LiteraryForm.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/LiteraryForm.java b/src/java/org/thdl/lex/component/child/LiteraryForm.java new file mode 100644 index 0000000..6b512ba --- /dev/null +++ b/src/java/org/thdl/lex/component/child/LiteraryForm.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class LiteraryForm implements Serializable { + + /** identifier field */ + private Integer id; + + /** persistent field */ + private String literaryForm; + + /** full constructor */ + public LiteraryForm(String literaryForm) { + this.literaryForm = literaryForm; + } + + /** default constructor */ + public LiteraryForm() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getLiteraryForm() { + return this.literaryForm; + } + + public void setLiteraryForm(String literaryForm) { + this.literaryForm = literaryForm; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof LiteraryForm)) + return false; + LiteraryForm castOther = (LiteraryForm) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/LiteraryGenre.hbm.xml b/src/java/org/thdl/lex/component/child/LiteraryGenre.hbm.xml new file mode 100644 index 0000000..b36247a --- /dev/null +++ b/src/java/org/thdl/lex/component/child/LiteraryGenre.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/LiteraryGenre.java b/src/java/org/thdl/lex/component/child/LiteraryGenre.java new file mode 100644 index 0000000..c61c444 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/LiteraryGenre.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class LiteraryGenre implements Serializable { + + /** identifier field */ + private Integer id; + + /** persistent field */ + private String literaryGenre; + + /** full constructor */ + public LiteraryGenre(String literaryGenre) { + this.literaryGenre = literaryGenre; + } + + /** default constructor */ + public LiteraryGenre() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getLiteraryGenre() { + return this.literaryGenre; + } + + public void setLiteraryGenre(String literaryGenre) { + this.literaryGenre = literaryGenre; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof LiteraryGenre)) + return false; + LiteraryGenre castOther = (LiteraryGenre) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/LiteraryPeriod.hbm.xml b/src/java/org/thdl/lex/component/child/LiteraryPeriod.hbm.xml new file mode 100644 index 0000000..594b016 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/LiteraryPeriod.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/LiteraryPeriod.java b/src/java/org/thdl/lex/component/child/LiteraryPeriod.java new file mode 100644 index 0000000..c88bfc6 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/LiteraryPeriod.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class LiteraryPeriod implements Serializable { + + /** identifier field */ + private Integer id; + + /** persistent field */ + private String literaryPeriod; + + /** full constructor */ + public LiteraryPeriod(String literaryPeriod) { + this.literaryPeriod = literaryPeriod; + } + + /** default constructor */ + public LiteraryPeriod() { + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getLiteraryPeriod() { + return this.literaryPeriod; + } + + public void setLiteraryPeriod(String literaryPeriod) { + this.literaryPeriod = literaryPeriod; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof LiteraryPeriod)) + return false; + LiteraryPeriod castOther = (LiteraryPeriod) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/LiterarySource.hbm.xml b/src/java/org/thdl/lex/component/child/LiterarySource.hbm.xml new file mode 100644 index 0000000..33f6721 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/LiterarySource.hbm.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/LiterarySource.java b/src/java/org/thdl/lex/component/child/LiterarySource.java new file mode 100644 index 0000000..30d1061 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/LiterarySource.java @@ -0,0 +1,213 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; +import java.util.Date; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class LiterarySource implements Serializable { + + /** identifier field */ + private Integer id; + + /** nullable persistent field */ + private Integer literaryPeriod; + + /** nullable persistent field */ + private Integer literaryGenre; + + /** nullable persistent field */ + private Integer literaryForm; + + /** nullable persistent field */ + private Integer author; + + /** nullable persistent field */ + private String sourceNormalizedTitle; + + /** nullable persistent field */ + private String tibetanDate; + + /** nullable persistent field */ + private String internationalDate; + + /** nullable persistent field */ + private String edition; + + /** nullable persistent field */ + private String publisher; + + /** nullable persistent field */ + private String isbn; + + /** nullable persistent field */ + private Date yearPublished; + + /** persistent field */ + private Integer volumeNumber; + + /** nullable persistent field */ + private String pagination; + + /** full constructor */ + public LiterarySource(Integer literaryPeriod, Integer literaryGenre, + Integer literaryForm, Integer author, String sourceNormalizedTitle, + String tibetanDate, String internationalDate, String edition, + String publisher, String isbn, Date yearPublished, + Integer volumeNumber, String pagination) { + this.literaryPeriod = literaryPeriod; + this.literaryGenre = literaryGenre; + this.literaryForm = literaryForm; + this.author = author; + this.sourceNormalizedTitle = sourceNormalizedTitle; + this.tibetanDate = tibetanDate; + this.internationalDate = internationalDate; + this.edition = edition; + this.publisher = publisher; + this.isbn = isbn; + this.yearPublished = yearPublished; + this.volumeNumber = volumeNumber; + this.pagination = pagination; + } + + /** default constructor */ + public LiterarySource() { + } + + /** minimal constructor */ + public LiterarySource(Integer volumeNumber) { + this.volumeNumber = volumeNumber; + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getLiteraryPeriod() { + return this.literaryPeriod; + } + + public void setLiteraryPeriod(Integer literaryPeriod) { + this.literaryPeriod = literaryPeriod; + } + + public Integer getLiteraryGenre() { + return this.literaryGenre; + } + + public void setLiteraryGenre(Integer literaryGenre) { + this.literaryGenre = literaryGenre; + } + + public Integer getLiteraryForm() { + return this.literaryForm; + } + + public void setLiteraryForm(Integer literaryForm) { + this.literaryForm = literaryForm; + } + + public Integer getAuthor() { + return this.author; + } + + public void setAuthor(Integer author) { + this.author = author; + } + + public String getSourceNormalizedTitle() { + return this.sourceNormalizedTitle; + } + + public void setSourceNormalizedTitle(String sourceNormalizedTitle) { + this.sourceNormalizedTitle = sourceNormalizedTitle; + } + + public String getTibetanDate() { + return this.tibetanDate; + } + + public void setTibetanDate(String tibetanDate) { + this.tibetanDate = tibetanDate; + } + + public String getInternationalDate() { + return this.internationalDate; + } + + public void setInternationalDate(String internationalDate) { + this.internationalDate = internationalDate; + } + + public String getEdition() { + return this.edition; + } + + public void setEdition(String edition) { + this.edition = edition; + } + + public String getPublisher() { + return this.publisher; + } + + public void setPublisher(String publisher) { + this.publisher = publisher; + } + + public String getIsbn() { + return this.isbn; + } + + public void setIsbn(String isbn) { + this.isbn = isbn; + } + + public Date getYearPublished() { + return this.yearPublished; + } + + public void setYearPublished(Date yearPublished) { + this.yearPublished = yearPublished; + } + + public Integer getVolumeNumber() { + return this.volumeNumber; + } + + public void setVolumeNumber(Integer volumeNumber) { + this.volumeNumber = volumeNumber; + } + + public String getPagination() { + return this.pagination; + } + + public void setPagination(String pagination) { + this.pagination = pagination; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof LiterarySource)) + return false; + LiterarySource castOther = (LiterarySource) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/MajorDialectFamily.hbm.xml b/src/java/org/thdl/lex/component/child/MajorDialectFamily.hbm.xml new file mode 100644 index 0000000..07fcf4d --- /dev/null +++ b/src/java/org/thdl/lex/component/child/MajorDialectFamily.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/MajorDialectFamily.java b/src/java/org/thdl/lex/component/child/MajorDialectFamily.java new file mode 100644 index 0000000..50753dd --- /dev/null +++ b/src/java/org/thdl/lex/component/child/MajorDialectFamily.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class MajorDialectFamily implements Serializable { + + /** identifier field */ + private Short id; + + /** nullable persistent field */ + private String majorDialectFamily; + + /** full constructor */ + public MajorDialectFamily(String majorDialectFamily) { + this.majorDialectFamily = majorDialectFamily; + } + + /** default constructor */ + public MajorDialectFamily() { + } + + public Short getId() { + return this.id; + } + + public void setId(Short id) { + this.id = id; + } + + public String getMajorDialectFamily() { + return this.majorDialectFamily; + } + + public void setMajorDialectFamily(String majorDialectFamily) { + this.majorDialectFamily = majorDialectFamily; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof MajorDialectFamily)) + return false; + MajorDialectFamily castOther = (MajorDialectFamily) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/PhoneticsType.hbm.xml b/src/java/org/thdl/lex/component/child/PhoneticsType.hbm.xml new file mode 100644 index 0000000..6515a82 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/PhoneticsType.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/PhoneticsType.java b/src/java/org/thdl/lex/component/child/PhoneticsType.java new file mode 100644 index 0000000..ca4c5a0 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/PhoneticsType.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class PhoneticsType implements Serializable { + + /** identifier field */ + private Short id; + + /** persistent field */ + private String phoneticsType; + + /** full constructor */ + public PhoneticsType(String phoneticsType) { + this.phoneticsType = phoneticsType; + } + + /** default constructor */ + public PhoneticsType() { + } + + public Short getId() { + return this.id; + } + + public void setId(Short id) { + this.id = id; + } + + public String getPhoneticsType() { + return this.phoneticsType; + } + + public void setPhoneticsType(String phoneticsType) { + this.phoneticsType = phoneticsType; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof PhoneticsType)) + return false; + PhoneticsType castOther = (PhoneticsType) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/Preferences.hbm.xml b/src/java/org/thdl/lex/component/child/Preferences.hbm.xml new file mode 100644 index 0000000..a67cebd --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Preferences.hbm.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/ProjectSubject.hbm.xml b/src/java/org/thdl/lex/component/child/ProjectSubject.hbm.xml new file mode 100644 index 0000000..2b28d2b --- /dev/null +++ b/src/java/org/thdl/lex/component/child/ProjectSubject.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/ProjectSubject.java b/src/java/org/thdl/lex/component/child/ProjectSubject.java new file mode 100644 index 0000000..8ce15df --- /dev/null +++ b/src/java/org/thdl/lex/component/child/ProjectSubject.java @@ -0,0 +1,89 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class ProjectSubject implements Serializable { + + /** identifier field */ + private Integer id; + + /** nullable persistent field */ + private String projectSubject; + + /** persistent field */ + private Integer leader; + + /** nullable persistent field */ + private String participantList; + + /** full constructor */ + public ProjectSubject(String projectSubject, Integer leader, + String participantList) { + this.projectSubject = projectSubject; + this.leader = leader; + this.participantList = participantList; + } + + /** default constructor */ + public ProjectSubject() { + } + + /** minimal constructor */ + public ProjectSubject(Integer leader) { + this.leader = leader; + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getProjectSubject() { + return this.projectSubject; + } + + public void setProjectSubject(String projectSubject) { + this.projectSubject = projectSubject; + } + + public Integer getLeader() { + return this.leader; + } + + public void setLeader(Integer leader) { + this.leader = leader; + } + + public String getParticipantList() { + return this.participantList; + } + + public void setParticipantList(String participantList) { + this.participantList = participantList; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof ProjectSubject)) + return false; + ProjectSubject castOther = (ProjectSubject) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/Register.hbm.xml b/src/java/org/thdl/lex/component/child/Register.hbm.xml new file mode 100644 index 0000000..a6ed75e --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Register.hbm.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/Register.java b/src/java/org/thdl/lex/component/child/Register.java new file mode 100644 index 0000000..3b8d6af --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Register.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class Register implements Serializable { + + /** identifier field */ + private Short id; + + /** persistent field */ + private String register; + + /** full constructor */ + public Register(String register) { + this.register = register; + } + + /** default constructor */ + public Register() { + } + + public Short getId() { + return this.id; + } + + public void setId(Short id) { + this.id = id; + } + + public String getRegister() { + return this.register; + } + + public void setRegister(String register) { + this.register = register; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof Register)) + return false; + Register castOther = (Register) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/RelatedTermType.hbm.xml b/src/java/org/thdl/lex/component/child/RelatedTermType.hbm.xml new file mode 100644 index 0000000..89bc969 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/RelatedTermType.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/RelatedTermType.java b/src/java/org/thdl/lex/component/child/RelatedTermType.java new file mode 100644 index 0000000..dca298a --- /dev/null +++ b/src/java/org/thdl/lex/component/child/RelatedTermType.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class RelatedTermType implements Serializable { + + /** identifier field */ + private Short id; + + /** persistent field */ + private String relatedTermType; + + /** full constructor */ + public RelatedTermType(String relatedTermType) { + this.relatedTermType = relatedTermType; + } + + /** default constructor */ + public RelatedTermType() { + } + + public Short getId() { + return this.id; + } + + public void setId(Short id) { + this.id = id; + } + + public String getRelatedTermType() { + return this.relatedTermType; + } + + public void setRelatedTermType(String relatedTermType) { + this.relatedTermType = relatedTermType; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof RelatedTermType)) + return false; + RelatedTermType castOther = (RelatedTermType) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/Script.hbm.xml b/src/java/org/thdl/lex/component/child/Script.hbm.xml new file mode 100644 index 0000000..738bbe3 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Script.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/Script.java b/src/java/org/thdl/lex/component/child/Script.java new file mode 100644 index 0000000..c437144 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Script.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class Script implements Serializable { + + /** identifier field */ + private Short id; + + /** persistent field */ + private String script; + + /** full constructor */ + public Script(String script) { + this.script = script; + } + + /** default constructor */ + public Script() { + } + + public Short getId() { + return this.id; + } + + public void setId(Short id) { + this.id = id; + } + + public String getScript() { + return this.script; + } + + public void setScript(String script) { + this.script = script; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof Script)) + return false; + Script castOther = (Script) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/Source.hbm.xml b/src/java/org/thdl/lex/component/child/Source.hbm.xml new file mode 100644 index 0000000..ade374f --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Source.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/Source.java b/src/java/org/thdl/lex/component/child/Source.java new file mode 100644 index 0000000..14a1ac6 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/Source.java @@ -0,0 +1,76 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class Source implements Serializable { + + /** identifier field */ + private Integer id; + + /** persistent field */ + private String sourceTitle; + + /** nullable persistent field */ + private String sourceDescription; + + /** full constructor */ + public Source(String sourceTitle, String sourceDescription) { + this.sourceTitle = sourceTitle; + this.sourceDescription = sourceDescription; + } + + /** default constructor */ + public Source() { + } + + /** minimal constructor */ + public Source(String sourceTitle) { + this.sourceTitle = sourceTitle; + } + + public Integer getId() { + return this.id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getSourceTitle() { + return this.sourceTitle; + } + + public void setSourceTitle(String sourceTitle) { + this.sourceTitle = sourceTitle; + } + + public String getSourceDescription() { + return this.sourceDescription; + } + + public void setSourceDescription(String sourceDescription) { + this.sourceDescription = sourceDescription; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof Source)) + return false; + Source castOther = (Source) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/SpecificDialect.hbm.xml b/src/java/org/thdl/lex/component/child/SpecificDialect.hbm.xml new file mode 100644 index 0000000..b3513a6 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/SpecificDialect.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/SpecificDialect.java b/src/java/org/thdl/lex/component/child/SpecificDialect.java new file mode 100644 index 0000000..dd439c9 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/SpecificDialect.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class SpecificDialect implements Serializable { + + /** identifier field */ + private Short id; + + /** nullable persistent field */ + private String specificDialect; + + /** full constructor */ + public SpecificDialect(String specificDialect) { + this.specificDialect = specificDialect; + } + + /** default constructor */ + public SpecificDialect() { + } + + public Short getId() { + return this.id; + } + + public void setId(Short id) { + this.id = id; + } + + public String getSpecificDialect() { + return this.specificDialect; + } + + public void setSpecificDialect(String specificDialect) { + this.specificDialect = specificDialect; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof SpecificDialect)) + return false; + SpecificDialect castOther = (SpecificDialect) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/SpellingType.hbm.xml b/src/java/org/thdl/lex/component/child/SpellingType.hbm.xml new file mode 100644 index 0000000..5c949ac --- /dev/null +++ b/src/java/org/thdl/lex/component/child/SpellingType.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/SpellingType.java b/src/java/org/thdl/lex/component/child/SpellingType.java new file mode 100644 index 0000000..27ef092 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/SpellingType.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class SpellingType implements Serializable { + + /** identifier field */ + private Short id; + + /** persistent field */ + private String spellingType; + + /** full constructor */ + public SpellingType(String spellingType) { + this.spellingType = spellingType; + } + + /** default constructor */ + public SpellingType() { + } + + public Short getId() { + return this.id; + } + + public void setId(Short id) { + this.id = id; + } + + public String getSpellingType() { + return this.spellingType; + } + + public void setSpellingType(String spellingType) { + this.spellingType = spellingType; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof SpellingType)) + return false; + SpellingType castOther = (SpellingType) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/TransitionalDataLabel.hbm.xml b/src/java/org/thdl/lex/component/child/TransitionalDataLabel.hbm.xml new file mode 100644 index 0000000..eb2a274 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/TransitionalDataLabel.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/component/child/TransitionalDataLabel.java b/src/java/org/thdl/lex/component/child/TransitionalDataLabel.java new file mode 100644 index 0000000..ddc6c2c --- /dev/null +++ b/src/java/org/thdl/lex/component/child/TransitionalDataLabel.java @@ -0,0 +1,59 @@ +package org.thdl.lex.component.child; + +import java.io.Serializable; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.commons.lang.builder.ToStringBuilder; + +/** @author Hibernate CodeGenerator */ +public class TransitionalDataLabel implements Serializable { + + /** identifier field */ + private Short id; + + /** nullable persistent field */ + private String transitionalDataLabel; + + /** full constructor */ + public TransitionalDataLabel(String transitionalDataLabel) { + this.transitionalDataLabel = transitionalDataLabel; + } + + /** default constructor */ + public TransitionalDataLabel() { + } + + public Short getId() { + return this.id; + } + + public void setId(Short id) { + this.id = id; + } + + public String getTransitionalDataLabel() { + return this.transitionalDataLabel; + } + + public void setTransitionalDataLabel(String transitionalDataLabel) { + this.transitionalDataLabel = transitionalDataLabel; + } + + public String toString() { + return new ToStringBuilder(this).append("id", getId()).toString(); + } + + public boolean equals(Object other) { + if (!(other instanceof TransitionalDataLabel)) + return false; + TransitionalDataLabel castOther = (TransitionalDataLabel) other; + return new EqualsBuilder().append(this.getId(), castOther.getId()) + .isEquals(); + } + + public int hashCode() { + return new HashCodeBuilder().append(getId()).toHashCode(); + } + +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/component/child/User.hbm.xml b/src/java/org/thdl/lex/component/child/User.hbm.xml new file mode 100644 index 0000000..4111ca8 --- /dev/null +++ b/src/java/org/thdl/lex/component/child/User.hbm.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/test/LexTestCase.java b/src/java/org/thdl/lex/test/LexTestCase.java new file mode 100644 index 0000000..ec013f4 --- /dev/null +++ b/src/java/org/thdl/lex/test/LexTestCase.java @@ -0,0 +1,80 @@ +package org.thdl.lex.test; + +import net.sourceforge.jwebunit.WebTestCase; + + +/** + * Description of the Class + * + * @author travis + * @created November 10, 2003 + */ +public class LexTestCase extends WebTestCase +{ + + /** + * Description of the Method + */ + public void begin() + { + beginAt( "/action" ); + System.out.println( "Starting at /action" ); + } + + + /** + * A unit test for JUnit + * + * @param user Description of the Parameter + * @param pass Description of the Parameter + */ + public void testLoginPageInterceptThenProceed( String user, String pass ) + { + System.out.println( "Verifying Login Form intercept" ); + assertFormPresent( "loginForm" ); + assertFormElementPresent( "username" ); + assertFormElementPresent( "password" ); + setFormElement( "username", user ); + setFormElement( "password", pass ); + submit(); + } + + + /** + * A unit test for JUnit + */ + public void testLex() + { + assertFormPresent( "quickSearch" ); + assertFormPresent( "newTerm" ); + assertFormPresent( "defults" ); + assertFormPresent( "preferences" ); + } + + + /** + *Constructor for the LexTestCase object + * + * @param name Description of the Parameter + */ + public LexTestCase( String name ) + { + super( name ); + getTestContext().setBaseUrl( "http://haley.local:2020/lex" ); + } + + + /** + * The main program for the LexTestCase class + * + * @param args The command line arguments + */ + public static void main( String[] args ) + { + LexTestCase tc = new LexTestCase( "menu" ); + tc.begin(); + tc.testLoginPageInterceptThenProceed( args[0], args[1] ); + tc.testLex(); + } +} + diff --git a/src/java/org/thdl/lex/util/DictionaryImporter.java b/src/java/org/thdl/lex/util/DictionaryImporter.java new file mode 100644 index 0000000..226c771 --- /dev/null +++ b/src/java/org/thdl/lex/util/DictionaryImporter.java @@ -0,0 +1,560 @@ +package org.thdl.lex.util; + +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.net.URL; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.LinkedList; +import java.util.ListIterator; +import java.util.ResourceBundle; + +import org.thdl.lex.LexComponentRepository; +import org.thdl.lex.component.ITerm; +import org.thdl.lex.component.Meta; +import org.thdl.lex.component.Term; +import org.thdl.lex.component.TransitionalData; +import org.thdl.tib.scanner.Manipulate; + +public class DictionaryImporter { + private static final String INSERT_META = "INSERT INTO Meta (createdby, modifiedby, createdbyprojsub, modifiedbyprojsub, createdon," + + "modifiedon, source, language, dialect, script, note) VALUES ( ?, ? , ?, ?, NOW(), NOW(), 0, 0, 0, 1, ?)"; + + private static final String SELECT_META = "SELECT metaid FROM Terms WHERE term = ?"; + + private static final String INSERT_TERM = "INSERT INTO Terms (metaid, term) VALUES (?,?)"; + + private static final String UPDATE_TRANS = "UPDATE TransitionalData SET TransitionalDataText = ? WHERE metaid = ?"; + + private static final String INSERT_TRANS = "INSERT INTO TransitionalData (metaid, parentid, precedence, transitionaldatalabel, forpublicconsumption, " + + "transitionaldatatext) VALUES (?, ?, ?, ?, ?, ? )"; + + private static PrintWriter out; + + private static BufferedReader in; + + private static String delimiter; + + private static int delimiterType; + + private static Integer creator; + + private static String note; + + private static Integer proj; + + private static String publicCons; + + private static Integer label; + + private static Statement sqlStatement; + + private static Connection conn; + + private static Connection conn2; + + private static Connection conn3; + + private static Connection conn4; + + private static Connection conn5; + + private static PreparedStatement insertMetaStmt; + + private static PreparedStatement selectMetaStmt; + + private static PreparedStatement insertTermStmt; + + private static PreparedStatement updateTransStmt; + + private static PreparedStatement insertTransStmt; + + public final static int delimiterGeneric = 0; + + public final static int delimiterAcip = 1; + + public final static int delimiterDash = 2; + + private static int counter = 0; + + //helpers + public void doImport() throws Exception { + String entrada, s1, s2, alternateWords[]; + int marker, marker2, len, currentLine = 1; + //long start = System.currentTimeMillis(); + + while ((entrada = in.readLine()) != null) { + entrada = entrada.trim(); + if (!entrada.equals("")) { + switch (delimiterType) { + /* + * this is needed to make sure that the dash used in reverse + * vowels with extended wylie is not confused with the dash that + * separates definiendum and definition. + */ + case delimiterDash: + marker = entrada.indexOf('-'); + len = entrada.length(); + while (marker >= 0 + && marker < len - 1 + && Manipulate.isVowel(entrada.charAt(marker + 1)) + && !Character.isWhitespace(entrada + .charAt(marker - 1))) { + marker = entrada.indexOf('-', marker + 1); + } + break; + default: + marker = entrada.indexOf(delimiter); + } + if (marker < 0) { + System.out.println("Error loading line " + currentLine); + System.out.println(entrada); + } else { + s1 = Manipulate.deleteQuotes(entrada.substring(0, marker) + .trim()); + s2 = Manipulate.deleteQuotes(entrada.substring( + marker + delimiter.length()).trim()); + if (!s2.equals("")) { + // check if there are multiple entries for a single + // definition + marker2 = s1.indexOf(';'); + if (marker2 > 0) { + alternateWords = s1.split(";"); + for (marker2 = 0; marker2 < alternateWords.length; marker2++) { + addRecord(alternateWords[marker2], s2); + } + } + addRecord(s1, s2); + } + } + } + currentLine++; + } + + //System.out.println( "Duration: " + ( System.currentTimeMillis() - + // start )/60000 + " minutes"); + System.out.flush(); + if (out != null) + out.flush(); + if (sqlStatement != null) + sqlStatement.close(); + if (conn != null) + conn.close(); + } + + public void addRecordManually(String term, String definition) + throws Exception { + Boolean result; + ResultSet set; + int metaID, metaIDTrans, prec; + String currentDef; + + // These escapes should not be needed since we're using Prepared + // Statements + /* + * definition = Manipulate.replace(definition, "\\", "@@@@"); definition = + * Manipulate.replace(definition, "@@@@", "\\\\"); definition = + * Manipulate.replace(definition, "\"", "@@@@"); definition = + * Manipulate.replace(definition, "@@@@", "\\\""); + */ + + // displaying for debugging purposes only + // System.out.println(term); + // Check to see if term is already there + selectMetaStmt.setString(1, term); + set = selectMetaStmt.executeQuery(); + + // if it is get its metaID, else add it + if (!set.first()) { + insertMetaStmt.executeUpdate(); + set = sqlStatement.executeQuery("SELECT MAX(metaid) FROM Meta"); + set.first(); + metaID = set.getInt(1); + + insertTermStmt.setInt(1, metaID); + insertTermStmt.setString(2, term); + insertTermStmt.executeUpdate(); + } else + metaID = set.getInt(1); + + // See if there is an associated TransitionalData with this term and + // project + set = sqlStatement + .executeQuery("SELECT TransitionalDataText, TransitionalData.metaid FROM TransitionalData, Meta where TransitionalData.parentid = " + + metaID + + " and TransitionalData.metaid = Meta.metaid and createdbyprojsub = " + + proj.toString()); + + // if there is, append the definition if it is different. If not add it. + if (set.first()) { + currentDef = set.getString(1).trim(); + + // These escapes should not be needed since we're using Prepared + // Statements + /* + * currentDef = Manipulate.replace(currentDef, "\\", "@@@@"); + * currentDef = Manipulate.replace(currentDef, "@@@@", "\\\\"); + * currentDef = Manipulate.replace(currentDef, "\"", "@@@@"); + * currentDef = Manipulate.replace(currentDef, "@@@@", "\\\""); + */ + + if (currentDef.indexOf(definition) < 0) { + if (!currentDef.equals("")) + definition = currentDef + ". " + definition; + metaIDTrans = set.getInt(2); + updateTransStmt.setString(1, definition); + updateTransStmt.setInt(2, metaIDTrans); + updateTransStmt.executeUpdate(); + } + } else { + insertMetaStmt.executeUpdate(); + set = sqlStatement.executeQuery("SELECT MAX(metaid) FROM Meta"); + set.first(); + metaIDTrans = set.getInt(1); + set = sqlStatement + .executeQuery("SELECT precedence FROM TransitionalData WHERE parentid = " + + metaID + " ORDER BY precedence DESC"); + if (set.first()) + prec = set.getInt(1) + 1; + else + prec = 0; + + insertTransStmt.setInt(1, metaIDTrans); + insertTransStmt.setInt(2, metaID); + insertTransStmt.setInt(3, prec); + insertTransStmt.setInt(4, label.intValue()); + insertTransStmt.setString(5, publicCons); + insertTransStmt.setString(6, definition); + insertTransStmt.executeUpdate(); + } + } + + private void addRecord(String term, String definition) throws Exception { + if (counter++ % 1000 == 0) { + System.out.println("Adding term " + counter + " " + term); + } + term = Manipulate.replace(term, " ", " "); + if (out != null) + out.println(term + " - " + definition); + else if (sqlStatement != null) + addRecordManually(term, definition); + else + addRecordViaHibernate(term, definition); + + } + + /** + * Main class to map the term and its definition to the Lex Component object + * model. Works but painfully slow! + */ + public void addRecordViaHibernate(String term, String definition) + throws Exception { + LinkedList ll; + ListIterator li; + ITerm lexTerm; + TransitionalData trans = null; + boolean found, newTerm = false; + String existingDef; + + // displaying for debugging purposes only + // System.out.println(term); + + //check to see if the term already exists + lexTerm = LexComponentRepository.loadTermByTerm(term); + + found = false; + + //if it doesn't create a new term. + if (null == lexTerm) { + // System.out.println("New term"); + lexTerm = new Term(); + lexTerm.setTerm(term); + lexTerm.setMeta(defaultMeta()); + //save the Term to the database. This step is necessary here to + // generate a unique id + LexComponentRepository.save(lexTerm); + newTerm = true; + } else { + // System.out.println("Old term"); + li = lexTerm.getTransitionalData().listIterator(); + + while (li.hasNext()) { + trans = (TransitionalData) li.next(); + if (trans.getMeta().getCreatedByProjSub().equals(proj)) { + found = true; + break; + } + } + newTerm = false; + } + + //OLD CODE + /* + * TransitionalData trans = getTransData( lexTerm.getId() ); + * + * trans.setTransitionalDataLabel( new Short( "1" ) ); + * trans.setForPublicConsumption( "true" ); trans.setTermId( + * termParent.getId() ); + * + * String newText = null; if (null != trans.getTransitionalDataText() ) + * newText = trans.getTransitionalDataText() + ". " + + * def.toString().trim(); else newText = def.toString().trim(); + * trans.setTransitionalDataText( newText ); trans.save(); + * + * out.print( termParent.getTerm() + " "); + * + * int subTarget = 30; if ( trans.getTransitionalDataText().length() < + * 40 ) subTarget = trans.getTransitionalDataText().length(); out.print( + * trans.getTransitionalDataText().substring( 0, subTarget ) ); + */ + + //NEW CODE + // check if there is already a defition for this project + if (found) { + existingDef = trans.getTransitionalDataText().trim(); + if (existingDef.equals("")) + found = false; + else if (existingDef.indexOf(definition) < 0) { + definition = existingDef + ". " + definition; + found = false; + } + } else { + // System.out.println("New definition"); + trans = new TransitionalData(); + trans.setMeta(defaultMeta()); + trans.setTransitionalDataLabel(label); + trans.setParentId(lexTerm.getMetaId()); + trans.setForPublicConsumption(publicCons); + if (newTerm) { + ll = new LinkedList(); + ll.add(trans); + lexTerm.setTransitionalData(ll); + } else + lexTerm.getTransitionalData().add(trans); + + } + + if (!found) { + trans.setTransitionalDataText(definition); + //save the Term to the database. + LexComponentRepository.save(lexTerm); + } + } + + public Meta defaultMeta() { + //use the file src/sql/import-updates.sql to add new metadata for use + // in this method. + Meta meta = new Meta(); + meta.setCreatedBy(creator); + meta.setModifiedBy(creator); + meta.setCreatedByProjSub(proj); + meta.setModifiedByProjSub(proj); + meta.setSource(new Integer(0)); + // meta.setTranslationOf( new Integer( 0 ) ); + meta.setLanguage(new Integer("0")); + meta.setDialect(new Integer("0")); + meta.setScript(new Integer("1")); + meta.setNote(note); + return meta; + } + + /** + * Used only if the database is being accessed manually instead of through + * Hibernate + */ + private static void initConnections() { + ResourceBundle rb = ResourceBundle.getBundle("dictionary-importer"); + + // Loading driver + try { + Class.forName(rb.getString("dictionaryimporter.driverclassname")) + .newInstance(); + } catch (Exception ex) { + System.out.println("Mysql driver couldn't be loaded!"); + System.exit(0); + } + + // Connecting to database + try { + conn = DriverManager.getConnection(rb + .getString("dictionaryimporter.url")); + conn2 = DriverManager.getConnection(rb + .getString("dictionaryimporter.url")); + conn3 = DriverManager.getConnection(rb + .getString("dictionaryimporter.url")); + conn4 = DriverManager.getConnection(rb + .getString("dictionaryimporter.url")); + conn5 = DriverManager.getConnection(rb + .getString("dictionaryimporter.url")); + } catch (Exception ex) { + // handle any errors + System.out.println("Could not connect to database!"); + ex.printStackTrace(); + System.exit(0); + } + } + + private static void initStatements() { + try { + sqlStatement = conn.createStatement(); + insertMetaStmt = conn.prepareStatement(INSERT_META); + selectMetaStmt = conn.prepareStatement(SELECT_META); + insertTermStmt = conn.prepareStatement(INSERT_TERM); + updateTransStmt = conn.prepareStatement(UPDATE_TRANS); + insertTransStmt = conn.prepareStatement(INSERT_TRANS); + } catch (Exception ex) { + // handle any errors + System.out.println("Could not create statement!"); + ex.printStackTrace(); + System.exit(0); + } + } + + public DictionaryImporter() { + } + + public static void main(String[] args) throws Exception { + String format = null; + InputStream is; + + int argNum = args.length, currentArg = 0; + String option; + boolean file = false; + boolean manual = false; + out = null; + + delimiterType = delimiterDash; + delimiter = "-"; + creator = new Integer(80); + proj = new Integer(18); + note = "This entry comes from The Rangjung Yeshe Tibetan-English Dictionary of Buddhist Culture (www.rangjung.com)."; + publicCons = "true"; + label = new Integer(6); + sqlStatement = null; + conn = null; + + if (argNum <= currentArg) { + System.out + .println("Syntax: DictionaryImporter [-manual] [-format format] [-tab | -delim delimiter] " + + "[-creator creator-id] [-proj project-id] [-label label] [-note note] " + + "[-pub-cons public-consumption-marker] [input-file] [output-error-file]"); + return; + } + + while (args[currentArg].charAt(0) == '-') { + option = args[currentArg].substring(1); + currentArg++; + if (option.equals("manual")) { + initConnections(); + initStatements(); + manual = true; + } else if (option.equals("format")) { + if (argNum <= currentArg) { + System.out.println("Syntax error: format expected."); + return; + } + format = args[currentArg]; + currentArg++; + } else if (option.equals("tab")) { + delimiter = "\t"; + delimiterType = delimiterGeneric; + } else if (option.equals("delim")) { + if (argNum <= currentArg) { + System.out.println("Syntax error: delimiter expected."); + return; + } + delimiter = args[currentArg]; + currentArg++; + } else if (option.equals("creator")) { + if (argNum <= currentArg) { + System.out.println("Syntax error: creator expected."); + return; + } + creator = new Integer(args[currentArg]); + currentArg++; + } else if (option.equals("proj")) { + if (argNum <= currentArg) { + System.out.println("Syntax error: project expected."); + return; + } + proj = new Integer(args[currentArg]); + currentArg++; + } else if (option.equals("label")) { + if (argNum <= currentArg) { + System.out.println("Syntax error: label expected."); + return; + } + label = new Integer(args[currentArg]); + currentArg++; + } else if (option.equals("note")) { + if (argNum <= currentArg) { + System.out.println("Syntax error: note expected."); + return; + } + note = args[currentArg]; + currentArg++; + } else if (option.equals("pub-cons")) { + if (argNum <= currentArg) { + System.out + .println("Syntax error: public consumption description expected."); + return; + } + publicCons = args[currentArg]; + currentArg++; + } + } + + switch (args.length - currentArg) { + case 0: + out = new PrintWriter(System.out); + if (format != null) { + System.out.println("Syntax error. Input file expected."); + return; + } + break; + case 1: + file = true; + break; + default: + if (format != null) + out = new PrintWriter(new OutputStreamWriter( + new FileOutputStream(args[currentArg + 1]), format)); + else + out = new PrintWriter( + new FileOutputStream(args[currentArg + 1])); + file = true; + } + + if (file) { + if (args[currentArg].indexOf("http://") >= 0) + is = new BufferedInputStream((new URL(args[currentArg])) + .openStream()); + else + is = new FileInputStream(args[currentArg]); + + if (format == null) + in = new BufferedReader(new InputStreamReader(is)); + else + in = new BufferedReader(new InputStreamReader(is, format)); + } + + if (manual) { + insertMetaStmt.setString(1, creator.toString()); + insertMetaStmt.setString(2, creator.toString()); + insertMetaStmt.setString(3, proj.toString()); + insertMetaStmt.setString(4, proj.toString()); + insertMetaStmt.setString(5, note); + } + + new DictionaryImporter().doImport(); + } +} \ No newline at end of file diff --git a/src/java/org/thdl/lex/util/LexComponentDataTransfer.hbm.xml b/src/java/org/thdl/lex/util/LexComponentDataTransfer.hbm.xml new file mode 100644 index 0000000..4e7e620 --- /dev/null +++ b/src/java/org/thdl/lex/util/LexComponentDataTransfer.hbm.xml @@ -0,0 +1,471 @@ + + + + + + + + org.thdl.lex.component.BaseLexComponent + + + + + + + + + + + + + + + + + + + org.thdl.lex.component.BaseMeta + + + + + + + + + + + + + + + org.thdl.lex.component.BaseAnalyticalNote + + + + + + + + + + + + + org.thdl.lex.component.BaseTerm + org.thdl.lex.component.LexComponentNode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.thdl.lex.component.BaseDefinition + org.thdl.lex.component.Translatable, org.thdl.lex.component.LexComponentNode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.thdl.lex.component.BaseSubdefinition + org.thdl.lex.component.Translatable, org.thdl.lex.component.LexComponentNode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.thdl.lex.component.BasePronunciation + + + + + + + + + + + + + + org.thdl.lex.component.BaseEtymology + org.thdl.lex.component.Translatable + + + + + + + + + + + + + + + + + + + + + + org.thdl.lex.component.BaseSpelling + + + + + + + + + + + + + + org.thdl.lex.component.BaseGrammaticalFunction + + + + + + + + + + + + + org.thdl.lex.component.BaseEncyclopediaArticle + + + + + + + + + + + + + + org.thdl.lex.component.BaseGloss + + + + + + + + + + + + + + org.thdl.lex.component.BaseKeyword + + + + + + + + + + + + + org.thdl.lex.component.BaseModelSentence + org.thdl.lex.component.Translatable + + + + + + + + + + + + + + + + + + + org.thdl.lex.component.BaseTranslationEquivalent + + + + + + + + + + + + + org.thdl.lex.component.BaseRelatedTerm + + + + + + + + + + + + + + org.thdl.lex.component.BasePassage + org.thdl.lex.component.Translatable + + + + + + + + + + + + + + + + + + + + + + org.thdl.lex.component.BaseSpeechRegister + + + + + + + + + + + + + org.thdl.lex.component.BaseTransitionalData + + + + + + + + + + + + + + + + + diff --git a/src/java/org/thdl/lex/util/hibernate-data-transfer.cfg.xml.sample b/src/java/org/thdl/lex/util/hibernate-data-transfer.cfg.xml.sample new file mode 100644 index 0000000..e7a765f --- /dev/null +++ b/src/java/org/thdl/lex/util/hibernate-data-transfer.cfg.xml.sample @@ -0,0 +1,57 @@ + + + + + + + + + +com.mysql.jdbc.Driver +jdbc:mysql://localhost/LexNew +USER_XYZ +PASS_XYZ +true +utf-8 + + + + + + + false + true + net.sf.hibernate.dialect.MySQLDialect + + + + + + + + + + + diff --git a/src/java/org/thdl/tib/scanner/Manipulate.java b/src/java/org/thdl/tib/scanner/Manipulate.java new file mode 100644 index 0000000..300ecdf --- /dev/null +++ b/src/java/org/thdl/tib/scanner/Manipulate.java @@ -0,0 +1,374 @@ +/* + The contents of this file are subject to the AMP 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 AMP web site + (http://www.tibet.iteso.mx/Guatemala/). + + 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 Andres Montano Pellegrini. Portions + created by Andres Montano Pellegrini are Copyright 2001 Andres Montano + Pellegrini. All Rights Reserved. + + Contributor(s): ______________________________________. + */ +package org.thdl.tib.scanner; + +/** + * Miscelaneous static methods for the manipulation of Tibetan text. + * + * @author Andrés Montano Pellegrini + */ + +public class Manipulate { + + /* + * public static String[] parseFields (String s, char delimiter) { int pos; + * String field; SimplifiedLinkedList ll = new SimplifiedLinkedList(); + * + * while ((pos = s.indexOf(delimiter))>=0) { field = s.substring(0, + * pos).trim(); ll.addLast(field); s = s.substring(pos+1); } + * + * ll.addLast(s.trim()); return ll.toStringArray(); } + */ + + public static String replace(String linea, String origSub, String newSub) { + int pos, lenOrig = origSub.length(); + while ((pos = linea.indexOf(origSub)) != -1) { + linea = linea.substring(0, pos).concat(newSub).concat( + linea.substring(pos + lenOrig)); + } + return linea; + } + + public static boolean isVowel(char ch) { + ch = Character.toLowerCase(ch); + return ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u'; + } + + public static String wylieToAcip(String palabra) { + // DLC FIXME: for unknown things, return null. + if (palabra.equals("@##")) + return "#"; + if (palabra.equals("@#")) + return "*"; + if (palabra.equals("!")) + return "`"; + if (palabra.equals("b+h")) + return "BH"; + if (palabra.equals("d+h")) + return "DH"; + if (palabra.equals("X")) + return null; + if (palabra.equals("iA")) + return null; + if (palabra.equals("ai")) + return "EE"; + if (palabra.equals("au")) + return "OO"; + if (palabra.equals("$")) + return null; + if (palabra.startsWith("@") || palabra.startsWith("#")) + return null; // we can't convert this in isolation! We need context. + char[] caract; + int i, j, len; + String nuevaPalabra; + + caract = palabra.toCharArray(); + len = palabra.length(); + for (j = 0; j < len; j++) { + i = j; + /* + * ciclo: while(true) // para manejar excepciones; que honda! { + * switch(caract[i]) { case 'A': if (i>0) { i--; break; } default: + */ + if (Character.isLowerCase(caract[i])) + caract[i] = Character.toUpperCase(caract[i]); + else if (Character.isUpperCase(caract[i])) + caract[i] = Character.toLowerCase(caract[i]); + /* + * break ciclo; } } + */ + } + nuevaPalabra = new String(caract); + // nuevaPalabra = palabra.toUpperCase(); + + // ahora hacer los cambios de Michael Roach + + nuevaPalabra = replace(nuevaPalabra, "TSH", "TQQ"); + nuevaPalabra = replace(nuevaPalabra, "TS", "TZ"); + nuevaPalabra = replace(nuevaPalabra, "TQQ", "TS"); + nuevaPalabra = replace(nuevaPalabra, "a", "'A"); + nuevaPalabra = replace(nuevaPalabra, "i", "'I"); + nuevaPalabra = replace(nuevaPalabra, "u", "'U"); + nuevaPalabra = replace(nuevaPalabra, "-I", "i"); + nuevaPalabra = replace(nuevaPalabra, "/", ","); + nuevaPalabra = replace(nuevaPalabra, "_", " "); + nuevaPalabra = replace(nuevaPalabra, "|", ";"); + nuevaPalabra = fixWazur(nuevaPalabra); + return nuevaPalabra; + } + + public static String acipToWylie(String linea) { + char caract[], ch, chP, chN; + String nuevaLinea; + int i, len; + boolean open; + + caract = linea.toCharArray(); + len = linea.length(); + for (i = 0; i < len; i++) { + if (Character.isLowerCase(caract[i])) + caract[i] = Character.toUpperCase(caract[i]); + else if (Character.isUpperCase(caract[i])) + caract[i] = Character.toLowerCase(caract[i]); + } + nuevaLinea = new String(caract); + + /* + * ahora hacer los cambios de Michael Roach ts -> tsh, tz -> ts, v -> w, + * TH -> Th, kSH, kaSH -> k+Sh, SH -> Sh, : -> H, dh -> d+h, gh -> g+h, + * bh -> b+h, dzh -> dz+h, aa -> a, a'a -> A, ai->i, aee ->ai, au->u, + * aoo->au, ae->e, ao->o, ee->ai, oo->au, 'I->-I I->-i, a'i->I, a'u->U, + * a'e->E, a'o->O, a'i->I, a'u->U, a'e->E, a'o->O, ,->/, # -> @##, * -> + * @#, \ -> ?, ` -> !, /-/ -> (-), ga-y -> g.y, g-y -> g.y, na-y -> n+y + */ + + nuevaLinea = replace(nuevaLinea, "ts", "tq"); + nuevaLinea = replace(nuevaLinea, "tz", "ts"); + nuevaLinea = replace(nuevaLinea, "tq", "tsh"); + nuevaLinea = replace(nuevaLinea, "v", "w"); + nuevaLinea = replace(nuevaLinea, "TH", "Th"); + nuevaLinea = replace(nuevaLinea, "kSH", "k+Sh"); + nuevaLinea = replace(nuevaLinea, "kaSH", "k+Sh"); + nuevaLinea = replace(nuevaLinea, "SH", "Sh"); + nuevaLinea = replace(nuevaLinea, ":", "H"); + nuevaLinea = replace(nuevaLinea, "dh", "d+h"); + nuevaLinea = replace(nuevaLinea, "gh", "g+h"); + nuevaLinea = replace(nuevaLinea, "bh", "b+h"); + nuevaLinea = replace(nuevaLinea, "dzh", "dz+h"); + nuevaLinea = replace(nuevaLinea, "aa", "a"); + nuevaLinea = replace(nuevaLinea, "ai", "i"); + nuevaLinea = replace(nuevaLinea, "aee", "ai"); + nuevaLinea = replace(nuevaLinea, "au", "u"); + nuevaLinea = replace(nuevaLinea, "aoo", "au"); + nuevaLinea = replace(nuevaLinea, "ae", "e"); + nuevaLinea = replace(nuevaLinea, "ao", "o"); + nuevaLinea = replace(nuevaLinea, "ee", "ai"); + nuevaLinea = replace(nuevaLinea, "oo", "au"); + nuevaLinea = replace(nuevaLinea, "\'I", "\'q"); + nuevaLinea = replace(nuevaLinea, "I", "-i"); + nuevaLinea = replace(nuevaLinea, "\'q", "-I"); + nuevaLinea = replace(nuevaLinea, "\\", "?"); + nuevaLinea = replace(nuevaLinea, "`", "!"); + nuevaLinea = replace(nuevaLinea, "ga-y", "g.y"); + nuevaLinea = replace(nuevaLinea, "g-y", "g.y"); + nuevaLinea = replace(nuevaLinea, "na-y", "n+y"); + + len = nuevaLinea.length(); + for (i = 0; i < len; i++) { + ch = nuevaLinea.charAt(i); + switch (ch) { + case '#': + nuevaLinea = nuevaLinea.substring(0, i) + "@##" + + nuevaLinea.substring(i + 1); + i += 3; + len += 2; + break; + case '*': + nuevaLinea = nuevaLinea.substring(0, i) + "@#" + + nuevaLinea.substring(i + 1); + i += 2; + len++; + break; + case '\'': + if (i > 0 && i < len - 1) { + chP = nuevaLinea.charAt(i - 1); + chN = nuevaLinea.charAt(i + 1); + if (Character.isLetter(chP) && !isVowel(chP) + && isVowel(chN)) { + nuevaLinea = nuevaLinea.substring(0, i) + + Character.toUpperCase(chN) + + nuevaLinea.substring(i + 2); + len--; + } + } + break; + case 'a': + if ((i < len - 3 && nuevaLinea.charAt(i + 1) == '\'' && isVowel(nuevaLinea + .charAt(i + 2))) + && (i == 0 || !Character.isLetter(nuevaLinea + .charAt(i - 1)))) { + nuevaLinea = nuevaLinea.substring(0, i) + + Character.toUpperCase(nuevaLinea.charAt(i + 2)) + + nuevaLinea.substring(i + 3); + len -= 2; + } + } + } + + open = false; + for (i = 0; i < len; i++) { + ch = nuevaLinea.charAt(i); + if (ch == '/') { + if (open) { + nuevaLinea = nuevaLinea.substring(0, i) + ")" + + nuevaLinea.substring(i + 1); + open = false; + } + + else { + nuevaLinea = nuevaLinea.substring(0, i) + "(" + + nuevaLinea.substring(i + 1); + open = true; + } + } + } + nuevaLinea = replace(nuevaLinea, ",", "/"); + + return nuevaLinea; + } + + public static String fixWazur(String linea) { + int i; + + for (i = 1; i < linea.length(); i++) { + if (linea.charAt(i) == 'W') { + if (Character.isLetter(linea.charAt(i - 1))) + linea = linea.substring(0, i) + 'V' + + linea.substring(i + 1); + } + } + return linea; + } + + /** + * Returns the base letter of a syllable. Does not include the vowel! + * Ignoring cases for now. + */ + public static String getBaseLetter(String sil) { + sil = sil.toLowerCase(); + + int i = 0; + char ch, ch2; + + while (!isVowel(sil.charAt(i))) + i++; + if (i == 0) + return ""; + + i--; + if (i == -1) + return ""; + + if (sil.charAt(i) == '-') + i--; + + ch = sil.charAt(i); + + // check to see if it is a subscript (y, r, l, w) + if (i > 0) { + switch (ch) { + case 'r': + case 'l': + case 'w': + i--; + break; + case 'y': + ch2 = sil.charAt(i - 1); + switch (ch2) { + case '.': + return "y"; + case 'n': + return "ny"; + default: + i--; + } + } + } + if (i == 0) + return sil.substring(i, i + 1); + ch = sil.charAt(i); + ch2 = sil.charAt(i - 1); + + switch (ch) { + case 'h': + switch (ch2) { + case 'k': + case 'c': + case 't': + case 'p': + case 'z': + return sil.substring(i - 1, i + 1); + case 's': + if (i - 2 >= 0 && sil.charAt(i - 2) == 't') + return "tsh"; + else + return "sh"; + default: + return "h"; + } + case 's': + if (ch2 == 't') + return "ts"; + else + return "s"; + case 'g': + if (ch2 == 'n') + return "ng"; + else + return "g"; + case 'z': + if (ch2 == 'd') + return "dz"; + else + return "z"; + } + return sil.substring(i, i + 1); + } + + public static String deleteQuotes(String s) { + int length = s.length(); + if (length > 2) { + if ((s.charAt(0) == '\"') && (s.charAt(length - 1) == '\"')) + return s.substring(1, length - 1); + } + return s; + } + + /** + * Syntax: java Manipulate [word-file] < source-dic-entries > + * dest-dic-entries + * + * Takes the output of ConsoleScannerFilter (in RY format), converts the + * Wylie to Acip and displays the result in csv format. arch-palabras es + * usado solo cuando deseamos las palabras cambiadas a otro archivo. + * + * + * public static void main (String[] args) throws Exception { String linea, + * palabra, definicion, nuevaPalabra; int marker; PrintWriter psPalabras = + * null; + * + * BufferedReader keyb = new BufferedReader(new + * InputStreamReader(System.in)); + * + * if (args.length==1) psPalabras = new PrintWriter(new + * FileOutputStream(args[0])); + * + * while ((linea=keyb.readLine())!=null) { if (linea.trim().equals("")) + * continue; marker = linea.indexOf('-'); if (marker <0) // linea tiene + * error { palabra = linea; definicion = ""; } else { palabra = + * linea.substring(0, marker).trim(); definicion = + * linea.substring(marker+1).trim(); } + * + * nuevaPalabra = wylieToAcip(palabra); + * + * if (psPalabras!=null) psPalabras.println(nuevaPalabra); else + * System.out.print(nuevaPalabra + '\t'); if (definicion.equals("")) + * System.out.println(palabra); else System.out.println(palabra + '\t' + + * definicion); } if (psPalabras!=null) psPalabras.flush(); } + */ +} \ No newline at end of file diff --git a/src/sql/import-updates.sql b/src/sql/import-updates.sql new file mode 100644 index 0000000..d546bae --- /dev/null +++ b/src/sql/import-updates.sql @@ -0,0 +1,15 @@ +use lex; + +--add TransitionalDataLabels +insert into TransitionalDataLabels values ( null, "Text That You Want To Appear In The Public Interface To Describe This Dictionary" ); + +--add some new project subjects +insert int ProjectSubjects( id, projectSubject, leader, participantList ) + values ( null, "The Name Of The New Project Subject,bod yig med", 0, null ); + +select "+++++Display Newly inserted ids"; +select id, transitionalDataLabel from TransitionalDataLabels order by id desc; +select id, projectSubject from ProjectSubjects order by id desc; + + + diff --git a/src/sql/lex-flat-data.sql b/src/sql/lex-flat-data.sql new file mode 100644 index 0000000..2448ac1 --- /dev/null +++ b/src/sql/lex-flat-data.sql @@ -0,0 +1,272 @@ +# phpMyAdmin SQL Dump +# version 2.5.3 +# http://www.phpmyadmin.net +# +# Host: localhost +# Generation Time: Oct 05, 2003 at 10:27 PM +# Server version: 3.23.58 +# PHP Version: 4.1.2 +# +# Database : `Lex` +# + +# +# Dumping data for table `Authors` +# + +INSERT INTO Authors (id, author) VALUES (1, 'Kun-mkhyen Klo·n-chen-pa Dri-med-\'od-zer, 1308-1363'); + +# +# Dumping data for table `Dialects` +# + + +# +# Dumping data for table `EtymologyTypes` +# + +INSERT INTO EtymologyTypes (id, etymologyType) VALUES (2, 'Historical (linguistic), bod yig med'), +(3, 'Creative, bod yig med'), +(1, 'Basic (syllabic), bod yig med'); + +# +# Dumping data for table `Functions` +# + + +# +# Dumping data for table `FunctionsGeneral` +# + +INSERT INTO FunctionsGeneral (id, functionGeneral) VALUES (2, 'Adjective,bod yig med/'), +(3, 'Adverb,bod yig med/'), +(4, 'Article,bod yig med/'), +(5, 'Verb,bod yig med/'), +(6, 'Noun,bod yig med/'), +(7, 'Conjunction,bod yig med/'), +(8, 'Particle,bod yig med/'), +(9, 'Pronoun,bod yig med/'), +(10, 'Phrase,bod yig med/'), +(1, 'Case Markers,bod yig med/'); + +# +# Dumping data for table `FunctionsSpecific` +# + +INSERT INTO FunctionsSpecific (id, functionSpecific) VALUES (2, 'Absolutive,bod yig med/'), +(3, 'Ergative,bod yig med/'), +(4, 'Genitive,bod yig med/'), +(5, 'Locative,bod yig med/'), +(6, 'Oblique,bod yig med/'), +(7, 'Superlative,bod yig med/'), +(8, 'Comparative,bod yig med/'), +(9, 'Absolute,bod yig med/'), +(10, 'Quantifier,bod yig med/'), +(11, 'Determinant,bod yig med/'), +(12, 'Auxiliary,bod yig med/'), +(13, 'Causative,bod yig med/'), +(14, 'Modal,bod yig med/'), +(15, 'Resultative,bod yig med/'), +(16, 'Volitional,bod yig med/'), +(17, 'Present,bod yig med/'), +(18, 'Past,bod yig med/'), +(19, 'Future,bod yig med/'), +(20, 'Imperative,bod yig med/'), +(21, 'Proper,bod yig med/'), +(22, 'auxiliary,bod yig med/'), +(23, 'Connective,bod yig med/'), +(24, 'Disjunctive,bod yig med/'), +(25, 'Personal,bod yig med/'), +(26, 'Demonstrative,bod yig med/'), +(27, 'Interrogative,bod yig med/'), +(28, 'Verb Phrase,bod yig med/'), +(29, 'Noun Phrase,bod yig med/'), +(30, 'Postpositional,bod yig med/'), +(31, 'Negative,bod yig med/'), +(32, 'Finalizing,bod yig med/'), +(33, 'Interrogative,bod yig med/'), +(34, 'Pluralizers,bod yig med/'), +(35, 'Expressive,bod yig med/'), +(1, 'Ablative,bod yig med/'); + +# +# Dumping data for table `Languages` +# + +INSERT INTO Languages (id, language) VALUES (2, 'Tibetan,bod skad/'), +(3, 'Classical Chinese,gnas rabs kyi rgya skad/'), +(4, 'Modern Chinese,deng dus kyi rgya skad/'), +(5, 'Sanskrit,legs sbyar skad/'), +(6, 'Hindi,deng dus kyi rgya gar skad hin di skad/'), +(7, 'Nepali,bal yul skad/'), +(8, 'Zhangzhung,zhang zhung skad/'), +(9, 'Mongolian,sog skad/'), +(10, 'Korean,khro\'o shan skad dam ko ri ya\'i skad/'), +(11, 'Japanese,nyi hong skad/'), +(12, 'Pali,pa li skad/'), +(1, 'English,dbyin skad/'); + +# +# Dumping data for table `LiteraryForms` +# + +INSERT INTO LiteraryForms (id, literaryForm) VALUES (2, 'prose, bod skad med/'), +(1, 'verse, bod skad med/'); + +# +# Dumping data for table `LiteraryGenres` +# + +INSERT INTO LiteraryGenres (id, literaryGenre) VALUES (2, 'epic, bod skad med/'), +(3, 'philosophy, bod skad med/'), +(4, 'history, bod skad med/'), +(1, 'biography, bod skad med/'); + +# +# Dumping data for table `LiteraryPeriods` +# + +INSERT INTO LiteraryPeriods (id, literaryPeriod) VALUES (2, 'classical, bod skad med/'), +(3, 'modern, bod skad med/'), +(1, 'old, bod skad med/'); + +# +# Dumping data for table `LiterarySources` +# + +INSERT INTO LiterarySources (id, literaryPeriod, literaryGenre, literaryForm, author, sourceNormalizedTitle, tibetanDate, internationalDate, edition, publisher, isbn, yearPublished, volumeNumber, pagination) VALUES (1, 2, 3, 1, 2, 'Mdzod bdun : the famed seven treasuries of Vajray¯ana Buddhist philosophy', 'unknown', '1308-1363', 'Gangtok, Sikkim : Sherab Gyaltsen and Khyentse Labrang, 1983', 'Gangtok, Sikkim', 'unknown', 00000000000000, 0, 'unknown'); + +# +# Dumping data for table `MajorDialectFamilies` +# + +INSERT INTO MajorDialectFamilies (id, majorDialectFamily) VALUES (2, 'Ladakh/Balti,la dwags sbal ti yul skad _nub khongs/'), +(3, 'Central Tibetan,dbus gtsang yul skad _dbus khongs/'), +(4, 'Lhasa,dbus gtsag lha sa yul skad _dbus khongs/'), +(5, 'Kham/Hor,khams hor yul skad _shar khongs/'), +(6, 'Amdo,a mdo yul skad _byang shar khongs/'), +(7, 'Dzongkha/Bhutanese,rdzong kha \'bras ljongs _lho khongs/'), +(1, 'Standard Tibetan,spyi skad _khyab khongs chen po\'i yul skad/'); + +# +# Dumping data for table `PhoneticsTypes` +# + +INSERT INTO PhoneticsTypes (id, phoneticsType) VALUES (2, 'THDL Simplified Phonetics,bod yig med/'), +(3, 'Tournadre Phonetics, bod yig med/'), +(1, 'IPA Phonetics,bod yig med/'); + +# +# Dumping data for table `Preferences` +# + +INSERT INTO Preferences (id, userId, preferencesName, projectSubject, source, language, script, dialect, note, useDefaultProjSub, useDefaultSource, useDefaultLanguage, useDefaultScript, useDefaultDialect, useDefaultNote, projectSubjectSet, sourceSet, languageSet, scriptSet, dialectSet) VALUES (2, 3, 0, 2, 1, 1, 1, 0, '', 'false', 'false', 'false', 'false', 'false', 'false', 'null', 'null', 'null', 'null', 'null'), +(3, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'false', 'false', 'false', 'false', 'false', 'false', NULL, NULL, NULL, NULL, NULL), +(1, 3, 0, 1, 1, 1, 1, 0, 'Default Note', 'false', 'false', 'false', 'false', 'false', 'false', '1', '1', '1', '1', '1'), +(4, 6, 0, 0, 0, 1, 1, 0, '', 'true', 'true', 'true', 'true', 'true', 'false', 'null', 'null', 'null', 'null', 'null'), +(5, 5, 0, 0, 0, 1, 1, 0, '', 'true', 'true', 'true', 'true', 'true', 'true', 'null', 'null', 'null', 'null', 'null'), +(6, 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'false', 'false', 'false', 'false', 'false', 'false', NULL, NULL, NULL, NULL, NULL); + +# +# Dumping data for table `ProjectSubjects` +# + +INSERT INTO ProjectSubjects (id, projectSubject, leader, participantList) VALUES (1, 'Germano Tantra Dictionary,\'jer mA no\'i gsang sngags kyi tha snyad/', 3, '1,2,3'), +(2, 'TLLR Colloquial,bod skad yig kyi slob gnyer gter mdzod las gzhi\'i kha skad tshig mdzod/', 3, ''), +(3, 'Tournadre/Dorje Manual Glossary,bod kyi spyi skad slob deb kyi rgyun mkho\'i tshig mdzod chung ngu/', 3, ''), +(4, 'TLLR Colloquial Standardized Spelling,bod skad yig kyi slob gnyer gter mdzod las gzhi\'i kha skad dag cha khungs ldan gsar/', 3, ''), +(5, 'TLLR Literary Glossary,bod skad yig kyi slob gnyer gter mdzod las gzhi\'i yi ge\'i tshig mdzod/', 3, ''), +(6, 'THDL Architecture Terminology,glog rdul dpe mdzod khang gi bzo skrun rig gnas kyi tha snyad/', 3, ''), +(7, 'THDL Astrology Terminology,glog rdul dpe mdzod khang gi skar rtsis rig pa\'i tha snyad/', 3, ''), +(8, 'THDL/Rubin Art Terminology,glog rdul dpe mdzod khang gi mdzas rtsal/', 3, ''), +(9, 'THDL Colophons,glog rdul dpe mdzod khang gi mjug byang gi tha snyad/', 3, ''), +(10, 'THDL Computer Science Terminology,glog rdul dpe mdzod khang gi glog klad rig pa\'i tha snyad/', 3, ''), +(11, 'THDL Library Science Terminology,glog rdul dpe mdzod khang gi dpe mdzod khang rig pa\'i tha snyad/', 3, ''), +(12, 'THDL Medical Terminology,glog rdul dpe mdzod khang gi gso ba rig pa\'i tha snyad/', 3, ''), +(13, 'THDL Music Terminology,glog rdul dpe mdzod khang gi rol gzhas kyi tha snyad/', 3, ''), +(14, 'THDL Samantabhadra Titles,glog rdul dpe mdzod khang gi rnying ma\'i rgyud \'bum dpe mtshan gyi tha snyad/', 3, ''), +(15, 'Public Domain Dictionary Entry Project,bod skad med/', 3, ''), +(16, 'Rangjung Yeshe Tibetan-English Dictionary, bod yig med/', 4, NULL); + +# +# Dumping data for table `Registers` +# + +INSERT INTO Registers (id, register) VALUES (2, 'Slang,logs skad/'), +(3, 'Ordinary,skad dkyus ma/'), +(4, 'Humilific,dma\' sa bzung ba\'i zhe sa/'), +(5, 'Honorific,zhe sa/'), +(6, 'High Honorific,zhe sa mtho po/'), +(7, 'Double Honorific,phyogs gnyis kyi zhe sa/'), +(1, 'Unspecified,gtan ma \'khel ba/'); + +# +# Dumping data for table `RelatedTermTypes` +# + +INSERT INTO RelatedTermTypes (id, relatedTermType) VALUES (2, 'Non-honorific Form,bod yig med/'), +(3, 'Conjugated Form Past,bod yig med/'), +(4, 'Conjugated Form Present,bod yig med/'), +(5, 'Conjugated Form Future,bod yig med/'), +(6, 'Conjugated Form Imperativ,bod yig med/'), +(7, 'Dialectical correlates,yul skad mi \'dra ba brjod tshul/'), +(8, 'Literary and colloquial correlates,kha skad dang yig skad bar gyi \'brel ba/'), +(9, 'Compounds,ming \'dus nas ming du grub pa/'), +(10, 'Abbreviation,bsdus ming/'), +(11, 'Phrases,mnyam du \'grogs pa\'i ming tshig/'), +(12, 'Paired term,zung du \'brel ba\'i ming/'), +(13, 'Full Synonym,ming gi rnam grangs don yongs mtshungs/'), +(14, 'Para Synonym,ming gi rnam grangs don nye ba/'), +(15, 'Antonyms,ldog phyogs kyi ming/'), +(16, 'Poetic expressions,mngon brjod/'), +(1, 'Honorific Form,bod yig med/'); + +# +# Dumping data for table `Scripts` +# + +INSERT INTO Scripts (id, script) VALUES (2, 'Tibetan,bod yig'), +(3, 'Devanagiri,gya gar gyi yi ge'), +(4, 'Chinese,rgya yig'), +(1, 'Roman,dbyin yig'); + +# +# Dumping data for table `Sources` +# + +INSERT INTO Sources (id, sourceTitle, sourceDescription) VALUES (2, 'Chandra Das,cha \'dra dA se/', 'A Public Domain Dictionary.'), +(3, 'H. A. J\ZÉÃ??schke,ye sha ki/', 'A Public Domain Dictionary.'), +(1, 'Self,bdag rang/', 'This source is used when the user is the source for any data.'); + +# +# Dumping data for table `SpecificDialects` +# + +INSERT INTO SpecificDialects (id, specificDialect) VALUES (1, 'Lhasa,dbus gtsang lha sa yul skad (dbus khongs )/'); + +# +# Dumping data for table `SpellingTypes` +# + +INSERT INTO SpellingTypes (id, spellingType) VALUES (1, 'Unspecified,gtan ma \'khel ba/'), +(2, 'THDL Normalized Spelling,bod yig med/'), +(3, 'Alternative literary spelling,sbyor tshul mi \'dra ba/'), +(4, 'Mistaken spelling,sbyor tshul nor ba/'), +(5, 'Mistakenly corrected spelling,bcos nor shor ba/'), +(6, 'Old spelling,brda rnying/'), +(7, 'Vernacular Tibetan spelling,bod yig med/'), +(8, 'Standard Tibetan spelling,spyi skad _khyab khongs chen po\'i yul skad/'), +(9, 'Ladakh/Balti spelling,la dwags sbal ti yul skad _nub khongs/'), +(10, 'Central Tibetan spelling,dbus gtsang yul skad _dbus khongs/'), +(11, 'Lhasa spelling,dbus gtsag lha sa yul skad _dbus khongs/'), +(12, 'Kham/Hor spelling,khams hor yul skad _shar khongs/'), +(13, 'Amdo spelling,a mdo yul skad _byang shar khongs/'), +(14, 'Dzongkha/Bhutanese spelling,rdzong kha \'bras ljongs _lho khongs/'), +(15, 'Local Spelling - Unknown Locale,gnas ma nges pa\'i yul skad/'); + +# +# Dumping data for table `TransitionalDataLabels` +# + +INSERT INTO TransitionalDataLabels (id, transitionalDataLabel) VALUES (2, 'Great Tibetan-Chinese Dictionary'), +(1, 'The Rangjung Yeshe Tibetan-English Dictionary'); diff --git a/src/sql/lex-flat-schema.sql b/src/sql/lex-flat-schema.sql new file mode 100644 index 0000000..df53fe9 --- /dev/null +++ b/src/sql/lex-flat-schema.sql @@ -0,0 +1,552 @@ +-- MySQL dump 8.23 +-- +-- Host: localhost Database: Lex +--------------------------------------------------------- +-- Server version 3.23.58-max-log + +-- +-- Table structure for table `AnalyticalNotes` +-- + +CREATE TABLE AnalyticalNotes ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + analyticalNote text, + PRIMARY KEY (metaId), + KEY parentId (parentId), + KEY metaId (metaId) +) TYPE=MyISAM; + +-- +-- Table structure for table `Authors` +-- + +CREATE TABLE Authors ( + id int(11) NOT NULL auto_increment, + author mediumtext NOT NULL, + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `Definitions` +-- + +CREATE TABLE Definitions ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) NOT NULL default '0', + definition text, + PRIMARY KEY (metaId), + KEY parentId (parentId), + KEY metaId (metaId) +) TYPE=MyISAM; + +-- +-- Table structure for table `Dialects` +-- + +CREATE TABLE Dialects ( + id int(11) NOT NULL auto_increment, + majorDialectFamily smallint(6) NOT NULL default '0', + specificDialect smallint(6) NOT NULL default '0', + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `EncyclopediaArticles` +-- + +CREATE TABLE EncyclopediaArticles ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + article text NOT NULL, + articleTitle text NOT NULL, + PRIMARY KEY (metaId), + KEY parentId (parentId), + KEY metaId (metaId) +) TYPE=MyISAM; + +-- +-- Table structure for table `Etymologies` +-- + +CREATE TABLE Etymologies ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + loanLanguage smallint(6) default NULL, + etymologyType smallint(6) NOT NULL default '0', + derivation varchar(255) NOT NULL default '', + etymologyDescription text NOT NULL, + PRIMARY KEY (metaId), + KEY metaId (metaId), + KEY parentId (parentId) +) TYPE=MyISAM; + +-- +-- Table structure for table `EtymologyTypes` +-- + +CREATE TABLE EtymologyTypes ( + id int(11) NOT NULL auto_increment, + etymologyType varchar(255) NOT NULL default '', + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `Functions` +-- + +CREATE TABLE Functions ( + id int(11) NOT NULL auto_increment, + functionsGeneral smallint(6) NOT NULL default '0', + functionsSpecific smallint(6) NOT NULL default '0', + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `FunctionsGeneral` +-- + +CREATE TABLE FunctionsGeneral ( + id int(11) NOT NULL auto_increment, + functionGeneral varchar(255) NOT NULL default '', + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `FunctionsSpecific` +-- + +CREATE TABLE FunctionsSpecific ( + id int(11) NOT NULL auto_increment, + functionSpecific varchar(255) NOT NULL default '', + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `Glosses` +-- + +CREATE TABLE Glosses ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + gloss text, + translation text, + PRIMARY KEY (metaId), + KEY metaId (metaId), + KEY parentId (parentId) +) TYPE=MyISAM; + +-- +-- Table structure for table `GrammaticalFunctions` +-- + +CREATE TABLE GrammaticalFunctions ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + function smallint(6) NOT NULL default '0', + PRIMARY KEY (metaId), + KEY metaId (metaId), + KEY parentId (parentId) +) TYPE=MyISAM; + +-- +-- Table structure for table `Keywords` +-- + +CREATE TABLE Keywords ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + keyword text, + PRIMARY KEY (metaId), + KEY parentId (parentId), + KEY metaId (metaId) +) TYPE=MyISAM; + +-- +-- Table structure for table `Languages` +-- + +CREATE TABLE Languages ( + id int(11) NOT NULL auto_increment, + language varchar(255) NOT NULL default '', + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `LiteraryForms` +-- + +CREATE TABLE LiteraryForms ( + id int(11) NOT NULL auto_increment, + literaryForm mediumtext NOT NULL, + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `LiteraryGenres` +-- + +CREATE TABLE LiteraryGenres ( + id int(11) NOT NULL auto_increment, + literaryGenre mediumtext NOT NULL, + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `LiteraryPeriods` +-- + +CREATE TABLE LiteraryPeriods ( + id int(11) NOT NULL auto_increment, + literaryPeriod mediumtext NOT NULL, + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `LiteraryQuotations` +-- + +CREATE TABLE LiteraryQuotations ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + literarySource text, + spelling text, + pagination text, + passage text, + PRIMARY KEY (metaId), + KEY parentId (parentId), + KEY metaId (metaId) +) TYPE=MyISAM; + +-- +-- Table structure for table `LiterarySources` +-- + +CREATE TABLE LiterarySources ( + id int(11) NOT NULL auto_increment, + literaryPeriod int(11) default NULL, + literaryGenre int(11) default NULL, + literaryForm int(11) default NULL, + author int(11) default NULL, + sourceNormalizedTitle mediumtext, + tibetanDate mediumtext, + internationalDate mediumtext, + edition mediumtext, + publisher mediumtext, + isbn mediumtext, + yearPublished timestamp(14) NOT NULL, + volumeNumber int(11) NOT NULL default '0', + pagination mediumtext, + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `MajorDialectFamilies` +-- + +CREATE TABLE MajorDialectFamilies ( + id int(11) NOT NULL auto_increment, + majorDialectFamily mediumtext, + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `Meta` +-- + +CREATE TABLE Meta ( + metaId int(11) NOT NULL auto_increment, + translationOf int(11) default NULL, + deleted tinyint(1) NOT NULL default '0', + createdBy int(11) NOT NULL default '0', + modifiedBy int(11) NOT NULL default '0', + createdByProjSub int(11) NOT NULL default '0', + modifiedByProjSub int(11) NOT NULL default '0', + createdOn datetime default NULL, + modifiedOn datetime default NULL, + source int(11) NOT NULL default '0', + language smallint(6) NOT NULL default '0', + script smallint(6) NOT NULL default '0', + dialect smallint(6) NOT NULL default '0', + note text, + PRIMARY KEY (metaId), + KEY translationOf (translationOf) +) TYPE=MyISAM; + +-- +-- Table structure for table `ModelSentences` +-- + +CREATE TABLE ModelSentences ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + subdefinitionId int(11) NOT NULL default '0', + modelSentence text, + PRIMARY KEY (metaId), + KEY metaId (metaId), + KEY parentId (parentId) +) TYPE=MyISAM; + +-- +-- Table structure for table `PhoneticsTypes` +-- + +CREATE TABLE PhoneticsTypes ( + id int(11) NOT NULL auto_increment, + phoneticsType varchar(255) NOT NULL default '', + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `Preferences` +-- + +CREATE TABLE Preferences ( + id int(11) NOT NULL auto_increment, + userId int(11) NOT NULL default '0', + preferencesName int(11) default NULL, + projectSubject int(11) default NULL, + source int(11) default NULL, + language int(11) default NULL, + script int(11) default NULL, + dialect int(11) default NULL, + note mediumtext, + useDefaultProjSub varchar(5) NOT NULL default 'false', + useDefaultSource varchar(5) NOT NULL default 'false', + useDefaultLanguage varchar(5) NOT NULL default 'false', + useDefaultScript varchar(5) NOT NULL default 'false', + useDefaultDialect varchar(5) NOT NULL default 'false', + useDefaultNote varchar(5) NOT NULL default 'false', + projectSubjectSet varchar(255) default NULL, + sourceSet varchar(255) default NULL, + languageSet varchar(255) default NULL, + scriptSet varchar(255) default NULL, + dialectSet varchar(255) default NULL, + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `ProjectSubjects` +-- + +CREATE TABLE ProjectSubjects ( + id int(11) NOT NULL auto_increment, + projectSubject varchar(255) default NULL, + leader int(11) NOT NULL default '0', + participantList mediumtext, + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `Pronunciations` +-- + +CREATE TABLE Pronunciations ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + phonetics text NOT NULL, + phoneticsType smallint(6) NOT NULL default '0', + PRIMARY KEY (metaId), + KEY metaId (metaId), + KEY parentId (parentId) +) TYPE=MyISAM; + +-- +-- Table structure for table `Registers` +-- + +CREATE TABLE Registers ( + id int(11) NOT NULL auto_increment, + register mediumtext NOT NULL, + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `RelatedTermTypes` +-- + +CREATE TABLE RelatedTermTypes ( + id int(11) NOT NULL auto_increment, + relatedTermType varchar(255) NOT NULL default '', + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `RelatedTerms` +-- + +CREATE TABLE RelatedTerms ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + relatedTerm text, + relatedTermType smallint(6) NOT NULL default '0', + PRIMARY KEY (metaId), + KEY parentId (parentId), + KEY metaId (metaId) +) TYPE=MyISAM; + +-- +-- Table structure for table `Scripts` +-- + +CREATE TABLE Scripts ( + id int(11) NOT NULL auto_increment, + script varchar(255) NOT NULL default '', + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `Sources` +-- + +CREATE TABLE Sources ( + id int(11) NOT NULL auto_increment, + sourceTitle mediumtext NOT NULL, + sourceDescription mediumtext, + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `SpecificDialects` +-- + +CREATE TABLE SpecificDialects ( + id int(11) NOT NULL auto_increment, + specificDialect mediumtext, + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `SpeechRegisters` +-- + +CREATE TABLE SpeechRegisters ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + register smallint(6) NOT NULL default '0', + PRIMARY KEY (metaId), + KEY metaId (metaId), + KEY parentId (parentId) +) TYPE=MyISAM; + +-- +-- Table structure for table `SpellingTypes` +-- + +CREATE TABLE SpellingTypes ( + id int(11) NOT NULL auto_increment, + spellingType varchar(255) NOT NULL default '', + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `Spellings` +-- + +CREATE TABLE Spellings ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + spelling varchar(255) NOT NULL default '', + spellingType smallint(6) NOT NULL default '0', + PRIMARY KEY (metaId), + KEY parentId (parentId), + KEY metaId (metaId) +) TYPE=MyISAM; + +-- +-- Table structure for table `Subdefinitions` +-- + +CREATE TABLE Subdefinitions ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + subdefinition text, + PRIMARY KEY (metaId), + KEY metaId (metaId), + KEY parentId (parentId) +) TYPE=MyISAM; + +-- +-- Table structure for table `Terms` +-- + +CREATE TABLE Terms ( + metaId int(11) NOT NULL default '0', + term varchar(255) NOT NULL default '', + precedence smallint(6) default NULL, + PRIMARY KEY (metaId), + KEY metaId (metaId) +) TYPE=MyISAM; + +-- +-- Table structure for table `TransitionalData` +-- + +CREATE TABLE TransitionalData ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + transitionalDataLabel smallint(6) default NULL, + forPublicConsumption varchar(5) NOT NULL default '', + transitionalDataText text, + PRIMARY KEY (metaId), + KEY metaId (metaId), + KEY parentId (parentId) +) TYPE=MyISAM; + +-- +-- Table structure for table `TransitionalDataLabels` +-- + +CREATE TABLE TransitionalDataLabels ( + id int(11) NOT NULL auto_increment, + transitionalDataLabel mediumtext, + PRIMARY KEY (id) +) TYPE=MyISAM; + +-- +-- Table structure for table `TranslationEquivalents` +-- + +CREATE TABLE TranslationEquivalents ( + metaId int(11) NOT NULL default '0', + parentId int(11) default NULL, + precedence smallint(6) default NULL, + translationEquivalent text, + PRIMARY KEY (metaId), + KEY metaId (metaId), + KEY parentId (parentId) +) TYPE=MyISAM; + +-- +-- Table structure for table `Users` +-- + +CREATE TABLE Users ( + id int(11) NOT NULL auto_increment, + metaId int(11) NOT NULL default '0', + userRoleList varchar(255) default NULL, + username varchar(255) NOT NULL default '', + password varchar(255) NOT NULL default '', + firstname varchar(255) NOT NULL default '', + lastname varchar(255) NOT NULL default '', + middlename varchar(255) NOT NULL default '', + title varchar(255) NOT NULL default '', + email varchar(255) NOT NULL default '', + PRIMARY KEY (id) +) TYPE=MyISAM; + diff --git a/src/sql/lex-schema.sql b/src/sql/lex-schema.sql new file mode 100644 index 0000000..99a6598 --- /dev/null +++ b/src/sql/lex-schema.sql @@ -0,0 +1,344 @@ +drop table if exists FunctionsGeneral; +drop table if exists LiteraryPeriods; +drop table if exists Registers; +drop table if exists Pronunciations; +drop table if exists Authors; +drop table if exists Keywords; +drop table if exists Glosses; +drop table if exists RelatedTerms; +drop table if exists PhoneticsTypes; +drop table if exists Etymologies; +drop table if exists Meta; +drop table if exists SpellingTypes; +drop table if exists Dialects; +drop table if exists TransitionalData; +drop table if exists LiterarySources; +drop table if exists Spellings; +drop table if exists AnalyticalNotes; +drop table if exists EtymologyTypes; +drop table if exists SpeechRegisters; +drop table if exists Definitions; +drop table if exists FunctionsSpecific; +drop table if exists RelatedTermTypes; +drop table if exists ProjectSubjects; +drop table if exists ModelSentences; +drop table if exists Subdefinitions; +drop table if exists LiteraryGenres; +drop table if exists GrammaticalFunctions; +drop table if exists Functions; +drop table if exists SpecificDialects; +drop table if exists Sources; +drop table if exists TransitionalDataLabels; +drop table if exists LiteraryForms; +drop table if exists EncyclopediaArticles; +drop table if exists LiteraryQuotations; +drop table if exists MajorDialectFamilies; +drop table if exists Terms; +drop table if exists Scripts; +drop table if exists Languages; +drop table if exists TranslationEquivalents; +create table FunctionsGeneral ( + id SMALLINT NOT NULL AUTO_INCREMENT, + functionGeneral VARCHAR(255) not null, + primary key (id) +); +create table LiteraryPeriods ( + id INTEGER NOT NULL AUTO_INCREMENT, + literaryPeriod TEXT not null, + primary key (id) +); +create table Registers ( + id SMALLINT NOT NULL AUTO_INCREMENT, + register TEXT not null, + primary key (id) +); +create table Pronunciations ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + phonetics TEXT not null, + phoneticsType SMALLINT not null, + primary key (metaId) +); +create table Authors ( + id INTEGER NOT NULL AUTO_INCREMENT, + author TEXT not null, + primary key (id) +); +create table Keywords ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + keyword TEXT, + primary key (metaId) +); +create table Glosses ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + gloss TEXT, + translation TEXT, + primary key (metaId) +); +create table RelatedTerms ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + relatedTerm TEXT, + relatedTermType SMALLINT not null, + primary key (metaId) +); +create table PhoneticsTypes ( + id SMALLINT NOT NULL AUTO_INCREMENT, + phoneticsType VARCHAR(255) not null, + primary key (id) +); +create table Etymologies ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + loanLanguage SMALLINT, + etymologyType SMALLINT not null, + derivation VARCHAR(255) not null, + etymologyDescription TEXT not null, + primary key (metaId) +); +create table Meta ( + metaId INTEGER NOT NULL AUTO_INCREMENT, + translationOf INTEGER, + deleted BIT not null, + createdBy INTEGER not null, + modifiedBy INTEGER not null, + createdByProjSub INTEGER not null, + modifiedByProjSub INTEGER not null, + createdOn DATETIME, + modifiedOn DATETIME, + source INTEGER not null, + language SMALLINT not null, + script SMALLINT not null, + dialect SMALLINT not null, + note TEXT, + primary key (metaId) +); +create table SpellingTypes ( + id SMALLINT NOT NULL AUTO_INCREMENT, + spellingType VARCHAR(255) not null, + primary key (id) +); +create table Dialects ( + id INTEGER NOT NULL AUTO_INCREMENT, + majorDialectFamily SMALLINT not null, + specificDialect SMALLINT not null, + primary key (id) +); +create table TransitionalData ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + transitionalDataLabel SMALLINT, + forPublicConsumption VARCHAR(5) not null, + transitionalDataText TEXT, + primary key (metaId) +); +create table LiterarySources ( + id INTEGER NOT NULL AUTO_INCREMENT, + literaryPeriod INTEGER, + literaryGenre INTEGER, + literaryForm INTEGER, + author INTEGER, + sourceNormalizedTitle TEXT, + tibetanDate TEXT, + internationalDate TEXT, + edition TEXT, + publisher TEXT, + isbn TEXT, + yearPublished DATETIME, + volumeNumber INTEGER not null, + pagination TEXT, + primary key (id) +); +create table Spellings ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + spelling VARCHAR(255) not null, + spellingType SMALLINT not null, + primary key (metaId) +); +create table AnalyticalNotes ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + analyticalNote TEXT, + primary key (metaId) +); +create table EtymologyTypes ( + id SMALLINT NOT NULL AUTO_INCREMENT, + etymologyType VARCHAR(255) not null, + primary key (id) +); +create table SpeechRegisters ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + register SMALLINT not null, + primary key (metaId) +); +create table Definitions ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT not null, + definition TEXT, + primary key (metaId) +); +create table FunctionsSpecific ( + id SMALLINT NOT NULL AUTO_INCREMENT, + functionSpecific VARCHAR(255) not null, + primary key (id) +); +create table RelatedTermTypes ( + id SMALLINT NOT NULL AUTO_INCREMENT, + relatedTermType VARCHAR(255) not null, + primary key (id) +); +create table ProjectSubjects ( + id INTEGER NOT NULL AUTO_INCREMENT, + projectSubject VARCHAR(255), + leader INTEGER not null, + participantList TEXT, + primary key (id) +); +create table ModelSentences ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + subdefinitionId INTEGER not null, + modelSentence TEXT, + primary key (metaId) +); +create table Subdefinitions ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + subdefinition TEXT, + primary key (metaId) +); +create table LiteraryGenres ( + id INTEGER NOT NULL AUTO_INCREMENT, + literaryGenre TEXT not null, + primary key (id) +); +create table GrammaticalFunctions ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + function SMALLINT not null, + primary key (metaId) +); +create table Functions ( + id SMALLINT NOT NULL AUTO_INCREMENT, + functionsGeneral SMALLINT not null, + functionsSpecific SMALLINT not null, + primary key (id) +); +create table SpecificDialects ( + id SMALLINT NOT NULL AUTO_INCREMENT, + specificDialect TEXT, + primary key (id) +); +create table Sources ( + id INTEGER NOT NULL AUTO_INCREMENT, + sourceTitle TEXT not null, + sourceDescription TEXT, + primary key (id) +); +create table TransitionalDataLabels ( + id SMALLINT NOT NULL AUTO_INCREMENT, + transitionalDataLabel TEXT, + primary key (id) +); +create table LiteraryForms ( + id INTEGER NOT NULL AUTO_INCREMENT, + literaryForm TEXT not null, + primary key (id) +); +create table EncyclopediaArticles ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + article TEXT not null, + articleTitle TEXT not null, + primary key (metaId) +); +create table LiteraryQuotations ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + literarySource TEXT, + spelling TEXT, + pagination TEXT, + passage TEXT, + primary key (metaId) +); +create table MajorDialectFamilies ( + id SMALLINT NOT NULL AUTO_INCREMENT, + majorDialectFamily TEXT, + primary key (id) +); +create table Terms ( + metaId INTEGER not null, + term VARCHAR(255) not null, + precedence SMALLINT, + primary key (metaId) +); +create table Scripts ( + id SMALLINT NOT NULL AUTO_INCREMENT, + script VARCHAR(255) not null, + primary key (id) +); +create table Languages ( + id SMALLINT NOT NULL AUTO_INCREMENT, + language VARCHAR(255) not null, + primary key (id) +); +create table TranslationEquivalents ( + metaId INTEGER not null, + parentId INTEGER, + precedence SMALLINT, + translationEquivalent TEXT, + primary key (metaId) +); +alter table Pronunciations add index (metaId), add constraint FK1889BDEBFC5B200 foreign key (metaId) references Meta (metaId); +alter table Pronunciations add index (parentId), add constraint FK1889BDE460B8F65 foreign key (parentId) references Terms (metaId); +alter table Keywords add index (parentId), add constraint FK230903CA460B8F65 foreign key (parentId) references Subdefinitions (metaId); +alter table Keywords add index (metaId), add constraint FK230903CABFC5B200 foreign key (metaId) references Meta (metaId); +alter table Glosses add index (metaId), add constraint FK6A780618BFC5B200 foreign key (metaId) references Meta (metaId); +alter table Glosses add index (parentId), add constraint FK6A780618460B8F65 foreign key (parentId) references Subdefinitions (metaId); +alter table RelatedTerms add index (parentId), add constraint FK125CF43C460B8F65 foreign key (parentId) references Subdefinitions (metaId); +alter table RelatedTerms add index (metaId), add constraint FK125CF43CBFC5B200 foreign key (metaId) references Meta (metaId); +alter table Etymologies add index (metaId), add constraint FKD08FB0BFBFC5B200 foreign key (metaId) references Meta (metaId); +alter table Etymologies add index (parentId), add constraint FKD08FB0BF460B8F65 foreign key (parentId) references Terms (metaId); +alter table Meta add index (translationOf), add constraint FK248A2527981468 foreign key (translationOf) references Meta (metaId); +alter table TransitionalData add index (metaId), add constraint FK9204002ABFC5B200 foreign key (metaId) references Meta (metaId); +alter table TransitionalData add index (parentId), add constraint FK9204002A460B8F65 foreign key (parentId) references Terms (metaId); +alter table Spellings add index (parentId), add constraint FK21F7B1D9460B8F65 foreign key (parentId) references Terms (metaId); +alter table Spellings add index (metaId), add constraint FK21F7B1D9BFC5B200 foreign key (metaId) references Meta (metaId); +alter table AnalyticalNotes add index (parentId), add constraint FK5226AE09460B8F65 foreign key (parentId) references Meta (metaId); +alter table AnalyticalNotes add index (metaId), add constraint FK5226AE09BFC5B200 foreign key (metaId) references Meta (metaId); +alter table SpeechRegisters add index (metaId), add constraint FK6456534EBFC5B200 foreign key (metaId) references Meta (metaId); +alter table SpeechRegisters add index (parentId), add constraint FK6456534E460B8F65 foreign key (parentId) references Subdefinitions (metaId); +alter table Definitions add index (parentId), add constraint FK11071D60460B8F65 foreign key (parentId) references Terms (metaId); +alter table Definitions add index (metaId), add constraint FK11071D60BFC5B200 foreign key (metaId) references Meta (metaId); +alter table ModelSentences add index (metaId), add constraint FKBDC96567BFC5B200 foreign key (metaId) references Meta (metaId); +alter table ModelSentences add index (parentId), add constraint FKBDC96567460B8F65 foreign key (parentId) references Subdefinitions (metaId); +alter table Subdefinitions add index (metaId), add constraint FKDC691B60BFC5B200 foreign key (metaId) references Meta (metaId); +alter table Subdefinitions add index (parentId), add constraint FKDC691B60460B8F65 foreign key (parentId) references Definitions (metaId); +alter table GrammaticalFunctions add index (metaId), add constraint FKCD3F816DBFC5B200 foreign key (metaId) references Meta (metaId); +alter table GrammaticalFunctions add index (parentId), add constraint FKCD3F816D460B8F65 foreign key (parentId) references Terms (metaId); +alter table EncyclopediaArticles add index (parentId), add constraint FKAC14CB5D460B8F65 foreign key (parentId) references Terms (metaId); +alter table EncyclopediaArticles add index (metaId), add constraint FKAC14CB5DBFC5B200 foreign key (metaId) references Meta (metaId); +alter table LiteraryQuotations add index (parentId), add constraint FK99D4FE0B460B8F65 foreign key (parentId) references Subdefinitions (metaId); +alter table LiteraryQuotations add index (metaId), add constraint FK99D4FE0BBFC5B200 foreign key (metaId) references Meta (metaId); +alter table Terms add index (metaId), add constraint FK4CF5967BFC5B200 foreign key (metaId) references Meta (metaId); +alter table TranslationEquivalents add index (metaId), add constraint FK27FEF3F8BFC5B200 foreign key (metaId) references Meta (metaId); +alter table TranslationEquivalents add index (parentId), add constraint FK27FEF3F8460B8F65 foreign key (parentId) references Subdefinitions (metaId); diff --git a/tomcat/LICENSE b/tomcat/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/tomcat/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/tomcat/NOTICE b/tomcat/NOTICE new file mode 100644 index 0000000..a4599d2 --- /dev/null +++ b/tomcat/NOTICE @@ -0,0 +1,13 @@ +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + +Java Management Extensions (JMX) support is provided by +the MX4J package, which is open source software. The +original software and related information is available +at http://mx4j.sourceforge.net. + +The Windows Installer is built with the Nullsoft +Scriptable Install Sysem (NSIS), which is +open source software. The original software and +related information is available at +http://nsis.sourceforge.net. \ No newline at end of file diff --git a/tomcat/RELEASE-NOTES b/tomcat/RELEASE-NOTES new file mode 100644 index 0000000..56afd01 --- /dev/null +++ b/tomcat/RELEASE-NOTES @@ -0,0 +1,248 @@ + + + Apache Tomcat Version @VERSION@ + Release Notes + + +$Id: RELEASE-NOTES,v 1.1 2005/02/21 06:54:22 amontano Exp $ + + +============================ +KNOWN ISSUES IN THIS RELEASE: +============================ + +* Tomcat 5.0 and JNI Based Applications +* Tomcat 5.0 Standard APIs Available +* Tomcat 5.0 and XML Parsers +* Web application reloading and static fields in shared libraries +* JAVAC leaking memory +* Tomcat on Linux +* Enabling SSI and CGI Support +* Security manager URLs +* Symlinking static resources +* Enabling invoker servlet +* Viewing the Tomcat Change Log +* When all else fails + + +------------------------------------- +Tomcat 5.0 and JNI Based Applications: +------------------------------------- + +Applications that require native libraries must ensure that the libraries have +been loaded prior to use. Typically, this is done with a call like: + + static { + System.loadLibrary("path-to-library-file"); + } + +in some class. However, the application must also ensure that the library is +not loaded more than once. If the above code were placed in a class inside +the web application (i.e. under /WEB-INF/classes or /WEB-INF/lib), and the +application were reloaded, the loadLibrary() call would be attempted a second +time. + +To avoid this problem, place classes that load native libraries outside of the +web application, and ensure that the loadLibrary() call is executed only once +during the lifetime of a particular JVM. + + +---------------------------------- +Tomcat 5.0 Standard APIs Available: +---------------------------------- + +A standard installation of Tomcat 5 makes all of the following APIs available +for use by web applications (by placing them in "common/lib" or "shared/lib"): +* ant.jar (Apache Ant 1.6 or later) +* commons-collections*.jar (Commons Collections 2.1 or later) +* commons-dbcp.jar (Commons DBCP 1.1 or later) +* commons-el.jar (Commons Expression Language 1.0) +* commons-logging-api.jar (Commons Logging API 1.0.3 or later) +* commons-pool.jar (Commons Pool 1.1 or later) +* jasper-compiler.jar (Jasper 2 Compiler) +* jasper-runtime.jar (Jasper 2 Runtime) +* jsp-api.jar (JSP 2.0 API) +* commons-el.jar (JSP 2.0 Expression Language) +* naming-common.jar (JNDI Context implementation) +* naming-factory.jar (JNDI object factories for J2EE ENC support) +* naming-resources.jar (JNDI DirContext implementations) +* servlet-api.jar (Servlet 2.4 API) + +You can make additional APIs available to all of your web applications by +putting unpacked classes into a "classes" directory (not created by default), +or by placing them in JAR files in the "lib" directory. + +Tomcat 5.0 also makes Xerces 2 and the Commons Logging API (release 1.0.3) +available to web applications. + +Please note that the JMX API is available to applications as well. The jmx.jar +file used to be located in the common/lib directory, but was moved to the bin +directory as part of the Tomcat 5.0.20 release. The jmx.jar is in Tomcat's +bootstrap classpath (included via the Class Path line in bootstrap.jar's manifest). + + +-------------------------- +Tomcat 5.0 and XML Parsers: +-------------------------- + +As described above, Tomcat 5.0 makes an XML parser (and many other standard +APIs) available to web applications. This parser is also used internally +to parse web.xml files and the server.xml configuration file. If you wish, +you may replace the "xercesImpl.jar" file in "common/endorsed" with another +XML parser, as long as it is compatible with the JAXP 1.2 APIs. + +Xerces 2.6.2 is included. + + +--------------------------------------------------------------- +Web application reloading and static fields in shared libraries: +--------------------------------------------------------------- + +Some shared libraries (many are part of the JDK) keep references to objects +instantiated by the web application. To avoid class loading related problems +(ClassCastExceptions, messages indicating that the classloader +is stopped, etc.), the shared libraries state should be reinitialized. + +Something which might help is to avoid putting classes which would be +referenced by a shared static field in the web application classloader, +and putting them in the shared classloader instead (JARs should be put in the +"lib" folder, and classes should be put in the "classes" folder). + + +-------------------- +JAVAC leaking memory: +-------------------- + +The Java compiler leaks memory each time a class is compiled. Web applications +containing hundreds of JSP files may as a result trigger out of memory errors +once a significant number of pages have been accessed. The memory can only be +freed by stopping Tomcat and then restarting it. + +The JSP command line compiler (JSPC) can also be used to precompile the JSPs. + +Note: This issue has been fixed in Sun JDK 1.4.x. + + +--------------- +Tomcat on Linux: +--------------- + +Virtual machine crashes can be experienced when using certain combinations of +kernel / glibc under Linux with Sun Hotspot 1.2 to 1.3. The crashes were +reported to occur mostly on startup. Sun JDK 1.4 does not exhibit the problems, +and neither does IBM JDK for Linux. + +The problems can be fixed by reducing the default stack size. At bash shell, +do "ulimit -s 2048"; use "limit stacksize 2048" for tcsh. + +GLIBC 2.2 / Linux 2.4 users should also define an environment variable: +export LD_ASSUME_KERNEL=2.2.5 + +Additionally, Redhat Linux 9.0 users should use the same setting, to avoid +stability problems. + + +---------------------------- +Enabling SSI and CGI Support: +---------------------------- + +Having CGI and SSI available to web applications created security problems when +using a security manager (as a malicious web application could use them to +sidestep the security manager access control). In Tomcat 5.0, they have been +disabled by default, as our goal is to provide a fully secure default +configuration. However, CGI and SSI remain available. + + +To enable CGI: +* rename the file $CATALINA_HOME/server/lib/servlets-cgi.renametojar to + $CATALINA_HOME/server/lib/servlets-cgi.jar. +* in $CATALINA_HOME/conf/web.xml, you will need to uncomment 2 areas, the + servlet declaration and the servlet mapping. The servlet declaration + looks similar to this: + + cgi + ... + + + While the servlet mapping looks similar to this: + + cgi + /cgi-bin/* + + + Alternately, these servlet declarations and mappings + can be added to your web application deployment descriptor. + +To enable SSI: +* rename the file $CATALINA_HOME/server/lib/servlets-ssi.renametojar to + $CATALINA_HOME/server/lib/servlets-ssi.jar. +* in $CATALINA_HOME/conf/web.xml, you will need to uncomment 2 areas, the + servlet declaration and the servlet mapping. The servlet declaration + looks similar to this: + + ssi + ... + + + While the servlet mapping looks similar to this: + + ssi + *.shtml + + + Alternately, these servlet declarations and mappings + can be added to your web application deployment descriptor. + + + +--------------------- +Security manager URLs: +--------------------- + +The URLs to be used in the policy file to grant permissions to JARs located +inside the web application repositories have changed as of Tomcat 4.1. + +In Tomcat 4.0, codeBase URLs for JARs loaded from web application +repositories were: +jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/- + +In Tomcat 4.1 and 5.0, they should be: +file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar + + +--------------------------- +Symlinking static resources: +--------------------------- + +By default, Unix symlinks will not work when used in a web application to link +resources located outside the web application root directory. + +This behavior is optional, and the "allowLinking" flag may be used to disable +the check. + + +------------------------ +Enabling invoker servlet: +------------------------ + +Starting with Tomcat 4.1.12, the invoker servlet is no longer available by +default in all webapps. Enabling it for all webapps is possible by editing +$CATALINA_HOME/conf/web.xml to uncomment the "/servlet/*" servlet-mapping +definition. + +Using the invoker servlet in a production environment is not recommended and +is unsupported. + +------------------------ +Viewing the Tomcat Change Log +------------------------ + +The Change Log for tomcat 5 is available at +http://jakarta.apache.org/tomcat/tomcat-5.0-doc/changelog.html. + +------------------- +When all else fails: +------------------- + +See the FAQ +http://jakarta.apache.org/tomcat/faq/ diff --git a/tomcat/RUNNING.txt b/tomcat/RUNNING.txt new file mode 100644 index 0000000..414abd8 --- /dev/null +++ b/tomcat/RUNNING.txt @@ -0,0 +1,144 @@ +$Id: RUNNING.txt,v 1.1 2005/02/21 06:54:22 amontano Exp $ + + + Running The Tomcat 5 Servlet/JSP Container + ========================================== + +This subproject contains Tomcat 5, a server that implements the Servlet 2.4 +and JSP 2.0 specifications from the Java Community Process +. In order to install and run this container, you must do +the following: + + +(0) Download and Install a Java Development Kit + +* Download a Java Development Kit (JDK) release (version 1.3 or later) from: + + http://java.sun.com/j2se/ + +* Install the JDK according to the instructions included with the release. + +* Set an environment variable JAVA_HOME to the pathname of the directory + into which you installed the JDK release. + + +(1) Download and Install the Tomcat 5 Binary Distribution + +NOTE: As an alternative to downloading a binary distribution, you can create +your own from the Tomcat source repository, as described in "BUILDING.txt". +If you do this, the value to use for "${catalina.home}" will be the "dist" +subdirectory of your source distribution. + +* Download a binary distribution of Tomcat from: + + http://jakarta.apache.org/site/binindex.cgi + +* Unpack the binary distribution into a convenient location so that the + distribution resides in its own directory (conventionally named + "jakarta-tomcat-5"). For the purposes of the remainder of this document, + the symbolic name "$CATALINA_HOME" is used to refer to the full + pathname of the release directory. + + +(2) Start Up Tomcat 5 + +Tomcat 5 can be started by executing the following commands: + + $CATALINA_HOME\bin\startup.bat (Windows) + + $CATALINA_HOME/bin/startup.sh (Unix) + +After startup, the default web applications included with Tomcat 5 will be +available by visiting: + + http://localhost:8080/ + +Further information about configuring and running Tomcat 5 can be found in +the documentation included here, as well as on the Tomcat web site: + + http://jakarta.apache.org/tomcat/ + + +(3) Shut Down Tomcat 5 + +Tomcat 5 can be shut down by executing the following command: + + $CATALINA_HOME\bin\shutdown (Windows) + + $CATALINA_HOME/bin/shutdown.sh (Unix) + + +(4) Advanced Configuration - Multiple Tomcat 5 Instances + +In many circumstances, it is desirable to have a single copy of a Tomcat 5 +binary distribution shared among multiple users on the same server. To make +this possible, you can pass a "-Dcatalina.base=$CATALINA_BASE" argument when +executing the startup command (see (2)). In this +"-Dcatalina.base=$CATALINA_BASE" argument, replace $CATALINA_BASE with the +directory that contains the files for your 'personal' Tomcat 5 instance. + +When you use this "-Dcatalina.base=$CATALINA_BASE" argument, Tomcat 5 will +calculate all relative references for files in the following directories based +on the value of $CATALINA_BASE instead of $CATALINA_HOME : + +* conf - Server configuration files (including server.xml) + +* logs - Log and output files + +* shared - For classes and resources that must be shared across all web + applications + +* webapps - Automatically loaded web applications + +* work - Temporary working directories for web applications + +* temp - Directory used by the JVM for temporary files (java.io.tmpdir) + +If you do not pass the "-Dcatalina.base=$CATALINA_BASE" argument to the startup command, $CATALINA_BASE will default to the same value as $CATALINA_HOME (which means that the same directory is used for all relative path resolutions). + +The administration and manager web applications, which are defined in the +$CATALINA_BASE/conf/Catalina/localhost/admin.xml and $CATALINA_BASE/conf/Catalina/localhost/manager.xml files, will +not run in that configuration, unless either: +- The path specified in the docBase attribute of the Context element is made + absolute, and replaced respectively by $CATALINA_HOME/server/webapps/admin + and $CATALINA_HOME/server/webapps/manager +- Both web applications are copied or moved to $CATALINA_BASE, and the path specified in the docBase attribute of the Context element is modified appropriately. +- Both web applications are disabled by removing $CATALINA_BASE/conf/Catalina/localhost/admin.xml + and $CATALINA_BASE/conf/Catalina/localhost/manager.xml + + +(5) Troubleshooting: + +There are only really 3 things likely to go wrong during the stand-alone +Tomcat 5 install: + +1) The most common hiccup is when another web server (or any process for that + matter) has laid claim to port 8080. This is the default HTTP port that + Tomcat attempts to bind to at startup. To change this, open the file: + + $CATALINA_HOME/conf/server.xml + + and search for '8080'. Change it to a port that isn't in use, and is + greater than 1024, as ports less than or equal to 1024 require superuser + access to bind under UNIX. + + Restart Tomcat and you're in business. Be sure that you replace the "8080" + in the URL you're using to access Tomcat. For example, if you change the + port to 1977, you would request the URL http://localhost:1977/ in your browser. + +2) An "out of environment space" error when running the batch files in + Windows 95, 98, or ME operating systems. + + Right-click on the STARTUP.BAT and SHUTDOWN.BAT files. Click on + "Properties", then on the "Memory" tab. For the "Initial environment" field, + enter in something like 4096. + + After you click apply, Windows will create shortcuts which you can use to start and stop the container. + +3) The 'localhost' machine isn't found. This could happen if you're behind a + proxy. If that's the case, make sure the proxy configuration for your + browser knows that you shouldn't be going through the proxy to access the + "localhost". + + In Netscape, this is under Edit/Preferences -> Advanced/Proxies, and in + Internet Explorer, Tools -> Internet Options -> Connections -> LAN Settings. diff --git a/tomcat/bin/LauncherBootstrap.class b/tomcat/bin/LauncherBootstrap.class new file mode 100644 index 0000000..ff74cca Binary files /dev/null and b/tomcat/bin/LauncherBootstrap.class differ diff --git a/tomcat/bin/bootstrap.jar b/tomcat/bin/bootstrap.jar new file mode 100644 index 0000000..ddb935d Binary files /dev/null and b/tomcat/bin/bootstrap.jar differ diff --git a/tomcat/bin/catalina.50.bat b/tomcat/bin/catalina.50.bat new file mode 100644 index 0000000..1cd7f77 --- /dev/null +++ b/tomcat/bin/catalina.50.bat @@ -0,0 +1,192 @@ +@echo off +if "%OS%" == "Windows_NT" setlocal +rem --------------------------------------------------------------------------- +rem Start/Stop Script for the CATALINA Server +rem +rem Environment Variable Prequisites +rem +rem CATALINA_HOME May point at your Catalina "build" directory. +rem +rem CATALINA_BASE (Optional) Base directory for resolving dynamic portions +rem of a Catalina installation. If not present, resolves to +rem the same directory that CATALINA_HOME points to. +rem +rem CATALINA_OPTS (Optional) Java runtime options used when the "start", +rem "stop", or "run" command is executed. +rem +rem CATALINA_TMPDIR (Optional) Directory path location of temporary directory +rem the JVM should use (java.io.tmpdir). Defaults to +rem %CATALINA_BASE%\temp. +rem +rem JAVA_HOME Must point at your Java Development Kit installation. +rem +rem JAVA_OPTS (Optional) Java runtime options used when the "start", +rem "stop", or "run" command is executed. +rem +rem JSSE_HOME (Optional) May point at your Java Secure Sockets Extension +rem (JSSE) installation, whose JAR files will be added to the +rem system class path used to start Tomcat. +rem +rem JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start" +rem command is executed. The default is "dt_shmem". +rem +rem JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start" +rem command is executed. The default is "jdbconn". +rem +rem $Id: catalina.50.bat,v 1.1 2005/02/21 06:54:22 amontano Exp $ +rem --------------------------------------------------------------------------- + +rem Guess CATALINA_HOME if not defined +set CURRENT_DIR=%cd% +if not "%CATALINA_HOME%" == "" goto gotHome +set CATALINA_HOME=%CURRENT_DIR% +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome +cd .. +set CATALINA_HOME=%cd% +cd %CURRENT_DIR% +:gotHome +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome +echo The CATALINA_HOME environment variable is not defined correctly +echo This environment variable is needed to run this program +goto end +:okHome + +rem Get standard environment variables +if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat" + +rem Get standard Java environment variables +if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath +echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat +echo This file is needed to run this program +goto end +:okSetclasspath +set BASEDIR=%CATALINA_HOME% +call "%CATALINA_HOME%\bin\setclasspath.bat" + +rem Add on extra jar files to CLASSPATH +if "%JSSE_HOME%" == "" goto noJsse +set CLASSPATH=%CLASSPATH%;%JSSE_HOME%\lib\jcert.jar;%JSSE_HOME%\lib\jnet.jar;%JSSE_HOME%\lib\jsse.jar +:noJsse +set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar + +if not "%CATALINA_BASE%" == "" goto gotBase +set CATALINA_BASE=%CATALINA_HOME% +:gotBase + +if not "%CATALINA_TMPDIR%" == "" goto gotTmpdir +set CATALINA_TMPDIR=%CATALINA_BASE%\temp +:gotTmpdir + +rem ----- Execute The Requested Command --------------------------------------- + +echo Using CATALINA_BASE: %CATALINA_BASE% +echo Using CATALINA_HOME: %CATALINA_HOME% +echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR% +echo Using JAVA_HOME: %JAVA_HOME% + +set _EXECJAVA=%_RUNJAVA% +set MAINCLASS=org.apache.catalina.startup.Bootstrap +set ACTION=start +set SECURITY_POLICY_FILE= +set DEBUG_OPTS= +set JPDA= + +if not ""%1"" == ""jpda"" goto noJpda +set JPDA=jpda +if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport +set JPDA_TRANSPORT=dt_shmem +:gotJpdaTransport +if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress +set JPDA_ADDRESS=jdbconn +:gotJpdaAddress +shift +:noJpda + +if ""%1"" == ""debug"" goto doDebug +if ""%1"" == ""run"" goto doRun +if ""%1"" == ""start"" goto doStart +if ""%1"" == ""stop"" goto doStop +if ""%1"" == ""version"" goto doVersion + +echo Usage: catalina ( commands ... ) +echo commands: +echo debug Start Catalina in a debugger +echo debug -security Debug Catalina with a security manager +echo jpda start Start Catalina under JPDA debugger +echo run Start Catalina in the current window +echo run -security Start in the current window with security manager +echo start Start Catalina in a separate window +echo start -security Start in a separate window with security manager +echo stop Stop Catalina +echo version What version of tomcat are you running? +goto end + +:doDebug +shift +set _EXECJAVA=%_RUNJDB% +set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\jakarta-tomcat-catalina\catalina\src\share" +if not ""%1"" == ""-security"" goto execCmd +shift +echo Using Security Manager +set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy +goto execCmd + +:doRun +shift +if not ""%1"" == ""-security"" goto execCmd +shift +echo Using Security Manager +set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy +goto execCmd + +:doStart +shift +if not "%OS%" == "Windows_NT" goto noTitle +set _EXECJAVA=start "Tomcat" %_RUNJAVA% +goto gotTitle +:noTitle +set _EXECJAVA=start %_RUNJAVA% +:gotTitle +if not ""%1"" == ""-security"" goto execCmd +shift +echo Using Security Manager +set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy +goto execCmd + +:doStop +shift +set ACTION=stop +goto execCmd + +:doVersion +%_EXECJAVA% -classpath "%CATALINA_HOME%\server\lib\catalina.jar" org.apache.catalina.util.ServerInfo +goto end + + +:execCmd +rem Get remaining unshifted command line arguments and save them in the +set CMD_LINE_ARGS= +:setArgs +if ""%1""=="""" goto doneSetArgs +set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 +shift +goto setArgs +:doneSetArgs + +rem Execute Java with the applicable properties +if not "%JPDA%" == "" goto doJpda +if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION% +goto end +:doSecurity +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION% +goto end +:doJpda +if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION% +goto end +:doSecurityJpda +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION% +goto end + +:end diff --git a/tomcat/bin/catalina.50.sh b/tomcat/bin/catalina.50.sh new file mode 100644 index 0000000..ea92a8c --- /dev/null +++ b/tomcat/bin/catalina.50.sh @@ -0,0 +1,287 @@ +#!/bin/sh +# ----------------------------------------------------------------------------- +# Start/Stop Script for the CATALINA Server +# +# Environment Variable Prequisites +# +# CATALINA_HOME May point at your Catalina "build" directory. +# +# CATALINA_BASE (Optional) Base directory for resolving dynamic portions +# of a Catalina installation. If not present, resolves to +# the same directory that CATALINA_HOME points to. +# +# CATALINA_OPTS (Optional) Java runtime options used when the "start", +# "stop", or "run" command is executed. +# +# CATALINA_TMPDIR (Optional) Directory path location of temporary directory +# the JVM should use (java.io.tmpdir). Defaults to +# $CATALINA_BASE/temp. +# +# JAVA_HOME Must point at your Java Development Kit installation. +# +# JAVA_OPTS (Optional) Java runtime options used when the "start", +# "stop", or "run" command is executed. +# +# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start" +# command is executed. The default is "dt_socket". +# +# JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start" +# command is executed. The default is 8000. +# +# JSSE_HOME (Optional) May point at your Java Secure Sockets Extension +# (JSSE) installation, whose JAR files will be added to the +# system class path used to start Tomcat. +# +# CATALINA_PID (Optional) Path of the file which should contains the pid +# of catalina startup java process, when start (fork) is used +# +# $Id: catalina.50.sh,v 1.1 2005/02/21 06:54:22 amontano Exp $ +# ----------------------------------------------------------------------------- + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false +os400=false +case "`uname`" in +CYGWIN*) cygwin=true;; +OS400*) os400=true;; +esac + +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ]; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '.*/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +# Get standard environment variables +PRGDIR=`dirname "$PRG"` + +# Only set CATALINA_HOME if not already set +[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd` + +if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then + . "$CATALINA_HOME"/bin/setenv.sh +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"` + [ -n "$CATALINA_BASE" ] && CATALINA_BASE=`cygpath --unix "$CATALINA_BASE"` + [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"` + [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --absolute --unix "$JSSE_HOME"` +fi + +# For OS400 +if $os400; then + # Set job priority to standard for interactive (interactive - 6) by using + # the interactive priority - 6, the helper threads that respond to requests + # will be running at the same priority as interactive jobs. + COMMAND='chgjob job('$JOBNAME') runpty(6)' + system $COMMAND + + # Enable multi threading + export QIBM_MULTI_THREADED=Y +fi + +# Get standard Java environment variables +if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then + BASEDIR="$CATALINA_HOME" + . "$CATALINA_HOME"/bin/setclasspath.sh +else + echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh" + echo "This file is needed to run this program" + exit 1 +fi + +# Add on extra jar files to CLASSPATH +if [ -n "$JSSE_HOME" ]; then + CLASSPATH="$CLASSPATH":"$JSSE_HOME"/lib/jcert.jar:"$JSSE_HOME"/lib/jnet.jar:"$JSSE_HOME"/lib/jsse.jar +fi +CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/commons-logging-api.jar + +if [ -z "$CATALINA_BASE" ] ; then + CATALINA_BASE="$CATALINA_HOME" +fi + +if [ -z "$CATALINA_TMPDIR" ] ; then + # Define the java.io.tmpdir to use for Catalina + CATALINA_TMPDIR="$CATALINA_BASE"/temp +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"` + CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"` + CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"` + CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"` + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --absolute --windows "$JSSE_HOME"` + JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"` +fi + +# ----- Execute The Requested Command ----------------------------------------- + +echo "Using CATALINA_BASE: $CATALINA_BASE" +echo "Using CATALINA_HOME: $CATALINA_HOME" +echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR" +echo "Using JAVA_HOME: $JAVA_HOME" + +if [ "$1" = "jpda" ] ; then + if [ -z "$JPDA_TRANSPORT" ]; then + JPDA_TRANSPORT="dt_socket" + fi + if [ -z "$JPDA_ADDRESS" ]; then + JPDA_ADDRESS="8000" + fi + if [ -z "$JPDA_OPTS" ]; then + JPDA_OPTS="-Xdebug -Xrunjdwp:transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=n" + fi + CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS" + shift +fi + +if [ "$1" = "debug" ] ; then + + if $os400; then + echo "Debug command not available on OS400" + exit 1 + else + shift + if [ "$1" = "-security" ] ; then + echo "Using Security Manager" + shift + exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \ + -classpath "$CLASSPATH" \ + -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-catalina/catalina/src/share \ + -Djava.security.manager \ + -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" start + else + exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \ + -classpath "$CLASSPATH" \ + -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-catalina/catalina/src/share \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" start + fi + fi + +elif [ "$1" = "run" ]; then + + shift + if [ "$1" = "-security" ] ; then + echo "Using Security Manager" + shift + exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ + -classpath "$CLASSPATH" \ + -Djava.security.manager \ + -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" start + else + exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ + -classpath "$CLASSPATH" \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" start + fi + +elif [ "$1" = "start" ] ; then + + shift + touch "$CATALINA_BASE"/logs/catalina.out + if [ "$1" = "-security" ] ; then + echo "Using Security Manager" + shift + "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ + -classpath "$CLASSPATH" \ + -Djava.security.manager \ + -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" start \ + >> "$CATALINA_BASE"/logs/catalina.out 2>&1 & + + if [ ! -z "$CATALINA_PID" ]; then + echo $! > $CATALINA_PID + fi + else + "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ + -classpath "$CLASSPATH" \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" start \ + >> "$CATALINA_BASE"/logs/catalina.out 2>&1 & + + if [ ! -z "$CATALINA_PID" ]; then + echo $! > $CATALINA_PID + fi + fi + +elif [ "$1" = "stop" ] ; then + + shift + FORCE=0 + if [ "$1" = "-force" ]; then + shift + FORCE=1 + fi + + "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ + -classpath "$CLASSPATH" \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" stop + + if [ $FORCE -eq 1 ]; then + if [ ! -z "$CATALINA_PID" ]; then + echo "Killing: `cat $CATALINA_PID`" + kill -9 `cat $CATALINA_PID` + fi + fi + +elif [ "$1" = "version" ] ; then + + "$_RUNJAVA" \ + -classpath "$CATALINA_HOME/server/lib/catalina.jar" \ + org.apache.catalina.util.ServerInfo + +else + + echo "Usage: catalina.sh ( commands ... )" + echo "commands:" + if $os400; then + echo " debug Start Catalina in a debugger (not available on OS400)" + echo " debug -security Debug Catalina with a security manager (not available on OS400)" + else + echo " debug Start Catalina in a debugger" + echo " debug -security Debug Catalina with a security manager" + fi + echo " jpda start Start Catalina under JPDA debugger" + echo " run Start Catalina in the current window" + echo " run -security Start in the current window with security manager" + echo " start Start Catalina in a separate window" + echo " start -security Start in a separate window with security manager" + echo " stop Stop Catalina" + echo " stop -force Stop Catalina (followed by kill -KILL)" + echo " version What version of tomcat are you running?" + exit 1 + +fi diff --git a/tomcat/bin/catalina.bat b/tomcat/bin/catalina.bat new file mode 100644 index 0000000..89bd4aa --- /dev/null +++ b/tomcat/bin/catalina.bat @@ -0,0 +1,192 @@ +@echo off +if "%OS%" == "Windows_NT" setlocal +rem --------------------------------------------------------------------------- +rem Start/Stop Script for the CATALINA Server +rem +rem Environment Variable Prequisites +rem +rem CATALINA_HOME May point at your Catalina "build" directory. +rem +rem CATALINA_BASE (Optional) Base directory for resolving dynamic portions +rem of a Catalina installation. If not present, resolves to +rem the same directory that CATALINA_HOME points to. +rem +rem CATALINA_OPTS (Optional) Java runtime options used when the "start", +rem "stop", or "run" command is executed. +rem +rem CATALINA_TMPDIR (Optional) Directory path location of temporary directory +rem the JVM should use (java.io.tmpdir). Defaults to +rem %CATALINA_BASE%\temp. +rem +rem JAVA_HOME Must point at your Java Development Kit installation. +rem +rem JAVA_OPTS (Optional) Java runtime options used when the "start", +rem "stop", or "run" command is executed. +rem +rem JSSE_HOME (Optional) May point at your Java Secure Sockets Extension +rem (JSSE) installation, whose JAR files will be added to the +rem system class path used to start Tomcat. +rem +rem JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start" +rem command is executed. The default is "dt_shmem". +rem +rem JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start" +rem command is executed. The default is "jdbconn". +rem +rem $Id: catalina.bat,v 1.1 2005/02/21 06:54:22 amontano Exp $ +rem --------------------------------------------------------------------------- + +rem Guess CATALINA_HOME if not defined +set CURRENT_DIR=%cd% +if not "%CATALINA_HOME%" == "" goto gotHome +set CATALINA_HOME=%CURRENT_DIR% +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome +cd .. +set CATALINA_HOME=%cd% +cd %CURRENT_DIR% +:gotHome +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome +echo The CATALINA_HOME environment variable is not defined correctly +echo This environment variable is needed to run this program +goto end +:okHome + +rem Get standard environment variables +if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat" + +rem Get standard Java environment variables +if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath +echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat +echo This file is needed to run this program +goto end +:okSetclasspath +set BASEDIR=%CATALINA_HOME% +call "%CATALINA_HOME%\bin\setclasspath.bat" + +rem Add on extra jar files to CLASSPATH +if "%JSSE_HOME%" == "" goto noJsse +set CLASSPATH=%CLASSPATH%;%JSSE_HOME%\lib\jcert.jar;%JSSE_HOME%\lib\jnet.jar;%JSSE_HOME%\lib\jsse.jar +:noJsse +set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar + +if not "%CATALINA_BASE%" == "" goto gotBase +set CATALINA_BASE=%CATALINA_HOME% +:gotBase + +if not "%CATALINA_TMPDIR%" == "" goto gotTmpdir +set CATALINA_TMPDIR=%CATALINA_BASE%\temp +:gotTmpdir + +rem ----- Execute The Requested Command --------------------------------------- + +echo Using CATALINA_BASE: %CATALINA_BASE% +echo Using CATALINA_HOME: %CATALINA_HOME% +echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR% +echo Using JAVA_HOME: %JAVA_HOME% + +set _EXECJAVA=%_RUNJAVA% +set MAINCLASS=org.apache.catalina.startup.Bootstrap +set ACTION=start +set SECURITY_POLICY_FILE= +set DEBUG_OPTS= +set JPDA= + +if not ""%1"" == ""jpda"" goto noJpda +set JPDA=jpda +if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport +set JPDA_TRANSPORT=dt_shmem +:gotJpdaTransport +if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress +set JPDA_ADDRESS=jdbconn +:gotJpdaAddress +shift +:noJpda + +if ""%1"" == ""debug"" goto doDebug +if ""%1"" == ""run"" goto doRun +if ""%1"" == ""start"" goto doStart +if ""%1"" == ""stop"" goto doStop +if ""%1"" == ""version"" goto doVersion + +echo Usage: catalina ( commands ... ) +echo commands: +echo debug Start Catalina in a debugger +echo debug -security Debug Catalina with a security manager +echo jpda start Start Catalina under JPDA debugger +echo run Start Catalina in the current window +echo run -security Start in the current window with security manager +echo start Start Catalina in a separate window +echo start -security Start in a separate window with security manager +echo stop Stop Catalina +echo version What version of tomcat are you running? +goto end + +:doDebug +shift +set _EXECJAVA=%_RUNJDB% +set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\jakarta-tomcat-catalina\catalina\src\share" +if not ""%1"" == ""-security"" goto execCmd +shift +echo Using Security Manager +set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy +goto execCmd + +:doRun +shift +if not ""%1"" == ""-security"" goto execCmd +shift +echo Using Security Manager +set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy +goto execCmd + +:doStart +shift +if not "%OS%" == "Windows_NT" goto noTitle +set _EXECJAVA=start "Tomcat" %_RUNJAVA% +goto gotTitle +:noTitle +set _EXECJAVA=start %_RUNJAVA% +:gotTitle +if not ""%1"" == ""-security"" goto execCmd +shift +echo Using Security Manager +set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy +goto execCmd + +:doStop +shift +set ACTION=stop +goto execCmd + +:doVersion +%_EXECJAVA% -classpath "%CATALINA_HOME%\server\lib\catalina.jar" org.apache.catalina.util.ServerInfo +goto end + + +:execCmd +rem Get remaining unshifted command line arguments and save them in the +set CMD_LINE_ARGS= +:setArgs +if ""%1""=="""" goto doneSetArgs +set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 +shift +goto setArgs +:doneSetArgs + +rem Execute Java with the applicable properties +if not "%JPDA%" == "" goto doJpda +if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION% +goto end +:doSecurity +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION% +goto end +:doJpda +if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION% +goto end +:doSecurityJpda +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION% +goto end + +:end diff --git a/tomcat/bin/catalina.sh b/tomcat/bin/catalina.sh new file mode 100644 index 0000000..834e771 --- /dev/null +++ b/tomcat/bin/catalina.sh @@ -0,0 +1,287 @@ +#!/bin/sh +# ----------------------------------------------------------------------------- +# Start/Stop Script for the CATALINA Server +# +# Environment Variable Prequisites +# +# CATALINA_HOME May point at your Catalina "build" directory. +# +# CATALINA_BASE (Optional) Base directory for resolving dynamic portions +# of a Catalina installation. If not present, resolves to +# the same directory that CATALINA_HOME points to. +# +# CATALINA_OPTS (Optional) Java runtime options used when the "start", +# "stop", or "run" command is executed. +# +# CATALINA_TMPDIR (Optional) Directory path location of temporary directory +# the JVM should use (java.io.tmpdir). Defaults to +# $CATALINA_BASE/temp. +# +# JAVA_HOME Must point at your Java Development Kit installation. +# +# JAVA_OPTS (Optional) Java runtime options used when the "start", +# "stop", or "run" command is executed. +# +# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start" +# command is executed. The default is "dt_socket". +# +# JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start" +# command is executed. The default is 8000. +# +# JSSE_HOME (Optional) May point at your Java Secure Sockets Extension +# (JSSE) installation, whose JAR files will be added to the +# system class path used to start Tomcat. +# +# CATALINA_PID (Optional) Path of the file which should contains the pid +# of catalina startup java process, when start (fork) is used +# +# $Id: catalina.sh,v 1.1 2005/02/21 06:54:22 amontano Exp $ +# ----------------------------------------------------------------------------- + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false +os400=false +case "`uname`" in +CYGWIN*) cygwin=true;; +OS400*) os400=true;; +esac + +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ]; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '.*/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +# Get standard environment variables +PRGDIR=`dirname "$PRG"` + +# Only set CATALINA_HOME if not already set +[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd` + +if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then + . "$CATALINA_HOME"/bin/setenv.sh +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"` + [ -n "$CATALINA_BASE" ] && CATALINA_BASE=`cygpath --unix "$CATALINA_BASE"` + [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"` + [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --absolute --unix "$JSSE_HOME"` +fi + +# For OS400 +if $os400; then + # Set job priority to standard for interactive (interactive - 6) by using + # the interactive priority - 6, the helper threads that respond to requests + # will be running at the same priority as interactive jobs. + COMMAND='chgjob job('$JOBNAME') runpty(6)' + system $COMMAND + + # Enable multi threading + export QIBM_MULTI_THREADED=Y +fi + +# Get standard Java environment variables +if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then + BASEDIR="$CATALINA_HOME" + . "$CATALINA_HOME"/bin/setclasspath.sh +else + echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh" + echo "This file is needed to run this program" + exit 1 +fi + +# Add on extra jar files to CLASSPATH +if [ -n "$JSSE_HOME" ]; then + CLASSPATH="$CLASSPATH":"$JSSE_HOME"/lib/jcert.jar:"$JSSE_HOME"/lib/jnet.jar:"$JSSE_HOME"/lib/jsse.jar +fi +CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/commons-logging-api.jar + +if [ -z "$CATALINA_BASE" ] ; then + CATALINA_BASE="$CATALINA_HOME" +fi + +if [ -z "$CATALINA_TMPDIR" ] ; then + # Define the java.io.tmpdir to use for Catalina + CATALINA_TMPDIR="$CATALINA_BASE"/temp +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"` + CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"` + CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"` + CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"` + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --absolute --windows "$JSSE_HOME"` + JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"` +fi + +# ----- Execute The Requested Command ----------------------------------------- + +echo "Using CATALINA_BASE: $CATALINA_BASE" +echo "Using CATALINA_HOME: $CATALINA_HOME" +echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR" +echo "Using JAVA_HOME: $JAVA_HOME" + +if [ "$1" = "jpda" ] ; then + if [ -z "$JPDA_TRANSPORT" ]; then + JPDA_TRANSPORT="dt_socket" + fi + if [ -z "$JPDA_ADDRESS" ]; then + JPDA_ADDRESS="8000" + fi + if [ -z "$JPDA_OPTS" ]; then + JPDA_OPTS="-Xdebug -Xrunjdwp:transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=n" + fi + CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS" + shift +fi + +if [ "$1" = "debug" ] ; then + + if $os400; then + echo "Debug command not available on OS400" + exit 1 + else + shift + if [ "$1" = "-security" ] ; then + echo "Using Security Manager" + shift + exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \ + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ + -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-catalina/catalina/src/share \ + -Djava.security.manager \ + -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" start + else + exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \ + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ + -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-catalina/catalina/src/share \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" start + fi + fi + +elif [ "$1" = "run" ]; then + + shift + if [ "$1" = "-security" ] ; then + echo "Using Security Manager" + shift + exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ + -Djava.security.manager \ + -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" start + else + exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" start + fi + +elif [ "$1" = "start" ] ; then + + shift + touch "$CATALINA_BASE"/logs/catalina.out + if [ "$1" = "-security" ] ; then + echo "Using Security Manager" + shift + "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ + -Djava.security.manager \ + -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" start \ + >> "$CATALINA_BASE"/logs/catalina.out 2>&1 & + + if [ ! -z "$CATALINA_PID" ]; then + echo $! > $CATALINA_PID + fi + else + "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" start \ + >> "$CATALINA_BASE"/logs/catalina.out 2>&1 & + + if [ ! -z "$CATALINA_PID" ]; then + echo $! > $CATALINA_PID + fi + fi + +elif [ "$1" = "stop" ] ; then + + shift + FORCE=0 + if [ "$1" = "-force" ]; then + shift + FORCE=1 + fi + + "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" stop + + if [ $FORCE -eq 1 ]; then + if [ ! -z "$CATALINA_PID" ]; then + echo "Killing: `cat $CATALINA_PID`" + kill -9 `cat $CATALINA_PID` + fi + fi + +elif [ "$1" = "version" ] ; then + + "$_RUNJAVA" \ + -classpath "$CATALINA_HOME/server/lib/catalina.jar" \ + org.apache.catalina.util.ServerInfo + +else + + echo "Usage: catalina.sh ( commands ... )" + echo "commands:" + if $os400; then + echo " debug Start Catalina in a debugger (not available on OS400)" + echo " debug -security Debug Catalina with a security manager (not available on OS400)" + else + echo " debug Start Catalina in a debugger" + echo " debug -security Debug Catalina with a security manager" + fi + echo " jpda start Start Catalina under JPDA debugger" + echo " run Start Catalina in the current window" + echo " run -security Start in the current window with security manager" + echo " start Start Catalina in a separate window" + echo " start -security Start in a separate window with security manager" + echo " stop Stop Catalina" + echo " stop -force Stop Catalina (followed by kill -KILL)" + echo " version What version of tomcat are you running?" + exit 1 + +fi diff --git a/tomcat/bin/catalina.xml b/tomcat/bin/catalina.xml new file mode 100644 index 0000000..1e78d64 --- /dev/null +++ b/tomcat/bin/catalina.xml @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TOMCAT_HOME=${catalina.home} + CLASSPATH=${toString:tomcatcp} + + + + + To run any of the applications in the JDB debugger, execute the Launcher with + a "-Ddebug=true" argument. + + To run any of the applications in JPDA mode, execute the Launcher with a + "-Djpda=true" argument. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tomcat/bin/commons-daemon.jar b/tomcat/bin/commons-daemon.jar new file mode 100644 index 0000000..4e4fcd4 Binary files /dev/null and b/tomcat/bin/commons-daemon.jar differ diff --git a/tomcat/bin/commons-launcher.jar b/tomcat/bin/commons-launcher.jar new file mode 100644 index 0000000..747310e Binary files /dev/null and b/tomcat/bin/commons-launcher.jar differ diff --git a/tomcat/bin/commons-logging-api.jar b/tomcat/bin/commons-logging-api.jar new file mode 100644 index 0000000..ade9a13 Binary files /dev/null and b/tomcat/bin/commons-logging-api.jar differ diff --git a/tomcat/bin/cpappend.bat b/tomcat/bin/cpappend.bat new file mode 100644 index 0000000..8572684 --- /dev/null +++ b/tomcat/bin/cpappend.bat @@ -0,0 +1,19 @@ +rem --------------------------------------------------------------------------- +rem Append to CLASSPATH +rem +rem $Id: cpappend.bat,v 1.1 2005/02/21 06:54:22 amontano Exp $ +rem --------------------------------------------------------------------------- + +rem Process the first argument +if ""%1"" == """" goto end +set CLASSPATH=%CLASSPATH%;%1 +shift + +rem Process the remaining arguments +:setArgs +if ""%1"" == """" goto doneSetArgs +set CLASSPATH=%CLASSPATH% %1 +shift +goto setArgs +:doneSetArgs +:end diff --git a/tomcat/bin/digest.bat b/tomcat/bin/digest.bat new file mode 100644 index 0000000..fa3bddf --- /dev/null +++ b/tomcat/bin/digest.bat @@ -0,0 +1,41 @@ +@echo off +if "%OS%" == "Windows_NT" setlocal +rem --------------------------------------------------------------------------- +rem Script to digest password using the algorithm specified +rem +rem $Id: digest.bat,v 1.1 2005/02/21 06:54:22 amontano Exp $ +rem --------------------------------------------------------------------------- + +rem Guess CATALINA_HOME if not defined +if not "%CATALINA_HOME%" == "" goto gotHome +set CATALINA_HOME=. +if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome +set CATALINA_HOME=.. +:gotHome +if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome +echo The CATALINA_HOME environment variable is not defined correctly +echo This environment variable is needed to run this program +goto end +:okHome + +set EXECUTABLE=%CATALINA_HOME%\bin\tool-wrapper.bat + +rem Check that target executable exists +if exist "%EXECUTABLE%" goto okExec +echo Cannot find %EXECUTABLE% +echo This file is needed to run this program +goto end +:okExec + +rem Get remaining unshifted command line arguments and save them in the +set CMD_LINE_ARGS= +:setArgs +if ""%1""=="""" goto doneSetArgs +set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 +shift +goto setArgs +:doneSetArgs + +call "%EXECUTABLE%" -server org.apache.catalina.realm.RealmBase %CMD_LINE_ARGS% + +:end diff --git a/tomcat/bin/digest.sh b/tomcat/bin/digest.sh new file mode 100644 index 0000000..c2f74e2 --- /dev/null +++ b/tomcat/bin/digest.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# ----------------------------------------------------------------------------- +# Script to digest password using the algorithm specified +# +# $Id: digest.sh,v 1.1 2005/02/21 06:54:22 amontano Exp $ +# ----------------------------------------------------------------------------- + +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '.*/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +PRGDIR=`dirname "$PRG"` +EXECUTABLE=tool-wrapper.sh + +# Check that target executable exists +if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then + echo "Cannot find $PRGDIR/$EXECUTABLE" + echo "This file is needed to run this program" + exit 1 +fi + +exec "$PRGDIR"/"$EXECUTABLE" -server org.apache.catalina.realm.RealmBase "$@" diff --git a/tomcat/bin/jmx.jar b/tomcat/bin/jmx.jar new file mode 100644 index 0000000..a62e0a0 Binary files /dev/null and b/tomcat/bin/jmx.jar differ diff --git a/tomcat/bin/jsvc.tar.gz b/tomcat/bin/jsvc.tar.gz new file mode 100644 index 0000000..b58f145 Binary files /dev/null and b/tomcat/bin/jsvc.tar.gz differ diff --git a/tomcat/bin/launcher.properties b/tomcat/bin/launcher.properties new file mode 100644 index 0000000..95722da --- /dev/null +++ b/tomcat/bin/launcher.properties @@ -0,0 +1,23 @@ +# +# Properties for the LauncherBootstrap class +# +# This file contains the following configurable properties: +# - ant.class.path - This property is a ":" separated list of the URL file +# fragments where the Ant classes are located. The list must include a JAXP +# compliant XML parser if you are not using Java(TM) SE 1.4 or higher. +# +# Important notes: +# - Relative URL file fragments, such as "../lib", are supported and strongly +# encouraged as absolute files prevent cross platform distribution. +# - URL file fragments are the portions of a URL after the "file:" string. +# This means that you must use "/" characters as directory separators on +# all platforms. Also, ":" characters in a file fragment, such as in drive +# portion of absolute Windows files, must be URL encoded as "%3A". Lastly, +# directories must have a "/" character at the end. +# - All relative URL file fragments in the above properties will be resolved +# using the URL of the directory that the LauncherBootstrap class was +# loaded from, not the current working directory. This ensures that the +# LauncherBootstrap class can properly resolve the files without regard to +# the current working directory. +# +ant.class.path=../common/lib/ant.jar:../common/lib/ant-launcher.jar:../common/endorsed/xercesImpl.jar:../common/endorsed/xml-apis.jar diff --git a/tomcat/bin/service.bat b/tomcat/bin/service.bat new file mode 100644 index 0000000..ed96309 --- /dev/null +++ b/tomcat/bin/service.bat @@ -0,0 +1,99 @@ +@echo off +if "%OS%" == "Windows_NT" setlocal +rem --------------------------------------------------------------------------- +rem NT Service Install/Uninstall script +rem +rem Options +rem install Install the service using Tomcat5 as service name. +rem Service is installed using default settings. +rem remove Remove the service from the System. +rem +rem name (optional) If the second argument is present it is considered +rem to be new service name +rem +rem $Id: service.bat,v 1.1 2005/02/21 06:54:23 amontano Exp $ +rem --------------------------------------------------------------------------- + +rem Guess CATALINA_HOME if not defined +set CURRENT_DIR=%cd% +if not "%CATALINA_HOME%" == "" goto gotHome +set CATALINA_HOME=%cd% +if exist "%CATALINA_HOME%\bin\tomcat5.exe" goto okHome +rem CD to the upper dir +cd .. +set CATALINA_HOME=%cd% +:gotHome +if exist "%CATALINA_HOME%\bin\tomcat5.exe" goto okHome +echo The tomcat.exe was not found... +echo The CATALINA_HOME environment variable is not defined correctly. +echo This environment variable is needed to run this program +goto end +rem Make sure prerequisite environment variables are set +if not "%JAVA_HOME%" == "" goto okHome +echo The JAVA_HOME environment variable is not defined +echo This environment variable is needed to run this program +goto end +:okHome +if not "%CATALINA_BASE%" == "" goto gotBase +set CATALINA_BASE=%CATALINA_HOME% +:gotBase + +set EXECUTABLE=%CATALINA_HOME%\bin\tomcat5.exe + +rem Set default Service name +set SERVICE_NAME=Tomcat5 +set PR_DISPLAYNAME=Apache Tomcat + +if "%1" == "" goto displayUsage +if "%2" == "" goto setServiceName +set SERVICE_NAME=%2 +set PR_DISPLAYNAME=Apache Tomcat %2 +:setServiceName +if %1 == install goto doInstall +if %1 == remove goto doRemove +echo Unknown parameter "%1" +:displayUsage +echo +echo Usage: service.bat install/remove [service_name] +goto end + +:doRemove +rem Remove the service +"%EXECUTABLE%" //DS//%SERVICE_NAME% +echo The service '%SERVICE_NAME%' has been removed +goto end + +:doInstall +rem Install the service +echo Installing the service '%SERVICE_NAME%' ... +echo Using CATALINA_HOME: %CATALINA_HOME% +echo Using JAVA_HOME: %JAVA_HOME% + +rem Use the environment variables as an exaple +rem Each command line option is prefixed with PR_ + +set PR_DESCRIPTION=Apache Tomcat Server - http://jakarta.apache.org/tomcat +set PR_INSTALL=%EXECUTABLE% +set PR_LOGPATH=%CATALINA_HOME%\logs +set PR_CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar +rem Set the server jvm frrom JAVA_HOME +set PR_JVM=%JAVA_HOME%\jre\bin\server\jvm.dll +rem You can use the 'set PR_JVM=auto' for default JVM +"%EXECUTABLE%" //IS//%SERVICE_NAME% --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop +rem Clear the environment variables. They are not needed any more. +set PR_DISPLAYNAME= +set PR_DESCRIPTION= +set PR_INSTALL= +set PR_LOGPATH= +set PR_CLASSPATH= +set PR_JVM= +rem Set extra parameters +"%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed" --StartMode jvm --StopMode jvm +rem More extra parameters +set PR_STDOUTPUT=%CATALINA_HOME%\logs\stdout.log +set PR_STDERROR=%CATALINA_HOME%\logs\stderr.log +"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMs 128 --JvmMx 256 +echo The service '%SERVICE_NAME%' has been installed. + +:end +cd %CURRENT_DIR% diff --git a/tomcat/bin/setclasspath.bat b/tomcat/bin/setclasspath.bat new file mode 100644 index 0000000..d38f4e5 --- /dev/null +++ b/tomcat/bin/setclasspath.bat @@ -0,0 +1,57 @@ +rem --------------------------------------------------------------------------- +rem Set CLASSPATH and Java options +rem +rem $Id: setclasspath.bat,v 1.1 2005/02/21 06:54:23 amontano Exp $ +rem --------------------------------------------------------------------------- + +rem Make sure prerequisite environment variables are set +if not "%JAVA_HOME%" == "" goto gotJavaHome +echo The JAVA_HOME environment variable is not defined +echo This environment variable is needed to run this program +goto exit +:gotJavaHome +if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome +if not exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaHome +if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJavaHome +if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome +goto okJavaHome +:noJavaHome +echo The JAVA_HOME environment variable is not defined correctly +echo This environment variable is needed to run this program +echo NB: JAVA_HOME should point to a JDK not a JRE +goto exit +:okJavaHome + +if not "%BASEDIR%" == "" goto gotBasedir +echo The BASEDIR environment variable is not defined +echo This environment variable is needed to run this program +goto exit +:gotBasedir +if exist "%BASEDIR%\bin\setclasspath.bat" goto okBasedir +echo The BASEDIR environment variable is not defined correctly +echo This environment variable is needed to run this program +goto exit +:okBasedir + +rem Set the default -Djava.endorsed.dirs argument +set JAVA_ENDORSED_DIRS=%BASEDIR%\common\endorsed + +rem Set standard CLASSPATH +rem Note that there are no quotes as we do not want to introduce random +rem quotes into the CLASSPATH +set CLASSPATH=%JAVA_HOME%\lib\tools.jar + +rem Set standard command for invoking Java. +rem Note that NT requires a window name argument when using start. +rem Also note the quoting as JAVA_HOME may contain spaces. +set _RUNJAVA="%JAVA_HOME%\bin\java" +set _RUNJAVAW="%JAVA_HOME%\bin\javaw" +set _RUNJDB="%JAVA_HOME%\bin\jdb" +set _RUNJAVAC="%JAVA_HOME%\bin\javac" + +goto end + +:exit +exit /b 1 + +:end diff --git a/tomcat/bin/setclasspath.sh b/tomcat/bin/setclasspath.sh new file mode 100644 index 0000000..cd0d55f --- /dev/null +++ b/tomcat/bin/setclasspath.sh @@ -0,0 +1,61 @@ +# ----------------------------------------------------------------------------- +# Set CLASSPATH and Java options +# +# $Id: setclasspath.sh,v 1.1 2005/02/21 06:54:23 amontano Exp $ +# ----------------------------------------------------------------------------- + +# Make sure prerequisite environment variables are set +if [ -z "$JAVA_HOME" ]; then + echo "The JAVA_HOME environment variable is not defined" + echo "This environment variable is needed to run this program" + exit 1 +fi +if $os400; then + if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/javac ]; then + echo "The JAVA_HOME environment variable is not defined correctly" + echo "This environment variable is needed to run this program" + echo "NB: JAVA_HOME should point to a JDK not a JRE" + exit 1 + fi +else + if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/jdb -o ! -x "$JAVA_HOME"/bin/javac ]; then + echo "The JAVA_HOME environment variable is not defined correctly" + echo "This environment variable is needed to run this program" + echo "NB: JAVA_HOME should point to a JDK not a JRE" + exit 1 + fi +fi +if [ -z "$BASEDIR" ]; then + echo "The BASEDIR environment variable is not defined" + echo "This environment variable is needed to run this program" + exit 1 +fi +if [ ! -x "$BASEDIR"/bin/setclasspath.sh ]; then + echo "The BASEDIR environment variable is not defined correctly" + echo "This environment variable is needed to run this program" + exit 1 +fi + +# Set the default -Djava.endorsed.dirs argument +JAVA_ENDORSED_DIRS="$BASEDIR"/common/endorsed + +# Set standard CLASSPATH +CLASSPATH="$JAVA_HOME"/lib/tools.jar + +# OSX hack to CLASSPATH +JIKESPATH= +if [ `uname -s` = "Darwin" ]; then + OSXHACK="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes" + if [ -d "$OSXHACK" ]; then + for i in "$OSXHACK"/*.jar; do + JIKESPATH="$JIKESPATH":"$i" + done + fi +fi + +# Set standard commands for invoking Java. +_RUNJAVA="$JAVA_HOME"/bin/java +if [ $os400 = false ]; then + _RUNJDB="$JAVA_HOME"/bin/jdb +fi +_RUNJAVAC="$JAVA_HOME"/bin/javac diff --git a/tomcat/bin/shutdown-using-launcher.bat b/tomcat/bin/shutdown-using-launcher.bat new file mode 100644 index 0000000..95c4fff --- /dev/null +++ b/tomcat/bin/shutdown-using-launcher.bat @@ -0,0 +1,40 @@ +@echo off +if "%OS%" == "Windows_NT" setlocal + +rem --------------------------------------------------------------------------- +rem +rem Script for shutting down Catalina using the Launcher +rem +rem --------------------------------------------------------------------------- + +rem Get standard environment variables +set PRG=%0 +if exist %PRG%\..\setenv.bat goto gotCmdPath +rem %0 must have been found by DOS using the %PATH% so we assume that +rem setenv.bat will also be found in the %PATH% +call setenv.bat +goto doneSetenv +:gotCmdPath +call %PRG%\..\setenv.bat +:doneSetenv + +rem Make sure prerequisite environment variables are set +if not "%JAVA_HOME%" == "" goto gotJavaHome +echo The JAVA_HOME environment variable is not defined +echo This environment variable is needed to run this program +goto end +:gotJavaHome + +rem Get command line arguments and save them with the proper quoting +set CMD_LINE_ARGS= +:setArgs +if ""%1""=="""" goto doneSetArgs +set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 +shift +goto setArgs +:doneSetArgs + +rem Execute the Launcher using the "catalina" target +"%JAVA_HOME%\bin\java.exe" -classpath %PRG%\..;"%PATH%";. LauncherBootstrap -launchfile catalina.xml -verbose catalina %CMD_LINE_ARGS% stop + +:end diff --git a/tomcat/bin/shutdown-using-launcher.sh b/tomcat/bin/shutdown-using-launcher.sh new file mode 100644 index 0000000..82daec2 --- /dev/null +++ b/tomcat/bin/shutdown-using-launcher.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# ----------------------------------------------------------------------------- +# +# Script for shutting down Catalina using the Launcher +# +# ----------------------------------------------------------------------------- + +# Resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ]; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '.*/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +# Get standard environment variables +PRGDIR=`dirname "$PRG"` +if [ -r "$PRGDIR"/setenv.sh ]; then + . "$PRGDIR"/setenv.sh +fi + +# Execute the Launcher using the "catalina" target +exec "$JAVA_HOME"/bin/java -classpath "$PRGDIR" LauncherBootstrap -launchfile catalina.xml -verbose catalina "$@" stop diff --git a/tomcat/bin/shutdown.bat b/tomcat/bin/shutdown.bat new file mode 100644 index 0000000..e266e91 --- /dev/null +++ b/tomcat/bin/shutdown.bat @@ -0,0 +1,44 @@ +@echo off +if "%OS%" == "Windows_NT" setlocal +rem --------------------------------------------------------------------------- +rem Stop script for the CATALINA Server +rem +rem $Id: shutdown.bat,v 1.1 2005/02/21 06:54:23 amontano Exp $ +rem --------------------------------------------------------------------------- + +rem Guess CATALINA_HOME if not defined +set CURRENT_DIR=%cd% +if not "%CATALINA_HOME%" == "" goto gotHome +set CATALINA_HOME=%CURRENT_DIR% +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome +cd .. +set CATALINA_HOME=%cd% +cd %CURRENT_DIR% +:gotHome +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome +echo The CATALINA_HOME environment variable is not defined correctly +echo This environment variable is needed to run this program +goto end +:okHome + +set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat + +rem Check that target executable exists +if exist "%EXECUTABLE%" goto okExec +echo Cannot find %EXECUTABLE% +echo This file is needed to run this program +goto end +:okExec + +rem Get remaining unshifted command line arguments and save them in the +set CMD_LINE_ARGS= +:setArgs +if ""%1""=="""" goto doneSetArgs +set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 +shift +goto setArgs +:doneSetArgs + +call "%EXECUTABLE%" stop %CMD_LINE_ARGS% + +:end diff --git a/tomcat/bin/shutdown.sh b/tomcat/bin/shutdown.sh new file mode 100644 index 0000000..77d7de9 --- /dev/null +++ b/tomcat/bin/shutdown.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# ----------------------------------------------------------------------------- +# Stop script for the CATALINA Server +# +# $Id: shutdown.sh,v 1.1 2005/02/21 06:54:23 amontano Exp $ +# ----------------------------------------------------------------------------- + +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '.*/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +PRGDIR=`dirname "$PRG"` +EXECUTABLE=catalina.sh + +# Check that target executable exists +if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then + echo "Cannot find $PRGDIR/$EXECUTABLE" + echo "This file is needed to run this program" + exit 1 +fi + +exec "$PRGDIR"/"$EXECUTABLE" stop "$@" diff --git a/tomcat/bin/startup-using-launcher.bat b/tomcat/bin/startup-using-launcher.bat new file mode 100644 index 0000000..2a5ece9 --- /dev/null +++ b/tomcat/bin/startup-using-launcher.bat @@ -0,0 +1,39 @@ +@echo off +if "%OS%" == "Windows_NT" setlocal + +rem --------------------------------------------------------------------------- +rem +rem Script for starting Catalina using the Launcher +rem +rem --------------------------------------------------------------------------- + +rem Get standard environment variables +set PRG=%0 +if exist %PRG%\..\setenv.bat goto gotCmdPath +rem %0 must have been found by DOS using the %PATH% so we assume that +rem setenv.bat will also be found in the %PATH% +goto doneSetenv +:gotCmdPath +call %PRG%\..\setenv.bat +:doneSetenv + +rem Make sure prerequisite environment variables are set +if not "%JAVA_HOME%" == "" goto gotJavaHome +echo The JAVA_HOME environment variable is not defined +echo This environment variable is needed to run this program +goto end +:gotJavaHome + +rem Get command line arguments and save them with the proper quoting +set CMD_LINE_ARGS= +:setArgs +if ""%1""=="""" goto doneSetArgs +set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 +shift +goto setArgs +:doneSetArgs + +rem Execute the Launcher using the "catalina" target +"%JAVA_HOME%\bin\java.exe" -classpath %PRG%\..;"%PATH%";. LauncherBootstrap -launchfile catalina.xml -verbose catalina %CMD_LINE_ARGS% start + +:end diff --git a/tomcat/bin/startup-using-launcher.sh b/tomcat/bin/startup-using-launcher.sh new file mode 100644 index 0000000..dcd179e --- /dev/null +++ b/tomcat/bin/startup-using-launcher.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# ----------------------------------------------------------------------------- +# +# Script for starting Catalina using the Launcher +# +# ----------------------------------------------------------------------------- + +# Resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ]; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '.*/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +# Get standard environment variables +PRGDIR=`dirname "$PRG"` +if [ -r "$PRGDIR"/setenv.sh ]; then + . "$PRGDIR"/setenv.sh +fi + +# Execute the Launcher using the "catalina" target +exec "$JAVA_HOME"/bin/java -classpath "$PRGDIR" LauncherBootstrap -launchfile catalina.xml -verbose catalina "$@" start diff --git a/tomcat/bin/startup.bat b/tomcat/bin/startup.bat new file mode 100644 index 0000000..fd69a9d --- /dev/null +++ b/tomcat/bin/startup.bat @@ -0,0 +1,44 @@ +@echo off +if "%OS%" == "Windows_NT" setlocal +rem --------------------------------------------------------------------------- +rem Start script for the CATALINA Server +rem +rem $Id: startup.bat,v 1.1 2005/02/21 06:54:23 amontano Exp $ +rem --------------------------------------------------------------------------- + +rem Guess CATALINA_HOME if not defined +set CURRENT_DIR=%cd% +if not "%CATALINA_HOME%" == "" goto gotHome +set CATALINA_HOME=%CURRENT_DIR% +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome +cd .. +set CATALINA_HOME=%cd% +cd %CURRENT_DIR% +:gotHome +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome +echo The CATALINA_HOME environment variable is not defined correctly +echo This environment variable is needed to run this program +goto end +:okHome + +set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat + +rem Check that target executable exists +if exist "%EXECUTABLE%" goto okExec +echo Cannot find %EXECUTABLE% +echo This file is needed to run this program +goto end +:okExec + +rem Get remaining unshifted command line arguments and save them in the +set CMD_LINE_ARGS= +:setArgs +if ""%1""=="""" goto doneSetArgs +set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 +shift +goto setArgs +:doneSetArgs + +call "%EXECUTABLE%" start %CMD_LINE_ARGS% + +:end diff --git a/tomcat/bin/startup.sh b/tomcat/bin/startup.sh new file mode 100644 index 0000000..bdf673e --- /dev/null +++ b/tomcat/bin/startup.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# ----------------------------------------------------------------------------- +# Start Script for the CATALINA Server +# +# $Id: startup.sh,v 1.1 2005/02/21 06:54:23 amontano Exp $ +# ----------------------------------------------------------------------------- + +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '.*/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +PRGDIR=`dirname "$PRG"` +EXECUTABLE=catalina.sh + +# Check that target executable exists +if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then + echo "Cannot find $PRGDIR/$EXECUTABLE" + echo "This file is needed to run this program" + exit 1 +fi + +exec "$PRGDIR"/"$EXECUTABLE" start "$@" diff --git a/tomcat/bin/tomcat5.exe b/tomcat/bin/tomcat5.exe new file mode 100644 index 0000000..64824e9 Binary files /dev/null and b/tomcat/bin/tomcat5.exe differ diff --git a/tomcat/bin/tomcat5w.exe b/tomcat/bin/tomcat5w.exe new file mode 100644 index 0000000..c986bfe Binary files /dev/null and b/tomcat/bin/tomcat5w.exe differ diff --git a/tomcat/bin/tool-wrapper-using-launcher.bat b/tomcat/bin/tool-wrapper-using-launcher.bat new file mode 100644 index 0000000..08b6586 --- /dev/null +++ b/tomcat/bin/tool-wrapper-using-launcher.bat @@ -0,0 +1,40 @@ +@echo off +if "%OS%" == "Windows_NT" setlocal + +rem --------------------------------------------------------------------------- +rem +rem Script for running the Catalina tool wrapper using the Launcher +rem +rem --------------------------------------------------------------------------- + +rem Get standard environment variables +set PRG=%0 +if exist %PRG%\..\setenv.bat goto gotCmdPath +rem %0 must have been found by DOS using the %PATH% so we assume that +rem setenv.bat will also be found in the %PATH% +call setenv.bat +goto doneSetenv +:gotCmdPath +call %PRG%\..\setenv.bat +:doneSetenv + +rem Make sure prerequisite environment variables are set +if not "%JAVA_HOME%" == "" goto gotJavaHome +echo The JAVA_HOME environment variable is not defined +echo This environment variable is needed to run this program +goto end +:gotJavaHome + +rem Get command line arguments and save them with the proper quoting +set CMD_LINE_ARGS= +:setArgs +if ""%1""=="""" goto doneSetArgs +set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 +shift +goto setArgs +:doneSetArgs + +rem Execute the Launcher using the "tool-wrapper" target +"%JAVA_HOME%\bin\java.exe" -classpath %PRG%\..;"%PATH%";. LauncherBootstrap -launchfile catalina.xml -verbose tool-wrapper %CMD_LINE_ARGS% + +:end diff --git a/tomcat/bin/tool-wrapper-using-launcher.sh b/tomcat/bin/tool-wrapper-using-launcher.sh new file mode 100644 index 0000000..4b286cc --- /dev/null +++ b/tomcat/bin/tool-wrapper-using-launcher.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# ----------------------------------------------------------------------------- +# +# Script for running the Catalina tool wrapper using the Launcher +# +# ----------------------------------------------------------------------------- + +# Resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ]; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '.*/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +# Get standard environment variables +PRGDIR=`dirname "$PRG"` +if [ -r "$PRGDIR"/setenv.sh ]; then + . "$PRGDIR"/setenv.sh +fi + +# Execute the Launcher using the "tool-wrapper" target +exec "$JAVA_HOME"/bin/java -classpath "$PRGDIR" LauncherBootstrap -launchfile catalina.xml -verbose tool-wrapper "$@" diff --git a/tomcat/bin/tool-wrapper.bat b/tomcat/bin/tool-wrapper.bat new file mode 100644 index 0000000..0f45b27 --- /dev/null +++ b/tomcat/bin/tool-wrapper.bat @@ -0,0 +1,59 @@ +@echo off +if "%OS%" == "Windows_NT" setlocal +rem --------------------------------------------------------------------------- +rem Wrapper script for command line tools +rem +rem Environment Variable Prequisites +rem +rem CATALINA_HOME May point at your Catalina "build" directory. +rem +rem TOOL_OPTS (Optional) Java runtime options used when the "start", +rem "stop", or "run" command is executed. +rem +rem JAVA_HOME Must point at your Java Development Kit installation. +rem +rem JAVA_OPTS (Optional) Java runtime options used when the "start", +rem "stop", or "run" command is executed. +rem +rem $Id: tool-wrapper.bat,v 1.1 2005/02/21 06:54:23 amontano Exp $ +rem --------------------------------------------------------------------------- + +rem Guess CATALINA_HOME if not defined +if not "%CATALINA_HOME%" == "" goto gotHome +set CATALINA_HOME=. +if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome +set CATALINA_HOME=.. +:gotHome +if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome +echo The CATALINA_HOME environment variable is not defined correctly +echo This environment variable is needed to run this program +goto end +:okHome + +rem Get standard environment variables +if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat" + +rem Get standard Java environment variables +if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath +echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat +echo This file is needed to run this program +goto end +:okSetclasspath +set BASEDIR=%CATALINA_HOME% +call "%CATALINA_HOME%\bin\setclasspath.bat" + +rem Add on extra jar files to CLASSPATH +set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar;"%BASEDIR%"\common\lib\jmx.jar + +rem Get remaining unshifted command line arguments and save them in the +set CMD_LINE_ARGS= +:setArgs +if ""%1""=="""" goto doneSetArgs +set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 +shift +goto setArgs +:doneSetArgs + +%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS% + +:end diff --git a/tomcat/bin/tool-wrapper.sh b/tomcat/bin/tool-wrapper.sh new file mode 100644 index 0000000..c551508 --- /dev/null +++ b/tomcat/bin/tool-wrapper.sh @@ -0,0 +1,78 @@ +#!/bin/sh +# ----------------------------------------------------------------------------- +# Wrapper script for command line tools +# +# Environment Variable Prequisites +# +# CATALINA_HOME May point at your Catalina "build" directory. +# +# TOOL_OPTS (Optional) Java runtime options used when the "start", +# "stop", or "run" command is executed. +# +# JAVA_HOME Must point at your Java Development Kit installation. +# +# JAVA_OPTS (Optional) Java runtime options used when the "start", +# "stop", or "run" command is executed. +# +# $Id: tool-wrapper.sh,v 1.1 2005/02/21 06:54:23 amontano Exp $ +# ----------------------------------------------------------------------------- + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false +case "`uname`" in +CYGWIN*) cygwin=true;; +esac + +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ]; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '.*/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +# Get standard environment variables +PRGDIR=`dirname "$PRG"` +CATALINA_HOME=`cd "$PRGDIR/.." ; pwd` +if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then + . "$CATALINA_HOME"/bin/setenv.sh +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"` + [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# Get standard Java environment variables +if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then + BASEDIR="$CATALINA_HOME" + . "$CATALINA_HOME"/bin/setclasspath.sh +else + echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh" + echo "This file is needed to run this program" + exit 1 +fi + +# Add on extra jar files to CLASSPATH +CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$BASEDIR"/common/lib/jmx.jar + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + CATALINA_HOME=`cygpath --path --windows "$CATALINA_HOME"` + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` +fi + +# ----- Execute The Requested Command ----------------------------------------- + +exec "$_RUNJAVA" $JAVA_OPTS $TOOL_OPTS \ + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ + -Dcatalina.home="$CATALINA_HOME" \ + org.apache.catalina.startup.Tool "$@" diff --git a/tomcat/bin/version.bat b/tomcat/bin/version.bat new file mode 100644 index 0000000..6182c8d --- /dev/null +++ b/tomcat/bin/version.bat @@ -0,0 +1,44 @@ +@echo off +if "%OS%" == "Windows_NT" setlocal +rem --------------------------------------------------------------------------- +rem Version script for the CATALINA Server +rem +rem $Id: version.bat,v 1.1 2005/02/21 06:54:23 amontano Exp $ +rem --------------------------------------------------------------------------- + +rem Guess CATALINA_HOME if not defined +set CURRENT_DIR=%cd% +if not "%CATALINA_HOME%" == "" goto gotHome +set CATALINA_HOME=%CURRENT_DIR% +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome +cd .. +set CATALINA_HOME=%cd% +cd %CURRENT_DIR% +:gotHome +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome +echo The CATALINA_HOME environment variable is not defined correctly +echo This environment variable is needed to run this program +goto end +:okHome + +set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat + +rem Check that target executable exists +if exist "%EXECUTABLE%" goto okExec +echo Cannot find %EXECUTABLE% +echo This file is needed to run this program +goto end +:okExec + +rem Get remaining unshifted command line arguments and save them in the +set CMD_LINE_ARGS= +:setArgs +if ""%1""=="""" goto doneSetArgs +set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 +shift +goto setArgs +:doneSetArgs + +call "%EXECUTABLE%" version %CMD_LINE_ARGS% + +:end diff --git a/tomcat/bin/version.sh b/tomcat/bin/version.sh new file mode 100644 index 0000000..f0be2a3 --- /dev/null +++ b/tomcat/bin/version.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# ----------------------------------------------------------------------------- +# Version Script for the CATALINA Server +# +# $Id: version.sh,v 1.1 2005/02/21 06:54:23 amontano Exp $ +# ----------------------------------------------------------------------------- + +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '.*/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +PRGDIR=`dirname "$PRG"` +EXECUTABLE=catalina.sh + +# Check that target executable exists +if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then + echo "Cannot find $PRGDIR/$EXECUTABLE" + echo "This file is needed to run this program" + exit 1 +fi + +exec "$PRGDIR"/"$EXECUTABLE" version "$@" diff --git a/tomcat/common/endorsed/xercesImpl.jar b/tomcat/common/endorsed/xercesImpl.jar new file mode 100644 index 0000000..f0fb0e8 Binary files /dev/null and b/tomcat/common/endorsed/xercesImpl.jar differ diff --git a/tomcat/common/endorsed/xml-apis.jar b/tomcat/common/endorsed/xml-apis.jar new file mode 100644 index 0000000..2dd8377 Binary files /dev/null and b/tomcat/common/endorsed/xml-apis.jar differ diff --git a/tomcat/common/lib/ant-launcher.jar b/tomcat/common/lib/ant-launcher.jar new file mode 100644 index 0000000..052fc4e Binary files /dev/null and b/tomcat/common/lib/ant-launcher.jar differ diff --git a/tomcat/common/lib/ant.jar b/tomcat/common/lib/ant.jar new file mode 100644 index 0000000..cf01339 Binary files /dev/null and b/tomcat/common/lib/ant.jar differ diff --git a/tomcat/common/lib/commons-collections-3.1.jar b/tomcat/common/lib/commons-collections-3.1.jar new file mode 100644 index 0000000..41e230f Binary files /dev/null and b/tomcat/common/lib/commons-collections-3.1.jar differ diff --git a/tomcat/common/lib/commons-dbcp-1.2.1.jar b/tomcat/common/lib/commons-dbcp-1.2.1.jar new file mode 100644 index 0000000..08440c0 Binary files /dev/null and b/tomcat/common/lib/commons-dbcp-1.2.1.jar differ diff --git a/tomcat/common/lib/commons-el.jar b/tomcat/common/lib/commons-el.jar new file mode 100644 index 0000000..608ed79 Binary files /dev/null and b/tomcat/common/lib/commons-el.jar differ diff --git a/tomcat/common/lib/commons-pool-1.2.jar b/tomcat/common/lib/commons-pool-1.2.jar new file mode 100644 index 0000000..4ba534c Binary files /dev/null and b/tomcat/common/lib/commons-pool-1.2.jar differ diff --git a/tomcat/common/lib/jasper-compiler.jar b/tomcat/common/lib/jasper-compiler.jar new file mode 100644 index 0000000..96ec538 Binary files /dev/null and b/tomcat/common/lib/jasper-compiler.jar differ diff --git a/tomcat/common/lib/jasper-runtime.jar b/tomcat/common/lib/jasper-runtime.jar new file mode 100644 index 0000000..5c3b4bf Binary files /dev/null and b/tomcat/common/lib/jasper-runtime.jar differ diff --git a/tomcat/common/lib/jsp-api.jar b/tomcat/common/lib/jsp-api.jar new file mode 100644 index 0000000..4236374 Binary files /dev/null and b/tomcat/common/lib/jsp-api.jar differ diff --git a/tomcat/common/lib/mysql-connector-java-3.0.15-ga-bin.jar b/tomcat/common/lib/mysql-connector-java-3.0.15-ga-bin.jar new file mode 100644 index 0000000..7042480 Binary files /dev/null and b/tomcat/common/lib/mysql-connector-java-3.0.15-ga-bin.jar differ diff --git a/tomcat/common/lib/naming-common.jar b/tomcat/common/lib/naming-common.jar new file mode 100644 index 0000000..2bb9ff5 Binary files /dev/null and b/tomcat/common/lib/naming-common.jar differ diff --git a/tomcat/common/lib/naming-factory.jar b/tomcat/common/lib/naming-factory.jar new file mode 100644 index 0000000..192c2d0 Binary files /dev/null and b/tomcat/common/lib/naming-factory.jar differ diff --git a/tomcat/common/lib/naming-java.jar b/tomcat/common/lib/naming-java.jar new file mode 100644 index 0000000..cc32e86 Binary files /dev/null and b/tomcat/common/lib/naming-java.jar differ diff --git a/tomcat/common/lib/naming-resources.jar b/tomcat/common/lib/naming-resources.jar new file mode 100644 index 0000000..20c6f0c Binary files /dev/null and b/tomcat/common/lib/naming-resources.jar differ diff --git a/tomcat/common/lib/servlet-api.jar b/tomcat/common/lib/servlet-api.jar new file mode 100644 index 0000000..c9dab30 Binary files /dev/null and b/tomcat/common/lib/servlet-api.jar differ diff --git a/tomcat/conf/Catalina/localhost/admin.xml b/tomcat/conf/Catalina/localhost/admin.xml new file mode 100644 index 0000000..74564e6 --- /dev/null +++ b/tomcat/conf/Catalina/localhost/admin.xml @@ -0,0 +1,24 @@ + + + + + + + + + + diff --git a/tomcat/conf/Catalina/localhost/lex.xml b/tomcat/conf/Catalina/localhost/lex.xml new file mode 100644 index 0000000..a9cac38 --- /dev/null +++ b/tomcat/conf/Catalina/localhost/lex.xml @@ -0,0 +1,28 @@ + + + + + + + + diff --git a/tomcat/conf/Catalina/localhost/manager.xml b/tomcat/conf/Catalina/localhost/manager.xml new file mode 100644 index 0000000..5636367 --- /dev/null +++ b/tomcat/conf/Catalina/localhost/manager.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/tomcat/server/lib/catalina-ant.jar b/tomcat/server/lib/catalina-ant.jar new file mode 100644 index 0000000..96041dd Binary files /dev/null and b/tomcat/server/lib/catalina-ant.jar differ diff --git a/tomcat/server/lib/catalina-cluster.jar b/tomcat/server/lib/catalina-cluster.jar new file mode 100644 index 0000000..bb6d044 Binary files /dev/null and b/tomcat/server/lib/catalina-cluster.jar differ diff --git a/tomcat/server/lib/catalina-i18n-es.jar b/tomcat/server/lib/catalina-i18n-es.jar new file mode 100644 index 0000000..87b409e Binary files /dev/null and b/tomcat/server/lib/catalina-i18n-es.jar differ diff --git a/tomcat/server/lib/catalina-i18n-fr.jar b/tomcat/server/lib/catalina-i18n-fr.jar new file mode 100644 index 0000000..899a273 Binary files /dev/null and b/tomcat/server/lib/catalina-i18n-fr.jar differ diff --git a/tomcat/server/lib/catalina-i18n-ja.jar b/tomcat/server/lib/catalina-i18n-ja.jar new file mode 100644 index 0000000..578da61 Binary files /dev/null and b/tomcat/server/lib/catalina-i18n-ja.jar differ diff --git a/tomcat/server/lib/catalina-optional.jar b/tomcat/server/lib/catalina-optional.jar new file mode 100644 index 0000000..d413638 Binary files /dev/null and b/tomcat/server/lib/catalina-optional.jar differ diff --git a/tomcat/server/lib/catalina.jar b/tomcat/server/lib/catalina.jar new file mode 100644 index 0000000..41884b5 Binary files /dev/null and b/tomcat/server/lib/catalina.jar differ diff --git a/tomcat/server/lib/commons-beanutils.jar b/tomcat/server/lib/commons-beanutils.jar new file mode 100644 index 0000000..b1b89c9 Binary files /dev/null and b/tomcat/server/lib/commons-beanutils.jar differ diff --git a/tomcat/server/lib/commons-digester.jar b/tomcat/server/lib/commons-digester.jar new file mode 100644 index 0000000..c2a7d9d Binary files /dev/null and b/tomcat/server/lib/commons-digester.jar differ diff --git a/tomcat/server/lib/commons-fileupload-1.0.jar b/tomcat/server/lib/commons-fileupload-1.0.jar new file mode 100644 index 0000000..1ca4a9c Binary files /dev/null and b/tomcat/server/lib/commons-fileupload-1.0.jar differ diff --git a/tomcat/server/lib/commons-modeler.jar b/tomcat/server/lib/commons-modeler.jar new file mode 100644 index 0000000..e098598 Binary files /dev/null and b/tomcat/server/lib/commons-modeler.jar differ diff --git a/tomcat/server/lib/jakarta-regexp-1.3.jar b/tomcat/server/lib/jakarta-regexp-1.3.jar new file mode 100644 index 0000000..d653a38 Binary files /dev/null and b/tomcat/server/lib/jakarta-regexp-1.3.jar differ diff --git a/tomcat/server/lib/jkconfig.jar b/tomcat/server/lib/jkconfig.jar new file mode 100644 index 0000000..460b9db Binary files /dev/null and b/tomcat/server/lib/jkconfig.jar differ diff --git a/tomcat/server/lib/jkshm.jar b/tomcat/server/lib/jkshm.jar new file mode 100644 index 0000000..5ab6de4 Binary files /dev/null and b/tomcat/server/lib/jkshm.jar differ diff --git a/tomcat/server/lib/servlets-cgi.renametojar b/tomcat/server/lib/servlets-cgi.renametojar new file mode 100644 index 0000000..d051070 Binary files /dev/null and b/tomcat/server/lib/servlets-cgi.renametojar differ diff --git a/tomcat/server/lib/servlets-common.jar b/tomcat/server/lib/servlets-common.jar new file mode 100644 index 0000000..7be0ee3 Binary files /dev/null and b/tomcat/server/lib/servlets-common.jar differ diff --git a/tomcat/server/lib/servlets-default.jar b/tomcat/server/lib/servlets-default.jar new file mode 100644 index 0000000..c4c152d Binary files /dev/null and b/tomcat/server/lib/servlets-default.jar differ diff --git a/tomcat/server/lib/servlets-invoker.jar b/tomcat/server/lib/servlets-invoker.jar new file mode 100644 index 0000000..b2a123b Binary files /dev/null and b/tomcat/server/lib/servlets-invoker.jar differ diff --git a/tomcat/server/lib/servlets-ssi.renametojar b/tomcat/server/lib/servlets-ssi.renametojar new file mode 100644 index 0000000..7d2cf0f Binary files /dev/null and b/tomcat/server/lib/servlets-ssi.renametojar differ diff --git a/tomcat/server/lib/servlets-webdav.jar b/tomcat/server/lib/servlets-webdav.jar new file mode 100644 index 0000000..14b2969 Binary files /dev/null and b/tomcat/server/lib/servlets-webdav.jar differ diff --git a/tomcat/server/lib/tomcat-coyote.jar b/tomcat/server/lib/tomcat-coyote.jar new file mode 100644 index 0000000..3a5c928 Binary files /dev/null and b/tomcat/server/lib/tomcat-coyote.jar differ diff --git a/tomcat/server/lib/tomcat-http11.jar b/tomcat/server/lib/tomcat-http11.jar new file mode 100644 index 0000000..4d78b46 Binary files /dev/null and b/tomcat/server/lib/tomcat-http11.jar differ diff --git a/tomcat/server/lib/tomcat-jk.jar b/tomcat/server/lib/tomcat-jk.jar new file mode 100644 index 0000000..c6fe487 Binary files /dev/null and b/tomcat/server/lib/tomcat-jk.jar differ diff --git a/tomcat/server/lib/tomcat-jk2.jar b/tomcat/server/lib/tomcat-jk2.jar new file mode 100644 index 0000000..2fd3798 Binary files /dev/null and b/tomcat/server/lib/tomcat-jk2.jar differ diff --git a/tomcat/server/lib/tomcat-jni.jar b/tomcat/server/lib/tomcat-jni.jar new file mode 100644 index 0000000..d7b07ab Binary files /dev/null and b/tomcat/server/lib/tomcat-jni.jar differ diff --git a/tomcat/server/lib/tomcat-util.jar b/tomcat/server/lib/tomcat-util.jar new file mode 100644 index 0000000..7e9dcee Binary files /dev/null and b/tomcat/server/lib/tomcat-util.jar differ diff --git a/tomcat/server/webapps/admin/WEB-INF/controls.tld b/tomcat/server/webapps/admin/WEB-INF/controls.tld new file mode 100644 index 0000000..627dfaf --- /dev/null +++ b/tomcat/server/webapps/admin/WEB-INF/controls.tld @@ -0,0 +1,419 @@ + + + + + + 1.0 + 1.2 + controls + + JSP tag library containing custom GUI controls used in the + Tomcat Administrative Application. + + + + + + + table + org.apache.webapp.admin.TableTag + JSP + + Render a "table" object, which is rendered as an HTML + "table" element. + + NOTE: The only valid nested content for this tag is + "row" tags from this library. Anything else will cause + the rendered HTML to be invalid. + + NOTE: To be usable, this tag must be nested inside an + HTML <form> element. + + + + columns + false + true + + (Integer) number of columns that the table contains. If + not specified, only two columns will be visible. + + + + + tableStyle + false + true + + The CSS style class to be applied to the entire rendered output + of the instant table. If not specified, no overall + style class is applied. + + + + + lineStyle + false + true + + The CSS style for the lines between rows. + + + + + + + + row + org.apache.webapp.admin.RowTag + JSP + + Define a single "instant table row" option for the surrounding "table" + tag. It is not valid to use this tag *except* when nested inside an + "table" tag. + + NOTE: This tag can nest only "label" and "data" tags. + + + + header + false + true + + (Boolean) variable set to "true" or "yes" if this row is + the header row. + + + + + labelStyle + false + true + + The style for the label table data element. + + + + + dataStyle + false + true + + The style for the value of the table data element. + + + + + styleId + false + true + + The styleId for the label table data element. + + + + + + + + label + org.apache.webapp.admin.LabelTag + JSP + + Render a "label" object, which is rendered as a label in the row of + an HTML "table" element. + + NOTE: To be usable, this tag must be nested inside a "row" tag. + + + + + + data + org.apache.webapp.admin.DataTag + JSP + + Render a "data" object, which is rendered as a label in the row of + an HTML "table" element. + + NOTE: To be usable, this tag must be nested inside a "row" tag. + + + + + + + + actions + org.apache.webapp.admin.ActionsTag + JSP + + Render an "instant actions" object, which is rendered as an HTML + "select" element, where the selection of a particular element from + the list immediately causes a JavaScript function to be executed + (with the available elements specified by "action" tag instances + nested within the body of the "actions" tag). + + NOTE: The only valid nested content for this tag is + "action" tags from this library. Anything else will cause + the rendered HTML to be invalid. + + NOTE: To be usable, this tag must be nested inside an + HTML <form> element. + + + + size + false + true + + (Integer) number of rows that will be visible to the user. If + not specified, only one row will be visible. + + + + + style + false + true + + The CSS style class to be applied to the entire rendered output + of the instant actions control. If not specified, no overall + style class is applied. + + + + + label + false + true + + HTML Label tag generation. + + + + + + + + action + org.apache.webapp.admin.ActionTag + JSP + + Define a single "instant action" option for the surrounding "actions" + tag. It is not valid to use this tag *except* when nested inside an + "actions" tag. + + NOTE: The body content of this tag (which should be suitably + localized, if required by your application) is used as the + user-visible label for this action. + + + + selected + false + true + + (Boolean) variable set to "true" or "yes" if this action should + already be selected when the "instant actions" element is + initially displayed. + + + + + disabled + false + true + + (Boolean) variable set to "true" or "yes" if the selection + for this action should be disabled. + + + + + url + false + true + + The URL to which the current frame or window will be transferred + if the "onchange" event handler of this "instant actions" element + is triggered, and this is the currently selected action. If no + URL is specified, no action will be taken (useful for "(None)" + options and dividers). + + If this URL starts with a slash, it will be assumed to be + context-relative, and will be prefixed with the context path + of this request. Otherwise, it will be used unmodified. + + NOTE: This URL will be passed through URL rewriting so that it + will maintain session identity even in environments were cookies + are not being used. + + + + + + + + + + + tree + org.apache.webapp.admin.TreeControlTag + empty + + Render a "tree" control, based on the current state of a data object + of type org.apache.webapp.admin.TreeControl, which is identified + by the name specified in the "tree" attribute, in the JSP scope + specified by the "scope" attribute. + + + + action + false + true + + Hyperlink to which expand/contract actions should be sent, + with a string "${node}" marking where the node name of the + affected node should be included (which will usually be as + the value of a request parameter). + + + + + images + false + true + + Name of a directory containing the images for our icons, + relative to the page including this tag. If not specified, + defaults to "images". + + + + + scope + false + true + + The JSP scope within which the "tree" attribute is to be found + (page, request, session, or application). If not specified, the + "tree" attribute will be searched for in any scope. + + + + + style + false + true + + The CSS style class to be applied to the entire rendered output + of the tree control. If not specified, no overall style class + is applied. + + + + + styleSelected + false + true + + The CSS style class to be applied to the text of any node that + is currently selected. If not specified, no style class will be + applied to the text of the selected node. + + + + + styleUnselected + false + true + + The CSS style class to be applied to the text of any node that + is *not* currently selected. If not specified, no style class will + be applied to the text of non-selected nodes. + + + + + tree + false + true + + Name of the attribute (in the scope specified by the "scope" + attribute, if any) under which an object of type + org.apache.webapp.admin.TreeControl is stored. This object + represents the entire current state of the tree, including + a representation of the hierarchical representation of the + nodes, plus the current expanded/ or contracted state of + non-leaf nodes. + + + + + + + + + + attribute + org.apache.webapp.admin.AttributeTag + empty + + Look up an attribute on a JMX MBean, specified by an object name + specified by the "name" (and optional "property" and "scope") + attributes, and render it to the current JSP writer. The object name + identified by these attributes can be either a java.lang.String version + of the name, or a javax.management.ObjectName instance. + + + + attribute + true + true + + Name of the attribute of the JMX MBean whose value is to be + retrieved and written to the current JSP writer. + + + + + name + true + true + + Name of a bean, optionally in some scope identified by the "scope" + attribute. If the "property" attribute is not specified, this bean + must by a String or an ObjectName. Otherwise, this bean must have + a property getter for the property named by "property", which will + return the String or ObjectName. + + + + + property + false + true + + Name of a bean property, on the bean identified by the "name" + (and optional "scope") attributes, that is either a String or an + ObjectName of the JMX MBean whose attribute is to be retrieved. + + + + + scope + false + true + + Name of the scope ("page", "request", "session", or "application") + in which the bean identified by the "name" attribute is to be found. + If not specified, all scopes will be searched in ascending order. + + + + + + diff --git a/tomcat/server/webapps/admin/WEB-INF/lib/catalina-admin.jar b/tomcat/server/webapps/admin/WEB-INF/lib/catalina-admin.jar new file mode 100644 index 0000000..8e2aa0f Binary files /dev/null and b/tomcat/server/webapps/admin/WEB-INF/lib/catalina-admin.jar differ diff --git a/tomcat/server/webapps/admin/WEB-INF/lib/struts.jar b/tomcat/server/webapps/admin/WEB-INF/lib/struts.jar new file mode 100644 index 0000000..db32f9f Binary files /dev/null and b/tomcat/server/webapps/admin/WEB-INF/lib/struts.jar differ diff --git a/tomcat/server/webapps/admin/WEB-INF/struts-bean.tld b/tomcat/server/webapps/admin/WEB-INF/struts-bean.tld new file mode 100644 index 0000000..7dfc6bd --- /dev/null +++ b/tomcat/server/webapps/admin/WEB-INF/struts-bean.tld @@ -0,0 +1,382 @@ + + + + + + + + + + +1.0 +1.1 +bean +http://jakarta.apache.org/struts/tags-bean + +cookie +org.apache.struts.taglib.bean.CookieTag +org.apache.struts.taglib.bean.CookieTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +define +org.apache.struts.taglib.bean.DefineTag +org.apache.struts.taglib.bean.DefineTei +JSP + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +header +org.apache.struts.taglib.bean.HeaderTag +org.apache.struts.taglib.bean.HeaderTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +include +org.apache.struts.taglib.bean.IncludeTag +org.apache.struts.taglib.bean.IncludeTei +empty + +anchor +false +true + + +forward +false +true + + +href +false +true + + +id +true +false + + +name +false +true + + +page +false +true + + +transaction +false +true + + + +message +org.apache.struts.taglib.bean.MessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +page +org.apache.struts.taglib.bean.PageTag +org.apache.struts.taglib.bean.PageTei +empty + +id +true +false + + +property +true +true + + + +parameter +org.apache.struts.taglib.bean.ParameterTag +org.apache.struts.taglib.bean.ParameterTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +resource +org.apache.struts.taglib.bean.ResourceTag +org.apache.struts.taglib.bean.ResourceTei +empty + +id +true +false + + +input +false +true + + +name +true +true + + + +size +org.apache.struts.taglib.bean.SizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + + +struts +org.apache.struts.taglib.bean.StrutsTag +org.apache.struts.taglib.bean.StrutsTei +empty + +id +true +false + + +formBean +false +true + + +forward +false +true + + +mapping +false +true + + + +write +org.apache.struts.taglib.bean.WriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +true +true + + +property +false +true + + +scope +false +true + + + + + + diff --git a/tomcat/server/webapps/admin/WEB-INF/struts-config.xml b/tomcat/server/webapps/admin/WEB-INF/struts-config.xml new file mode 100644 index 0000000..4b2acda --- /dev/null +++ b/tomcat/server/webapps/admin/WEB-INF/struts-config.xml @@ -0,0 +1,1062 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tomcat/server/webapps/admin/WEB-INF/struts-html.tld b/tomcat/server/webapps/admin/WEB-INF/struts-html.tld new file mode 100644 index 0000000..9087060 --- /dev/null +++ b/tomcat/server/webapps/admin/WEB-INF/struts-html.tld @@ -0,0 +1,2972 @@ + + + + + + + + + + +1.0 +1.1 +html +http://jakarta.apache.org/struts/tags-html + +base +org.apache.struts.taglib.html.BaseTag +empty + +target +false +true + + +server +false +true + + + +button +org.apache.struts.taglib.html.ButtonTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +cancel +org.apache.struts.taglib.html.CancelTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +checkbox +org.apache.struts.taglib.html.CheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.html.ErrorsTag +empty + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + + +file +org.apache.struts.taglib.html.FileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.html.FormTag +JSP + +action +true +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +name +false +true + + +onreset +false +true + + +onsubmit +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + +type +false +true + + + +frame +org.apache.struts.taglib.html.FrameTag + +action +false +true + + +anchor +false +true + + +forward +false +true + + +frameborder +false +true + + +frameName +false +true + + +href +false +true + + +longdesc +false +true + + +marginheight +false +true + + +marginwidth +false +true + + +name +false +true + + +noresize +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +scrolling +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +hidden +org.apache.struts.taglib.html.HiddenTag +empty + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + +write +false +true + + + +html +org.apache.struts.taglib.html.HtmlTag +JSP + +locale +false +true + + +xhtml +false +true + + + +image +org.apache.struts.taglib.html.ImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.html.ImgTag +empty + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +javascript +org.apache.struts.taglib.html.JavascriptValidatorTag +empty + +cdata +false +true + + +dynamicJavascript +false +false + + +formName +false +true + + +method +false +true + + +page +false +true + + +src +false +true + + +staticJavascript +false +false + + +htmlComment +false +true + + + +link +org.apache.struts.taglib.html.LinkTag + +accesskey +false +true + + +action +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +messages +org.apache.struts.taglib.html.MessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +false + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.html.MultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +option +org.apache.struts.taglib.html.OptionTag + +bundle +false +true + + +disabled +false +true + + +key +false +true + + +locale +false +true + + +style +false +true + + +styleId +false +true + + +styleClass +false +true + + +value +true +true + + + +options +org.apache.struts.taglib.html.OptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.html.OptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.html.PasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.html.RadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +reset +org.apache.struts.taglib.html.ResetTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +rewrite +org.apache.struts.taglib.html.RewriteTag +empty + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + + +select +org.apache.struts.taglib.html.SelectTag +JSP + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.html.SubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.html.TextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +disabled +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.html.TextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +cols +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +xhtml +org.apache.struts.taglib.html.XhtmlTag +empty + + + diff --git a/tomcat/server/webapps/admin/WEB-INF/struts-logic.tld b/tomcat/server/webapps/admin/WEB-INF/struts-logic.tld new file mode 100644 index 0000000..1975973 --- /dev/null +++ b/tomcat/server/webapps/admin/WEB-INF/struts-logic.tld @@ -0,0 +1,642 @@ + + + + + + + + + +1.0 +1.1 +logic +http://jakarta.apache.org/struts/tags-logic + +empty +org.apache.struts.taglib.logic.EmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.logic.EqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +forward +org.apache.struts.taglib.logic.ForwardTag +empty + +name +true +true + + + +greaterEqual +org.apache.struts.taglib.logic.GreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.logic.GreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.logic.IterateTag +org.apache.struts.taglib.logic.IterateTei +JSP + +collection +false +true + + +id +true +false + + +indexId +false +false + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.logic.LessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.logic.LessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.logic.MatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.logic.MessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.logic.MessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.logic.NotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.logic.NotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.logic.NotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.logic.NotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.logic.PresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +redirect +org.apache.struts.taglib.logic.RedirectTag + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + + + + + diff --git a/tomcat/server/webapps/admin/WEB-INF/web.xml b/tomcat/server/webapps/admin/WEB-INF/web.xml new file mode 100644 index 0000000..6bb40a2 --- /dev/null +++ b/tomcat/server/webapps/admin/WEB-INF/web.xml @@ -0,0 +1,819 @@ + + + + + + + Tomcat Administration Application + + Tomcat HTML based administration web application. + + + + + + + + + + + + + action + + org.apache.webapp.admin.ApplicationServlet + + + application + + org.apache.webapp.admin.ApplicationResources + + + + config + /WEB-INF/struts-config.xml + + + debug + 0 + + + detail + 0 + + + locale + true + + + nocache + true + + + validate + false + + + + + treebuilders + + org.apache.webapp.admin.TomcatTreeBuilder, + org.apache.webapp.admin.resources.ResourcesTreeBuilder, + org.apache.webapp.admin.users.UsersTreeBuilder + + + + domain + Catalina + + + 2 + + + + + + + + admin.header_jsp + admin.header_jsp + + + + admin.index_jsp + admin.index_jsp + + + + admin.saved_jsp + admin.saved_jsp + + + + admin.error_jsp + admin.error_jsp + + + + admin.banner_jsp + admin.banner_jsp + + + + admin.savefail_jsp + admin.savefail_jsp + + + + admin.blank_jsp + admin.blank_jsp + + + + admin.footer_jsp + admin.footer_jsp + + + + admin.tree_002dcontrol_002dtest_jsp + admin.tree_002dcontrol_002dtest_jsp + + + + admin.dumpServer_jsp + admin.dumpServer_jsp + + + + admin.dumpRegistry_jsp + admin.dumpRegistry_jsp + + + + admin.buttons_jsp + admin.buttons_jsp + + + + admin.frameset_jsp + admin.frameset_jsp + + + + admin.login_jsp + admin.login_jsp + + + + admin.connector.connectors_jsp + admin.connector.connectors_jsp + + + + admin.connector.connector_jsp + admin.connector.connector_jsp + + + + admin.context.context_jsp + admin.context.context_jsp + + + + admin.context.contexts_jsp + admin.context.contexts_jsp + + + + admin.defaultcontext.defaultcontext_jsp + admin.defaultcontext.defaultcontext_jsp + + + + admin.logger.logger_jsp + admin.logger.logger_jsp + + + + admin.logger.loggers_jsp + admin.logger.loggers_jsp + + + + admin.server.server_jsp + admin.server.server_jsp + + + + admin.service.services_jsp + admin.service.services_jsp + + + + admin.service.service_jsp + admin.service.service_jsp + + + + admin.host.host_jsp + admin.host.host_jsp + + + + admin.host.hosts_jsp + admin.host.hosts_jsp + + + + admin.host.aliases_jsp + admin.host.aliases_jsp + + + + admin.host.alias_jsp + admin.host.alias_jsp + + + + admin.users.footer_jsp + admin.users.footer_jsp + + + + admin.users.user_jsp + admin.users.user_jsp + + + + admin.users.listUsers_jsp + admin.users.listUsers_jsp + + + + admin.users.group_jsp + admin.users.group_jsp + + + + admin.users.deleteUsers_jsp + admin.users.deleteUsers_jsp + + + + admin.users.listRoles_jsp + admin.users.listRoles_jsp + + + + admin.users.listGroups_jsp + admin.users.listGroups_jsp + + + + admin.users.deleteGroups_jsp + admin.users.deleteGroups_jsp + + + + admin.users.header_jsp + admin.users.header_jsp + + + + admin.users.deleteRoles_jsp + admin.users.deleteRoles_jsp + + + + admin.users.role_jsp + admin.users.role_jsp + + + + admin.realm.userDatabaseRealm_jsp + admin.realm.userDatabaseRealm_jsp + + + + admin.realm.dataSourceRealm_jsp + admin.realm.dataSourceRealm_jsp + + + + admin.realm.jdbcRealm_jsp + admin.realm.jdbcRealm_jsp + + + + admin.realm.memoryRealm_jsp + admin.realm.memoryRealm_jsp + + + + admin.realm.realms_jsp + admin.realm.realms_jsp + + + + admin.realm.jndiRealm_jsp + admin.realm.jndiRealm_jsp + + + + admin.resources.resourceLink_jsp + admin.resources.resourceLink_jsp + + + + admin.resources.listResourceLinks_jsp + admin.resources.listResourceLinks_jsp + + + + admin.resources.deleteResourceLinks_jsp + admin.resources.deleteResourceLinks_jsp + + + + admin.resources.deleteDataSources_jsp + admin.resources.deleteDataSources_jsp + + + + admin.resources.deleteEnvEntries_jsp + admin.resources.deleteEnvEntries_jsp + + + + admin.resources.listDataSources_jsp + admin.resources.listDataSources_jsp + + + + admin.resources.listEnvEntries_jsp + admin.resources.listEnvEntries_jsp + + + + admin.resources.envEntry_jsp + admin.resources.envEntry_jsp + + + + admin.resources.userDatabase_jsp + admin.resources.userDatabase_jsp + + + + admin.resources.dataSource_jsp + admin.resources.dataSource_jsp + + + + admin.resources.listUserDatabases_jsp + admin.resources.listUserDatabases_jsp + + + + admin.resources.deleteUserDatabases_jsp + admin.resources.deleteUserDatabases_jsp + + + + admin.resources.listMailSessions_jsp + admin.resources.listMailSessions_jsp + + + + admin.resources.deleteMailSessions_jsp + admin.resources.deleteMailSessions_jsp + + + + admin.resources.mailSession_jsp + admin.resources.mailSession_jsp + + + + admin.valve.accessLogValve_jsp + admin.valve.accessLogValve_jsp + + + + admin.valve.remoteAddrValve_jsp + admin.valve.remoteAddrValve_jsp + + + + admin.valve.singleSignOnValve_jsp + admin.valve.singleSignOnValve_jsp + + + + admin.valve.remoteHostValve_jsp + admin.valve.remoteHostValve_jsp + + + + admin.valve.valves_jsp + admin.valve.valves_jsp + + + + admin.valve.requestDumperValve_jsp + admin.valve.requestDumperValve_jsp + + + + admin.header_jsp + /header.jsp + + + + admin.index_jsp + /index.jsp + + + + admin.saved_jsp + /saved.jsp + + + + admin.error_jsp + /error.jsp + + + + admin.banner_jsp + /banner.jsp + + + + admin.savefail_jsp + /savefail.jsp + + + + admin.blank_jsp + /blank.jsp + + + + admin.footer_jsp + /footer.jsp + + + + admin.tree_002dcontrol_002dtest_jsp + /tree-control-test.jsp + + + + admin.dumpServer_jsp + /dumpServer.jsp + + + + admin.dumpRegistry_jsp + /dumpRegistry.jsp + + + + admin.buttons_jsp + /buttons.jsp + + + + admin.frameset_jsp + /frameset.jsp + + + + admin.login_jsp + /login.jsp + + + + admin.connector.connectors_jsp + /connector/connectors.jsp + + + + admin.connector.connector_jsp + /connector/connector.jsp + + + + admin.context.context_jsp + /context/context.jsp + + + + admin.context.contexts_jsp + /context/contexts.jsp + + + + admin.defaultcontext.defaultcontext_jsp + /defaultcontext/defaultcontext.jsp + + + + admin.logger.logger_jsp + /logger/logger.jsp + + + + admin.logger.loggers_jsp + /logger/loggers.jsp + + + + admin.server.server_jsp + /server/server.jsp + + + + admin.service.services_jsp + /service/services.jsp + + + + admin.service.service_jsp + /service/service.jsp + + + + admin.host.host_jsp + /host/host.jsp + + + + admin.host.hosts_jsp + /host/hosts.jsp + + + + admin.host.aliases_jsp + /host/aliases.jsp + + + + admin.host.alias_jsp + /host/alias.jsp + + + + admin.users.footer_jsp + /users/footer.jsp + + + + admin.users.user_jsp + /users/user.jsp + + + + admin.users.listUsers_jsp + /users/listUsers.jsp + + + + admin.users.group_jsp + /users/group.jsp + + + + admin.users.deleteUsers_jsp + /users/deleteUsers.jsp + + + + admin.users.listRoles_jsp + /users/listRoles.jsp + + + + admin.users.listGroups_jsp + /users/listGroups.jsp + + + + admin.users.deleteGroups_jsp + /users/deleteGroups.jsp + + + + admin.users.header_jsp + /users/header.jsp + + + + admin.users.deleteRoles_jsp + /users/deleteRoles.jsp + + + + admin.users.role_jsp + /users/role.jsp + + + + admin.realm.userDatabaseRealm_jsp + /realm/userDatabaseRealm.jsp + + + + admin.realm.dataSourceRealm_jsp + /realm/dataSourceRealm.jsp + + + + admin.realm.jdbcRealm_jsp + /realm/jdbcRealm.jsp + + + + admin.realm.memoryRealm_jsp + /realm/memoryRealm.jsp + + + + admin.realm.realms_jsp + /realm/realms.jsp + + + + admin.realm.jndiRealm_jsp + /realm/jndiRealm.jsp + + + + admin.resources.resourceLink_jsp + /resources/resourceLink.jsp + + + + admin.resources.listResourceLinks_jsp + /resources/listResourceLinks.jsp + + + + admin.resources.deleteResourceLinks_jsp + /resources/deleteResourceLinks.jsp + + + + admin.resources.deleteDataSources_jsp + /resources/deleteDataSources.jsp + + + + admin.resources.deleteEnvEntries_jsp + /resources/deleteEnvEntries.jsp + + + + admin.resources.listDataSources_jsp + /resources/listDataSources.jsp + + + + admin.resources.listEnvEntries_jsp + /resources/listEnvEntries.jsp + + + + admin.resources.envEntry_jsp + /resources/envEntry.jsp + + + + admin.resources.userDatabase_jsp + /resources/userDatabase.jsp + + + + admin.resources.dataSource_jsp + /resources/dataSource.jsp + + + + admin.resources.listUserDatabases_jsp + /resources/listUserDatabases.jsp + + + + admin.resources.deleteUserDatabases_jsp + /resources/deleteUserDatabases.jsp + + + + admin.resources.listMailSessions_jsp + /resources/listMailSessions.jsp + + + + admin.resources.deleteMailSessions_jsp + /resources/deleteMailSessions.jsp + + + + admin.resources.mailSession_jsp + /resources/mailSession.jsp + + + + admin.valve.accessLogValve_jsp + /valve/accessLogValve.jsp + + + + admin.valve.remoteAddrValve_jsp + /valve/remoteAddrValve.jsp + + + + admin.valve.singleSignOnValve_jsp + /valve/singleSignOnValve.jsp + + + + admin.valve.remoteHostValve_jsp + /valve/remoteHostValve.jsp + + + + admin.valve.valves_jsp + /valve/valves.jsp + + + + admin.valve.requestDumperValve_jsp + /valve/requestDumperValve.jsp + + + + + + action + *.do + + + + + /WEB-INF/struts-bean.tld + /WEB-INF/struts-bean.tld + + + + /WEB-INF/struts-html.tld + /WEB-INF/struts-html.tld + + + + /WEB-INF/struts-logic.tld + /WEB-INF/struts-logic.tld + + + + + Tomcat Server Configuration Security Constraint + + Protected Area + + *.jsp + *.do + *.html + + + + admin + + + + + + FORM + Tomcat Server Configuration Form-Based Authentication Area + + /login.jsp + /error.jsp + + + + + + + The role that is required to log in to the Administration Application + + admin + + + diff --git a/tomcat/server/webapps/admin/admin.css b/tomcat/server/webapps/admin/admin.css new file mode 100644 index 0000000..c1b7467 --- /dev/null +++ b/tomcat/server/webapps/admin/admin.css @@ -0,0 +1,95 @@ +.masthead-title-text { + color: #FFFFFF; + margin: 3px 5px 5px 3px; + font-size: large; + font-family: Arial, Verdana,Helvetica, Sans-Serif; +} + +.page-title-text { + color: #FFFFFF; + font-weight: bold; + margin: 3px 5px 5px 3px; + font-size: normal; + font-family: Arial, Verdana, Helvetica, Sans-Serif; +} + +.table-title-text { + color: #000000; + font-weight: bold; + margin: 3px 5px 5px 4px; + font-family: Arial, Verdana, Helvetica, Sans-Serif; +} + +.table-header-text { + color: #FFFFFF; + font-weight: normal; + margin: 3px 5px 1px 15px; + font-family: Arial, Verdana,Helvetica, Sans-Serif; +} + +.table-label-text { + color: #000000; + margin: 3px 5px 3px 15px; + font-family: Arial, Verdana, Helvetica, Sans-Serif; +} + +.table-normal-text { + color: #000000; + margin: 3px 5px 3px 15px; + font-family: "Times New Roman", Times, serif; +} + +.back-table { + background-color: #9999CC; + margin: 0px 5px 3px 5px; + font-family: Verdana, Arial, Helvetica, Sans-Serif; +} + +.front-table { + background-color: #FFFFFF; + font-family: Arial, Verdana, Helvetica, Sans-Serif; +} + +.page-title-row { + background-color: #7171A5; + text-align: right; + font-family: Arial, Verdana, Helvetica, Sans-Serif; +} + +.header-row { + background-color: #9999CC; + text-align: center; + font-family: Arial, Verdana, Helvetica, Sans-Serif; +} + +.sort-row { + background-color: #CECEFF; + text-align: center; + font-family: Arial, Verdana, Helvetica, Sans-Serif; +} + +.line-row { + background-color: #CCCCCC; + font-family: Arial, Verdana, Helvetica, Sans-Serif; +} + +.button { + background-color: #CCCCFF; + font-family: Arial, Verdana, Helvetica, Sans-Serif; +} + +a.button-link-text:visited, a.button-link-text:link, a.button-link-text:active { + color: #000000; + background-color: #CCCCFF; + font-weight: bold; + font-family: Arial, Verdana, Geneva, Helvetica, Sans-Serif; + text-decoration: none; +} + +a.button-link-text:hover { + color: #000000; + background-color: #CCCCFF; + font-weight: bold; + font-family: Arial, Verdana, Geneva, Helvetica, Sans-Serif; + text-decoration: underline; +} diff --git a/tomcat/server/webapps/admin/admin.xml b/tomcat/server/webapps/admin/admin.xml new file mode 100644 index 0000000..5672153 --- /dev/null +++ b/tomcat/server/webapps/admin/admin.xml @@ -0,0 +1,24 @@ + + + + + + + + + + diff --git a/tomcat/server/webapps/admin/images/BlueTile.gif b/tomcat/server/webapps/admin/images/BlueTile.gif new file mode 100644 index 0000000..dacdfc1 Binary files /dev/null and b/tomcat/server/webapps/admin/images/BlueTile.gif differ diff --git a/tomcat/server/webapps/admin/images/Connector.gif b/tomcat/server/webapps/admin/images/Connector.gif new file mode 100644 index 0000000..00b31cc Binary files /dev/null and b/tomcat/server/webapps/admin/images/Connector.gif differ diff --git a/tomcat/server/webapps/admin/images/Context.gif b/tomcat/server/webapps/admin/images/Context.gif new file mode 100644 index 0000000..544ac78 Binary files /dev/null and b/tomcat/server/webapps/admin/images/Context.gif differ diff --git a/tomcat/server/webapps/admin/images/Datasource.gif b/tomcat/server/webapps/admin/images/Datasource.gif new file mode 100644 index 0000000..20d6751 Binary files /dev/null and b/tomcat/server/webapps/admin/images/Datasource.gif differ diff --git a/tomcat/server/webapps/admin/images/DefaultContext.gif b/tomcat/server/webapps/admin/images/DefaultContext.gif new file mode 100644 index 0000000..4ae60ff Binary files /dev/null and b/tomcat/server/webapps/admin/images/DefaultContext.gif differ diff --git a/tomcat/server/webapps/admin/images/EnvironmentEntries.gif b/tomcat/server/webapps/admin/images/EnvironmentEntries.gif new file mode 100644 index 0000000..01c4b0d Binary files /dev/null and b/tomcat/server/webapps/admin/images/EnvironmentEntries.gif differ diff --git a/tomcat/server/webapps/admin/images/Groups.gif b/tomcat/server/webapps/admin/images/Groups.gif new file mode 100644 index 0000000..d6a489e Binary files /dev/null and b/tomcat/server/webapps/admin/images/Groups.gif differ diff --git a/tomcat/server/webapps/admin/images/Host.gif b/tomcat/server/webapps/admin/images/Host.gif new file mode 100644 index 0000000..3bacd17 Binary files /dev/null and b/tomcat/server/webapps/admin/images/Host.gif differ diff --git a/tomcat/server/webapps/admin/images/Logger.gif b/tomcat/server/webapps/admin/images/Logger.gif new file mode 100644 index 0000000..ee15fe4 Binary files /dev/null and b/tomcat/server/webapps/admin/images/Logger.gif differ diff --git a/tomcat/server/webapps/admin/images/Login.jpg b/tomcat/server/webapps/admin/images/Login.jpg new file mode 100644 index 0000000..60bdabd Binary files /dev/null and b/tomcat/server/webapps/admin/images/Login.jpg differ diff --git a/tomcat/server/webapps/admin/images/LoginBackgroundTile.gif b/tomcat/server/webapps/admin/images/LoginBackgroundTile.gif new file mode 100644 index 0000000..62f91f3 Binary files /dev/null and b/tomcat/server/webapps/admin/images/LoginBackgroundTile.gif differ diff --git a/tomcat/server/webapps/admin/images/Mailsession.gif b/tomcat/server/webapps/admin/images/Mailsession.gif new file mode 100644 index 0000000..5c8a1bf Binary files /dev/null and b/tomcat/server/webapps/admin/images/Mailsession.gif differ diff --git a/tomcat/server/webapps/admin/images/PaperTexture.gif b/tomcat/server/webapps/admin/images/PaperTexture.gif new file mode 100644 index 0000000..0d24833 Binary files /dev/null and b/tomcat/server/webapps/admin/images/PaperTexture.gif differ diff --git a/tomcat/server/webapps/admin/images/Realm.gif b/tomcat/server/webapps/admin/images/Realm.gif new file mode 100644 index 0000000..49684d6 Binary files /dev/null and b/tomcat/server/webapps/admin/images/Realm.gif differ diff --git a/tomcat/server/webapps/admin/images/ResourceLink.gif b/tomcat/server/webapps/admin/images/ResourceLink.gif new file mode 100644 index 0000000..51463f8 Binary files /dev/null and b/tomcat/server/webapps/admin/images/ResourceLink.gif differ diff --git a/tomcat/server/webapps/admin/images/Roles.gif b/tomcat/server/webapps/admin/images/Roles.gif new file mode 100644 index 0000000..3990969 Binary files /dev/null and b/tomcat/server/webapps/admin/images/Roles.gif differ diff --git a/tomcat/server/webapps/admin/images/Server.gif b/tomcat/server/webapps/admin/images/Server.gif new file mode 100644 index 0000000..dbe2f2f Binary files /dev/null and b/tomcat/server/webapps/admin/images/Server.gif differ diff --git a/tomcat/server/webapps/admin/images/Service.gif b/tomcat/server/webapps/admin/images/Service.gif new file mode 100644 index 0000000..657cd3a Binary files /dev/null and b/tomcat/server/webapps/admin/images/Service.gif differ diff --git a/tomcat/server/webapps/admin/images/TomcatBanner.jpg b/tomcat/server/webapps/admin/images/TomcatBanner.jpg new file mode 100644 index 0000000..b31ce1b Binary files /dev/null and b/tomcat/server/webapps/admin/images/TomcatBanner.jpg differ diff --git a/tomcat/server/webapps/admin/images/Users.gif b/tomcat/server/webapps/admin/images/Users.gif new file mode 100644 index 0000000..b0dafcf Binary files /dev/null and b/tomcat/server/webapps/admin/images/Users.gif differ diff --git a/tomcat/server/webapps/admin/images/Valve.gif b/tomcat/server/webapps/admin/images/Valve.gif new file mode 100644 index 0000000..cf2a68c Binary files /dev/null and b/tomcat/server/webapps/admin/images/Valve.gif differ diff --git a/tomcat/server/webapps/admin/images/folder_16_pad.gif b/tomcat/server/webapps/admin/images/folder_16_pad.gif new file mode 100644 index 0000000..67702a1 Binary files /dev/null and b/tomcat/server/webapps/admin/images/folder_16_pad.gif differ diff --git a/tomcat/server/webapps/admin/images/handledownlast.gif b/tomcat/server/webapps/admin/images/handledownlast.gif new file mode 100644 index 0000000..7badb68 Binary files /dev/null and b/tomcat/server/webapps/admin/images/handledownlast.gif differ diff --git a/tomcat/server/webapps/admin/images/handledownmiddle.gif b/tomcat/server/webapps/admin/images/handledownmiddle.gif new file mode 100644 index 0000000..5b3cfed Binary files /dev/null and b/tomcat/server/webapps/admin/images/handledownmiddle.gif differ diff --git a/tomcat/server/webapps/admin/images/handlerightlast.gif b/tomcat/server/webapps/admin/images/handlerightlast.gif new file mode 100644 index 0000000..e9d0a92 Binary files /dev/null and b/tomcat/server/webapps/admin/images/handlerightlast.gif differ diff --git a/tomcat/server/webapps/admin/images/handlerightmiddle.gif b/tomcat/server/webapps/admin/images/handlerightmiddle.gif new file mode 100644 index 0000000..02eff2b Binary files /dev/null and b/tomcat/server/webapps/admin/images/handlerightmiddle.gif differ diff --git a/tomcat/server/webapps/admin/images/linelastnode.gif b/tomcat/server/webapps/admin/images/linelastnode.gif new file mode 100644 index 0000000..e0ff2f0 Binary files /dev/null and b/tomcat/server/webapps/admin/images/linelastnode.gif differ diff --git a/tomcat/server/webapps/admin/images/linemiddlenode.gif b/tomcat/server/webapps/admin/images/linemiddlenode.gif new file mode 100644 index 0000000..009f29b Binary files /dev/null and b/tomcat/server/webapps/admin/images/linemiddlenode.gif differ diff --git a/tomcat/server/webapps/admin/images/linevertical.gif b/tomcat/server/webapps/admin/images/linevertical.gif new file mode 100644 index 0000000..fdec15b Binary files /dev/null and b/tomcat/server/webapps/admin/images/linevertical.gif differ diff --git a/tomcat/server/webapps/admin/resources/dataSources.jspf b/tomcat/server/webapps/admin/resources/dataSources.jspf new file mode 100644 index 0000000..a0ff776 --- /dev/null +++ b/tomcat/server/webapps/admin/resources/dataSources.jspf @@ -0,0 +1,50 @@ +<%-- DataSources List --%> + +
+ + + + + + + + + + + + + + + + + + + + +
+   +
+ +
+ +
+ + +
+ + + +
  + +
+ +
diff --git a/tomcat/server/webapps/admin/resources/envEntries.jspf b/tomcat/server/webapps/admin/resources/envEntries.jspf new file mode 100644 index 0000000..0f606e0 --- /dev/null +++ b/tomcat/server/webapps/admin/resources/envEntries.jspf @@ -0,0 +1,56 @@ +<%-- Env Entries List --%> + +
+ + + + + + + + + + + + + + + + + + + + + + +
+   +
+ +
+ +
+ +
+ + +
+ + + +
  + +
  + +
+ +
diff --git a/tomcat/server/webapps/admin/resources/listDataSources.jspf b/tomcat/server/webapps/admin/resources/listDataSources.jspf new file mode 100644 index 0000000..cc584e7 --- /dev/null +++ b/tomcat/server/webapps/admin/resources/listDataSources.jspf @@ -0,0 +1,32 @@ + +
+ + + + -------- + + + + --------------------------------- + + + + + + + + + + + +
+ diff --git a/tomcat/server/webapps/admin/resources/listEnvEntries.jspf b/tomcat/server/webapps/admin/resources/listEnvEntries.jspf new file mode 100644 index 0000000..d5512ca --- /dev/null +++ b/tomcat/server/webapps/admin/resources/listEnvEntries.jspf @@ -0,0 +1,32 @@ + +
+ + + + -------- + + + + --------------------------------- + + + + + + + + + + + +
+ diff --git a/tomcat/server/webapps/admin/resources/listMailSessions.jspf b/tomcat/server/webapps/admin/resources/listMailSessions.jspf new file mode 100644 index 0000000..4227d83 --- /dev/null +++ b/tomcat/server/webapps/admin/resources/listMailSessions.jspf @@ -0,0 +1,32 @@ + +
+ + + + -------- + + + + --------------------------------- + + + + + + + + + + + +
+ diff --git a/tomcat/server/webapps/admin/resources/listResourceLinks.jspf b/tomcat/server/webapps/admin/resources/listResourceLinks.jspf new file mode 100644 index 0000000..4dccef2 --- /dev/null +++ b/tomcat/server/webapps/admin/resources/listResourceLinks.jspf @@ -0,0 +1,32 @@ + +
+ + + + -------- + + + + --------------------------------- + + + + + + + + + + + +
+ diff --git a/tomcat/server/webapps/admin/resources/listUserDatabases.jspf b/tomcat/server/webapps/admin/resources/listUserDatabases.jspf new file mode 100644 index 0000000..e5a7b1e --- /dev/null +++ b/tomcat/server/webapps/admin/resources/listUserDatabases.jspf @@ -0,0 +1,26 @@ + +
+ + + + -------- + + + + --------------------------------- + + + + + + + + + + + +
+ diff --git a/tomcat/server/webapps/admin/resources/mailSessions.jspf b/tomcat/server/webapps/admin/resources/mailSessions.jspf new file mode 100644 index 0000000..0edbc10 --- /dev/null +++ b/tomcat/server/webapps/admin/resources/mailSessions.jspf @@ -0,0 +1,50 @@ +<%-- MailSessions List --%> + +
+ + + + + + + + + + + + + + + + + + + + +
+   +
+ +
+ +
+ + +
+ + + +
  + +
+ +
diff --git a/tomcat/server/webapps/admin/resources/resourceLinks.jspf b/tomcat/server/webapps/admin/resources/resourceLinks.jspf new file mode 100644 index 0000000..5d32812 --- /dev/null +++ b/tomcat/server/webapps/admin/resources/resourceLinks.jspf @@ -0,0 +1,48 @@ +<%-- ResourceLinks List --%> + +
+ + + + + + + + + + + + + + + + + + +
+   +
+ +
+ +
+ + +
+ + + +
  + +
+ +
diff --git a/tomcat/server/webapps/admin/resources/userDatabases.jspf b/tomcat/server/webapps/admin/resources/userDatabases.jspf new file mode 100644 index 0000000..36638d1 --- /dev/null +++ b/tomcat/server/webapps/admin/resources/userDatabases.jspf @@ -0,0 +1,65 @@ +<%-- Env Entries List --%> + +
+ + + + + + + + <%-- + + --%> + + + + + + + + + <%-- FIX ME -- commentred out for now as the page was looking too crowded. + + --%> + + + +
+   +
+ +
+ +
+ +
+ + * + + + + + + + +
+ + + +
+ +
+ +
+ +
diff --git a/tomcat/server/webapps/admin/tree-control-test.css b/tomcat/server/webapps/admin/tree-control-test.css new file mode 100644 index 0000000..ba5466a --- /dev/null +++ b/tomcat/server/webapps/admin/tree-control-test.css @@ -0,0 +1,19 @@ +.tree-control { + font-family: arial, verdana, geneva, helvetica, sans-serif; + font-size: 80%; + line-height: 1.0; +} + +.tree-control-selected { + color: black; + font-weight: bold; + text-decoration: none; +} + +.tree-control-unselected { + color: black; + font-style: normal; + font-weight: normal; + text-decoration: none; +} + diff --git a/tomcat/server/webapps/admin/users/groups.jspf b/tomcat/server/webapps/admin/users/groups.jspf new file mode 100644 index 0000000..47480ae --- /dev/null +++ b/tomcat/server/webapps/admin/users/groups.jspf @@ -0,0 +1,54 @@ +<%-- Groups List --%> + +
+ + + + + + + + + + + + + + + + + + + + +
+   +
+ +
+ +
+ + + + + + + + +
  + + + +
  + +
+ +
diff --git a/tomcat/server/webapps/admin/users/listGroups.jspf b/tomcat/server/webapps/admin/users/listGroups.jspf new file mode 100644 index 0000000..0a906a5 --- /dev/null +++ b/tomcat/server/webapps/admin/users/listGroups.jspf @@ -0,0 +1,32 @@ + +
+ + + + -------- + + + + --------------------------------- + + + + + + + + + + + + + + + +
+ diff --git a/tomcat/server/webapps/admin/users/listRoles.jspf b/tomcat/server/webapps/admin/users/listRoles.jspf new file mode 100644 index 0000000..963716e --- /dev/null +++ b/tomcat/server/webapps/admin/users/listRoles.jspf @@ -0,0 +1,32 @@ + +
+ + + + -------- + + + + --------------------------------- + + + + + + + + + + + + + + + +
+ diff --git a/tomcat/server/webapps/admin/users/listUsers.jspf b/tomcat/server/webapps/admin/users/listUsers.jspf new file mode 100644 index 0000000..48fa4bf --- /dev/null +++ b/tomcat/server/webapps/admin/users/listUsers.jspf @@ -0,0 +1,32 @@ + +
+ + + + -------- + + + + --------------------------------- + + + + + + + + + + + + + + + +
+ diff --git a/tomcat/server/webapps/admin/users/roles.jspf b/tomcat/server/webapps/admin/users/roles.jspf new file mode 100644 index 0000000..aca4dbd --- /dev/null +++ b/tomcat/server/webapps/admin/users/roles.jspf @@ -0,0 +1,60 @@ +<%-- Roles List --%> + +
+ + + + + + + + + + + + + + + + + + + + +
+   +
+ +
+ +
+ + + + + + + + + + + + + + +
  + + + +
  + +
+ +
diff --git a/tomcat/server/webapps/admin/users/users.jspf b/tomcat/server/webapps/admin/users/users.jspf new file mode 100644 index 0000000..3568412 --- /dev/null +++ b/tomcat/server/webapps/admin/users/users.jspf @@ -0,0 +1,46 @@ +<%-- Users List --%> + +
+ + + + + + + + + + + + + + + + + + +
+   +
+ +
+ +
+ + +
  + + + +
  + +
+ +
diff --git a/tomcat/server/webapps/manager/WEB-INF/lib/catalina-manager.jar b/tomcat/server/webapps/manager/WEB-INF/lib/catalina-manager.jar new file mode 100644 index 0000000..4ae2e3b Binary files /dev/null and b/tomcat/server/webapps/manager/WEB-INF/lib/catalina-manager.jar differ diff --git a/tomcat/server/webapps/manager/WEB-INF/web.xml b/tomcat/server/webapps/manager/WEB-INF/web.xml new file mode 100644 index 0000000..5f18bfb --- /dev/null +++ b/tomcat/server/webapps/manager/WEB-INF/web.xml @@ -0,0 +1,172 @@ + + + + + + + Tomcat Manager Application + + A scriptable management web application for the Tomcat Web Server; + Manager lets you view, load/unload/etc particular web applications. + + + + + Manager + org.apache.catalina.manager.ManagerServlet + + debug + 2 + + + + HTMLManager + org.apache.catalina.manager.HTMLManagerServlet + + debug + 2 + + + + Status + org.apache.catalina.manager.StatusManagerServlet + + debug + 0 + + + + + JMXProxy + org.apache.catalina.manager.JMXProxyServlet + + + + + Manager + /list + + + Manager + /sessions + + + Manager + /start + + + Manager + /stop + + + Manager + /install + + + Manager + /remove + + + Manager + /deploy + + + Manager + /undeploy + + + Manager + /reload + + + Manager + /save + + + Manager + /serverinfo + + + Manager + /roles + + + Manager + /resources + + + Status + /status/* + + + JMXProxy + /jmxproxy/* + + + HTMLManager + /html/* + + + + + + Link to the UserDatabase instance from which we request lists of + defined role names. Typically, this will be connected to the global + user database with a ResourceLink element in server.xml or the context + configuration file for the Manager web application. + + users + + org.apache.catalina.UserDatabase + + + + + + + HTMLManger and Manager command + /jmxproxy/* + /html/* + /list + /sessions + /start + /stop + /install + /remove + /deploy + /undeploy + /reload + /save + /serverinfo + /status/* + /roles + /resources + + + + manager + + + + + + BASIC + Tomcat Manager Application + + + + + + The role that is required to log in to the Manager Application + + manager + + + diff --git a/tomcat/server/webapps/manager/html-manager-howto.html b/tomcat/server/webapps/manager/html-manager-howto.html new file mode 100644 index 0000000..cdd887c --- /dev/null +++ b/tomcat/server/webapps/manager/html-manager-howto.html @@ -0,0 +1,518 @@ +The Apache Jakarta Tomcat 5 Servlet/JSP Container - Tomcat Web Application Manager How To
The Jakarta Project
+      The Apache Jakarta Tomcat Servlet/JSP Container
+

The Apache Jakarta Tomcat 5 Servlet/JSP Container

Tomcat Web Application Manager How To

Introduction
+ +

In many production environments it is very useful to have the capability +to manage your web applications without having to shut down and restart +Tomcat. This document is for the HTML web interface to the web application +manager.

+ +

The interface is divided into five sections: +

    +
  • Message - Displays success and failure messages.
  • +
  • Manager - General manager operations like list and + help.
  • +
  • Applications - List of web applications and + commands.
  • +
  • Deploy - Deploying web applications.
  • +
  • Server Information - Information about the Tomcat + server.
  • +
+

+ +
Message
+ +

+Displays information about the success or failure of the last web application +manager command you performed. If it succeeded OK is displayed +and may be followed by a success message. If it failed FAIL +is displayed followed by an error message. Common failure messages are +documented below for each command. The complete list of failure messages for +each command can be found in the manager web +application documentation. +

+ +
Manager
+ +

The Manager section has three links: +

    +
  • List Applications - Redisplay a list of web + applications.
  • +
  • HTML Manager Help - A link to this document.
  • +
  • Manager Help - A link to the comprehensive Manager + App HOW TO.
  • +
+

+ +
Applications
+ +

The Applications section lists information about all the installed web +applications and provides links for managing them. For each web application +the following is displayed: +

    +
  • Path - The web applicaton context path.
  • +
  • Display Name - The display name for the web application + if it has one configured in its "web.xml" file.
  • +
  • Running - Whether the web application is running and + available (true), or not running and unavailable (false).
  • +
  • Sessions - The number of active sessions for remote + users of this web application. The number of sessions is a link which + when submitted displays more details about session usage by the web + application in the Message box.
  • +
  • Commands - Lists all commands which can be performed on + the web application. Only those commands which can be performed will be + listed as a link which can be submitted. No commands can be performed on + the manager web application itself. The following commands can be + performed: +
      +
    • Start - Start a web application which had been + stopped.
    • +
    • Stop - Stop a web application which is currently + running and make it unavailable.
    • +
    • Reload - Reload the web application so that new + ".jar" files in /WEB-INF/lib/ or new classes in + /WEB-INF/classes/ can be used.
    • +
    • Undeploy - Stop and then remove this web + application from the server.
    • +
    +
  • +
+

+ +
Start
+ +

Signal a stopped application to restart, and make itself available again. +Stopping and starting is useful, for example, if the database required by +your application becomes temporarily unavailable. It is usually better to +stop the web application that relies on this database rather than letting +users continuously encounter database exceptions.

+ +

If this command succeeds, you will see a Message like this:

+
+OK - Started application at context path /examples
+
+ +

Otherwise, the Message will start with FAIL and include an +error message. Possible causes for problems include: +

    +
  • Encountered exception +
    +

    An exception was encountered trying to start the web application. + Check the Tomcat 5 logs for the details.

    +
  • +
  • Invalid context path was specified +
    +

    The context path must start with a slash character, unless you are + referencing the ROOT web application -- in which case the context path + must be a zero-length string.

    +
  • +
  • No context exists for path /foo +
    +

    There is no deployed application on the context path + that you specified.

    +
  • +
  • No context path was specified +
    + The path parameter is required. +
  • +
+

+ +
+ +
Stop
+ +

Signal an existing application to make itself unavailable, but leave it +deployed. Any request that comes in while an application is +stopped will see an HTTP error 404, and this application will show as +"stopped" on a list applications command.

+ +

If this command succeeds, you will see a Message like this:

+
+OK - Stopped application at context path /examples
+
+ +

Otherwise, the Message will start with FAIL and include an +error message. Possible causes for problems include: +

    +
  • Encountered exception +
    +

    An exception was encountered trying to stop the web application. + Check the Tomcat 5 logs for the details.

    +
  • +
  • Invalid context path was specified +
    +

    The context path must start with a slash character, unless you are + referencing the ROOT web application -- in which case the context path + must be a zero-length string.

    +
  • +
  • No context exists for path /foo +
    +

    There is no deployed application on the context path + that you specified.

    +
  • +
  • No context path was specified +
    + The path parameter is required. +
  • +
+

+ +
+ +
Reload
+ +

Signal an existing application to shut itself down and reload. This can +be useful when the web application context is not reloadable and you have +updated classes or property files in the /WEB-INF/classes +directory or when you have added or updated jar files in the +/WEB-INF/lib directory. +

+

NOTE: The /WEB-INF/web.xml +web application configuration file is not checked on a reload; +the previous web.xml configuration is used. +If you have made changes to your web.xml file you must stop +then start the web application. +

+ +

If this command succeeds, you will see a Message like this:

+
+OK - Reloaded application at context path /examples
+
+ +

Otherwise, the Message will start with FAIL and include an +error message. Possible causes for problems include: +

    +
  • Encountered exception +
    +

    An exception was encountered trying to restart the web application. + Check the Tomcat 5 logs for the details.

    +
  • +
  • Invalid context path was specified +
    +

    The context path must start with a slash character, unless you are + referencing the ROOT web application -- in which case the context path + must be a zero-length string.

    +
  • +
  • No context exists for path /foo +
    +

    There is no deployed application on the context path + that you specified.

    +
  • +
  • No context path was specified +
    + The path parameter is required. +
  • +
  • Reload not supported on WAR deployed at path /foo +
    + Currently, application reloading (to pick up changes to the classes or + web.xml file) is not supported when a web application is + installed directly from a WAR file, which happens when the host is + configured to not unpack WAR files. As it only works when the web + application is installed from an unpacked directory, if you are using + a WAR file, you should undeploy and then deploy + the application again to pick up your changes. +
  • +
+

+ +
+ +
Undeploy
+ +

WARNING - This command will delete the +contents of the web application directory and/or ".war" file if it exists within +the appBase directory (typically "webapps") for this virtual host +. The web application temporary work directory is also deleted. If +you simply want to take an application out of service, you should use the +/stop command instead.

+ +

Signal an existing application to gracefully shut itself down, and then +remove it from Tomcat (which also makes this context path available for +reuse later). This command is the logical opposite of the +/deploy Ant command, and the related deploy features available +in the HTML manager.

+ +

If this command succeeds, you will see a Message like this:

+
+OK - Undeployed application at context path /examples
+
+ +

Otherwise, the Message will start with FAIL and include an +error message. Possible causes for problems include: +

    +
  • Encountered exception +
    +

    An exception was encountered trying to undeploy the web application. + Check the Tomcat logs for the details.

    +
  • +
  • Invalid context path was specified +
    +

    The context path must start with a slash character, unless you are + referencing the ROOT web application -- in which case the context path + must be a zero-length string.

    +
  • +
  • No context exists for path /foo +
    +

    There is no deployed application on the context path + that you specified.

    +
  • +
  • No context path was specified +
    + The path parameter is required. +
  • +
+

+ +
+ +
Deploy
+ +

Web applications can be deployed using files or directories located +on the Tomcat server or you can upload a web application archive (WAR) +file to the server.

+ +

To install an application, fill in the appropriate fields for the type +of install you want to do and then submit it using the Install +button.

+ +
Deploy directory or WAR file located on server
+ +

Deploy and start a new web application, attached to the specified Context +Path: (which must not be in use by any other web application). +This command is the logical opposite of the Undeploy command.

+ +

There are a number of different ways the deploy command can be used.

+ +

Deploy a Directory or WAR by URL

+ +

Install a web application directory or ".war" file located on the Tomcat +server. If no Context Path is specified, the directory name or the +war file name without the ".war" extension is used as the path. The +WAR or Directory URL specifies a URL (including the file: +scheme) for either a directory or a web application archive (WAR) file. The +supported syntax for a URL referring to a WAR file is described on the Javadocs +page for the java.net.JarURLConnection class. Use only URLs that +refer to the entire WAR file.

+ +

In this example the web application located in the directory +C:\path\to\foo on the Tomcat server (running on Windows) +is deployed as the web application context named /footoo. +

+Context Path: /footoo
+WAR or Directory URL: file:C:/path/to/foo
+
+

+ +

In this example the ".war" file /path/to/bar.war on the +Tomcat server (running on Unix) is deployed as the web application +context named /bar. Notice that there is no path +parameter so the context path defaults to the name of the web application +archive file without the ".war" extension. +

+WAR or Directory URL: jar:file:/path/to/bar.war!/
+
+

+ +

Deploy a Directory or War from the Host appBase

+ +

Install a web application directory or ".war" file located in your Host +appBase directory. If no Context Path is specified the directory name +or the war file name without the ".war" extension is used as the path.

+ +

In this example the web application located in a subdirectory named +foo in the Host appBase directory of the Tomcat server is +deployed as the web application context named /foo. Notice +that there is no path parameter so the context path defaults +to the name of the web application directory. +

+WAR or Directory URL: foo
+
+

+ +

In this example the ".war" file bar.war located in your +Host appBase directory on the Tomcat server is deployed as the web +application context named /bartoo. +

+Context Path: /bartoo
+WAR or Directory URL: bar.war
+
+

+ +

Deploy using a Context configuration ".xml" file

+ +

If the Host deployXML flag is set to true, you can install a web +application using a Context configuration ".xml" file and an optional +".war" file or web application directory. The Context Path +is not used when installing a web application using a context ".xml" +configuration file.

+ +

A Context configuration ".xml" file can contain valid XML for a +web application Context just as if it were configured in your +Tomcat server.xml configuration file. Here is an +example for Tomcat running on Windows: +

+<Context path="/foobar" docBase="C:\path\to\application\foobar"
+         debug="0">
+
+  <!-- Link to the user database we will get roles from -->
+  <ResourceLink name="users" global="UserDatabase"
+                type="org.apache.catalina.UserDatabase"/>
+
+</Context>
+
+

+ +

Use of the WAR or Directory URL is optional. When used +to select a web application ".war" file or directory it overrides any +docBase configured in the context configuration ".xml" file.

+ +

Here is an example of installing an application using a Context +configuration ".xml" file for Tomcat running on Windows. +

+XML Configuration file URL: file:C:/path/to/context.xml
+
+

+ +

Here is an example of installing an application using a Context +configuration ".xml" file and a web application ".war" file located +on the server (Tomcat running on Unix). +

+XML Configuration file URL: file:/path/to/context.xml
+WAR or Directory URL: jar:file:/path/to/bar.war!/
+
+

+ +
+ +
Upload a WAR file to install
+ +

Upload a WAR file from your local system and install it into the +appBase for your Host. The name of the WAR file without the ".war" +extension is used as the context path name.

+ +

Use the Browse button to select a WAR file to upload to the +server from your local desktop system.

+ +

The .WAR file may include Tomcat specific deployment configuration, by +including a Context configuration XML file in +/META-INF/context.xml.

+ +

Upload of a WAR file could fail for the following reasons:

+
    +
  • File uploaded must be a .war +
    +

    The upload install will only accept files which have the filename + extension of ".war".

    +
  • +
  • War file already exists on server +
    +

    If a war file of the same name already exists in your Host's + appBase the upload will fail. Either undeploy the existing war file + from your Host's appBase or upload the new war file using a different + name.

    +
  • +
  • File upload failed, no file +
    +

    The file upload failed, no file was received by the server.

    +
  • +
  • Install Upload Failed, Exception: +
    +

    The war file upload or install failed with a Java Exception. + The exception message will be listed.

    +
  • +
+ +
+ +
Deployment Notes
+ +

If the Host is configured with unpackWARs=true and you install a war +file, the war will be unpacked into a directory in your Host appBase +directory.

+ +

If the application war or directory is deployed in your Host appBase +directory and either the Host is configured with autoDeploy=true or +liveDeploy=true, the Context path must match the directory name or +war file name without the ".war" extension.

+ +

For security when untrusted users can manage web applications, the +Host deployXML flag can be set to false. This prevents untrusted users +from installing web applications using a configuration XML file and +also prevents them from installing application directories or ".war" +files located outside of their Host appBase.

+ +
+ +
Deploy Message
+ +

If deployment and startup is successful, you will receive a Message +like this:

+
+OK - Deployed application at context path /foo
+
+ +

Otherwise, the Message will start with FAIL and include an +error message. Possible causes for problems include:

+
    +
  • Application already exists at path /foo +
    +

    The context paths for all currently running web applications must be + unique. Therefore, you must either undeploy the existing web + application using this context path, or choose a different context path + for the new one.

    +
  • +
  • Document base does not exist or is not a readable directory +
    +

    The URL specified by the WAR or Directory URL: field must + identify a directory on this server that contains the "unpacked" version + of a web application, or the absolute URL of a web application archive + (WAR) file that contains this application. Correct the value entered for + the WAR or Directory URL: field.

    +
  • +
  • Encountered exception +
    +

    An exception was encountered trying to start the new web application. + Check the Tomcat 5 logs for the details, but likely explanations include + problems parsing your /WEB-INF/web.xml file, or missing + classes encountered when initializing application event listeners and + filters.

    +
  • +
  • Invalid application URL was specified +
    +

    The URL for the WAR or Directory URL: field that you specified + was not valid. Such URLs must start with file:, and URLs + for a WAR file must end in ".war".

    +
  • +
  • Invalid context path was specified +
    +

    The context path must start with a slash character, unless you are + referencing the ROOT web application -- in which case the context path + must be a "/" string.

    +
  • +
  • Context path must match the directory or WAR file name: +
    + If the application war or directory is deployed in your Host appBase + directory and either the Host is configured with autoDeploy=true or + liveDeploy=true, the Context path must match the directory name or + war file name without the ".war" extension. +
  • +
  • Only web applications in the Host web application directory can + be deployed +
    + If the Host deployXML flag is set to false this error will happen + if an attempt is made to install a web application directory or + ".war" file outside of the Host appBase directory. +
  • +
+ +
+
Server Information
+ +

This section displays information about Tomcat, the operating system of +the server Tomcat is hosted on, and the Java Virtual Machine Tomcat is +running in.

+ +

+ Copyright © 1999-2003, Apache Software Foundation +
\ No newline at end of file diff --git a/tomcat/server/webapps/manager/images/add.gif b/tomcat/server/webapps/manager/images/add.gif new file mode 100644 index 0000000..0774d07 Binary files /dev/null and b/tomcat/server/webapps/manager/images/add.gif differ diff --git a/tomcat/server/webapps/manager/images/code.gif b/tomcat/server/webapps/manager/images/code.gif new file mode 100644 index 0000000..d27307b Binary files /dev/null and b/tomcat/server/webapps/manager/images/code.gif differ diff --git a/tomcat/server/webapps/manager/images/design.gif b/tomcat/server/webapps/manager/images/design.gif new file mode 100644 index 0000000..f5db0a9 Binary files /dev/null and b/tomcat/server/webapps/manager/images/design.gif differ diff --git a/tomcat/server/webapps/manager/images/docs.gif b/tomcat/server/webapps/manager/images/docs.gif new file mode 100644 index 0000000..d64a4a1 Binary files /dev/null and b/tomcat/server/webapps/manager/images/docs.gif differ diff --git a/tomcat/server/webapps/manager/images/fix.gif b/tomcat/server/webapps/manager/images/fix.gif new file mode 100644 index 0000000..d59ad64 Binary files /dev/null and b/tomcat/server/webapps/manager/images/fix.gif differ diff --git a/tomcat/server/webapps/manager/images/jakarta-logo.gif b/tomcat/server/webapps/manager/images/jakarta-logo.gif new file mode 100644 index 0000000..049cf82 Binary files /dev/null and b/tomcat/server/webapps/manager/images/jakarta-logo.gif differ diff --git a/tomcat/server/webapps/manager/images/tomcat.gif b/tomcat/server/webapps/manager/images/tomcat.gif new file mode 100644 index 0000000..6175673 Binary files /dev/null and b/tomcat/server/webapps/manager/images/tomcat.gif differ diff --git a/tomcat/server/webapps/manager/images/update.gif b/tomcat/server/webapps/manager/images/update.gif new file mode 100644 index 0000000..31e22ab Binary files /dev/null and b/tomcat/server/webapps/manager/images/update.gif differ diff --git a/tomcat/server/webapps/manager/images/void.gif b/tomcat/server/webapps/manager/images/void.gif new file mode 100644 index 0000000..e565824 Binary files /dev/null and b/tomcat/server/webapps/manager/images/void.gif differ diff --git a/tomcat/server/webapps/manager/manager-howto.html b/tomcat/server/webapps/manager/manager-howto.html new file mode 100644 index 0000000..a99b24f --- /dev/null +++ b/tomcat/server/webapps/manager/manager-howto.html @@ -0,0 +1,1064 @@ +The Apache Jakarta Tomcat 5 Servlet/JSP Container - Manager App HOW-TO
The Jakarta Project
+      The Apache Jakarta Tomcat Servlet/JSP Container
+

The Apache Jakarta Tomcat 5 Servlet/JSP Container

Manager App HOW-TO

Table of Contents
+ +

+Introduction
+ +Configuring Manager Application Access
+Supported Manager Commands
+

+Deploy A New Application Remotely
+Deploy A New Application from a Local Path
+ +List Currently Deployed and Installed Applications
+Reload An Existing Application
+List OS and JVM Properties
+ +List Available Global JNDI Resources
+List Available Security Roles
+Session Statistics
+Start an Existing Application
+Stop an Existing Application
+ +Undeploy an Existing Application
+
+ +Executing Manager Commands With Ant
+ +Using the JMX Proxy Servlet
+
+What is JMX Proxy Servlet?
+Query command
+Set command
+
+

+ +
Introduction
+ +

In many production environments, it is very useful to have the capability +to deploy a new web application, or undeploy an existing one, without having +to shut down and restart the entire container. In addition, you can request +an existing application to reload itself, even if you have not declared it +to be reloadable in the Tomcat 5 server +configuration file.

+ +

To support these capabilities, Tomcat 5 includes a web application +(installed by default on context path /manager) that supports +the following functions:

+
    +
  • Deploy a new web application, on a specified context path, from + the uploaded contents of a WAR file.
  • +
  • Install a new web application, which can be anywhere on the + server's disks.
  • +
  • List the currently deployed web applications, as well as the + sessions that are currently active for those web apps.
  • +
  • Reload an existing web application, to reflect changes in the + contents of /WEB-INF/classes or /WEB-INF/lib. +
  • +
  • List the OS and JVM property values.
  • +
  • List the available global JNDI resources, for use in deployment + tools that are preparing <ResourceLink> elements + nested in a <Context> deployment description.
  • +
  • List the available security roles defined in the user database.
  • +
  • Remove an installed web application.
  • +
  • Start a stopped application (thus making it available again).
  • +
  • Stop an existing application (so that it becomes unavailable), but + do not undeploy it.
  • +
  • Undeploy a deployed web application and delete its document base + directory.
  • +
+ +

There are two ways to configure the Manager web application +Context: +

    +
  • Install the manager.xml context configuration file + in the $CATALINA_HOME/conf/[enginename]/[hostname] folder. +
  • +
  • Configure the Manager Context within the + Host configuration in your Tomcat server.xml + configuration. Here is an example: +
    +<Context path="/manager" debug="0" privileged="true"
    +         docBase="/usr/local/kinetic/tomcat5/server/webapps/manager">
    +</Context>
    +
    +
  • +
+

+ +

If you have Tomcat configured to support multiple virtual hosts +(websites) you would need to configure a Manager for each.

+ +

There are three ways to use the Manager web application. +

    +
  • As an application with a user interface you use in your browser. +Here is an example URL where you can replace localhost with +your website host name: http://localhost/manager/html/ .
  • +
  • A minimal version using HTTP requests only which is suitable for use +by scripts setup by system administrators. Commands are given as part of the +request URI, and responses are in the form of simple text that can be easily +parsed and processed. See +Supported Manager Commands for more information.
  • +
  • A convenient set of task definitions for the Ant +(version 1.4 or later) build tool. See +Executing Manager Commands +With Ant for more information.
  • +
+

+ +

Future versions of Tomcat 5 will include administrative functionality that +is presented in (at least) the following forms: +

    +
  • As web services, so that Tomcat administration can be easily integrated + into remote and/or non-Java mnagement environments.
  • +
  • As a web application with a nice user interface (built on top of the + web services processing layer) for easy Tomcat administration via a + web browser.
  • +
+

+ +
Configuring Manager Application Access
+ +
+

The description below uses the variable name $CATALINA_HOME + to refer to the directory into which you have installed Tomcat 5, + and is the base directory against which most relative paths are + resolved. However, if you have configured Tomcat 5 for multiple + instances by setting a CATALINA_BASE directory, you should use + $CATALINA_BASE instead of $CATALINA_HOME for each of these + references.

+
+ +

It would be quite unsafe to ship Tomcat with default settings that allowed +anyone on the Internet to execute the Manager application on your server. +Therefore, the Manager application is shipped with the requirement that anyone +who attempts to use it must authenticate themselves, using a username and +password that have the role manager associated with them. +Further, there is no username in the default users file +($CATALINA_HOME/conf/tomcat-users.xml) that is assigned this +role. Therefore, access to the Manager application is completely disabled +by default.

+ +

To enable access to the Manager web application, you must either create +a new username/password combination and associate the role name +manager with it, or add the manager role +to some existing username/password combination. Exactly where this is done +depends on which Realm implementation you are using:

+
    +
  • MemoryRealm - If you have not customized your + $CATALINA_HOME/conf/server.xml to select a different one, + Tomcat 5 defaults to an XML-format file stored at + $CATALINA_HOME/conf/tomcat-users.xml, which can be + edited with any text editor. This file contains an XML + <user> for each individual user, which might + look something like this: +
    +<user name="craigmcc" password="secret" roles="standard,manager" />
    +
    + which defines the username and password used by this individual to + log on, and the role names he or she is associated with. You can + add the manager role to the comma-delimited + roles attribute for one or more existing users, and/or + create new users with that assigned role.
  • +
  • JDBCRealm - Your user and role information is stored in + a database accessed via JDBC. Add the manager role + to one or more existing users, and/or create one or more new users + with this role assigned, following the standard procedures for your + environment.
  • +
  • JNDIRealm - Your user and role information is stored in + a directory server accessed via LDAP. Add the manager + role to one or more existing users, and/or create one or more new users + with this role assigned, following the standard procedures for your + environment.
  • +
+ +

The first time you attempt to issue one of the Manager commands +described in the next section, you will be challenged to log on using +BASIC authentication. The username and password you enter do not matter, +as long as they identify a valid user in the users database who possesses +the role manager.

+ +

In addition to the password restrictions the manager web application +could be restricted by the remote IP address or host by adding a +RemoteAddrValve or RemoteHostValve. Here is +an example of restricting access to the localhost by IP address: +

+<Context path="/manager" debug="0" privileged="true"
+         docBase="/usr/local/kinetic/tomcat5/server/webapps/manager">
+         <Valve className="org.apache.catalina.valves.RemoteAddrValve"
+                allow="127.0.0.1"/>
+</Context>
+
+

+
Supported Manager Commands
+ +

All commands that the Manager application knows how to process are +specified in a single request URI like this:

+
+http://{host}:{port}/manager/{command}?{parameters}
+
+

where {host} and {port} represent the hostname +and port number on which Tomcat is running, {command} +represents the Manager command you wish to execute, and +{parameters} represents the query parameters +that are specific to that command. In the illustrations below, customize +the host and port appropriately for your installation.

+ +

Most commands accept one or more of the following query parameters:

+
    +
  • path - The context path (including the leading slash) + of the web application you are dealing with. To select the ROOT web + application, specify a zero-length string. NOTE - + It is not possible to perform administrative commands on the + Manager application itself.
  • +
  • war - URL of a web application archive (WAR) file, + pathname of a directory which contains the web application, or a + Context configuration ".xml" file. You can use URLs in any of the + following formats: +
      +
    • file:/absolute/path/to/a/directory - The absolute + path of a directory that contains the unpacked version of a web + application. This directory will be attached to the context path + you specify without any changes.
    • +
    • file:/absolute/path/to/a/webapp.war - The absolute + path of a web application archive (WAR) file. This is valid + only for the /deploy command, and is + the only acceptable format to that command.
    • +
    • jar:file:/absolute/path/to/a/warfile.war!/ - The + URL to a local web application archive (WAR) file. You can use any + syntax that is valid for the JarURLConnection class + for reference to an entire JAR file.
    • +
    • file:/absolute/path/to/a/context.xml - The + absolute path of a web application Context configuration ".xml" + file which contains the Context configuration element.
    • +
    • directory - The directory name for the web + applciation context in the Host's application base directory.
    • +
    • webapp.war - The name of a web application war file + located in the Host's application base directory.
    • +
  • +
+ +

Each command will return a response in text/plain format +(i.e. plain ASCII with no HTML markup), making it easy for both humans and +programs to read). The first line of the response wil begin with either +OK or FAIL, indicating whether the requested +command was successful or not. In the case of failure, the rest of the first +line will contain a description of the problem that was encountered. Some +commands include additional lines of information as described below.

+ +

Internationalization Note - The Manager application looks up +its message strings in resource bundles, so it is possible that the strings +have been translated for your platform. The examples below show the English +version of the messages.

+ +
Deploy A New Application Remotely
+ +
+http://localhost:8080/manager/deploy?path=/foo
+
+ +

Upload the web application archive (WAR) file that is specified as the +request data in this HTTP PUT request, install it into the appBase +directory of our corresponding virtual host, and start it on the context path +specified by the path request parameter. If no path +is specified the directory name or the war file name without the .war extension +is used as the path. The application can +later be undeployed (and the corresponding application directory removed) +by use of the /undeploy.

+ +

The .WAR file may include Tomcat specific deployment configuration, by +including a Context configuration XML file in +/META-INF/context.xml.

+ +

URL parameters include: +

    +
  • update: When set to true, any existing update will be + undeployed first. The default value is set to false.
  • +
  • tag: Specifying a tag name, this allows associating the + deployed webapp with a version number. The application version can + be later redeployed when needed using only the tag.
  • +
+

+ +

NOTE - This command is the logical +opposite of the /undeploy command.

+ +

If installation and startup is successful, you will receive a response +like this:

+
+OK - Deployed application at context path /foo
+
+ +

Otherwise, the response will start with FAIL and include an +error message. Possible causes for problems include:

+
    +
  • Application already exists at path /foo +
    +

    The context paths for all currently running web applications must be + unique. Therefore, you must either remove or undeploy the existing web + application using this context path, or choose a different context path + for the new one. The update parameter may be specified as + a parameter on the URL, with a value of true to avoid this + error. In that case, an undeploy will be performed on an existing + application before performing the deployment.

    +
  • +
  • Encountered exception +
    +

    An exception was encountered trying to start the new web application. + Check the Tomcat 5 logs for the details, but likely explanations include + problems parsing your /WEB-INF/web.xml file, or missing + classes encountered when initializing application event listeners and + filters.

    +
  • +
  • Invalid context path was specified +
    +

    The context path must start with a slash character, unless you are + referencing the ROOT web application -- in which case the context path + must be a zero-length string.

    +
  • +
  • No context path was specified +
    + The path parameter is required. +
  • +
+ +
+ +
Deploy A New Application from a Local Path
+ +

Install and start a new web application, attached to the specified context +path (which must not be in use by any other web application). +This command is the logical opposite of the /remove command.

+ +

There are a number of different ways the install command can be used.

+ +

Install a version of a previously deployed webapp

+ +

This can be used to deploy a previous version of a web applicaion, which +has been deployed using the tag attribute. Note that the work +directory for the manager webapp will contain the previously deployed WARs; +removing it would make the deployment fail. +

+http://localhost:8080/manager/deploy?path=/footoo&tag=footag
+
+

+ +

Install a Directory or WAR by URL

+ +

Install a web application directory or ".war" file located on the Tomcat +server. If no path is specified, the directory name or the war file +name without the ".war" extension is used as the path. The war +parameter specifies a URL (including the file: scheme) for either +a directory or a web application archive (WAR) file. The supported syntax for +a URL referring to a WAR file is described on the Javadocs page for the +java.net.JarURLConnection class. Use only URLs that refer to +the entire WAR file.

+ +

In this example the web application located in the directory +/path/to/foo on the Tomcat server is installed as the +web application context named /footoo. +

+http://localhost:8080/manager/deploy?path=/footoo&war=file:/path/to/foo
+
+

+ +

In this example the ".war" file /path/to/bar.war on the +Tomcat server is installed as the web application context named +/bar. Notice that there is no path parameter +so the context path defaults to the name of the web application archive +file without the ".war" extension. +

+http://localhost:8080/manager/deploy?war=jar:file:/path/to/bar.war!/
+
+

+ +

Install a Directory or War from the Host appBase

+ +

Install a web application directory or ".war" file located in your Host +appBase directory. If no path is specified the directory name +or the war file name without the ".war" extension is used as the path.

+ +

In this example the web application located in a sub directory named +foo in the Host appBase directory of the Tomcat server is +installed as the web application context named /foo. Notice +that there is no path parameter so the context path defaults +to the name of the web application directory. +

+http://localhost:8080/manager/deploy?war=foo
+
+

+ +

In this example the ".war" file bar.war located in your +Host appBase directory on the Tomcat server is installed as the web +application context named /bartoo. +

+http://localhost:8080/manager/deploy?path=/bartoo&war=bar.war
+
+

+ +

Install using a Context configuration ".xml" file

+ +

If the Host deployXML flag is set to true you can install a web +application using a Context configuration ".xml" file and an optional +".war" file or web application directory. The context path +is not used when installing a web application using a context ".xml" +configuration file.

+ +

A Context configuration ".xml" file can contain valid XML for a +web application Context just as if it were configured in your +Tomcat server.xml configuration file. Here is an +example: +

+<Context path="/foobar" docBase="/path/to/application/foobar"
+         debug="0">
+
+  <!-- Link to the user database we will get roles from -->
+  <ResourceLink name="users" global="UserDatabase"
+                type="org.apache.catalina.UserDatabase"/>
+
+</Context>
+
+

+ +

When the optional war parameter is set to the URL +for a web application ".war" file or directory it overrides any +docBase configured in the context configuration ".xml" file.

+ +

Here is an example of installing an application using a Context +configuration ".xml" file. +

+http://localhost:8080/manager/deploy?config=file:/path/context.xml
+
+

+ +

Here is an example of installing an application using a Context +configuration ".xml" file and a web application ".war" file located +on the server. +

+http://localhost:8080/manager/deploy?config=file:/path/context.xml&war=jar:file:/path/bar.war!/
+
+

+ +

Installation Notes

+ +

If the Host is configured with unpackWARs=true and you install a war +file, the war will be unpacked into a directory in your Host appBase +directory.

+ +

If the application war or directory is installed in your Host appBase +directory and either the Host is configured with autoDeploy=true or +liveDeploy=true, the Context path must match the directory name or +war file name without the ".war" extension.

+ +

For security when untrusted users can manage web applications, the +Host deployXML flag can be set to false. This prevents untrusted users +from installing web applications using a configuration XML file and +also prevents them from installing application directories or ".war" +files located outside of their Host appBase.

+ + +

Install Response

+ +

If installation and startup is successful, you will receive a response +like this:

+
+OK - Deployed application at context path /foo
+
+ +

Otherwise, the response will start with FAIL and include an +error message. Possible causes for problems include:

+
    +
  • Application already exists at path /foo +
    +

    The context paths for all currently running web applications must be + unique. Therefore, you must either remove or undeploy the existing web + application using this context path, or choose a different context path + for the new one. The update parameter may be specified as + a parameter on the URL, with a value of true to avoid this + error. In that case, an undeploy will be performed on an existing + application before performing the deployment.

    +
  • +
  • Document base does not exist or is not a readable directory +
    +

    The URL specified by the war parameter must identify a + directory on this server that contains the "unpacked" version of a + web application, or the absolute URL of a web application archive (WAR) + file that contains this application. Correct the value specified by + the war parameter.

    +
  • +
  • Encountered exception +
    +

    An exception was encountered trying to start the new web application. + Check the Tomcat 5 logs for the details, but likely explanations include + problems parsing your /WEB-INF/web.xml file, or missing + classes encountered when initializing application event listeners and + filters.

    +
  • +
  • Invalid application URL was specified +
    +

    The URL for the directory or web application that you specified + was not valid. Such URLs must start with file:, and URLs + for a WAR file must end in ".war".

    +
  • +
  • Invalid context path was specified +
    +

    The context path must start with a slash character, unless you are + referencing the ROOT web application -- in which case the context path + must be a "/" string.

    +
  • +
  • Context path must match the directory or WAR file name: +
    + If the application war or directory is installed in your Host appBase + directory and either the Host is configured with autoDeploy=true or + liveDeploy=true, the Context path must match the directory name or + war file name without the ".war" extension. +
  • +
  • Only web applications in the Host web application directory can + be installed +
    + If the Host deployXML flag is set to false this error will happen + if an attempt is made to install a web application directory or + ".war" file outside of the Host appBase directory. +
  • +
+ +
+ +
List Currently Deployed and Installed Applications
+ +
+http://localhost:8080/manager/list
+
+ +

List the context paths, current status (running or +stopped), and number of active sessions for all currently +deployed and installed web applications. A typical response immediately +after starting Tomcat might look like this:

+
+OK - Listed applications for virtual host localhost
+/webdav:running:0
+/examples:running:0
+/manager:running:0
+/:running:0
+
+ +
+ +
Reload An Existing Application
+ +
+http://localhost:8080/manager/reload?path=/examples
+
+ +

Signal an existing application to shut itself down and reload. This can +be useful when the web application context is not reloadable and you have +updated classes or property files in the /WEB-INF/classes +directory or when you have added or updated jar files in the +/WEB-INF/lib directory. +

+

NOTE: The /WEB-INF/web.xml +web application configuration file is not reread on a reload. +If you have made changes to your web.xml file you must stop +then start the web application. +

+ +

If this command succeeds, you will see a response like this:

+
+OK - Reloaded application at context path /examples
+
+ +

Otherwise, the response will start with FAIL and include an +error message. Possible causes for problems include:

+
    +
  • Encountered exception +
    +

    An exception was encountered trying to restart the web application. + Check the Tomcat 5 logs for the details.

    +
  • +
  • Invalid context path was specified +
    +

    The context path must start with a slash character, unless you are + referencing the ROOT web application -- in which case the context path + must be a zero-length string.

    +
  • +
  • No context exists for path /foo +
    +

    There is no deployed or installed application on the context path + that you specified.

    +
  • +
  • No context path was specified +
    + The path parameter is required. +
  • +
  • Reload not supported on WAR deployed at path /foo +
    + Currently, application reloading (to pick up changes to the classes or + web.xml file) is not supported when a web application is + installed directly from a WAR file. It only works when the web application + is installed from an unpacked directory. If you are using a WAR file, + you should remove and then install the + application again to pick up your changes. +
  • +
+ +
+ +
List OS and JVM Properties
+ +
+http://localhost:8080/manager/serverinfo
+
+ +

Lists information about the Tomcat version, OS, and JVM properties.

+ +

If an error occurs, the response will start with FAIL and +include an error message. Possible causes for problems include:

+
    +
  • Encountered exception +
    +

    An exception was encountered trying to enumerate the system properties. + Check the Tomcat 5 logs for the details.

    +
  • +
+ +
+ +
List Available Global JNDI Resources
+ +
+http://localhost:8080/manager/resources[?type=xxxxx]
+
+ +

List the global JNDI resources that are available for use in resource +links for context configuration files. If you specify the type +request parameter, the value must be the fully qualified Java class name of +the resource type you are interested in (for example, you would specify +javax.sql.DataSource to acquire the names of all available +JDBC data sources). If you do not specify the type request +parameter, resources of all types will be returned.

+ +

Depending on whether the type request parameter is specfied +or not, the first line of a normal response will be:

+
+  OK - Listed global resources of all types
+
+

or

+
+  OK - Listed global resources of type xxxxx
+
+

followed by one line for each resource. Each line is composed of fields +delimited by colon characters (":"), as follows:

+
    +
  • Global Resource Name - The name of this global JNDI resource, + which would be used in the global attribute of a + <ResourceLink> element.
  • +
  • Global Resource Type - The fully qualified Java class name of + this global JNDI resource.
  • +
+ +

If an error occurs, the response will start with FAIL and +include an error message. Possible causes for problems include:

+
    +
  • Encountered exception +
    +

    An exception was encountered trying to enumerate the global JNDI + resources. Check the Tomcat 5 logs for the details.

    +
  • +
  • No global JNDI resources are available +
    +

    The Tomcat server you are running has been configured without + global JNDI resources.

    +
  • +
+ + +
+ + +
List Available Security Roles
+ +
+http://localhost:8080/manager/roles
+
+ +

List the security role names (and corresponding descriptions) that are +available in the org.apache.catalina.UserDatabase resource that +is linked to the users resource reference in the web.xml file +for the Manager web application. This would typically be used, for example, +by a deployment tool that wanted to create +<security-role-ref> elements to map security role names +used in a web application to the role names actually defined within the +container.

+ +

By default, the users resource reference is pointed at the +global UserDatabase resource. If you choose to utilize a +different user database per virtual host, you should modify the +<ResourceLink> element in the default +manager.xml context configuration file to point at the global +user database resource for this virtual host.

+ +

When this command is executed, the first line of the response will be:

+
+  OK - Listed security roles
+
+

followed by one line for each security role. Each line is composed of +fields delimited by colon characters (":") as follows:

+
    +
  • Security Role Name - A security role name that is known to Tomcat + in the user database.
  • +
  • Description - Description of this security role (useful in + creating user interfaces for selecting roles.
  • +
+ +

If an error occurs, the response will start with FAIL and +include an error message. Possible causes for problems include:

+
    +
  • Cannot resolve user database reference - A JNDI error prevented + the successful lookup of the org.apache.catalina.UserDatabase + resource. Check the Tomcat log files for a stack trace associated with + this error.
  • +
  • No user database is available - You have not configured a resource + reference for the users resource that points at an + appropriate user database instance. Check your manager.xml + file and ensure that you have created an appropriate + <ResourceLink> or + <ResourceParams> element for this resource.
  • +
+ +
+ + +
Session Statistics
+ +
+http://localhost:8080/manager/sessions?path=/examples
+
+ +

Display the default session timeout for a web application, and the +number of currently active sessions that fall within ten-minute ranges of +their actual timeout times. For example, after restarting Tomcat and then +executing one of the JSP samples in the /examples web app, +you might get something like this:

+
+OK - Session information for application at context path /examples
+Default maximum session inactive interval 30 minutes
+30 - <40 minutes:1 sessions
+
+ +
+ + +
Start an Existing Application
+ +
+http://localhost:8080/manager/start?path=/examples
+
+ +

Signal a stopped application to restart, and make itself available again. +Stopping and starting is useful, for example, if the database required by +your application becomes temporarily unavailable. It is usually better to +stop the web application that relies on this database rather than letting +users continuously encounter database exceptions.

+ +

If this command succeeds, you will see a response like this:

+
+OK - Started application at context path /examples
+
+ +

Otherwise, the response will start with FAIL and include an +error message. Possible causes for problems include:

+
    +
  • Encountered exception +
    +

    An exception was encountered trying to start the web application. + Check the Tomcat 5 logs for the details.

    +
  • +
  • Invalid context path was specified +
    +

    The context path must start with a slash character, unless you are + referencing the ROOT web application -- in which case the context path + must be a zero-length string.

    +
  • +
  • No context exists for path /foo +
    +

    There is no deployed or installed application on the context path + that you specified.

    +
  • +
  • No context path was specified +
    + The path parameter is required. +
  • +
+ +
+ +
Stop an Existing Application
+ +
+http://localhost:8080/manager/stop?path=/examples
+
+ +

Signal an existing application to make itself unavailable, but leave it +deployed or installed. Any request that comes in while an application is +stopped will see an HTTP error 404, and this application will show as +"stopped" on a list applications command.

+ +

If this command succeeds, you will see a response like this:

+
+OK - Stopped application at context path /examples
+
+ +

Otherwise, the response will start with FAIL and include an +error message. Possible causes for problems include:

+
    +
  • Encountered exception +
    +

    An exception was encountered trying to stop the web application. + Check the Tomcat 5 logs for the details.

    +
  • +
  • Invalid context path was specified +
    +

    The context path must start with a slash character, unless you are + referencing the ROOT web application -- in which case the context path + must be a zero-length string.

    +
  • +
  • No context exists for path /foo +
    +

    There is no deployed or installed application on the context path + that you specified.

    +
  • +
  • No context path was specified +
    + The path parameter is required. +
  • +
+ +
+ + +
Undeploy an Existing Application
+ +
+http://localhost:8080/manager/undeploy?path=/examples
+
+ +

WARNING - This command will +delete the contents of the web application directory if it exists within the +appBase directory (typically "webapps") for this virtual host +. This will also delete the source .WAR if expanding occurred, as +well as the XML Context definition. If you simply want to take an application +out of service, you should use the /stop command instead.

+ +

Signal an existing application to gracefully shut itself down, and +remove it from Tomcat (which also makes this context path available for +reuse later). In addition, the document root directory is removed, if it +exists in the appBase directory (typically "webapps") for +this virtual host. This command is the logical opposite of the +/deploy command.

+ +

If this command succeeds, you will see a response like this:

+
+OK - Undeployed application at context path /examples
+
+ +

Otherwise, the response will start with FAIL and include an +error message. Possible causes for problems include:

+
    +
  • Encountered exception +
    +

    An exception was encountered trying to undeploy the web application. + Check the Tomcat 5 logs for the details.

    +
  • +
  • Invalid context path was specified +
    +

    The context path must start with a slash character, unless you are + referencing the ROOT web application -- in which case the context path + must be a zero-length string.

    +
  • +
  • No context exists for path /foo +
    +

    There is no deployed or installed application on the context path + that you specified.

    +
  • +
  • No context path was specified +
    + The path parameter is required. +
  • +
+ +
+ +
Executing Manager Commands With Ant
+ +

In addition to the ability to execute Manager commands via HTTP requests, +as documented above, Tomcat 5 includes a convenient set of Task definitions +for the Ant (version 1.4 or later) build tool. In order to use these +commands, you must perform the following setup operations:

+
    +
  • Download the binary distribution of Ant from + http://jakarta.apache.org/ant. + You must use version 1.4 or later.
  • +
  • Install the Ant distribution in a convenient directory (called + ANT_HOME in the remainder of these instructions).
  • +
  • Copy the file server/lib/catalina-ant.jar from your Tomcat 5 + installation into Ant's library directory ($ANT_HOME/lib). +
  • +
  • Add the $ANT_HOME/bin directory to your PATH + environment variable.
  • +
  • Configure at least one username/password combination in your Tomcat + user database that includes the manager role.
  • +
+ +

To use custom tasks within Ant, you must declare them first with a +<taskdef> element. Therefore, your build.xml +file might look something like this:

+ + + +
+<project name="My Application" default="compile" basedir=".">
+
+  <!-- Configure the directory into which the web application is built -->
+  <property name="build"    value="${basedir}/build"/>
+
+  <!-- Configure the context path for this application -->
+  <property name="path"     value="/myapp"/>
+
+  <!-- Configure properties to access the Manager application -->
+  <property name="url"      value="http://localhost:8080/manager"/>
+  <property name="username" value="myusername"/>
+  <property name="password" value="mypassword"/>
+
+  <!-- Configure the custom Ant tasks for the Manager application -->
+  <taskdef name="deploy"    classname="org.apache.catalina.ant.DeployTask"/>
+  <taskdef name="list"      classname="org.apache.catalina.ant.ListTask"/>
+  <taskdef name="reload"    classname="org.apache.catalina.ant.ReloadTask"/>
+  <taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"/>
+  <taskdef name="roles"     classname="org.apache.catalina.ant.RolesTask"/>
+  <taskdef name="start"     classname="org.apache.catalina.ant.StartTask"/>
+  <taskdef name="stop"      classname="org.apache.catalina.ant.StopTask"/>
+  <taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask"/>
+
+  <!-- Executable Targets -->
+  <target name="compile" description="Compile web application">
+    <!-- ... construct web application in ${build} subdirectory, and
+            generated a ${path}.war ... -->
+  </target>
+
+  <target name="deploy" description="Install web application"
+          depends="compile">
+    <deploy url="${url}" username="${username}" password="${password}"
+            path="${path}" war="${build}${path}.war"/>
+  </target>
+
+  <target name="reload" description="Reload web application"
+          depends="compile">
+    <reload  url="${url}" username="${username}" password="${password}"
+            path="${path}"/>
+  </target>
+
+  <target name="undeploy" description="Remove web application">
+    <undeploy url="${url}" username="${username}" password="${password}"
+            path="${path}"/>
+  </target>
+
+</project>
+
+ +

Now, you can execute commands like ant deploy to deploy the +applcation to a running instance of Tomcat, or ant reload to +tell Tomcat to reload it. Note also that most of the interesting values in +this build.xml file are defined as replaceable properties, so +you can override their values from the command line. For example, you might +consider it a security risk to include the real manager password in your +build.xml file's source code. To avoid this, omit the password +property, and specify it from the command line:

+
+  ant -Dpassword=secret deploy
+
+ +
Using the JMX Proxy Servlet
+ +
What is JMX Proxy Servlet
+ The JMX Proxy Servlet is a lightweight proxy to get and set the + tomcat internals. (Or any class that has been exposed via an MBean) + Its usage is not very user friendly but the UI is + extremely help for integrating command line scripts for monitoring + and changing the internals of tomcat. You can do two things with the proxy: + get information and set information. For you to really understand the + JMX Proxy Servlet, you should have a general understanding of JMX. + If you don't know what JMX is, then prepare to be confused. +
+ +
JMX Query command
+ This takes the form: +
+http://webserver/manager/jmxproxy/?qry=STUFF
+
+ Where STUFF is the JMX query you wish to perform. For example, + here are some queries you might wish to run: +
    +
  • + qry=*%3Atype%3DRequestProcessor%2C* --> + type=RequestProcessor which will locate all + workers which can process requests and report + their state. +
  • +
  • + qry=*%3Aj2eeType=Servlet%2c* --> + j2eeType=Servlet which return all loaded servlets. +
  • +
  • + qry=Catalina%3Atype%3DEnvironment%2Cresourcetype%3DGlobal%2Cname%3DsimpleValue --> + Catalina:type=Environment,resourcetype=Global,name=simpleValue + which look for a specific MBean by the given name. +
  • +
+ You'll need to experiment with this to really understand its capabilites. + If you provide no qry parameter, then all of the MBeans will + be displayed. We really recommend looking at the tomcat source code and + understand the JMX spec to get a better understanding of all the queries + you may run. +
+ +
JMX Set command
+ Now that you can query an MBean, its time to muck with Tomcat's internals! + The general form of the set command is : +
+http://webserver/manager/jmxproxy/?set=BEANNAME&att=MYATTRIBUTE&val=NEWVALUE
+
+ So you need to provide 3 request parameters: +
    +
  1. set: The full bean name
  2. +
  3. att: The attribute you wish to alter
  4. +
  5. val: The new value
  6. +
+ If all goes ok, then it will say OK, otherwise an error message will be + shown. For example, lets say we wish to turn up debugging on the fly for the + ErrorReportValve. The following will set debugging to 10. +
+http://localhost:8080/manager/jmxproxy/
+?set=Catalina%3Atype%3DValve%2Cname%3DErrorReportValve%2Chost%3Dlocalhost&att=debug&val=10
+
+ and my result is (YMMV): +
+Result: ok
+
+ + Here is what I see if I pass in a bad value. Here is the URL I used, + I try set debugging equal to 'cowbell': +
+http://localhost:8080/manager/jmxproxy/
+?set=Catalina%3Atype%3DValve%2Cname%3DErrorReportValve%2Chost%3Dlocalhost&att=debug&val=cowbell
+
+ When I try that, my result is +
+Error: java.lang.NumberFormatException: For input string: "cowbell"
+
+
+ + +

+ Copyright © 1999-2003, Apache Software Foundation +
\ No newline at end of file diff --git a/tomcat/server/webapps/manager/manager.xml b/tomcat/server/webapps/manager/manager.xml new file mode 100644 index 0000000..19e142d --- /dev/null +++ b/tomcat/server/webapps/manager/manager.xml @@ -0,0 +1,17 @@ + + + + + + + + + diff --git a/tomcat/server/webapps/manager/status.xsd b/tomcat/server/webapps/manager/status.xsd new file mode 100644 index 0000000..0f266de --- /dev/null +++ b/tomcat/server/webapps/manager/status.xsd @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tomcat/server/webapps/manager/xform.xsl b/tomcat/server/webapps/manager/xform.xsl new file mode 100644 index 0000000..c5ced3b --- /dev/null +++ b/tomcat/server/webapps/manager/xform.xsl @@ -0,0 +1,96 @@ + + + + + + + + + + + Tomcat Status + + + +
Tomcat Status
+ + + + + +
+ + + + + + + + + + + + +
JVM:free: total: max:

+
+ + + Connector --
+ + + + +
+ + + + + + + + + + +
threadInfo maxThreads: minSpareThreads: maxSpareThreads: currentThreadCount: currentThreadsBusy:

+
+ + + + + + + + + + + +
requestInfo maxTime: processingTime: requestCount: errorCount: bytesReceived: bytesSent:

+
+ + + + + + +
StageTimeB SentB RecvClientVHostRequest

+
+ + + + + + + + + + ? + + + +
diff --git a/webroot/META-INF/context.xml b/webroot/META-INF/context.xml new file mode 100644 index 0000000..4f59a7b --- /dev/null +++ b/webroot/META-INF/context.xml @@ -0,0 +1,28 @@ + + + + + + + + diff --git a/webroot/WEB-INF/lib/DLESETools.jar b/webroot/WEB-INF/lib/DLESETools.jar new file mode 100644 index 0000000..38063cb Binary files /dev/null and b/webroot/WEB-INF/lib/DLESETools.jar differ diff --git a/webroot/WEB-INF/lib/Jskad.jar b/webroot/WEB-INF/lib/Jskad.jar new file mode 100644 index 0000000..c13e1bb Binary files /dev/null and b/webroot/WEB-INF/lib/Jskad.jar differ diff --git a/webroot/WEB-INF/lib/ThdlUser.jar b/webroot/WEB-INF/lib/ThdlUser.jar new file mode 100644 index 0000000..61e7f49 Binary files /dev/null and b/webroot/WEB-INF/lib/ThdlUser.jar differ diff --git a/webroot/WEB-INF/lib/cglib-full-2.0.2.jar b/webroot/WEB-INF/lib/cglib-full-2.0.2.jar new file mode 100644 index 0000000..c35f0cf Binary files /dev/null and b/webroot/WEB-INF/lib/cglib-full-2.0.2.jar differ diff --git a/webroot/WEB-INF/lib/commons-beanutils.jar b/webroot/WEB-INF/lib/commons-beanutils.jar new file mode 100644 index 0000000..b1b89c9 Binary files /dev/null and b/webroot/WEB-INF/lib/commons-beanutils.jar differ diff --git a/webroot/WEB-INF/lib/commons-collections-2.1.1.jar b/webroot/WEB-INF/lib/commons-collections-2.1.1.jar new file mode 100644 index 0000000..3272f2b Binary files /dev/null and b/webroot/WEB-INF/lib/commons-collections-2.1.1.jar differ diff --git a/webroot/WEB-INF/lib/commons-lang-2.0.jar b/webroot/WEB-INF/lib/commons-lang-2.0.jar new file mode 100644 index 0000000..c8a2870 Binary files /dev/null and b/webroot/WEB-INF/lib/commons-lang-2.0.jar differ diff --git a/webroot/WEB-INF/lib/commons-logging-1.0.4.jar b/webroot/WEB-INF/lib/commons-logging-1.0.4.jar new file mode 100644 index 0000000..b73a80f Binary files /dev/null and b/webroot/WEB-INF/lib/commons-logging-1.0.4.jar differ diff --git a/webroot/WEB-INF/lib/dom4j-1.4.jar b/webroot/WEB-INF/lib/dom4j-1.4.jar new file mode 100644 index 0000000..2a58756 Binary files /dev/null and b/webroot/WEB-INF/lib/dom4j-1.4.jar differ diff --git a/webroot/WEB-INF/lib/ehcache-0.9.jar b/webroot/WEB-INF/lib/ehcache-0.9.jar new file mode 100644 index 0000000..092c8e7 Binary files /dev/null and b/webroot/WEB-INF/lib/ehcache-0.9.jar differ diff --git a/webroot/WEB-INF/lib/hibernate2.jar b/webroot/WEB-INF/lib/hibernate2.jar new file mode 100644 index 0000000..a76861c Binary files /dev/null and b/webroot/WEB-INF/lib/hibernate2.jar differ diff --git a/webroot/WEB-INF/lib/jdbc2_0-stdext.jar b/webroot/WEB-INF/lib/jdbc2_0-stdext.jar new file mode 100644 index 0000000..ddafa13 Binary files /dev/null and b/webroot/WEB-INF/lib/jdbc2_0-stdext.jar differ diff --git a/webroot/WEB-INF/lib/jstl.jar b/webroot/WEB-INF/lib/jstl.jar new file mode 100644 index 0000000..ffeb926 Binary files /dev/null and b/webroot/WEB-INF/lib/jstl.jar differ diff --git a/webroot/WEB-INF/lib/jta.jar b/webroot/WEB-INF/lib/jta.jar new file mode 100644 index 0000000..e0822a9 Binary files /dev/null and b/webroot/WEB-INF/lib/jta.jar differ diff --git a/webroot/WEB-INF/lib/log4j-1.2.8.jar b/webroot/WEB-INF/lib/log4j-1.2.8.jar new file mode 100644 index 0000000..493a3cc Binary files /dev/null and b/webroot/WEB-INF/lib/log4j-1.2.8.jar differ diff --git a/webroot/WEB-INF/lib/lucene-1.3-rc1.jar b/webroot/WEB-INF/lib/lucene-1.3-rc1.jar new file mode 100644 index 0000000..0870dd7 Binary files /dev/null and b/webroot/WEB-INF/lib/lucene-1.3-rc1.jar differ diff --git a/webroot/WEB-INF/lib/odmg-3.0.jar b/webroot/WEB-INF/lib/odmg-3.0.jar new file mode 100644 index 0000000..258b673 Binary files /dev/null and b/webroot/WEB-INF/lib/odmg-3.0.jar differ diff --git a/webroot/WEB-INF/lib/standard.jar b/webroot/WEB-INF/lib/standard.jar new file mode 100644 index 0000000..b308eb3 Binary files /dev/null and b/webroot/WEB-INF/lib/standard.jar differ diff --git a/webroot/WEB-INF/lib/taglibs-input.jar b/webroot/WEB-INF/lib/taglibs-input.jar new file mode 100644 index 0000000..4b0fcec Binary files /dev/null and b/webroot/WEB-INF/lib/taglibs-input.jar differ diff --git a/webroot/WEB-INF/lib/taglibs-request.jar b/webroot/WEB-INF/lib/taglibs-request.jar new file mode 100644 index 0000000..6aa17f6 Binary files /dev/null and b/webroot/WEB-INF/lib/taglibs-request.jar differ diff --git a/webroot/WEB-INF/lib/taglibs-response.jar b/webroot/WEB-INF/lib/taglibs-response.jar new file mode 100644 index 0000000..8b331f0 Binary files /dev/null and b/webroot/WEB-INF/lib/taglibs-response.jar differ diff --git a/webroot/WEB-INF/lib/taglibs-session.jar b/webroot/WEB-INF/lib/taglibs-session.jar new file mode 100644 index 0000000..b1c1587 Binary files /dev/null and b/webroot/WEB-INF/lib/taglibs-session.jar differ diff --git a/webroot/WEB-INF/lib/taglibs-string.jar b/webroot/WEB-INF/lib/taglibs-string.jar new file mode 100644 index 0000000..c1b3baa Binary files /dev/null and b/webroot/WEB-INF/lib/taglibs-string.jar differ diff --git a/webroot/WEB-INF/tld/c-rt.tld b/webroot/WEB-INF/tld/c-rt.tld new file mode 100644 index 0000000..2203657 --- /dev/null +++ b/webroot/WEB-INF/tld/c-rt.tld @@ -0,0 +1,393 @@ + + + + 1.0 + 1.2 + c_rt + http://java.sun.com/jstl/core_rt + JSTL core RT + JSTL 1.0 core library + + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + Provides core validation features for JSTL tags. + + + + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + Catches any Throwable that occurs in its body and optionally + exposes it. + + + var + false + false + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + if + org.apache.taglibs.standard.tag.rt.core.IfTag + JSP + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + + test + true + true + boolean + + + var + false + false + + + scope + false + false + + + + + import + org.apache.taglibs.standard.tag.rt.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + + url + true + true + + + var + false + false + + + scope + false + false + + + varReader + false + false + + + context + false + true + + + charEncoding + false + true + + + + + forEach + org.apache.taglibs.standard.tag.rt.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + + items + false + true + java.lang.Object + + + begin + false + true + int + + + end + false + true + int + + + step + false + true + int + + + var + false + false + + + varStatus + false + false + + + + + forTokens + org.apache.taglibs.standard.tag.rt.core.ForTokensTag + JSP + + Iterates over tokens, separated by the supplied delimeters + + + items + true + true + java.lang.String + + + delims + true + true + java.lang.String + + + begin + false + true + int + + + end + false + true + int + + + step + false + true + int + + + var + false + false + + + varStatus + false + false + + + + + out + org.apache.taglibs.standard.tag.rt.core.OutTag + JSP + + Like <%= ... >, but for expressions. + + + value + true + true + + + default + false + true + + + escapeXml + false + true + + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.rt.core.ParamTag + JSP + + Adds a parameter to a containing 'import' tag's URL. + + + name + true + true + + + value + false + true + + + + + redirect + org.apache.taglibs.standard.tag.rt.core.RedirectTag + JSP + + Redirects to a new URL. + + + var + false + false + + + scope + false + false + + + url + false + true + + + context + false + true + + + + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + Removes a scoped variable (from a particular scope, if specified). + + + var + true + false + + + scope + false + false + + + + + set + org.apache.taglibs.standard.tag.rt.core.SetTag + JSP + + Sets the result of an expression evaluation in a 'scope' + + + var + false + false + + + value + false + true + + + target + false + true + + + property + false + true + + + scope + false + false + + + + + url + org.apache.taglibs.standard.tag.rt.core.UrlTag + JSP + + Creates a URL with optional query parameters. + + + var + false + false + + + scope + false + false + + + value + false + true + + + context + false + true + + + + + when + org.apache.taglibs.standard.tag.rt.core.WhenTag + JSP + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + + test + true + true + boolean + + + + diff --git a/webroot/WEB-INF/tld/c.tld b/webroot/WEB-INF/tld/c.tld new file mode 100644 index 0000000..ce80e8d --- /dev/null +++ b/webroot/WEB-INF/tld/c.tld @@ -0,0 +1,416 @@ + + + + 1.0 + 1.2 + c + http://java.sun.com/jstl/core + JSTL core + JSTL 1.0 core library + + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + expressionAttributes + + out:value + out:default + out:escapeXml + if:test + import:url + import:context + import:charEncoding + forEach:items + forEach:begin + forEach:end + forEach:step + forTokens:items + forTokens:begin + forTokens:end + forTokens:step + param:encode + param:name + param:value + redirect:context + redirect:url + set:property + set:target + set:value + url:context + url:value + when:test + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + Catches any Throwable that occurs in its body and optionally + exposes it. + + + var + false + false + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + out + org.apache.taglibs.standard.tag.el.core.OutTag + JSP + + Like <%= ... >, but for expressions. + + + value + true + false + + + default + false + false + + + escapeXml + false + false + + + + + if + org.apache.taglibs.standard.tag.el.core.IfTag + JSP + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + + test + true + false + + + var + false + false + + + scope + false + false + + + + + import + org.apache.taglibs.standard.tag.el.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + + url + true + false + + + var + false + false + + + scope + false + false + + + varReader + false + false + + + context + false + false + + + charEncoding + false + false + + + + + forEach + org.apache.taglibs.standard.tag.el.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + + items + false + false + + + begin + false + false + + + end + false + false + + + step + false + false + + + var + false + false + + + varStatus + false + false + + + + + forTokens + org.apache.taglibs.standard.tag.el.core.ForTokensTag + JSP + + Iterates over tokens, separated by the supplied delimeters + + + items + true + false + + + delims + true + false + + + begin + false + false + + + end + false + false + + + step + false + false + + + var + false + false + + + varStatus + false + false + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.el.core.ParamTag + JSP + + Adds a parameter to a containing 'import' tag's URL. + + + name + true + false + + + value + false + false + + + + + redirect + org.apache.taglibs.standard.tag.el.core.RedirectTag + JSP + + Redirects to a new URL. + + + var + false + false + + + scope + false + false + + + url + true + false + + + context + false + false + + + + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + Removes a scoped variable (from a particular scope, if specified). + + + var + true + false + + + scope + false + false + + + + + set + org.apache.taglibs.standard.tag.el.core.SetTag + JSP + + Sets the result of an expression evaluation in a 'scope' + + + var + false + false + + + value + false + false + + + target + false + false + + + property + false + false + + + scope + false + false + + + + + url + org.apache.taglibs.standard.tag.el.core.UrlTag + JSP + + Prints or exposes a URL with optional query parameters + (via the c:param tag). + + + var + false + false + + + scope + false + false + + + value + true + false + + + context + false + false + + + + + when + org.apache.taglibs.standard.tag.el.core.WhenTag + JSP + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + + test + true + false + + + + diff --git a/webroot/WEB-INF/tld/taglibs-input.tld b/webroot/WEB-INF/tld/taglibs-input.tld new file mode 100644 index 0000000..d4e4d38 --- /dev/null +++ b/webroot/WEB-INF/tld/taglibs-input.tld @@ -0,0 +1,346 @@ + + + + + + + + + + 1.0 + 1.1 + input + http://jakarta.apache.org/taglibs/input-1.0 + The "input" tag extension library lets you present HTML <form> + elements that are tied to the ServletRequest that caused the current + JSP page to run, or to a JavaBean. That is, using this library, you can easily + prepopulate form elements with prior values that the user has chosen + -- or with default values for the first time a user hits a web page. + This is useful when you need to present the same page to the user + several times (e.g., for server-side validation).You can also automatically build up <select> boxes, making it easier + to build data-driven forms. And even if you don't present the same + page multiple times, you may want form elements that have default + values; this library lets you do that without writing excessive logic.What is the "Input" tag library? Read more. + + form + org.apache.taglibs.input.Form + JSP + + name + false + true + + + attributes + false + true + + + attributesText + false + true + + + bean + false + true + + + method + false + true + + + action + false + true + + + encType + false + true + + + + text + org.apache.taglibs.input.Text + empty + + name + true + true + + + default + false + true + + + attributes + false + true + + + attributesText + false + true + + + bean + false + true + + + + password + org.apache.taglibs.input.Password + empty + + name + true + true + + + default + false + true + + + attributes + false + true + + + attributesText + false + true + + + bean + false + true + + + + textarea + org.apache.taglibs.input.TextArea + empty + + name + true + true + + + default + false + true + + + attributes + false + true + + + attributesText + false + true + + + bean + false + true + + + + hidden + org.apache.taglibs.input.Hidden + empty + + name + true + true + + + default + false + true + + + attributes + false + true + + + attributesText + false + true + + + bean + false + true + + + + select + org.apache.taglibs.input.Select + JSP + + name + true + true + + + default + false + true + + + defaults + false + true + + + attributes + false + true + + + attributesText + false + true + + + bean + false + true + + + multiple + false + true + + + size + false + true + + + options + false + true + + + optionLabels + false + true + + + optionValues + false + true + + + + option + org.apache.taglibs.input.Option + JSP + + value + false + true + + + attributes + false + true + + + attributesText + false + true + + + + radio + org.apache.taglibs.input.Radio + empty + + name + true + true + + + default + false + true + + + value + true + true + + + attributes + false + true + + + attributesText + false + true + + + bean + false + true + + + + checkbox + org.apache.taglibs.input.Checkbox + empty + + name + true + true + + + default + false + true + + + defaults + false + true + + + value + true + true + + + attributes + false + true + + + attributesText + false + true + + + bean + false + true + + + + + + + + + + diff --git a/webroot/WEB-INF/tld/taglibs-request.tld b/webroot/WEB-INF/tld/taglibs-request.tld new file mode 100644 index 0000000..e362822 --- /dev/null +++ b/webroot/WEB-INF/tld/taglibs-request.tld @@ -0,0 +1,447 @@ + + + + + + + + + + 1.0.1 + 1.1 + request + http://jakarta.apache.org/taglibs/request-1.0 + The REQUEST custom tag library contains tags which can be used to + access all the information about the HTTP request for a JSP page.Tags are provided to access information in the HTTP request for + HTTP input parameters from a POST or GET, HTTP Headers, Cookies, + request attributes, and session information related to this request. + + log + org.apache.taglibs.request.LogTag + JSP + + + request + org.apache.taglibs.request.RequestTag + org.apache.taglibs.request.RequestTEI + empty + + id + yes + no + + + + isSecure + org.apache.taglibs.request.IsSecureTag + JSP + + value + no + no + + + + isSessionFromCookie + org.apache.taglibs.request.IsSessionFromCookieTag + JSP + + value + no + no + + + + isSessionFromUrl + org.apache.taglibs.request.IsSessionFromURLTag + JSP + + value + no + no + + + + isSessionValid + org.apache.taglibs.request.IsSessionValidTag + JSP + + value + no + no + + + + isUserInRole + org.apache.taglibs.request.IsUserInRoleTag + JSP + + role + yes + no + + + value + no + no + + + + attribute + org.apache.taglibs.request.AttributeTag + empty + + name + yes + no + + + + attributes + org.apache.taglibs.request.AttributesTag + org.apache.taglibs.request.AttributesTEI + JSP + + id + yes + no + + + + equalsAttribute + org.apache.taglibs.request.EqualsAttributeTag + JSP + + name + yes + no + + + value + no + no + + + match + yes + no + + + ignoreCase + no + no + + + + existsAttribute + org.apache.taglibs.request.ExistsAttributeTag + JSP + + name + yes + no + + + value + no + no + + + + removeAttribute + org.apache.taglibs.request.RemoveAttributeTag + empty + + name + yes + no + + + + setAttribute + org.apache.taglibs.request.SetAttributeTag + JSP + + name + yes + no + + + + cookie + org.apache.taglibs.request.CookieTag + empty + + name + yes + no + + + + cookies + org.apache.taglibs.request.CookiesTag + org.apache.taglibs.request.CookiesTEI + JSP + + id + yes + no + + + name + no + no + + + + equalsCookie + org.apache.taglibs.request.EqualsCookieTag + JSP + + name + yes + no + + + value + no + no + + + match + yes + no + + + ignoreCase + no + no + + + + existsCookie + org.apache.taglibs.request.ExistsCookieTag + JSP + + name + yes + no + + + value + no + no + + + + header + org.apache.taglibs.request.HeaderTag + empty + + name + yes + no + + + + headers + org.apache.taglibs.request.HeadersTag + org.apache.taglibs.request.HeadersTEI + JSP + + id + yes + no + + + name + no + no + + + + equalsHeader + org.apache.taglibs.request.EqualsHeaderTag + JSP + + name + yes + no + + + value + no + no + + + match + yes + no + + + ignoreCase + no + no + + + + existsHeader + org.apache.taglibs.request.ExistsHeaderTag + JSP + + name + yes + no + + + value + no + no + + + + headerValues + org.apache.taglibs.request.HeaderValuesTag + org.apache.taglibs.request.HeaderValuesTEI + JSP + + id + yes + no + + + + parameter + org.apache.taglibs.request.ParameterTag + empty + + name + yes + no + + + + parameters + org.apache.taglibs.request.ParametersTag + org.apache.taglibs.request.ParametersTEI + JSP + + id + yes + no + + + name + no + no + + + + equalsParameter + org.apache.taglibs.request.EqualsParameterTag + JSP + + name + yes + no + + + value + no + no + + + match + yes + no + + + ignoreCase + no + no + + + + existsParameter + org.apache.taglibs.request.ExistsParameterTag + JSP + + name + yes + no + + + value + no + no + + + + parameterValues + org.apache.taglibs.request.ParameterValuesTag + org.apache.taglibs.request.ParameterValuesTEI + JSP + + id + yes + no + + + + queryString + org.apache.taglibs.request.QueryStringTag + empty + + name + yes + no + + + + queryStrings + org.apache.taglibs.request.QueryStringsTag + org.apache.taglibs.request.QueryStringsTEI + JSP + + id + yes + no + + + name + no + no + + + + existsQueryString + org.apache.taglibs.request.ExistsQueryStringTag + JSP + + name + yes + no + + + value + no + no + + + + + + + + + + + + + + + + + + + diff --git a/webroot/WEB-INF/tld/taglibs-response.tld b/webroot/WEB-INF/tld/taglibs-response.tld new file mode 100644 index 0000000..774ca09 --- /dev/null +++ b/webroot/WEB-INF/tld/taglibs-response.tld @@ -0,0 +1,248 @@ + + + + + + + + + + 1.0.1 + 1.1 + response + http://jakarta.apache.org/taglibs/response-1.0 + The RESPONSE custom tag library contains tags which can be used + to set all the information for an HTTP response for a JSP page.This includes creating cookies and setting their values, setting HTTP + headers, returning back an HTTP error, or sending an HTTP redirect. + + encodeRedirectUrl + org.apache.taglibs.response.EncodeRedirectURLTag + JSP + + + encodeUrl + org.apache.taglibs.response.EncodeURLTag + JSP + + + flushBuffer + org.apache.taglibs.response.FlushBufferTag + empty + + + isCommitted + org.apache.taglibs.response.IsCommittedTag + JSP + + value + no + no + + + + sendError + org.apache.taglibs.response.SendErrorTag + JSP + + error + yes + no + + + reset + no + no + + + + sendRedirect + org.apache.taglibs.response.SendRedirectTag + JSP + + + setContentType + org.apache.taglibs.response.SetContentTypeTag + JSP + + + setStatus + org.apache.taglibs.response.SetStatusTag + empty + + status + yes + no + + + + skipPage + org.apache.taglibs.response.SkipPageTag + empty + + + addCookie + org.apache.taglibs.response.AddCookieTag + JSP + + comment + no + no + + + domain + no + no + + + maxAge + no + no + + + name + yes + no + + + path + no + no + + + secure + no + no + + + value + no + no + + + version + no + no + + + + comment + org.apache.taglibs.response.CookieCommentTag + JSP + + + domain + org.apache.taglibs.response.CookieDomainTag + JSP + + + maxAge + org.apache.taglibs.response.CookieMaxAgeTag + JSP + + + path + org.apache.taglibs.response.CookiePathTag + JSP + + + secure + org.apache.taglibs.response.CookieSecureTag + JSP + + + value + org.apache.taglibs.response.CookieValueTag + JSP + + + version + org.apache.taglibs.response.CookieVersionTag + JSP + + + addHeader + org.apache.taglibs.response.AddHeaderTag + JSP + + name + yes + no + + + + addDateHeader + org.apache.taglibs.response.AddDateHeaderTag + JSP + + name + yes + no + + + + addIntHeader + org.apache.taglibs.response.AddIntHeaderTag + JSP + + name + yes + no + + + + containsHeader + org.apache.taglibs.response.ContainsHeaderTag + JSP + + name + yes + no + + + value + no + no + + + + setHeader + org.apache.taglibs.response.SetHeaderTag + JSP + + name + yes + no + + + + setDateHeader + org.apache.taglibs.response.SetDateHeaderTag + JSP + + name + yes + no + + + + setIntHeader + org.apache.taglibs.response.SetIntHeaderTag + JSP + + name + yes + no + + + + + + + + + + + + + + diff --git a/webroot/WEB-INF/tld/taglibs-session.tld b/webroot/WEB-INF/tld/taglibs-session.tld new file mode 100644 index 0000000..faed7d4 --- /dev/null +++ b/webroot/WEB-INF/tld/taglibs-session.tld @@ -0,0 +1,159 @@ + + + + + + + + + + 1.0.1 + 1.1 + session + http://jakarta.apache.org/taglibs/session-1.0 + The SESSION JSP tag library provides tags for reading or modifying client +HttpSession information. +A servlet container uses an HttpSession to store information about a +clients session on the server. By default a JSP page will create a session for +a user. The user is tied to the session using either a Cookie or by using URL +rewriting. This is how you can tie information to a user between multiple HTTP +requests to your server. +Session Attributes are what makes it possible to store information about a +clients session between multiple HTTP requests. A session attribute consists of +a name and value. To save information about a users session on your server use +the setAttribute tag. +The session attributes you save only exist while the sessions exists. +Servlet containers will expire a users session and remove it after the user has +been inactive for a period of time. Many servlet containers default to 30 +minutes. You can change this by using the maxInactiveInterval tag. +A typical example of this is a shopping cart application where you use the +session to track what items the user wants to purchase. Each time a user +selects an item to purchase you set a session attribute which contains +information about the item. Then when the user later checks out, you can +determine what items they want to purchase by looking at the session +attributes. + + + session + org.apache.taglibs.session.SessionTag + org.apache.taglibs.session.SessionTEI + empty + + id + yes + no + + + + isNew + org.apache.taglibs.session.IsNewTag + JSP + + value + no + no + + + + invalidate + org.apache.taglibs.session.InvalidateTag + empty + + + maxInactiveInterval + org.apache.taglibs.session.MaxInactiveIntervalTag + JSP + + + attribute + org.apache.taglibs.session.AttributeTag + empty + + name + yes + no + + + + attributes + org.apache.taglibs.session.AttributesTag + org.apache.taglibs.session.AttributesTEI + JSP + + id + yes + no + + + + equalsAttribute + org.apache.taglibs.session.EqualsAttributeTag + JSP + + name + yes + no + + + value + no + no + + + match + yes + no + + + ignoreCase + no + no + + + + existsAttribute + org.apache.taglibs.session.ExistsAttributeTag + JSP + + name + yes + no + + + value + no + no + + + + removeAttribute + org.apache.taglibs.session.RemoveAttributeTag + empty + + name + yes + no + + + + setAttribute + org.apache.taglibs.session.SetAttributeTag + JSP + + name + yes + no + + + + + + + + + + + + + + diff --git a/webroot/WEB-INF/tld/taglibs-string.tld b/webroot/WEB-INF/tld/taglibs-string.tld new file mode 100644 index 0000000..043d092 --- /dev/null +++ b/webroot/WEB-INF/tld/taglibs-string.tld @@ -0,0 +1,748 @@ + + + + + + + + + + 1.1.0 + 1.1 + string + http://jakarta.apache.org/taglibs/string-1.1 + + The String taglibrary provides a host of tags for manipulating + java.lang.Strings. The style is that the String to act upon is the + body of the tag, and attributes are used as parameters for the + manipulation. + + + length + org.apache.taglibs.string.LengthTag + JSP + + var + false + true + + + + capitalize + org.apache.taglibs.string.CapitalizeTag + JSP + + var + false + true + + + + uncapitalize + org.apache.taglibs.string.UncapitalizeTag + JSP + + var + false + true + + + + upperCase + org.apache.taglibs.string.UpperCaseTag + JSP + + var + false + true + + + + lowerCase + org.apache.taglibs.string.LowerCaseTag + JSP + + var + false + true + + + + trim + org.apache.taglibs.string.TrimTag + JSP + + var + false + true + + + + chop + org.apache.taglibs.string.ChopTag + JSP + + var + false + true + + + + chopNewline + org.apache.taglibs.string.ChopNewlineTag + JSP + + var + false + true + + + + escape + org.apache.taglibs.string.EscapeTag + JSP + + var + false + true + + + + reverse + org.apache.taglibs.string.ReverseTag + JSP + + var + false + true + + + + swapCase + org.apache.taglibs.string.SwapCaseTag + JSP + + var + false + true + + + + soundex + org.apache.taglibs.string.SoundexTag + JSP + + var + false + true + + + + metaphone + org.apache.taglibs.string.MetaphoneTag + JSP + + var + false + true + + + + quoteRegexp + org.apache.taglibs.string.QuoteRegexpTag + JSP + + var + false + true + + + + capitalizeAllWords + org.apache.taglibs.string.CapitalizeAllWordsTag + JSP + + var + false + true + + + + removeXml + org.apache.taglibs.string.RemoveXmlTag + JSP + + var + false + true + + + + encodeUrl + org.apache.taglibs.string.EncodeUrlTag + JSP + + var + false + true + + + + decodeUrl + org.apache.taglibs.string.DecodeUrlTag + JSP + + var + false + true + + + + count + org.apache.taglibs.string.CountTag + JSP + + var + false + true + + + set + true + true + + + + delete + org.apache.taglibs.string.DeleteTag + JSP + + var + false + true + + + set + true + true + + + + squeeze + org.apache.taglibs.string.SqueezeTag + JSP + + var + false + true + + + set + true + true + + + + center + org.apache.taglibs.string.CenterTag + JSP + + var + false + true + + + delimiter + false + true + + + width + true + true + + + + rightPad + org.apache.taglibs.string.RightPadTag + JSP + + var + false + true + + + delimiter + false + true + + + width + true + true + + + + leftPad + org.apache.taglibs.string.LeftPadTag + JSP + + var + false + true + + + delimiter + false + true + + + width + true + true + + + + chomp + org.apache.taglibs.string.ChompTag + JSP + + var + false + true + + + delimiter + false + true + + + + getChomp + org.apache.taglibs.string.GetChompTag + JSP + + var + false + true + + + delimiter + false + true + + + + prechomp + org.apache.taglibs.string.PrechompTag + JSP + + var + false + true + + + delimiter + false + true + + + + getPrechomp + org.apache.taglibs.string.GetPrechompTag + JSP + + var + false + true + + + delimiter + false + true + + + + strip + org.apache.taglibs.string.StripTag + JSP + + var + false + true + + + delimiter + false + true + + + + stripEnd + org.apache.taglibs.string.StripEndTag + JSP + + var + false + true + + + delimiter + false + true + + + + stripStart + org.apache.taglibs.string.StripStartTag + JSP + + var + false + true + + + delimiter + false + true + + + + reverseDelimitedString + org.apache.taglibs.string.ReverseDelimitedStringTag + JSP + + var + false + true + + + delimiter + false + true + + + + overlay + org.apache.taglibs.string.OverlayTag + JSP + + var + false + true + + + with + true + true + + + start + true + true + + + end + true + true + + + + substring + org.apache.taglibs.string.SubstringTag + JSP + + var + false + true + + + start + false + true + + + end + false + true + + + + repeat + org.apache.taglibs.string.RepeatTag + JSP + + var + false + true + + + count + true + true + + + + wordWrap + org.apache.taglibs.string.WordWrapTag + JSP + + var + false + true + + + width + false + true + + + delimiter + false + true + + + split + false + true + + + delimiterInside + false + false + + + + nestedString + org.apache.taglibs.string.NestedStringTag + JSP + + var + false + true + + + open + true + true + + + close + false + true + + + + countMatches + org.apache.taglibs.string.CountMatchesTag + JSP + + var + false + true + + + substring + true + true + + + + default + org.apache.taglibs.string.DefaultTag + JSP + + var + false + true + + + value + false + true + + + default + false + true + + + + replace + org.apache.taglibs.string.ReplaceTag + JSP + + var + false + true + + + replace + true + true + + + with + true + true + + + count + false + true + + + newlineToken + false + true + + + carriageToken + false + true + + + + randomString + org.apache.taglibs.string.RandomStringTag + JSP + + var + false + true + + + count + true + true + + + start + false + true + + + end + false + true + + + type + false + true + + + + left + org.apache.taglibs.string.LeftTag + JSP + + var + false + true + + + count + true + true + + + + right + org.apache.taglibs.string.RightTag + JSP + + var + false + true + + + count + true + true + + + + mid + org.apache.taglibs.string.MidTag + JSP + + var + false + true + + + start + false + true + + + count + true + true + + + + truncateNicely + org.apache.taglibs.string.TruncateNicelyTag + JSP + + var + false + true + + + lower + false + true + + + upper + false + true + + + appendToEnd + false + true + + + + join + org.apache.taglibs.string.JoinTag + EMPTY + + items + true + true + + + separator + false + true + + + + split + org.apache.taglibs.string.SplitTag + JSP + + separator + true + true + + + var + true + true + + + + + + + + + + + diff --git a/webroot/WEB-INF/web.xml b/webroot/WEB-INF/web.xml new file mode 100644 index 0000000..4153233 --- /dev/null +++ b/webroot/WEB-INF/web.xml @@ -0,0 +1,221 @@ + + + + + + +Lex + + + + authentication + org.thdl.lex.AuthenticationFilter + + loginPage + /login.jsp + + + + + guest + org.thdl.lex.GuestFilter + + + + charEnc + org.thdl.lex.CharEncFilter + + + + component + org.thdl.lex.LexComponentFilter + + + + charEnc + /action + + + + authentication + /action + + + + + + guest + /public + + + + component + /action + + + + component + /public + + + + + + + action + org.thdl.lex.LexActionServlet + + + + globalDataRefreshDelay + 6 + + + recentItems + 6 + + + + + oaiServer + http://datastore.lib.virginia.edu/tibet/spt/SPT--OAI.php + + + oaiMetadataPrefix + oai_dc + + + oaiHome + /Users/travis/webapps/oai-sources + + + oaiLocalCopy + Thdl_Oai_Bibliography_Sources.xml + + + oaiRefreshDelay + 24 + + + + + login + org.thdl.lex.LoginServlet + + + loginPage + /login.jsp + + + welcomePage + /jsp/menu.jsp + + + + + logout + org.thdl.lex.LogoutServlet + + goodbyePage + http://iris.lib.virginia.edu/tibet/reference/dictionary.html + + + + + test + org.thdl.lex.HibernateTestServlet + + + + + + action + /action + + + + action + /public + + + + login + /login + + + + logout + /logout + + + + test + /test + + + + + + + + + http://java.sun.com/jstl/core + /WEB-INF/tld/c.tld + + + + + + http://jakarta.apache.org/taglibs/request-1.0 + /WEB-INF/tld/taglibs-request.tld + + + + http://jakarta.apache.org/taglibs/response-1.0 + /WEB-INF/tld/taglibs-response.tld + + + + http://jakarta.apache.org/taglibs/session-1.0 + /WEB-INF/tld/taglibs-session.tld + + + + http://jakarta.apache.org/taglibs/input-1.0 + /WEB-INF/tld/taglibs-input.tld + + + + http://jakarta.apache.org/taglibs/string-1.0 + /WEB-INF/tld/taglibs-string.tld + + + + diff --git a/webroot/css/lex-advanced.css b/webroot/css/lex-advanced.css new file mode 100644 index 0000000..03b6594 --- /dev/null +++ b/webroot/css/lex-advanced.css @@ -0,0 +1,165 @@ +/* ID Selectors */ + +#label +{ +} + + +#message +{ +} + + +#results +{ +} + +#toc +{ + padding: 0; +} + +#helper +{ + background-color: #99ccff; + border: solid 1px gray; + padding: 2px 0 2px 2px; +} +#recentTerms h3 +{ +margin-bottom: 2px; +} +#recentTerms p +{ +margin-top: 2px; +} + +#termChildren, #defChildren, #subdefChildren +{ +} +#columnLeft select, #columnLeft input, #columnRight select, #columnRight input +{ + width: 120px !important; +} +#columnCenter p +{ + text-align: justify; +} + +#newCompForm, #preferencesForm +{ +background-color: #99ccff; +border: black solid 1px; +margin: 8px 8px 8px 8px !important; +} + +#newCompForm input, select, textarea +{ +margin: 5px 5px 5px 5px; +} + +/* Class Selectors.*/ +ul.navLinks +{ + list-style-type: none; + margin: 0 0 0 6px !important; + padding: 0 0 0 0; +} +ul.navLinks li +{ + display: inline; + margin: 0 0 0 0 !important; + padding: 0 0 0 0; +} + + .highlightBox ol +{ +margin: 0 0 0 20px; +} + +.label +{ +font-weight: bold; +} + +.compEditOptions +{ +padding: 3px 3px 0px 3px; +margin: 0; +float: right; +display: block; +background-color: #99ccff; +border-right: 1px solid gray; +border-bottom: 1px solid gray; +border-left: 1px solid gray; +} + +.data +{ +border-top: 1px solid gray; +padding-top: 0; +margin-left: 0; +margin-right: 0; +margin-bottom: 0; +} + +a.meta img, .data img +{ +margin-right: 2px; +vertical-align: middle; +} + +.metadata +{ +display: none; +margin-left: 1.5em; +margin-top: .5em; +} + +.data input +{ + padding: 0px; +} + +/* CSS Rollovers */ +p.data a:hover +{ +/* +Don't Remove bgcolor and color or rollover will not work on IE Windows +These CSS Rollovers do not work on IE Mac. but they do work on Mozilla Mac +*/ +text-decoration: none; +background-color: white; +color: #003366; +} + +p.data a:link span.metadata +{ +display: none; +} + +p.data a:visited span.metadata +{ +display: none; +} + +p.data a:hover span.metadata +{ +text-decoration: none !important; +position: absolute; +margin: 5px 0px 0px 20px; +background-color: beige; +max-width: 300px; +padding: 2px 10px 2px 10px; +border: 1px solid #C0C0C0; +text-align:left; +display: block; +} + +/* p.data a:hover span.translation span.metadata, p.data a:hover span.analysis span.metadata +{ + width: 300px; +} */ + + +/* END OF CSS*/ diff --git a/webroot/css/lex.css b/webroot/css/lex.css new file mode 100644 index 0000000..62ed059 --- /dev/null +++ b/webroot/css/lex.css @@ -0,0 +1,136 @@ +/* IMPORTS */ + +@import url( "thdl-styles.css" ); +@import url( "lex-advanced.css" ); + + +#main input, #main textarea, #main p, #main li +{ /*--------- '*' = everything -------------*/ +font-family: 'Times Ext Roman', 'Arial Unicode MS', 'Lucida Grande', sans-serif !important; +} + +h1 +{ + font-size: 1.5em; + text-transform: none; +} + +ol +{ +list-style-type: none; +} +ol ol +{ +list-style-type: decimal; +} + +ol ol ol +{ +list-style-type: lower-alpha; +} +ol ol ol ol +{ +list-style-type: none; +} + +#results ol +{ +list-style-type: decimal; +} +ol.notes +{ +list-style-type: lower-roman; +} + +ul +{ +list-style-type: disc; +} + +ol, ul, li +{ +clear: right; +margin-right: 0px !important; +padding-right: 0 !important; +margin-left: 2px !important; +padding-left: 0 !important; +} +#results ol +{ + margin-left: 30px !important; +} +li +{ + margin-left: 0 !important; +} +/* ol +{ + border: solid 2px black; +} + +li ol +{ + border: solid 2px yellow; +} +li +{ + border: solid 2px red; +} */ +li li +{ + margin-left: 25px !important; + /* border: solid 2px blue; */ +} + + +div.tmw-block, h1.tmw-block, p.tmw-block +{ + margin-top: 1ex !important; + text-align: left !important; + /* border: solid 2px red; */ +} + +.tmw-block span +{ +/* vertical-align: middle; */ +} + +span.tmw-roman +{ + +/* margin-top: 1ex; +padding-top: 1ex; */ +} +span.tmw {font: 24pt TibetanMachineWeb !important; text-transform: none; } +span.tmw1 {font: 24pt TibetanMachineWeb1 !important; text-transform: none; } +span.tmw2 {font: 24pt TibetanMachineWeb2 !important; text-transform: none; } +span.tmw3 {font: 24pt TibetanMachineWeb3 !important; text-transform: none; } +span.tmw4 {font: 24pt TibetanMachineWeb4 !important; text-transform: none; } +span.tmw5 {font: 24pt TibetanMachineWeb5 !important; text-transform: none; } +span.tmw6 {font: 24pt TibetanMachineWeb6 !important; text-transform: none; } +span.tmw7 {font: 24pt TibetanMachineWeb7 !important; text-transform: none; } +span.tmw8 {font: 24pt TibetanMachineWeb8 !important; text-transform: none; } +span.tmw9 {font: 24pt TibetanMachineWeb9 !important; text-transform: none; } + +h1 span.tmw {font-size: 32pt !important; } +h1 span.tmw1 {font-size: 32pt !important; } +h1 span.tmw2 {font-size: 32pt !important; } +h1 span.tmw3 {font-size: 32pt !important; } +h1 span.tmw4 {font-size: 32pt !important; } +h1 span.tmw5 {font-size: 32pt !important; } +h1 span.tmw6 {font-size: 32pt !important; } +h1 span.tmw7 {font-size: 32pt !important; } +h1 span.tmw8 {font-size: 32pt !important; } +h1 span.tmw9 {font-size: 32pt !important; } + +/* The following child selectors hide this css from IE 6 and lower which can't re-position without screwing up the drawing of the fonts*/ +.tmw-block>span.tmw-roman, a>span.tmw-roman +{ + vertical-align: sub; +} + +a.tmw-link:hover +{ + background-color: inherit; +} + diff --git a/webroot/css/thdl-advanced.css b/webroot/css/thdl-advanced.css new file mode 100644 index 0000000..dbbd4cd --- /dev/null +++ b/webroot/css/thdl-advanced.css @@ -0,0 +1,385 @@ +/*-------- +ID Selectors --primarily used for page layout +----------*/ + +#banner +{ +margin: 0px 0px 0px 0px; +padding: 0px 0px 0px 0px; +height : 55px; +background-color: #E5E5E5; +} + +#logo +{ +position: absolute; +top: 2px; +left: 0; +border: 0; +background-color: transparent; +margin-left : 5px; +width: 50px; +margin-right: 5%; +z-index: 11; +} + +#banner h1 { +margin-right: 25%; +position: absolute; +top: 0px; +left: 65px; +color: #003366; +font-size: 14px; +font-weight: bold; +text-transform: uppercase; +} + +#menubar { +position: absolute; +top: 33px; +left: 65px; +height: 21px; +} + +body>#menubar { +height: 22px; +} + +#MenuPos { +height: 22px; +font-size: .9em; +z-index: 2; +} + +#sub_banner +{ +top: 50px; +padding: 0px 0px 0px 0px; +height : 25px; +background-color: #CCCCCC; +z-index: 1; +} + +#breadcrumbs { +position:absolute; +left: 10px; +top: 60px; +font-size: 12px; +} + +#search { +margin-right: 13px; +text-align: right; +} + +#search form { +font-size: 9px; +margin: 0; +display: inline; +text-align: right; +} + +#search form p +{ +margin: 0; +display: inline; +text-align: right; +} + + + +/* #sa, #q - These are Google Search form-parameter names */ +#sa +{ +margin-top: 5px; +padding: 0; +height: 16px; +width: 50px; +background-color: #666666; +color: white; +font-size: 10px; +border-top: solid 1px white; +border-left: solid 1px white; +border-bottom: solid 1px gray; +border-right: solid 1px gray; +} + +p>#sa +{ +height: 14px; +} + +#q +{ +padding: 0; +height: 14px; +width: 90px; +font-size: 10px; +border-top: solid 1px silver; +border-left: solid 1px silver; +border-bottom: solid 1px silver; +border-right: solid 1px silver; +} + + + + + + + + + + #main { +/* width: 800px; */ + margin: 2px 0 10px 0; +/*background-color : #ffffff; */ +} + +body>#main { +margin-top: 6px; +} + +#columnLeft { +position: absolute; +left:10px; +top:82px; +width:200px; +} + +#columnCenter { + font-size: 1em; + +margin-left: 216px; +margin-right:216px; +} + +#columnRight { +position: absolute; +right:10px; +top:82px; +width:200px; +margin-right: 0; +margin-top: 0px; +} + +#columnMain { +background: #ffffff; +margin-left: 216px; +margin-right: 10px; +} + +#main p, #columnMain p{ +max-width: 700px; +min-width: 10px; +text-align: justify; +} + +#main p.illustratedBlurb +{ + max-width: none !important; +} + +#main ul, #main dl, #main ol { +max-width: 620px; +min-width: 10px; +text-align: justify; +} + +#columnLeft p, #columnCenter p, #columnRight p, +#columnLeft ul, #columnCenter ul, #columnRight ul, +#columnLeft ol, #columnCenter ol, #columnRight ol, +#columnLeft dl, #columnCenter dl, #columnRight dl +{ +text-align: left; +} + + + + + + + + + + + + + + + +.low-emph, .low-emph * { +color: gray; +text-decoration: none !important; +} + +.caption { +font-size: .9em; +font-style: italic; +font-weight: normal; +color: #000033; +} + +.smallgray { +font-size: .9em; +font-weight: normal; +color: #333333; +} + +.smalllink { +font-size: .9em; +color: #333399; +} + +.bodytext { +font-size: 1em; +text-align: justify; +} + +.label, .bold { +font-weight: bold; +color: black; +} + +.credits { +font-size: 1.1em; +color: #660033; +text-align: justify; +font-weight: bold; +} + +.highlightBox, .spotlightBox { +width: 100%; +margin: 5px 0 0 0; +padding: 0 0 0 0; +background-color: #e1e1e1; +border: solid 1px gray; +} + +.spotlightBox { +background-color: white; +} + +.highlightBox h2, .spotlightBox h2 { +color: white; +background-color: #336699; +margin: 0; +text-align: center; +} + +.highlightBox li +{ +margin: 2px 0 2px 10px; +} + +.highlightBox ul, .highlightBox ol +{ +margin: 0 0 0 10px; +padding-left: 0px; +} + +.spotlightBox h2 { +color: #000033; +background-color: #E5E5E5; +} + +.highlightBox a:hover, #breadcrumbs a:hover { +background-color: white !important; +} + +ul.member { +list-style-type: none; +} + +.menu0 { +font-size: 1em; +margin-left: 0em; +text-align: left; +color: #FFFFFF; +background-color: #000066; +} + +a.menu { +font-size: 1em; +color: #FFFFFF; +} + +.selected { +margin: 0px; +font-size: 1em; +font-weight: 900; +color: #009933; +background-color: #ffff99; +padding: .1em; +} + +.selected:hover { +background-color: #ffff99 !important; +} + +p.illustratedBlurb { +clear: none; +} + +div.caption +{ + text-align: left !important; + margin-top: 1px !important; +} + +div.captionedImage { +float: right; +clear: right; +margin: 4px 0 10px 10px; +} + +div.captionedImage img { +float: left; +border: solid 1px gray; +} +div.captionedImage div { +clear: left; +width: 240px; +text-align: center; +margin-top: 20px; +} + +div.captionedImageLeft { +float: left; +clear: left; +margin: 0 10px 10px 5px; +} + +div.captionedImageLeft img { +float: left; +border: solid 1px gray; +} + +div.captionedImageLeft div { +clear: left; +width: 240px; +} + +img +{ +border: 0; +} + +.footer +{ +text-align: center; +font-size: .9em; +margin-right: 240px; +margin-left: 240px; +border-top: 1px dotted gray; +} + +#main img +{ +border: solid 1px silver; +} + +img.text-illustration +{ +margin: 8px 8px 8px 8px; +float: right; +} diff --git a/webroot/css/thdl-styles.css b/webroot/css/thdl-styles.css new file mode 100644 index 0000000..cb7affc --- /dev/null +++ b/webroot/css/thdl-styles.css @@ -0,0 +1,108 @@ +/*------------------ + IMPORT STYLESHEETS + This import hides layout rules from the following older browsers +--------------------*/ + +@import url( "thdl-advanced.css" ); + +/*------------- +Element Selectors +---------------*/ + +body { +margin:0 0 0 0; +padding:0 0 0 0; +color: #000033; +background-color: #FFFFFF; +font-size: small; +font-family: Arial, sans-serif !important; +} + +a { +color: #0033CC; +border: 0; +text-decoration: none; +} + +a:hover { +background-color: #e1e1e1; +} + +p, pre { +color: #000033; +font-size: 1em; +margin: 5px 5px 5px 10px; +} + +p { +text-align: justify; +margin: 5px 5px 7px 5px; +} + +h1, h2, h3, h4, h5, h6 { +font-family: Verdana, sans-serif !important; +font-style: normal; +font-weight: bold; +font-variant: normal; +font-size: 1em; +margin: 5px 5px 5px 3px; +padding:0; +text-transform: none; +line-height: normal; +border-style: none; +} + +h1 { +font-size: 1.2em; +text-transform: uppercase; +} + +h2 { +font-size: 1.1em; +} + +h3 { +font-size: 1em; +} + +form { +margin: 0; +padding: 0; +} + +li { +margin-top: 5px; +font-size: 1em; +font-style: normal; +font-weight: normal; +color: #000033; +} + +blockquote { +font-style: normal; +font-weight: normal; +} + +dt { +font-weight: bold; +} + +.alert, .warning, .dangerous { +font-style: normal; +color: red; +} + +.alert .label, .warning .label, .dangerous .label { +color: red; +} + +.message +{ +color: #006666; +} + +.inline-help +{ +color: #006666; +} + diff --git a/webroot/images/def.gif b/webroot/images/def.gif new file mode 100644 index 0000000..7db166b Binary files /dev/null and b/webroot/images/def.gif differ diff --git a/webroot/images/edit.gif b/webroot/images/edit.gif new file mode 100644 index 0000000..a8e6ea7 Binary files /dev/null and b/webroot/images/edit.gif differ diff --git a/webroot/images/ency.gif b/webroot/images/ency.gif new file mode 100644 index 0000000..470d9a7 Binary files /dev/null and b/webroot/images/ency.gif differ diff --git a/webroot/images/etym.gif b/webroot/images/etym.gif new file mode 100644 index 0000000..d5ca321 Binary files /dev/null and b/webroot/images/etym.gif differ diff --git a/webroot/images/gram.gif b/webroot/images/gram.gif new file mode 100644 index 0000000..2d31b44 Binary files /dev/null and b/webroot/images/gram.gif differ diff --git a/webroot/images/key.gif b/webroot/images/key.gif new file mode 100644 index 0000000..17649a3 Binary files /dev/null and b/webroot/images/key.gif differ diff --git a/webroot/images/meta.gif b/webroot/images/meta.gif new file mode 100644 index 0000000..cdcb3ca Binary files /dev/null and b/webroot/images/meta.gif differ diff --git a/webroot/images/metadata.gif b/webroot/images/metadata.gif new file mode 100644 index 0000000..b4c9a8f Binary files /dev/null and b/webroot/images/metadata.gif differ diff --git a/webroot/images/note.gif b/webroot/images/note.gif new file mode 100644 index 0000000..b1317b6 Binary files /dev/null and b/webroot/images/note.gif differ diff --git a/webroot/images/pass.gif b/webroot/images/pass.gif new file mode 100644 index 0000000..044a903 Binary files /dev/null and b/webroot/images/pass.gif differ diff --git a/webroot/images/pron.gif b/webroot/images/pron.gif new file mode 100644 index 0000000..a1197c6 Binary files /dev/null and b/webroot/images/pron.gif differ diff --git a/webroot/images/reg.gif b/webroot/images/reg.gif new file mode 100644 index 0000000..03baab1 Binary files /dev/null and b/webroot/images/reg.gif differ diff --git a/webroot/images/rel-term.gif b/webroot/images/rel-term.gif new file mode 100644 index 0000000..8fc76f8 Binary files /dev/null and b/webroot/images/rel-term.gif differ diff --git a/webroot/images/remove.gif b/webroot/images/remove.gif new file mode 100644 index 0000000..78e1023 Binary files /dev/null and b/webroot/images/remove.gif differ diff --git a/webroot/images/sent.gif b/webroot/images/sent.gif new file mode 100644 index 0000000..126075b Binary files /dev/null and b/webroot/images/sent.gif differ diff --git a/webroot/images/spell.gif b/webroot/images/spell.gif new file mode 100644 index 0000000..98c3c3b Binary files /dev/null and b/webroot/images/spell.gif differ diff --git a/webroot/images/subdef.gif b/webroot/images/subdef.gif new file mode 100644 index 0000000..dd50db2 Binary files /dev/null and b/webroot/images/subdef.gif differ diff --git a/webroot/images/trans-eqv.gif b/webroot/images/trans-eqv.gif new file mode 100644 index 0000000..936c438 Binary files /dev/null and b/webroot/images/trans-eqv.gif differ diff --git a/webroot/images/trans.gif b/webroot/images/trans.gif new file mode 100644 index 0000000..948f1fe Binary files /dev/null and b/webroot/images/trans.gif differ diff --git a/webroot/js/lex.js b/webroot/js/lex.js new file mode 100644 index 0000000..ea9b9e9 --- /dev/null +++ b/webroot/js/lex.js @@ -0,0 +1,73 @@ +/* +==================== +Scripts for Lex - general +==================== +*/ +function assert( fact, details ) +{ + if ( ! fact ) alert( details ); +} +function element(id) +{ + if (document.getElementById != null) + { + return getElementById(id); + } + if (document.all != null) + { + return document.all[id] + } + if (document.layers != null) + { + return document.layers[id] + } +} + +/* +==================== +Scripts for menu.jsp +==================== +*/ +function setCmd(cmd) +{ +document.forms[1].cmd.value = cmd; +// element( elementId ).cmd.value = cmd; +} +function setTerm() +{ +document.forms[1].term.value = element( termSource ).value; +} +/* +============================= +Scripts for displayEntry.jsp +============================= +*/ +function MM_jumpMenu(targ,selObj,restore) //v3.0 modified by TWM +{ +eval(targ + ".location='/lex/action?cmd=displayFull&componentLabel=term&id=" + selObj.options[selObj.selectedIndex].value + "'"); +if (restore) selObj.selectedIndex=0; +} + +function jumpToAnchor(sAnchor) { +ns = (document.layers)? true:false; +ie = (document.all)? true:false; +if (ns) + { + window.scrollTo(0, document.anchors[sAnchor].y); + } +if (ie) + { + eval('document.all.' + sAnchor + '.scrollIntoView()'); + } +} + +/* +============================= +Scripts for displayTree.jsf +============================= +*/ + +function smile() +{} + + diff --git a/webroot/jsp/analyticalNoteForm.jsf b/webroot/jsp/analyticalNoteForm.jsf new file mode 100644 index 0000000..0910918 --- /dev/null +++ b/webroot/jsp/analyticalNoteForm.jsf @@ -0,0 +1,42 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + + + + + + + + + + + + + + + + + +
+

+ + + + + + +Analysis:
+ +
+ + + + +

+
diff --git a/webroot/jsp/debug.jsf b/webroot/jsp/debug.jsf new file mode 100644 index 0000000..07b94cc --- /dev/null +++ b/webroot/jsp/debug.jsf @@ -0,0 +1,77 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp" %> +<%@ taglib prefix = "c" uri = "http://java.sun.com/jstl/core" %> +<%@ taglib prefix = "req" uri = "http://jakarta.apache.org/taglibs/request-1.0" %> +<%@ taglib prefix = "res" uri = "http://jakarta.apache.org/taglibs/response-1.0" %> +<%@ taglib prefix = "sess" uri = "http://jakarta.apache.org/taglibs/session-1.0" %> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

DEBUG INFO

+ +Validate CSS + +
+

USER INFO

+User Roles: + +
+

+Request Parameters:

+ + = ''
+
+
+

+ Request Attributes:

+ + = ''
+
+ +
+

+ Session Attributes:

+ + = ''
+
+
+ +

+ Response Headers:

+ +
+ +

Results Array Items:

+ +
+
+
+
+
diff --git a/webroot/jsp/definitionForm.jsf b/webroot/jsp/definitionForm.jsf new file mode 100644 index 0000000..064813f --- /dev/null +++ b/webroot/jsp/definitionForm.jsf @@ -0,0 +1,57 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ + + + + + + + + + + + +Definition:
+ + +
+ + + + +

+
diff --git a/webroot/jsp/displayDefinition.jsf b/webroot/jsp/displayDefinition.jsf new file mode 100644 index 0000000..748be15 --- /dev/null +++ b/webroot/jsp/displayDefinition.jsf @@ -0,0 +1,63 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + +

+ + + + + + + + + + + + + + + + + + + +

+ + + + + +

Translations

+
    + +
  • +

    + + + + + + + + + + + + +

    +
  • +
    +
+
+
+ + + + + + diff --git a/webroot/jsp/displayEncyclopediaArticle.jsf b/webroot/jsp/displayEncyclopediaArticle.jsf new file mode 100644 index 0000000..f17dffb --- /dev/null +++ b/webroot/jsp/displayEncyclopediaArticle.jsf @@ -0,0 +1,26 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + +

+ + + + + + + + + + + + + + + + + + +

+ + diff --git a/webroot/jsp/displayEntry.jsp b/webroot/jsp/displayEntry.jsp new file mode 100644 index 0000000..ec7b9f5 --- /dev/null +++ b/webroot/jsp/displayEntry.jsp @@ -0,0 +1,140 @@ +<%@ 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" %> +<% request.setCharacterEncoding("UTF-8"); %> + + + + + + + + + + + +
+
+
+

Quick Search

+

+ + + Term: + +
+ Find: + + +

+ +

+ +

+
+
+ + +
+

Search Results

+
    + + + + + +
  1. + +
    +
  2. +
    +
+
+
+ +
+ +
+ +
+ +
+ +
+ + +
+ + + +

+ + + .
+
+ +
+

+ +
+

+ + Display: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+
+ +

This dictionary requires the TibetanMachineWeb font to display Tibetan script.

+ +
+ + + + + + + + +
+
+ + + + diff --git a/webroot/jsp/displayEtymology.jsf b/webroot/jsp/displayEtymology.jsf new file mode 100644 index 0000000..281b329 --- /dev/null +++ b/webroot/jsp/displayEtymology.jsf @@ -0,0 +1,78 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + +

+ + + + + + + + + + + ; + + + + ; + + + + + + <%-- Derivation: --%> + + + + + + +

+ + + + + +

Translations

+
    + + +
  • +

    + + + + + + + + + +
    +
    +
    + + +
    + + + + +

    +
  • +
    +
+
+
+ + + + + diff --git a/webroot/jsp/displayForm.jsp b/webroot/jsp/displayForm.jsp new file mode 100644 index 0000000..ca8a2df --- /dev/null +++ b/webroot/jsp/displayForm.jsp @@ -0,0 +1,205 @@ +<%@ 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" %> +<% request.setCharacterEncoding("UTF-8"); %> + + + + + + +
Component Entry Form Page +
+ +
+ + + +
+ +
+ +
+Back to: + +
+
+ + + + + + + + + + + + + + + + + +

+ + + + + + + + +Warning!! This is your last chance. Are you sure you want to remove this component and all of its sub-components? + +

+ +
+ + + + + + +

Note

+

+
+ + +

+
+ + +

+
+ + +

+
+ + +

+
+ + +

+
+ + +

+
+ + +

+
+ + +

+
+ + +

+
+ + +

+
+ + +

+
+ + +

+
+ + +

+
+ + +

+
+ + +

+
+ +<%--Insert Form--%> + + + + + + +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Error: no form was included + +
+ +
+ + + + diff --git a/webroot/jsp/displayFunction.jsf b/webroot/jsp/displayFunction.jsf new file mode 100644 index 0000000..60ba8ae --- /dev/null +++ b/webroot/jsp/displayFunction.jsf @@ -0,0 +1,28 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + +

+ + + + + + + + + + + + + + + + + + + + +

+ + diff --git a/webroot/jsp/displayKeyword.jsf b/webroot/jsp/displayKeyword.jsf new file mode 100644 index 0000000..b15ffdc --- /dev/null +++ b/webroot/jsp/displayKeyword.jsf @@ -0,0 +1,32 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + +

+ + + + + + + + + + + + + + + + + + + + + +

+ + diff --git a/webroot/jsp/displayMeta.jsf b/webroot/jsp/displayMeta.jsf new file mode 100644 index 0000000..a1f4799 --- /dev/null +++ b/webroot/jsp/displayMeta.jsf @@ -0,0 +1,53 @@ +<%@ page %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + +<%--
--%> + + + view metadata + + + + + + +
+ + diff --git a/webroot/jsp/displayModelSentence.jsf b/webroot/jsp/displayModelSentence.jsf new file mode 100644 index 0000000..90223ac --- /dev/null +++ b/webroot/jsp/displayModelSentence.jsf @@ -0,0 +1,63 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + +

+ + + + + + + + + + + + + + + +

+ + + + +

Translations

+
    + +
  • +

    + + + + + + + + + + + + +

    +
  • +
    +
+
+
+ + + + + + + + + + + + diff --git a/webroot/jsp/displayNotes.jsf b/webroot/jsp/displayNotes.jsf new file mode 100644 index 0000000..771149c --- /dev/null +++ b/webroot/jsp/displayNotes.jsf @@ -0,0 +1,41 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + +

Notes

+
    + +
  1. +

    + + + + + + + + + + + + + + + + + + + + +

    +
  2. +
    +
+ +
+
diff --git a/webroot/jsp/displayPassage.jsf b/webroot/jsp/displayPassage.jsf new file mode 100644 index 0000000..70d7d57 --- /dev/null +++ b/webroot/jsp/displayPassage.jsf @@ -0,0 +1,109 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + +

+ + + + + + + + + + + + + + +
+
+ + + Spelling: +
+
+ + + Pagination: + ''
+
+ + + + + + + +

+ + + + + + Wylie conversion error (view source for details) + + + + +
+ + + + + +

+ + + + +

Translations

+
    + +
  • +

    + + + + + + + + + +
    +
    + + + Spelling: +
    +
    + + + Pagination: +
    +
    + + + + + + + + +

    +
  • +
    +
+
+
+ + + + + + diff --git a/webroot/jsp/displayPronunciation.jsf b/webroot/jsp/displayPronunciation.jsf new file mode 100644 index 0000000..a08e680 --- /dev/null +++ b/webroot/jsp/displayPronunciation.jsf @@ -0,0 +1,33 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + +

+ + + + + + + + + + + ; + + + + + + + + + + + +

+ diff --git a/webroot/jsp/displayRegister.jsf b/webroot/jsp/displayRegister.jsf new file mode 100644 index 0000000..305985e --- /dev/null +++ b/webroot/jsp/displayRegister.jsf @@ -0,0 +1,30 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + +

+ + + + + + + + + + + + + + + + + + + +

+ + diff --git a/webroot/jsp/displayRelatedTerm.jsf b/webroot/jsp/displayRelatedTerm.jsf new file mode 100644 index 0000000..bdfd4d6 --- /dev/null +++ b/webroot/jsp/displayRelatedTerm.jsf @@ -0,0 +1,33 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + +

+ + + + + + + + + + +
+ + + + + + + + + + + + + +

+ diff --git a/webroot/jsp/displaySpelling.jsf b/webroot/jsp/displaySpelling.jsf new file mode 100644 index 0000000..8a3ef43 --- /dev/null +++ b/webroot/jsp/displaySpelling.jsf @@ -0,0 +1,28 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + +

+ + + + + + + + + + + + + + + + + + + + + + +

diff --git a/webroot/jsp/displaySubdefinition.jsf b/webroot/jsp/displaySubdefinition.jsf new file mode 100644 index 0000000..842fa41 --- /dev/null +++ b/webroot/jsp/displaySubdefinition.jsf @@ -0,0 +1,65 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + +

+ + + + +

Translations

+
    + +
  • +

    + + + + + + + + + + + + +

    +
  • +
    +
+
+
+ + + + +

+ diff --git a/webroot/jsp/displayTerm.jsf b/webroot/jsp/displayTerm.jsf new file mode 100644 index 0000000..7d85a80 --- /dev/null +++ b/webroot/jsp/displayTerm.jsf @@ -0,0 +1,46 @@ +<%@ page buffer="512kb" autoFlush="false" import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + +

+ + + + + + Wylie conversion error: + +

+ +

+ + + + + + + + + + + + + + + + + + + + + + +

+ + + diff --git a/webroot/jsp/displayTransitionalData.jsf b/webroot/jsp/displayTransitionalData.jsf new file mode 100644 index 0000000..a5ec292 --- /dev/null +++ b/webroot/jsp/displayTransitionalData.jsf @@ -0,0 +1,29 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + +
  • + +

    + + + + + + + + +
    + + + + + +

    +
  • +
    diff --git a/webroot/jsp/displayTranslationEquivalent.jsf b/webroot/jsp/displayTranslationEquivalent.jsf new file mode 100644 index 0000000..4fcfe21 --- /dev/null +++ b/webroot/jsp/displayTranslationEquivalent.jsf @@ -0,0 +1,28 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + +

    + + + + + + + + + + + + + + + + + +

    + + diff --git a/webroot/jsp/displayTree.jsf b/webroot/jsp/displayTree.jsf new file mode 100644 index 0000000..77f81ba --- /dev/null +++ b/webroot/jsp/displayTree.jsf @@ -0,0 +1,271 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + + + + + + +
      + + + + +
    1. + +

      Pronunciations

      +
        + + +
      • + + +
      • +
        +
      +
    2. +
      + + + + +
    3. + +

      Etymologies

      +
        + + +
      • + + +
      • +
        +
      +
    4. +
      + + + + +
    5. + +

      Spellings

      +
        + + +
      • + + +
      • +
        +
      +
    6. +
      + + + + +
    7. + +

      Functions

      +
        + + +
      • + + +
      • +
        +
      +
    8. +
      + + + + +
    9. + +

      Encyclopedia Articles

      +
        + + +
      • + + +
      • +
        +
      +
    10. +
      + + + +
    11. +

      Definitions

      + +
        + +
      1. + <%--

        --%> + + + + + + + + +
          + + +
        1. + + + +
            + + + + +
          1. + +

            Keywords

            +
              + + +
            • + + +
            • +
              +
            +
          2. +
            + + + + +
          3. + +

            Model Sentences

            +
              + + +
            • + + +
            • +
              +
            +
          4. +
            + + + + +
          5. + +

            Translation Equivalents

            +
              + + +
            • + + +
            • +
              +
            +
          6. +
            + + + + +
          7. + +

            Related Term

            +
              + + +
            • + + +
            • +
              +
            +
          8. +
            + + + + +
          9. + +

            Passages

            +
              + + +
            • + + +
            • +
              +
            +
          10. +
            + + + + +
          11. + +

            Registers

            +
              + + + +
            • + + +
            • +
              +
            +
          12. +
            + +
          +
        2. + +
          + +
        +
        +
      2. +
        +
      +
    12. +
      + + + + +
    13. + +

      Other Dictionaries

      +
        + + + + +
      +
    14. +
      + +
    +
    diff --git a/webroot/jsp/displayTreeToc.jsf b/webroot/jsp/displayTreeToc.jsf new file mode 100644 index 0000000..e48feae --- /dev/null +++ b/webroot/jsp/displayTreeToc.jsf @@ -0,0 +1,141 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + +

    Term Map

    +

    + +

    + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    1. + +
        + +
      1. + + + + + +
          + + + + + +
        1. + + + +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          +
        2. + +
          +
          + +
        +
      2. + +
        +
      +
    2. +
      + + + + + + + + + +<%--
    + --%> + + + diff --git a/webroot/jsp/encyclopedia.jsf b/webroot/jsp/encyclopedia.jsf new file mode 100644 index 0000000..7d68b8b --- /dev/null +++ b/webroot/jsp/encyclopedia.jsf @@ -0,0 +1,19 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false"%> +<%-- <%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp" buffer="512kb" autoFlush="false" %> --%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + +

    Encyclopedia Article

    +

    + Title:
    +

    +

    + Author: + +

    +

    + Article:
    +
    +

    diff --git a/webroot/jsp/encyclopediaArticleForm.jsf b/webroot/jsp/encyclopediaArticleForm.jsf new file mode 100644 index 0000000..ffa5511 --- /dev/null +++ b/webroot/jsp/encyclopediaArticleForm.jsf @@ -0,0 +1,54 @@ +<%-- <%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp" %> --%> +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %><%@ page import="java.util.HashMap" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%-- <%@ taglib prefix="input" uri="http://jakarta.apache.org/taglibs/input-1.0" %> --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + + + + + + +Article Title:
    + +
    + +Article:
    + +
    + + + + +

    +
    diff --git a/webroot/jsp/error.jsp b/webroot/jsp/error.jsp new file mode 100644 index 0000000..f9a7dbb --- /dev/null +++ b/webroot/jsp/error.jsp @@ -0,0 +1,68 @@ +<%@ page buffer="512kb" autoFlush="false" import="java.io.*, org.thdl.lex.*,org.thdl.lex.component.*" isErrorPage="true" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + +THDL Dictionary Error Page + + + +
    +

    +You have reached the Error page. +This page indicates that Lex has caught an exception that it does not know how to deal with. +The message appears below.
    +Return to the home page.

    + + +Message: <%= exception.getMessage() %>

    + +<% if (request.getAttribute("comp") != null) + { LexComponent lab = (LexComponent) request.getAttribute("comp"); +%> + Label: <%= lab %>

    + +<% } %>

    + +Stack Trace: +<% StringWriter writer = new StringWriter(); + exception.printStackTrace( new PrintWriter(writer) ); + String stackTrace = writer.getBuffer().toString(); +%> +

    +<%= stackTrace %>
    +
    + + + +

    +
    + +<%-- --%> + + + diff --git a/webroot/jsp/etymologyForm.jsf b/webroot/jsp/etymologyForm.jsf new file mode 100644 index 0000000..a7d1b13 --- /dev/null +++ b/webroot/jsp/etymologyForm.jsf @@ -0,0 +1,114 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%-- <%@ taglib prefix="input" uri="http://jakarta.apache.org/taglibs/input-1.0" %> --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + + + + + + + + + + + + +Etymology Description:
    + +
    + +Etymology Type: + +
    +Loan Language: + +
    +Derivation: + + + + + +

    +
    diff --git a/webroot/jsp/footer.jsf b/webroot/jsp/footer.jsf new file mode 100644 index 0000000..a776a64 --- /dev/null +++ b/webroot/jsp/footer.jsf @@ -0,0 +1,28 @@ +<%@ page import="org.thdl.lex.LexLogger" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + +<%-- + + + + + + + + + --%> + + + + + + +<% LexLogger.debug( "Footer.jsf has finished rendering." ); %> diff --git a/webroot/jsp/functionForm.jsf b/webroot/jsp/functionForm.jsf new file mode 100644 index 0000000..a50a2dc --- /dev/null +++ b/webroot/jsp/functionForm.jsf @@ -0,0 +1,55 @@ +<%-- <%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp" %> --%> +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %><%@ page import="java.util.HashMap" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%-- <%@ taglib prefix="input" uri="http://jakarta.apache.org/taglibs/input-1.0" %> --%> + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + + + + + + +Grammatical Function: + + +
    + + + +

    +
    diff --git a/webroot/jsp/goodbye.jsp b/webroot/jsp/goodbye.jsp new file mode 100644 index 0000000..c596508 --- /dev/null +++ b/webroot/jsp/goodbye.jsp @@ -0,0 +1,10 @@ +<%@ page import="java.io.PrintWriter,java.io.StringWriter,org.thdl.lex.*,org.thdl.lex.component.*" isErrorPage="true" contentType="text/html; charset=UTF-8"%> + + + +

    Thank you

    +

    Click here to log back in.

    + + + + diff --git a/webroot/jsp/header.jsf b/webroot/jsp/header.jsf new file mode 100644 index 0000000..92b7328 --- /dev/null +++ b/webroot/jsp/header.jsf @@ -0,0 +1,84 @@ +<%@ page import="org.thdl.lex.*" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + + + + + +THDL Tibetan Collaborative Dictionaries + + + + + + +
    + + + +
    + +
    + +<%-- + --%> diff --git a/webroot/jsp/keywordForm.jsf b/webroot/jsp/keywordForm.jsf new file mode 100644 index 0000000..570af23 --- /dev/null +++ b/webroot/jsp/keywordForm.jsf @@ -0,0 +1,44 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + + + + + + +Keyword:
    + +
    + + + + +

    +
    diff --git a/webroot/jsp/menu.jsp b/webroot/jsp/menu.jsp new file mode 100644 index 0000000..264ce3b --- /dev/null +++ b/webroot/jsp/menu.jsp @@ -0,0 +1,121 @@ +<%@ 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" %> +<% request.setCharacterEncoding("UTF-8"); %> + + + + + + + + +
    + +
    +
    +

    Dictionary Quick Search

    +

    + + + Term:
    + Find: + + +

    + +

    + +

    +
    +
    + + + +
    +
    +

    Add a new term

    +

    + + + Term: +

    +

    + Note: if an exact match of this term already exists, this action will direct to the edit page for that term. +

    +

    +
    +

    +
    +
    + +
    +

    Defaults & Preferences

    +
    +

    + + +

    +
    + +
    +

    + +
    +

    +
    + +
    +

    + +
    +

    +
    +

    This dictionary requires the TibetanMachineWeb font to display Tibetan script.

    + +
    + +
    +
    + +
    + +

    THDL Tibetan Collaborative Dictionaries: Main Menu

    +

    + + Last Update: +

    + +

    + +

    +
    + +

    Recently Modified Terms

    + +
    + + + +

    + + + +     + +    + + Created by + + + +

    +
    +
    +
    + + + diff --git a/webroot/jsp/metaDefaultsForm.jsp b/webroot/jsp/metaDefaultsForm.jsp new file mode 100644 index 0000000..1abd5a6 --- /dev/null +++ b/webroot/jsp/metaDefaultsForm.jsp @@ -0,0 +1,257 @@ +<%@ 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" %> + + + + +

    Lex the Dictionary Server: Manage Input Session Form

    + +
    +

    +Message: + + + +

    +
    + +
    +
    + + + + + + + + +<%--
    +
    +
    +
    + --%> + +

    +In the metadata categories below, indicate the option you would like to appear by default. +Then check the "Use Default" box next to metadata fields you want to be entered automatically. +When this box is checked, the dropdown for that field will not appear +(this only applies to forms for new components, not edit forms). +

    + +

    + + + + + +Use Default Language:
    + +

    + +

    + + + + + +Use Default Script:
    + + +

    + +

    + + + + + +Use Default Dialect:
    + +

    + +

    + + + + + +Use Default Source:
    + +

    + +

    + + + + + +Use Default Project/Subject:
    + +

    + +

    + + + + + + +Use Default Metadata Note:
    +
    + + + + +

    + + +
    + + + diff --git a/webroot/jsp/metaForm.jsf b/webroot/jsp/metaForm.jsf new file mode 100644 index 0000000..5e613f1 --- /dev/null +++ b/webroot/jsp/metaForm.jsf @@ -0,0 +1,278 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="sess" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="str" uri="http://jakarta.apache.org/taglibs/string-1.0" %> + + + + + + + + + + + <%-- --%> + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + +<%-- + + --%> + +<%-- --%> + + + + +

    +Analysis:
    + +

    +
    + + + + + + +

    +Language: + +

    +
    + + + +
    + + + +

    +Script: + + +

    +
    + + + +
    + + + +<%-- --%> +

    +Dialect: + +

    +
    + + + +
    + + + +

    +Source: + +

    +
    + + + +
    + + + +

    +Project/Subject: + +

    +
    + + + +
    + + + + +

    + +Metadata Note:
    +
    +

    +
    + + + +
    + + diff --git a/webroot/jsp/metaPrefsForm.jsp b/webroot/jsp/metaPrefsForm.jsp new file mode 100644 index 0000000..38dbc23 --- /dev/null +++ b/webroot/jsp/metaPrefsForm.jsp @@ -0,0 +1,143 @@ +<%@ 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" %> + + + + +

    Lex the Dictionary Server: Manage Input Session Form

    + +
    +

    +Message: + + + +

    +
    + +
    +
    +

    +In the metadata categories below, please choose sets of options that you use frequently. +Use the ctrl-key (command-key on Mac) to select multiple options. +Your choices from this page will appear at the top of every dropdown menu +in the metadata section of every form in this application. +

    + +

    +Languages:
    + +

    +

    +Dialects:
    + +

    +

    +Sources:
    + +

    +

    + +Project/Subject:
    + +

    +

    +Scripts:
    + + +

    +

    + + +

    +
    + +
    + + + diff --git a/webroot/jsp/modelSentenceForm.jsf b/webroot/jsp/modelSentenceForm.jsf new file mode 100644 index 0000000..2328499 --- /dev/null +++ b/webroot/jsp/modelSentenceForm.jsf @@ -0,0 +1,61 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + + + <%-- --%> + + + + + + + + <%-- --%> + + + + + + + <%-- --%> + + + + + + + + + + +
    +

    + + + + + + + + + + + +Model Sentence:
    + +
    + +<%-- Precedence: --%>
    + + + + +

    +
    diff --git a/webroot/jsp/navLinks.jsf b/webroot/jsp/navLinks.jsf new file mode 100644 index 0000000..eb12fe5 --- /dev/null +++ b/webroot/jsp/navLinks.jsf @@ -0,0 +1,26 @@ +<%@ page %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + diff --git a/webroot/jsp/passageForm.jsf b/webroot/jsp/passageForm.jsf new file mode 100644 index 0000000..e906255 --- /dev/null +++ b/webroot/jsp/passageForm.jsf @@ -0,0 +1,74 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + +
    +

    + + + + + + + + + + +LiterarySource:
    + +Spelling:
    + + +Pagination:
    +
    + + +Passage:
    +
    + + + + +

    +
    diff --git a/webroot/jsp/pronunciationForm.jsf b/webroot/jsp/pronunciationForm.jsf new file mode 100644 index 0000000..1794e30 --- /dev/null +++ b/webroot/jsp/pronunciationForm.jsf @@ -0,0 +1,62 @@ +<%-- <%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp" %> --%> +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %><%@ page import="java.util.HashMap" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%-- <%@ taglib prefix="input" uri="http://jakarta.apache.org/taglibs/input-1.0" %> --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + + + + + + +Phonetic Rendering:
    + +
    +Type of Phonetics: + +
    + + + +

    +
    diff --git a/webroot/jsp/registerForm.jsf b/webroot/jsp/registerForm.jsf new file mode 100644 index 0000000..086a2c7 --- /dev/null +++ b/webroot/jsp/registerForm.jsf @@ -0,0 +1,54 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + + + <%-- --%> + + + + + + + + <%-- --%> + + + + + + + <%-- --%> + + + + +
    +

    + + + + + + +Register: + +
    + + + +

    +
    diff --git a/webroot/jsp/relatedTermForm.jsf b/webroot/jsp/relatedTermForm.jsf new file mode 100644 index 0000000..dc3ac63 --- /dev/null +++ b/webroot/jsp/relatedTermForm.jsf @@ -0,0 +1,63 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + + + + <%-- --%> + + + + + + + + + <%-- --%> + + + + + + + + + + + +
    +

    + + + + + + +Related Term:
    + +
    + + +Related Term Type: + +
    +<%-- Precedence: --%>
    + + + + +

    +
    diff --git a/webroot/jsp/search.jsp b/webroot/jsp/search.jsp new file mode 100644 index 0000000..0e40d30 --- /dev/null +++ b/webroot/jsp/search.jsp @@ -0,0 +1,53 @@ +<%@ 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" %> + + + + + + + +
    + +
    +
    +

    Find a term

    +

    + + + Term:
    + Find: + + +

    + +

    + +

    +
    +
    +
    + +
    + +

    THDL Tibetan Collaborative Dictionaries: Advanced Search

    +

    + Last Update: +

    +

    + This page is under Construction +

    + +

    + +

    +
    + +
    + + + diff --git a/webroot/jsp/spellingForm.jsf b/webroot/jsp/spellingForm.jsf new file mode 100644 index 0000000..c2a1c6a --- /dev/null +++ b/webroot/jsp/spellingForm.jsf @@ -0,0 +1,60 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> +<%-- <%@ page import="java.util.HashMap" %> --%> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + + + + + + +Spelling:
    + +
    + +Spelling Type: + +
    + + + +

    +
    diff --git a/webroot/jsp/subdefinitionForm.jsf b/webroot/jsp/subdefinitionForm.jsf new file mode 100644 index 0000000..dc31bef --- /dev/null +++ b/webroot/jsp/subdefinitionForm.jsf @@ -0,0 +1,60 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + + + + + + + + + + + +Subdefinition:
    + +
    + +<%-- Precedence:
    + --%> + + + +

    +
    diff --git a/webroot/jsp/termForm.jsf b/webroot/jsp/termForm.jsf new file mode 100644 index 0000000..352e83f --- /dev/null +++ b/webroot/jsp/termForm.jsf @@ -0,0 +1,47 @@ +<%@ page buffer="512kb" autoFlush="false" import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + + + + <%-- --%> + + + + + + + <%-- --%> + + + + + + <%-- --%> + + + +
    +

    + + + + + + +Term: + +
    + +<%-- --%> + + + + +

    +
    diff --git a/webroot/jsp/test.jsp b/webroot/jsp/test.jsp new file mode 100644 index 0000000..e236fbc --- /dev/null +++ b/webroot/jsp/test.jsp @@ -0,0 +1,39 @@ +<%@ 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" %> +<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %> +<% request.setCharacterEncoding("UTF-8"); %> + + + + + + + + +
    + +
    +

    + +
    +

    +
    + +
    + +
    + +

    THDL Tibetan Collaborative Dictionaries: Test Page

    +

    +
      + + +
    1. + +
      +
    + +
    + + + diff --git a/webroot/jsp/testing.jsf b/webroot/jsp/testing.jsf new file mode 100644 index 0000000..3aeecb9 --- /dev/null +++ b/webroot/jsp/testing.jsf @@ -0,0 +1,27 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %> + + +

    +You have reached the test page by specifying cmd=testing in your request.
    + + + + + +<%-- <% + TermTest component = (TermTest) request.getAttribute("termTest"); +%> + +Id: <%= component.getId() %>
    +Term: <%= component.getTerm() %>
    +Analytical Notes Hex: <%= component.getAnalyticalNotes().toString() %>
    + + +Id:
    +Term:
    +Analytical Notes Hex:
    --%> + +

    + diff --git a/webroot/jsp/transitionalDataForm.jsf b/webroot/jsp/transitionalDataForm.jsf new file mode 100644 index 0000000..ecc0298 --- /dev/null +++ b/webroot/jsp/transitionalDataForm.jsf @@ -0,0 +1,53 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> +<%-- <%@ taglib prefix="input" uri="http://jakarta.apache.org/taglibs/input-1.0" %> --%> + + + + + + + + + + + + + + + + + + + + + + +<%-- + + + --%> + +
    +

    + + + + + + + + + + + + + Text:
    + +
    + + + + +

    +
    diff --git a/webroot/jsp/translationEquivalentForm.jsf b/webroot/jsp/translationEquivalentForm.jsf new file mode 100644 index 0000000..6ad82ae --- /dev/null +++ b/webroot/jsp/translationEquivalentForm.jsf @@ -0,0 +1,47 @@ +<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> + + + + + + + + + <%-- --%> + + + + + + + + <%-- --%> + + + + + + + <%-- --%> + + + + +
    +

    + + + + + + +Translation Equivalent:
    + +
    + + + + +

    +
    diff --git a/work/loader/org/thdl/tib/text/tibwn.ini b/work/loader/org/thdl/tib/text/tibwn.ini new file mode 100644 index 0000000..c6d6efc --- /dev/null +++ b/work/loader/org/thdl/tib/text/tibwn.ini @@ -0,0 +1,1196 @@ +// This is not a Java source file, but fontification of -*- java -*- +// mode in Emacs looks good. +// +// tibwn.ini +// the code table for tony duff's TibetanMachineWeb +// +// format: +// - initial // marks a comment +// - blank lines should be ignored +// - marks a command +// +// If you change the Wylie here, it can break the ACIP->TMW and +// ACIP->Unicode conversion. So keep ACIPRules in sync with this, and be +// sure to run 'ant clean check' after your change. +// +// Note that some glyphs have EWTS \uF021-\uF0FF inclusive. These do +// not have anything in the Unicode column, though, because this is +// just the EWTS -- if someone wants to convert TMSkt3.183->Unicode +// and get \u0F21, let them do that, but our *->Unicode converters +// shouldn't output codes in the private-use area (PUA) without +// explicit user authorization. +// +// Note that 0F00, 0F02, 0F03, and 0F0E are made by using multiple +// glyphs from TMW. 0F6A is not listed here (DLC FIXME: should it be? +// Test that you can convert the Unicode ("" + U+0F6A) to TMW), but +// the glyph for it is the glyph for 0F62. +// +// The EWTS is not a unique key -- see "r", for example. +// +// DuffPaneTest ensures that the na-ro column truly contains na-ros, +// by the way. +// +// If EWTS changes, then ACIP->TMW and ACIP->Unicode will break -- +// modify ACIPRules and test test test. + + +//_~32,1~0,32 +// ~45,1~0,45~~~~~~~0FB0 +// DLC 0020 or a wider space, perhaps a couple of EM spaces (2003,2003)? Than couldn't say, but he also had thought of U+2003. +_~32,1~~1,32~~~~~~~0020 + ~45,1~~1,45~~~~~~~0F0B +/~202,1~~1,107~~~~~~~0F0D +// rinchen shad: +|~203,1~~1,103~~~~~~~0F11 +// sbrul shad: +!~204,1~~1,104~~~~~~~0F08 +// gter tsheg: +:~206,1~~1,105~~~~~~~0F14 +// shad + single tsheg: +;~40,5~~9,43~~~~~~~0F0F +// zla tse gcig: +@~210,1~~9,38~~~~~~~0F04 +// yig.mgo.phur.shad: +$~38,5~~9,41~~~~~~~0F06 +// half zla tse gcig: +#~200,1~~9,39~~~~~~~0F05 +// Yig.mgo.tsheg.shad: +%~39,5~~9,42~~~~~~~0F07 +// dbu.khang.g-yon: (If this changes, edit ACIPConverter) +(~208,1~~9,93~~~~~~~0F3C +// dbu.khang.g-yas: (If this changes, edit ACIPConverter) +)~209,1~~9,94~~~~~~~0F3D +H~239,1~~8,92~~~~~~~0F7F +// mtshan.rtags: +X~101,5~~9,101~~~~~~~0F37 +// mtshan.rtags zhes.sa: +__TILDE__X~102,5~~9,102~~~~~~~0F35 + +// 8,91 is the small bindu. We say that this, and not 8,90 (large +// anusvara) is the glyph that M yields. This is because [8,90] is +// poorly positioned and ends up at over the left edge of most glyphs +// rather than [8,91] which ends up right above the middle of most +// glyphs. We allow 8,91 to become 'M' when you convert TMW->Wylie, +// though, and we let it become U+0F7E when you convert TMW->Unicode. +// That is, we treat them as interchangeable except for in TMW->TM +// mappings, where [8,91] does not map to any TM glyph (though you +// could argue that it should become what [8,90] becomes -- DLC +// FIXME). +M~~~8,91~~~~~~~0F7E +__TILDE__M~241,1~~8,94~~~~~~~0F83 +// bindu + datse + thigle: U+0F82 +__TILDE__M`~242,1~~8,95~~~~~~~0F82 + + +// plutao: +&~177,4~~8,93~~~~~~~0F85 +// zla tse gnyis: +@#~201,1~~9,40~~~~~~~0F04,0F05 +// abbreviation sign: +=~207,1~~1,106~~~~~~~0F34 +// virama: +?~252,1~~8,105~~~~~~~0F84 +// rgya.gram.shad: +\u0F12~48,5~~9,51~~~~~~~0F12 +// shad + single ornament: +\u0F10~43,5~~9,47~~~~~~~0F10 +// gug.rtags.gyon: +<~95,5~~9,95~~~~~~~0F3A +// gug.rtags.gyas: +>~96,5~~9,96~~~~~~~0F3B +// mar.tshes.rtags: +{~134,5~~10,39~~~~~~~0F3F +// yar.tshes.rtags: +}~135,5~~10,40~~~~~~~0F3E +// dzud.rtags.me.long.can: +\u0F13~94,5~~9,92~~~~~~~0F13 +// hard tsheg: +*~205,1~~1,108~~~~~~~0F0C + + + +// +// NOTE WELL: If you decide to move a stack from to +// or vice versa, then you will change how the +// ACIP->Tibetan converters operate. See the user guide for those +// converters to learn why, but in short, consider {GNA} and {GNVA}. +// +k~33,1~1,92~1,33~1,109~1,111~1,123~1,125~10,118~10,120~0F40 +kh~34,1~~1,34~1,109~1,118~1,123~1,125~10,114~10,123~0F41 +g~35,1~1,93~1,35~1,109~1,111~1,123~1,125~10,118~10,120~0F42 +ng~36,1~~1,36~1,109~1,118~1,123~1,125~10,114~10,123~0F44 +c~37,1~~1,37~1,109~1,116~1,123~1,125~10,114~10,123~0F45 +ch~38,1~~1,38~1,109~1,117~1,123~1,125~10,114~10,123~0F46 +j~39,1~~1,39~1,109~1,118~1,123~1,125~10,114~10,123~0F47 +ny~40,1~1,94~1,40~1,109~1,112~1,123~1,125~10,115~10,121~0F49 +t~41,1~1,95~1,41~1,109~1,112~1,123~1,125~10,115~10,121~0F4F +th~42,1~~1,42~1,109~1,118~1,123~1,125~10,114~10,123~0F50 +d~43,1~1,96~1,43~1,109~1,111~1,123~1,125~10,118~10,120~0F51 +n~44,1~1,97~1,44~1,109~1,111~1,123~1,125~10,118~10,120~0F53 +p~253,1~~1,46~1,109~1,118~1,123~1,125~10,114~10,123~0F54 +ph~46,1~~1,47~1,109~1,118~1,123~1,125~10,114~10,123~0F55 +b~47,1~~1,48~1,109~1,118~1,123~1,125~10,114~10,123~0F56 +m~48,1~~1,49~1,109~1,118~1,123~1,125~10,114~10,123~0F58 +ts~49,1~~1,50~1,110~1,116~1,124~1,126~10,114~10,123~0F59 +tsh~50,1~~1,51~1,110~1,117~1,124~1,126~10,114~10,123~0F5A +dz~51,1~~1,52~1,110~1,118~1,124~1,126~10,114~10,123~0F5B +w~52,1~~1,53~1,109~1,119~1,123~1,125~10,118~10,124~0F5D +zh~53,1~1,98~1,54~1,109~1,111~1,123~1,125~10,118~10,120~0F5E +z~54,1~~1,55~1,109~1,118~1,123~1,125~10,114~10,123~0F5F +'~55,1~~1,56~1,109~1,118~1,123~1,125~10,114~10,123~0F60 +// /* /** unconfuse emacs fontification in java-mode... */ */ ' +y~56,1~~1,57~1,109~1,118~1,123~1,125~10,114~10,123~0F61 +r~57,1~~1,58~1,109~1,118~1,123~1,125~10,114~10,123~0F62 +l~58,1~~1,59~1,109~1,118~1,123~1,125~10,114~10,123~0F63 +sh~59,1~1,99~1,60~1,109~1,111~1,123~1,125~10,118~10,120~0F64 +s~60,1~~1,61~1,109~1,118~1,123~1,125~10,114~10,123~0F66 +h~61,1~1,100~1,62~1,109~1,112~1,123~1,125~10,115~10,122~0F67~1,102 +a~62,1~~1,63~1,109~1,118~1,123~1,125~10,114~10,123~0F68 +r-k~63,1~~1,70~1,109~1,121~1,123~1,125~10,115~10,124~f62,f90 +r-g~64,1~~1,71~1,109~1,121~1,123~1,125~10,115~10,124~f62,f92 +r-ng~65,1~~1,72~1,109~1,119~1,123~1,125~10,115~10,124~f62,f94 +r-j~66,1~~1,73~1,109~1,119~1,123~1,125~10,115~10,124~f62,f97 +r-ny~67,1~~1,74~1,109~1,113~1,123~1,125~10,116~10,125~f62,f99 +r-t~68,1~1,101~1,75~1,109~1,113~1,123~1,125~10,116~10,124~f62,f9f +r-d~69,1~~1,76~1,109~1,121~1,123~1,125~10,115~10,124~f62,fa1 +r-n~70,1~~1,77~1,109~1,121~1,123~1,125~10,115~10,124~f62,fa3 +r-b~71,1~~1,78~1,109~1,119~1,123~1,125~10,115~10,124~f62,fa6 +r-m~72,1~~1,79~1,109~1,119~1,123~1,125~10,115~10,124~f62,fa8 +r-ts~73,1~~1,80~1,109~1,119~1,123~1,125~10,115~10,124~f62,fa9 +r-dz~74,1~~1,81~1,109~1,119~1,123~1,125~10,115~10,124~f62,fab +l-k~75,1~~1,82~1,109~1,114~1,123~1,125~10,116~10,125~f63,f90 +l-g~76,1~~1,83~1,109~1,114~1,123~1,125~10,116~10,125~f63,f92 +l-ng~77,1~~1,84~1,109~1,122~1,123~1,125~10,116~10,125~f63,f94 +l-c~78,1~~1,85~1,109~1,122~1,123~1,125~10,116~10,125~f63,f95 +l-j~79,1~~1,86~1,109~1,122~1,123~1,125~10,116~10,125~f63,f97 +l-t~80,1~~1,87~1,109~1,115~1,123~1,125~10,116~10,125~f63,f9f +l-d~81,1~~1,88~1,109~1,114~1,123~1,125~10,116~10,125~f63,fa1 +l-p~82,1~~1,89~1,109~1,122~1,123~1,125~10,116~10,125~f63,fa4 +l-b~83,1~~1,90~1,109~1,122~1,123~1,125~10,116~10,125~f63,fa6 +l-h~84,1~~1,91~1,109~1,115~1,123~1,125~10,116~10,125~f63,fb7 +s-k~85,1~~2,33~1,109~2,113~1,123~1,125~10,116~10,125~f66,f90 +s-g~86,1~~2,34~1,109~2,113~1,123~1,125~10,116~10,125~f66,f92 +s-ng~87,1~~2,35~1,109~2,116~1,123~1,125~10,116~10,125~f66,f94 +s-ny~88,1~~2,36~1,109~2,114~1,123~1,125~10,116~10,125~f66,f99 +s-t~89,1~~2,37~1,109~2,114~1,123~1,125~10,116~10,125~f66,f9f +s-d~90,1~~2,38~1,109~2,113~1,123~1,125~10,116~10,125~f66,fa1 +s-n~91,1~~2,39~1,109~2,113~1,123~1,125~10,116~10,125~f66,fa3 +s-p~92,1~~2,40~1,109~2,116~1,123~1,125~10,116~10,125~f66,fa4 +s-b~93,1~~2,41~1,109~2,116~1,123~1,125~10,116~10,125~f66,fa6 +s-m~94,1~~2,42~1,109~2,116~1,123~1,125~10,116~10,125~f66,fa8 +s-ts~95,1~~2,43~1,109~2,116~1,123~1,125~10,116~10,125~f66,fa9 +k-w~138,1~~2,44~1,109~2,116~1,123~1,125~10,116~10,125~f40,fad +kh-w~139,1~~2,46~1,109~2,116~1,123~1,125~10,116~10,125~f41,fad +g-w~140,1~~2,47~1,109~2,116~1,123~1,125~10,116~10,125~f42,fad +c-w~141,1~~2,48~1,109~2,116~1,123~1,125~10,116~10,125~f45,fad +ny-w~157,1~~2,49~1,109~2,116~1,123~1,125~10,116~10,125~f49,fad +t-w~143,1~~2,50~1,109~2,116~1,123~1,125~10,116~10,125~f4f,fad +d-w~144,1~~2,51~1,109~2,116~1,123~1,125~10,116~10,125~f51,fad +ts-w~145,1~~2,52~1,110~2,116~1,124~1,126~10,116~10,125~f59,fad +tsh-w~146,1~~2,53~1,110~2,116~1,124~1,126~10,116~10,125~f5a,fad +zh-w~147,1~~2,54~1,109~2,116~1,123~1,125~10,116~10,125~f5e,fad +z-w~148,1~~2,55~1,109~2,116~1,123~1,125~10,116~10,125~f5f,fad +r-w~149,1~~2,56~1,109~2,116~1,123~1,125~10,115~10,125~f62,fad +sh-w~150,1~~2,57~1,109~2,116~1,123~1,125~10,116~10,125~f64,fad +s-w~151,1~~2,58~1,109~2,116~1,123~1,125~10,115~10,125~f66,fad +h-w~152,1~~2,59~1,109~2,116~1,123~1,125~10,116~10,125~f67,fad +k-y~96,1~~2,60~1,109~2,111~1,123~1,125~10,115~10,124~f40,fb1 +kh-y~97,1~~2,61~1,109~2,111~1,123~1,125~10,115~10,124~f41,fb1 +g-y~98,1~~2,62~1,109~2,111~1,123~1,125~10,115~10,124~f42,fb1 +p-y~99,1~~2,63~1,109~2,112~1,123~1,125~10,116~10,125~f54,fb1 +ph-y~100,1~~2,64~1,109~2,112~1,123~1,125~10,116~10,125~f55,fb1 +b-y~101,1~~2,65~1,109~2,112~1,123~1,125~10,116~10,125~f56,fb1 +m-y~102,1~~2,66~1,109~2,112~1,123~1,125~10,116~10,125~f58,fb1 +k-r~103,1~~2,67~1,109~2,115~1,123~1,125~10,115~10,124~f40,fb2 +kh-r~104,1~~2,68~1,109~2,115~1,123~1,125~10,115~10,124~f41,fb2 +g-r~105,1~~2,69~1,109~2,115~1,123~1,125~10,115~10,124~f42,fb2 +t-r~106,1~~2,70~1,109~2,115~1,123~1,125~10,115~10,124~f4f,fb2 +th-r~107,1~~2,71~1,109~2,115~1,123~1,125~10,115~10,124~f50,fb2 +d-r~108,1~~2,72~1,109~2,115~1,123~1,125~10,115~10,124~f51,fb2 +p-r~109,1~~2,73~1,109~2,115~1,123~1,125~10,115~10,124~f54,fb2 +ph-r~110,1~~2,74~1,109~2,115~1,123~1,125~10,115~10,124~f55,fb2 +b-r~111,1~~2,75~1,109~2,115~1,123~1,125~10,115~10,124~f56,fb2 +m-r~112,1~~2,76~1,109~2,115~1,123~1,125~10,115~10,124~f58,fb2 +sh-r~113,1~~2,77~1,109~2,115~1,123~1,125~10,115~10,124~f64,fb2 +s-r~114,1~~2,78~1,109~2,115~1,123~1,125~10,115~10,124~f66,fb2 +h-r~115,1~~2,79~1,109~2,115~1,123~1,125~10,115~10,124~f67,fb2 +k-l~116,1~~2,80~1,109~2,116~1,123~1,125~10,116~10,125~f40,fb3 +g-l~117,1~~2,81~1,109~2,116~1,123~1,125~10,116~10,125~f42,fb3 +b-l~118,1~~2,82~1,109~2,116~1,123~1,125~10,116~10,125~f56,fb3 +z-l~119,1~~2,83~1,109~2,116~1,123~1,125~10,116~10,125~f5f,fb3 +r-l~120,1~~2,84~1,109~2,116~1,123~1,125~10,116~10,125~f62,fb3 +s-l~121,1~~2,85~1,109~2,116~1,123~1,125~10,116~10,125~f66,fb3 +r-k-y~122,1~~2,86~1,109~2,118~1,123~1,125~10,116~10,125~f62,f90,fb1 +r-g-y~123,1~~2,87~1,109~2,118~1,123~1,125~10,116~10,125~f62,f92,fb1 +r-m-y~124,1~~2,88~1,109~2,118~1,123~1,125~10,116~10,125~f62,fa8,fb1 +r-g-w~125,1~~2,89~1,109~2,117~1,123~1,125~10,117~10,126~f62,f92,fad +r-ts-w~126,1~~2,90~1,109~2,117~1,123~1,125~10,117~10,126~f62,fa9,fad +s-k-y~254,1~~2,91~1,109~2,119~1,123~1,125~10,117~10,126~f66,f90,fb1 +s-g-y~128,1~~2,92~1,109~2,119~1,123~1,125~10,117~10,126~f66,f92,fb1 +s-p-y~129,1~~2,93~1,109~2,119~1,123~1,125~10,117~10,126~f66,fa4,fb1 +s-b-y~130,1~~2,94~1,109~2,119~1,123~1,125~10,117~10,126~f66,fa6,fb1 +s-m-y~131,1~~2,95~1,109~2,117~1,123~1,125~10,117~10,126~f66,fa8,fb1 +s-k-r~132,1~~2,96~1,109~2,117~1,123~1,125~10,117~10,126~f66,f90,fb2 +s-g-r~133,1~~2,97~1,109~2,117~1,123~1,125~10,117~10,126~f66,f92,fb2 +s-n-r~134,1~~2,98~1,109~2,117~1,123~1,125~10,117~10,126~f66,fa3,fb2 +s-p-r~135,1~~2,99~1,109~2,117~1,123~1,125~10,117~10,126~f66,fa4,fb2 +s-b-r~136,1~~2,100~1,109~2,117~1,123~1,125~10,117~10,126~f66,fa6,fb2 +s-m-r~137,1~~2,101~1,109~2,117~1,123~1,125~10,117~10,126~f66,fa8,fb2 +g-r-w~153,1~~2,102~1,109~2,116~1,123~1,125~10,115~10,124~f42,fb2,fad +d-r-w~154,1~~2,103~1,109~2,116~1,123~1,125~10,116~10,125~f51,fb2,fad +ph-y-w~155,1~~2,104~1,109~2,117~1,123~1,125~10,117~10,126~f55,fb1,fad + + +-i~222,1~~8,87~~~~~~~0F80~~8,98 +ai~234,1~~8,88~~~~~~~0F7B~~8,101 +au~237,1~~8,89~~~~~~~0F7D~~8,104 + + + +// DLC NOW: who uses 10,99, 10,103, or 10,104? R+, +R, r+, +r, what??? If they can be on top, the Unicode is wrong too! Make TM/TMW->Unicode,EWTS,ACIP barf on these. +W~228,5~~10,99~1,109~~1,123~1,125~~~0FBA +Y~232,5~~10,103~1,109~~1,123~1,125~~~0FBB +R~233,5~~10,104~1,109~~1,123~1,125~~~0FBC + +// 0F5F,0F39 might work, but the OpenType font's author must've had +// the TMSkt4.146 glyph in mind if it does. Note that the bottommost +// horizontal stroke goes upward on U+0F5F and downward on U+0F5B. +\uF031~146,5~~10,42~~~~~~~none +f~153,5~~10,58~1,110~1,118~1,124~1,126~10,114~10,123~0F55,0F39 +v~154,5~~10,59~1,110~1,118~1,124~1,126~10,114~10,123~0F56,f39 +T~170,1~~1,64~1,109~1,120~1,123~1,125~10,115~10,124~0F4A +Th~171,1~~1,65~1,109~1,118~1,123~1,125~10,114~10,123~0F4B +D~172,1~~1,66~1,109~1,120~1,123~1,125~10,115~10,124~0F4C +N~173,1~~1,67~1,109~1,118~1,123~1,125~10,115~10,124~0F4E +Sh~174,1~~1,68~1,109~1,118~1,123~1,125~10,115~10,124~0F65 +k+Sh~175,1~~1,69~1,109~1,122~1,123~1,125~10,116~10,125~0F69 +k+k~33,2~~3,33~1,109~4,120~1,123~1,125~4,106~4,113~f40,f90 +k+kh~34,2~~3,34~1,109~4,120~1,123~1,125~4,106~4,113~f40,f91 +k+ng~35,2~~3,35~1,109~4,120~1,123~1,125~4,106~4,113~f40,f94 +k+ts~36,2~~3,36~1,109~4,120~1,123~1,125~4,106~4,113~f40,fa9 +k+t~37,2~~3,37~1,109~4,120~1,123~1,125~4,106~4,113~f40,f9f +k+t+y~38,2~~3,38~1,109~4,121~1,123~1,125~4,107~4,114~f40,f9f,fb1 +k+t+r~39,2~~3,39~1,109~4,121~1,123~1,125~4,107~4,114~f40,f9f,fb2 +k+t+r+y~40,2~~3,40~1,109~4,123~1,123~1,125~4,109~4,116~f40,f9f,fb2,fb1 +k+t+w~41,2~~3,41~1,109~4,121~1,123~1,125~4,107~4,114~f40,f9f,fad +k+th~42,2~~3,42~1,109~4,120~1,123~1,125~4,106~4,113~f40,fa0 +k+th+y~43,2~~3,43~1,109~4,122~1,123~1,125~4,108~4,115~f40,fa0,fb1 +k+N~44,2~~3,44~1,109~4,120~1,123~1,125~4,106~4,113~f40,f9e +k+n~252,2~~3,46~1,109~4,120~1,123~1,125~4,106~4,113~f40,fa3 +k+n+y~46,2~~3,47~1,109~4,122~1,123~1,125~4,108~4,115~f40,fa3,fb1 +k+ph~47,2~~3,48~1,109~4,120~1,123~1,125~4,106~4,113~f40,fa5 +k+m~48,2~~3,49~1,109~4,120~1,123~1,125~4,106~4,113~f40,fa8 +k+m+y~49,2~~3,50~1,109~4,122~1,123~1,125~4,108~4,115~f40,fa8,fb1 +k+r+y~50,2~~3,51~1,109~4,120~1,123~1,125~4,106~4,113~f40,fb2,fb1 +k+w+y~192,4~~3,52~1,109~8,121~1,123~1,125~8,107~8,114~f40,fad,fb1 +k+sh~51,2~~3,53~1,109~4,120~1,123~1,125~4,106~4,113~f40,fb4 +k+s~52,2~~3,54~1,109~4,120~1,123~1,125~4,106~4,113~f40,fb6 +k+s+n~53,2~~3,55~1,109~4,124~1,123~1,125~4,110~4,117~f40,fb6,fa3 +k+s+m~54,2~~3,56~1,109~4,123~1,123~1,125~4,109~4,116~f40,fb6,fa8 +k+s+y~55,2~~3,57~1,109~4,122~1,123~1,125~4,108~4,115~f40,fb6,fb1 +k+s+w~56,2~~3,58~1,109~4,122~1,123~1,125~4,108~4,115~f40,fb6,fad +kh+kh~59,2~~3,61~1,109~4,120~1,123~1,125~4,106~4,113~f41,f91 +kh+n~60,2~~3,62~1,109~4,120~1,123~1,125~4,106~4,113~f41,fa3 +kh+l~61,2~~3,63~1,109~4,120~1,123~1,125~4,106~4,113~f41,fb3 +g+g~62,2~~3,64~1,109~4,120~1,123~1,125~4,106~4,113~f42,f92 +g+g+h~63,2~~3,65~1,109~4,124~1,123~1,125~4,110~4,117~f42,f92,fb7 +g+ny~64,2~~3,66~1,109~4,120~1,123~1,125~4,106~4,113~f42,f99 +g+d~65,2~~3,67~1,109~4,120~1,123~1,125~4,106~4,113~f42,fa1 +g+d+h~66,2~~3,68~1,109~4,123~1,123~1,125~4,109~4,116~f42,fa1,fb7 +g+d+h+y~67,2~~3,69~1,109~4,125~1,123~1,125~4,111~4,118~f42,fa1,fb7,fb1 +g+d+h+w~68,2~~3,70~1,109~4,125~1,123~1,125~4,111~4,118~f42,fa1,fb7,fad +g+n~69,2~~3,71~1,109~4,120~1,123~1,125~4,106~4,113~f42,fa3 +g+n+y~70,2~~3,72~1,109~4,122~1,123~1,125~4,108~4,115~f42,fa3,fb1 +g+p~71,2~~3,73~1,109~4,120~1,123~1,125~4,106~4,113~f42,fa4 +g+b+h~72,2~~3,74~1,109~4,124~1,123~1,125~4,110~4,117~f42,fa6,fb7 +g+b+h+y~73,2~~3,75~1,109~4,125~1,123~1,125~4,111~4,118~f42,fa6,fb7,fb1 +g+m~74,2~~3,76~1,109~4,120~1,123~1,125~4,106~4,113~f42,fa8 +g+m+y~75,2~~3,77~1,109~4,122~1,123~1,125~4,108~4,115~f42,fa8,fb1 +g+r+y~76,2~~3,78~1,109~4,120~1,123~1,125~4,106~4,113~f42,fb2,fb1 +g+h~77,2~~3,79~1,109~4,120~1,123~1,125~4,106~4,113~0F43 +g+h+g+h~78,2~~3,80~1,109~4,126~1,123~1,125~4,112~4,119~f43,f92,fb7 +g+h+ny~79,2~~3,81~1,109~4,124~1,123~1,125~4,110~4,117~f43,f99 +g+h+n~80,2~~3,82~1,109~4,124~1,123~1,125~4,110~4,117~f43,fa3 +g+h+n+y~81,2~~3,83~1,109~4,125~1,123~1,125~4,111~4,118~f43,fa3,fb1 +g+h+m~82,2~~3,84~1,109~4,124~1,123~1,125~4,110~4,117~f43,fa8 +g+h+l~83,2~~3,85~1,109~4,124~1,123~1,125~4,110~4,117~f43,fb3 +g+h+y~84,2~~3,86~1,109~4,121~1,123~1,125~4,107~4,114~f43,fb1 +g+h+r~85,2~~3,87~1,109~4,121~1,123~1,125~4,107~4,114~f43,fb2 +g+h+w~86,2~~3,88~1,109~4,121~1,123~1,125~4,107~4,114~f43,fad +ng+k~87,2~~3,89~1,109~4,120~1,123~1,125~4,106~4,113~f44,f90 +ng+k+t~88,2~~3,90~1,109~4,124~1,123~1,125~4,110~4,117~f44,f90,f9f +ng+k+t+y~89,2~~3,91~1,109~4,125~1,123~1,125~4,111~4,118~f44,f90,f9f,fb1 +ng+k+y~90,2~~3,92~1,109~4,122~1,123~1,125~4,108~4,115~f44,f90,fb1 +ng+kh~91,2~~3,93~1,109~4,120~1,123~1,125~4,106~4,113~f44,f91 +ng+kh+y~92,2~~3,94~1,109~4,122~1,123~1,125~4,108~4,115~f44,f91,fb1 +ng+g~93,2~~3,95~1,109~4,120~1,123~1,125~4,106~4,113~f44,f92 +ng+g+r~94,2~~3,96~1,109~4,121~1,123~1,125~4,107~4,114~f44,f92,fb2 +ng+g+y~95,2~~3,97~1,109~4,122~1,123~1,125~4,108~4,115~f44,f92,fb1 +ng+g+h~96,2~~3,98~1,109~4,124~1,123~1,125~4,110~4,117~f44,f92,fb7 +ng+g+h+y~97,2~~3,99~1,109~4,125~1,123~1,125~4,111~4,118~f44,f92,fb7,fb1 +ng+g+h+r~98,2~~3,100~1,109~4,125~1,123~1,125~4,111~4,118~f44,f92,fb7,fb2 +ng+ng~99,2~~3,101~1,109~4,120~1,123~1,125~4,106~4,113~f44,f94 +ng+t~100,2~~3,102~1,109~4,120~1,123~1,125~4,106~4,113~f44,f9f +ng+n~101,2~~3,103~1,109~4,120~1,123~1,125~4,106~4,113~f44,fa3 +ng+m~102,2~~3,104~1,109~4,120~1,123~1,125~4,106~4,113~f44,fa8 +ng+y~103,2~~3,105~1,109~4,120~1,123~1,125~4,106~4,113~f44,fb1 +ng+l~104,2~~3,106~1,109~4,120~1,123~1,125~4,106~4,113~f44,fb3 +ng+sh~105,2~~3,107~1,109~4,120~1,123~1,125~4,106~4,113~f44,fb4 +ng+h~106,2~~3,108~1,109~4,120~1,123~1,125~4,106~4,113~f44,fb7 +ng+k+Sh~107,2~~3,109~1,109~4,123~1,123~1,125~4,109~4,116~f44,f90,fb5 +ng+k+Sh+w~108,2~~3,110~1,109~4,124~1,123~1,125~4,110~4,117~f44,f90,fb5,fad +ng+k+Sh+y~109,2~~3,111~1,109~4,125~1,123~1,125~4,111~4,118~f44,f90,fb5,fb1 +ts+ts~110,2~~3,112~1,110~4,120~1,124~1,126~4,106~4,113~f59,fa9 +ts+tsh~111,2~~3,113~1,110~4,120~1,124~1,126~4,106~4,113~f59,faa +ts+tsh+w~112,2~~3,114~1,110~4,122~1,124~1,126~4,108~4,115~f59,faa,fad +ts+tsh+r~113,2~~3,115~1,110~4,122~1,124~1,126~4,108~4,115~f59,faa,fb2 +ts+ny~114,2~~3,116~1,110~4,120~1,124~1,126~4,106~4,113~f59,f99 +ts+n+y~115,2~~3,117~1,110~4,122~1,124~1,126~4,108~4,115~f59,fa3,fb1 +ts+m~116,2~~3,118~1,110~4,120~1,124~1,126~4,106~4,113~f59,fa8 +ts+y~117,2~~3,119~1,110~4,120~1,124~1,126~4,106~4,113~f59,fb1 +ts+r~118,2~~3,120~1,110~4,120~1,124~1,126~4,106~4,113~f59,fb2 +ts+l~119,2~~3,121~1,110~4,120~1,124~1,126~4,106~4,113~f59,fb3 +ts+h+y~120,2~~3,122~1,110~4,122~1,124~1,126~4,108~4,115~f59,fb7,fb1 +tsh+th~121,2~~3,123~1,110~4,120~1,124~1,126~4,106~4,113~f5a,fa0 +tsh+tsh~122,2~~3,124~1,110~4,120~1,124~1,126~4,106~4,113~f5a,faa +tsh+y~123,2~~3,125~1,110~4,120~1,124~1,126~4,106~4,113~f5a,fb1 +tsh+r~124,2~~3,126~1,110~4,120~1,124~1,126~4,106~4,113~f5a,fb2 +tsh+l~125,2~~4,33~1,110~4,120~1,124~1,126~4,106~4,113~f5a,fb3 +dz+dz~126,2~~4,34~1,110~4,120~1,124~1,126~4,106~4,113~f5b,fab +dz+dz+ny~253,2~~4,35~1,110~4,124~1,124~1,126~4,110~4,117~f5b,fab,f99 +dz+dz+w~128,2~~4,36~1,110~4,123~1,124~1,126~4,109~4,116~f5b,fab,fad +dz+dz+h~129,2~~4,37~1,110~4,124~1,124~1,126~4,110~4,117~f5b,fab,fb7 +dz+h+dz+h~130,2~~4,38~1,110~4,126~1,124~1,126~4,112~4,119~f5b,fb7,fab,fb7 +dz+ny~131,2~~4,39~1,110~4,120~1,124~1,126~4,106~4,113~f5b,f99 +dz+ny+y~132,2~~4,40~1,110~4,122~1,124~1,126~4,108~4,115~f5b,f99,fb1 +dz+n~133,2~~4,41~1,110~4,120~1,124~1,126~4,106~4,113~f5b,fa3 +dz+n+w~134,2~~4,42~1,110~4,122~1,124~1,126~4,108~4,115~f5b,fa3,fad +dz+m~135,2~~4,43~1,110~4,120~1,124~1,126~4,106~4,113~f5b,fa8 +dz+y~136,2~~4,44~1,110~4,120~1,124~1,126~4,106~4,113~f5b,fb1 +dz+r~137,2~~4,46~1,110~4,120~1,123~1,126~4,106~4,113~f5b,fb2 +dz+w~138,2~~4,47~1,110~4,120~1,123~1,126~4,106~4,113~f5b,fad +dz+h~139,2~~4,48~1,110~4,120~1,123~1,126~4,106~4,113~0F5C +dz+h+y~140,2~~4,49~1,110~4,121~1,123~1,126~4,107~4,114~f5c,fb1 +dz+h+r~141,2~~4,50~1,110~4,121~1,123~1,126~4,107~4,114~f5c,fb2 +dz+h+l~249,2~~4,51~1,110~4,123~1,123~1,126~4,110~4,117~f5c,fb3 +dz+h+w~143,2~~4,52~1,110~4,122~1,123~1,126~4,108~4,115~f5c,fad +ny+ts~144,2~~4,53~1,109~4,120~1,123~1,125~4,106~4,113~f49,fa9 +ny+ts+m~145,2~~4,54~1,109~4,124~1,123~1,125~4,110~4,117~f49,fa9,fa8 +ny+ts+y~146,2~~4,55~1,109~4,122~1,123~1,125~4,108~4,115~f49,fa9,fb1 +ny+tsh~147,2~~4,56~1,109~4,120~1,123~1,125~4,106~4,113~f49,faa +ny+dz~148,2~~4,57~1,109~4,120~1,123~1,125~4,106~4,113~f49,fab +ny+dz+y~149,2~~4,58~1,109~4,123~1,123~1,125~4,109~4,116~f49,fab,fb1 +ny+dz+h~150,2~~4,59~1,109~4,124~1,123~1,125~4,110~4,117~f49,fab,fb7 +ny+ny~151,2~~4,60~1,109~4,120~1,123~1,125~4,106~4,113~f49,f99 +ny+p~152,2~~4,61~1,109~4,120~1,123~1,125~4,106~4,113~f49,fa4 +ny+ph~153,2~~4,62~1,109~4,120~1,123~1,125~4,106~4,113~f49,fa5 +ny+y~154,2~~4,63~1,109~4,120~1,123~1,125~4,106~4,113~f49,fb1 +ny+r~155,2~~4,64~1,109~4,120~1,123~1,125~4,106~4,113~f49,fb2 +ny+l~156,2~~4,65~1,109~4,120~1,123~1,125~4,106~4,113~f49,fb3 +ny+sh~157,2~~4,66~1,109~4,120~1,123~1,125~4,106~4,113~f49,fb4 +T+k~250,2~~4,67~1,109~4,120~1,123~1,125~4,106~4,113~f4a,f90 +T+T~159,2~~4,68~1,109~4,120~1,123~1,125~4,106~4,113~f4a,f9a +T+T+h~254,2~~4,69~1,109~4,124~1,123~1,125~4,110~4,117~f4a,f9a,fb7 +T+n~188,4~~4,70~1,109~8,120~1,123~1,125~8,106~8,113~f4a,fa3 +T+p~161,2~~4,71~1,109~4,120~1,123~1,125~4,106~4,113~f4a,fa4 +T+m~162,2~~4,72~1,109~4,120~1,123~1,125~4,106~4,113~f4a,fa8 +T+y~163,2~~4,73~1,109~4,120~1,123~1,125~4,106~4,113~f4a,fb1 +T+w~164,2~~4,74~1,109~4,121~1,123~1,125~4,107~4,114~f4a,fad +T+s~165,2~~4,75~1,109~4,120~1,123~1,125~4,106~4,113~f4a,fb6 +Th+y~251,2~~4,76~1,109~4,120~1,123~1,125~4,106~4,113~f4b,fb1 +Th+r~167,2~~4,77~1,109~4,120~1,123~1,125~4,106~4,113~f4b,fb2 +D+g~168,2~~4,78~1,109~4,120~1,123~1,125~4,106~4,113~f4c,f92 +D+g+y~169,2~~4,79~1,109~4,122~1,123~1,125~4,108~4,115~f4c,f92,fb1 +D+g+h~170,2~~4,80~1,109~4,124~1,123~1,125~4,110~4,117~f4c,f92,fb7 +D+g+h+r~171,2~~4,81~1,109~4,125~1,123~1,125~4,111~4,118~f4c,f92,fb7,fb2 +D+D~172,2~~4,82~1,109~4,120~1,123~1,125~4,106~4,113~f4c,f9c +D+D+h~173,2~~4,83~1,109~4,123~1,123~1,125~4,109~4,116~f4c,f9c,fb7 +D+D+h+y~174,2~~4,84~1,109~4,125~1,123~1,125~4,111~4,118~f4c,f9c,fb7,fb1 +D+n~175,2~~4,85~1,109~4,120~1,123~1,125~4,106~4,113~f4c,fa3 +D+m~176,2~~4,86~1,109~4,120~1,123~1,125~4,106~4,113~f4c,fa8 +D+y~177,2~~4,87~1,109~4,120~1,123~1,125~4,106~4,113~f4c,fb1 +D+r~178,2~~4,88~1,109~4,120~1,123~1,125~4,106~4,113~f4c,fb2 +D+w~179,2~~4,89~1,109~4,120~1,123~1,125~4,106~4,113~f4c,fad +D+h~180,2~~4,90~1,109~4,120~1,123~1,125~4,106~4,113~0F4D +D+h+D+h~181,2~~4,91~1,109~4,126~1,123~1,125~4,112~4,119~f4d,f9d +D+h+m~182,2~~4,92~1,109~4,124~1,123~1,125~4,110~4,117~f4d,fa8 +D+h+y~183,2~~4,93~1,109~4,121~1,123~1,125~4,107~4,114~f4d,fb1 +D+h+r~184,2~~4,94~1,109~4,121~1,123~1,125~4,107~4,114~f4d,fb2 +D+h+w~185,2~~4,95~1,109~4,121~1,123~1,125~4,107~4,114~f4d,fad +N+T~186,2~~4,96~1,109~4,120~1,123~1,125~4,106~4,113~f4e,f9a +N+Th~187,2~~4,97~1,109~4,120~1,123~1,125~4,106~4,113~f4e,f9b +N+D~188,2~~4,98~1,109~4,120~1,123~1,125~4,106~4,113~f4e,f9c +N+D+Y~189,2~~4,99~1,109~4,123~1,123~1,125~4,109~4,116~f4e,f9c,fbb +N+D+r~193,4~~4,100~1,109~8,121~1,123~1,125~8,107~8,114~f4e,f9c,fb2 +N+D+R+y~190,2~~4,101~1,109~4,125~1,123~1,125~4,111~4,118~f4e,f9c,fbc,fb1 +N+D+h~191,2~~4,102~1,109~4,123~1,123~1,125~4,109~4,116~f4e,f9c,fb7 +N+N~192,2~~4,103~1,109~4,120~1,123~1,125~4,106~4,113~f4e,f9e +N+d+r~193,2~~4,104~1,109~4,122~1,123~1,125~4,108~4,115~f4e,fa1,fb2 +N+m~194,2~~4,105~1,109~4,120~1,123~1,125~4,106~4,113~f4e,fa8 +N+y~195,2~~5,33~1,109~4,120~1,123~1,125~4,106~4,113~f4e,fb1 +N+w~196,2~~5,34~1,109~4,120~1,123~1,125~4,106~4,113~f4e,fad +t+k~197,2~~5,35~1,109~4,120~1,123~1,125~4,106~4,113~f4f,f90 +t+k+r~198,2~~5,36~1,109~4,121~1,123~1,125~4,107~4,114~f4f,f90,fb2 +t+k+w~33,3~~5,37~1,109~6,122~1,123~1,125~6,108~6,115~f4f,f90,fad +t+k+s~199,2~~5,38~1,109~4,123~1,123~1,125~4,109~4,116~f4f,f90,fb6 +t+g~189,4~~5,39~1,109~8,120~1,123~1,125~8,106~8,113~f4f,f92 +t+ny~34,3~~5,40~1,109~6,120~1,123~1,125~6,106~6,113~f4f,f99 +t+Th~35,3~~5,41~1,109~6,120~1,123~1,125~6,106~6,113~f4f,f9b +t+t~36,3~~5,42~1,109~6,120~1,123~1,125~6,106~6,113~f4f,f9f +t+t+y~37,3~~5,43~1,109~6,122~1,123~1,125~6,108~6,115~f4f,f9f,fb1 +t+t+r~38,3~~5,44~1,109~6,121~1,123~1,125~6,107~6,114~f4f,f9f,fb2 +t+t+w~39,3~~5,46~1,109~6,121~1,123~1,125~6,107~6,114~f4f,f9f,fad +t+th~40,3~~5,47~1,109~6,120~1,123~1,125~6,106~6,113~f4f,fa0 +t+th+y~41,3~~5,48~1,109~6,122~1,123~1,125~6,108~6,115~f4f,fa0,fb1 +t+n~42,3~~5,49~1,109~6,120~1,123~1,125~6,106~6,113~f4f,fa3 +t+n+y~43,3~~5,50~1,109~6,122~1,123~1,125~6,108~6,115~f4f,fa3,fb1 +t+p~44,3~~5,51~1,109~6,120~1,123~1,125~6,106~6,113~f4f,fa4 +t+p+r~252,3~~5,52~1,109~6,122~1,123~1,125~6,108~6,115~f4f,fa4,fb2 +t+ph~46,3~~5,53~1,109~6,120~1,123~1,125~6,106~6,113~f4f,fa5 +t+m~47,3~~5,54~1,109~6,120~1,123~1,125~6,106~6,113~f4f,fa8 +t+m+y~48,3~~5,55~1,109~6,122~1,123~1,125~6,108~6,115~f4f,fa8,fb1 +t+y~49,3~~5,56~1,109~6,120~1,123~1,125~6,106~6,113~f4f,fb1 +t+r+n~50,3~~5,57~1,110~6,121~1,123~1,125~6,107~6,114~f4f,fb2,fa3 +t+s~51,3~~5,58~1,110~6,120~1,123~1,125~6,106~6,113~f4f,fb6 +t+s+th~52,3~~5,59~1,110~6,124~1,123~1,125~6,110~6,117~f4f,fb6,fa0 +t+s+n~53,3~~5,60~1,109~6,124~1,123~1,125~6,110~6,117~f4f,fb6,fa3 +t+s+n+y~54,3~~5,61~1,109~6,125~1,123~1,125~6,111~6,118~f4f,fb6,fa3,fb1 +t+s+m~55,3~~5,62~1,109~6,124~1,123~1,125~6,110~6,117~f4f,fb6,fa8 +t+s+m+y~56,3~~5,63~1,109~6,125~1,123~1,125~6,111~6,118~f4f,fb6,fa8,fb1 +t+s+y~57,3~~5,64~1,109~6,122~1,123~1,125~6,108~6,115~f4f,fb6,fb1 +t+s+r~58,3~~5,65~1,109~6,122~1,123~1,125~6,108~6,115~f4f,fb6,fb2 +t+s+w~59,3~~5,66~1,109~6,122~1,123~1,125~6,108~6,115~f4f,fb6,fad +t+r+y~60,3~~5,67~1,109~6,121~1,123~1,125~6,107~6,114~f4f,fb2,fb1 +t+w+y~61,3~~5,68~1,109~6,122~1,123~1,125~6,108~6,115~f4f,fad,fb1 +t+k+Sh~62,3~~5,69~1,109~6,123~1,123~1,125~6,109~6,116~f4f,fb9 +th+y~63,3~~5,70~1,109~6,120~1,123~1,125~6,106~6,113~f50,fb1 +th+w~64,3~~5,71~1,109~6,120~1,123~1,125~6,106~6,113~f50,fad +d+g~65,3~~5,72~1,109~6,120~1,123~1,125~6,106~6,113~f51,f92 +d+g+y~66,3~~5,73~1,109~6,122~1,123~1,125~6,108~6,115~f51,f92,fb1 +d+g+r~67,3~~5,74~1,109~6,122~1,123~1,125~6,108~6,115~f51,f92,fb2 +d+g+h~68,3~~5,75~1,109~6,124~1,123~1,125~6,110~6,117~f51,f92,fb7 +d+g+h+r~69,3~~5,76~1,109~6,125~1,123~1,125~6,111~6,118~f51,f92,fb7,fb2 +d+dz~70,3~~5,77~1,109~6,120~1,123~1,125~6,106~6,113~f51,fab +d+d~71,3~~5,78~1,109~6,120~1,123~1,125~6,106~6,113~f51,fa1 +d+d+y~72,3~~5,79~1,109~6,122~1,123~1,125~6,108~6,115~f51,fa1,fb1 +d+d+r~73,3~~5,80~1,109~6,122~1,123~1,125~6,108~6,115~f51,fa1,fb2 +d+d+w~74,3~~5,81~1,109~6,122~1,123~1,125~6,108~6,115~f51,fa1,fad +d+d+h~75,3~~5,82~1,109~6,123~1,123~1,125~6,109~6,116~f51,fa1,fb7 +d+d+h+n~76,3~~5,83~1,109~6,126~1,123~1,125~6,112~6,119~f51,fa1,fb7,fa3 +d+d+h+y~77,3~~5,84~1,109~6,125~1,123~1,125~6,111~6,118~f51,fa1,fb7,fb1 +d+d+h+r~78,3~~5,85~1,109~6,125~1,123~1,125~6,111~6,118~f51,fa1,fb7,fb2 +d+d+h+w~79,3~~5,86~1,109~6,125~1,123~1,125~6,111~6,118~f51,fa1,fb7,fad +d+n~80,3~~5,87~1,109~6,120~1,123~1,125~6,106~6,113~f51,fa3 +d+b~81,3~~5,88~1,109~6,120~1,123~1,125~6,106~6,113~f51,fa6 +d+b+r~82,3~~5,89~1,109~6,121~1,123~1,125~6,107~6,114~f51,fa6,fb2 +d+b+h~83,3~~5,90~1,109~6,124~1,123~1,125~6,110~6,117~f51,fa6,fb7 +d+b+h+y~84,3~~5,91~1,109~6,125~1,123~1,125~6,111~6,118~f51,fa6,fb7,fb1 +d+b+h+r~85,3~~5,92~1,109~6,125~1,123~1,125~6,111~6,118~f51,fa6,fb7,fb2 +d+m~86,3~~5,93~1,109~6,120~1,123~1,125~6,106~6,113~f51,fa8 +d+y~87,3~~5,94~1,109~6,120~1,123~1,125~6,106~6,113~f51,fb1 +d+r+y~88,3~~5,95~1,109~6,121~1,123~1,125~6,107~6,114~f51,fb2,fb1 +d+w+y~89,3~~5,96~1,109~6,122~1,123~1,125~6,108~6,115~f51,fad,fb1 +d+h~90,3~~5,97~1,109~6,120~1,123~1,125~6,106~6,113~0F52 +d+h+n~91,3~~5,98~1,109~6,124~1,123~1,125~6,110~6,117~f52,fa3 +d+h+n+y~92,3~~5,99~1,109~6,125~1,123~1,125~6,111~6,118~f52,fa3,fb1 +d+h+m~93,3~~5,100~1,109~6,124~1,123~1,125~6,110~6,117~f52,fa8 +d+h+y~94,3~~5,101~1,109~6,122~1,123~1,125~6,108~6,115~f52,fb1 +d+h+r~95,3~~5,102~1,109~6,121~1,123~1,125~6,107~6,114~f52,fb2 +d+h+r+y~96,3~~5,103~1,109~6,123~1,123~1,125~6,109~6,116~f52,fb2,fb1 +d+h+w~97,3~~5,104~1,109~6,121~1,123~1,125~6,107~6,114~f52,fad +n+k~98,3~~5,105~1,109~6,120~1,123~1,125~6,106~6,113~f53,f90 +n+k+t~99,3~~5,106~1,109~6,124~1,123~1,125~6,110~6,117~f53,f90,f9f +n+g+h~101,3~~5,107~1,109~6,124~1,123~1,125~6,110~6,117~f53,f92,fb7 +n+ng~102,3~~5,108~1,109~6,120~1,123~1,125~6,106~6,113~f53,f94 +n+dz~103,3~~5,109~1,109~6,120~1,123~1,125~6,106~6,113~f53,fab +n+dz+y~104,3~~5,110~1,109~6,123~1,123~1,125~6,109~6,116~f53,fab,fb1 +n+D~105,3~~5,111~1,109~6,120~1,123~1,125~6,106~6,113~f53,f9c +n+t~106,3~~5,112~1,109~6,120~1,123~1,125~6,106~6,113~f53,f9f +n+t+y~107,3~~5,113~1,109~6,122~1,123~1,125~6,108~6,115~f53,f9f,fb1 +n+t+r~108,3~~5,114~1,109~6,121~1,123~1,125~6,107~6,114~f53,f9f,fb2 +n+t+r+y~109,3~~5,115~1,109~6,123~1,123~1,125~6,109~6,116~f53,f9f,fb2,fb1 +n+t+w~110,3~~5,116~1,109~6,121~1,123~1,125~6,107~6,114~f53,f9f,fad +n+t+s~111,3~~5,117~1,109~6,123~1,123~1,125~6,109~6,116~f53,f9f,fb6 +n+th~112,3~~5,118~1,109~6,120~1,123~1,125~6,106~6,113~f53,fa0 +n+d~113,3~~5,119~1,109~6,120~1,123~1,125~6,106~6,113~f53,fa1 +n+d+d~114,3~~5,120~1,109~6,124~1,123~1,125~6,110~6,117~f53,fa1,fa1 +n+d+d+r~115,3~~5,121~1,109~6,125~1,123~1,125~6,111~6,118~f53,fa1,fa1,fb2 +n+d+y~116,3~~5,122~1,109~6,122~1,123~1,125~6,108~6,115~f53,fa1,fb1 +n+d+r~117,3~~5,123~1,109~6,122~1,123~1,125~6,108~6,115~f53,fa1,fb2 +n+d+h~118,3~~5,124~1,109~6,124~1,123~1,125~6,110~6,117~f53,fa1,fb7 +n+d+h+r~119,3~~5,125~1,109~6,125~1,123~1,125~6,111~6,118~f53,fa1,fb7,fb2 +n+d+h+y~120,3~~5,126~1,109~6,125~1,123~1,125~6,111~6,118~f53,fa1,fb7,fb1 +n+n~121,3~~6,33~1,109~6,120~1,123~1,125~6,106~6,113~f53,fa3 +n+n+y~123,3~~6,34~1,109~6,122~1,123~1,125~6,108~6,115~f53,fa3,f61 +n+p~124,3~~6,35~1,109~6,120~1,123~1,125~6,106~6,113~f53,fa4 +n+p+r~125,3~~6,36~1,109~6,121~1,123~1,125~6,107~6,114~f53,fa4,fb2 +n+ph~126,3~~6,37~1,109~6,120~1,123~1,125~6,106~6,113~f53,fa5 +n+m~253,3~~6,39~1,109~6,120~1,123~1,125~6,106~6,113~f53,fa8 +n+b+h+y~128,3~~6,38~1,109~6,125~1,123~1,125~6,111~6,118~f53,fa6,fb7,fb1 +n+ts~129,3~~6,40~1,109~6,120~1,123~1,125~6,106~6,113~f53,fa9 +n+y~130,3~~6,41~1,109~6,120~1,123~1,125~6,106~6,113~f53,fb1 +n+r~131,3~~6,42~1,109~6,120~1,123~1,125~6,106~6,113~f53,fb2 +n+w~132,3~~6,43~1,109~6,120~1,123~1,125~6,106~6,113~f53,fad +n+w+y~133,3~~6,44~1,109~6,121~1,123~1,125~6,107~6,114~f53,fad,fb1 +n+s~134,3~~6,46~1,109~6,120~1,123~1,125~6,106~6,113~f53,fb6 +n+s+y~135,3~~6,47~1,109~6,122~1,123~1,125~6,108~6,115~f53,fb6,fb1 +n+h~136,3~~6,48~1,109~6,120~1,123~1,125~6,106~6,113~f53,fb7 +n+h+r~137,3~~6,49~1,109~6,121~1,123~1,125~6,107~6,114~f53,fb7,fb2 +p+t~138,3~~6,50~1,109~6,120~1,123~1,125~6,106~6,113~f54,f9f +p+t+y~139,3~~6,51~1,109~6,122~1,123~1,125~6,108~6,115~f54,f9f,fb1 +p+t+r+y~140,3~~6,52~1,109~6,123~1,123~1,125~6,109~6,116~f54,f9f,fb2,fb1 +p+d~190,4~~6,53~1,109~8,120~1,123~1,125~8,106~8,113~f54,fa1 +p+n~141,3~~6,54~1,109~6,120~1,123~1,125~6,106~6,113~f54,fa3 +p+n+y~249,3~~6,55~1,109~6,122~1,123~1,125~6,108~6,115~f54,fa3,fb1 +p+p~143,3~~6,56~1,109~6,120~1,123~1,125~6,106~6,113~f54,fa4 +p+m~144,3~~6,57~1,109~6,120~1,123~1,125~6,106~6,113~f54,fa8 +p+l~145,3~~6,58~1,109~6,120~1,123~1,125~6,106~6,113~f54,fb3 +p+w~146,3~~6,59~1,109~6,120~1,123~1,125~6,106~6,113~f54,fad +p+s~147,3~~6,60~1,109~6,120~1,123~1,125~6,106~6,113~f54,fb6 +p+s+n+y~148,3~~6,61~1,109~6,125~1,123~1,125~6,111~6,118~f54,fb6,fa3,fb1 +p+s+w~149,3~~6,62~1,109~6,122~1,123~1,125~6,108~6,115~f54,fb6,fad +p+s+y~150,3~~6,63~1,109~6,122~1,123~1,125~6,108~6,115~f54,fb6,fb1 +b+g+h~151,3~~6,64~1,109~6,124~1,123~1,125~6,110~6,117~f56,f92,fb7 +b+dz~152,3~~6,65~1,109~6,120~1,123~1,125~6,106~6,113~f56,fab +b+d~153,3~~6,66~1,109~6,120~1,123~1,125~6,106~6,113~f56,fa1 +b+d+dz~154,3~~6,67~1,109~6,124~1,123~1,125~6,110~6,117~f56,fa1,fab +b+d+h~155,3~~6,68~1,109~6,124~1,123~1,125~6,110~6,117~f56,fa1,fb7 +b+d+h+w~156,3~~6,69~1,109~6,125~1,123~1,125~6,111~6,118~f56,fa1,fb7,fad +b+t~157,3~~6,70~1,109~6,120~1,123~1,125~6,106~6,113~f56,f9f +b+n~250,3~~6,71~1,109~6,120~1,123~1,125~6,106~6,113~f56,fa3 +b+b~159,3~~6,72~1,109~6,120~1,123~1,125~6,106~6,113~f56,fa6 +b+b+h~254,3~~6,73~1,109~6,124~1,123~1,125~6,110~6,117~f56,fa6,fb7 +b+b+h+y~161,3~~6,74~1,109~6,125~1,123~1,125~6,111~6,118~f56,fa6,fb7,fb1 +b+m~162,3~~6,75~1,109~6,120~1,123~1,125~6,106~6,113~f56,fa8 +b+h~163,3~~6,76~1,109~6,120~1,123~1,125~6,106~6,113~0F57 +b+h+N~164,3~~6,77~1,109~6,124~1,123~1,125~6,110~6,117~f57,f9e +b+h+n~165,3~~6,78~1,109~6,124~1,123~1,125~6,110~6,117~f57,fa3 +b+h+m~251,3~~6,79~1,109~6,124~1,123~1,125~6,110~6,117~f57,fa8 +b+h+y~167,3~~6,80~1,109~6,122~1,123~1,125~6,108~6,115~f57,fb1 +b+h+r~168,3~~6,81~1,109~6,121~1,123~1,125~6,107~6,114~f57,fb2 +b+h+w~169,3~~6,82~1,109~6,122~1,123~1,125~6,108~6,115~f57,fad +m+ny~170,3~~6,83~1,109~6,121~1,123~1,125~6,107~6,114~f58,f99 +m+N~171,3~~6,84~1,109~6,120~1,123~1,125~6,106~6,113~f58,f9e +m+n~172,3~~6,85~1,109~6,120~1,123~1,125~6,106~6,113~f58,fa3 +m+n+y~173,3~~6,86~1,109~6,122~1,123~1,125~6,108~6,115~f58,fa3,fb1 +m+p~174,3~~6,87~1,109~6,120~1,123~1,125~6,106~6,113~f58,fa4 +m+p+r~175,3~~6,88~1,109~6,122~1,123~1,125~6,108~6,115~f58,fa4,fb2 +m+ph~176,3~~6,89~1,109~6,120~1,123~1,125~6,106~6,113~f58,fa5 +m+b~177,3~~6,90~1,109~6,120~1,123~1,125~6,106~6,113~f58,fa6 +m+b+h~178,3~~6,91~1,109~6,124~1,123~1,125~6,110~6,117~f58,fa6,fb7 +m+b+h+y~179,3~~6,92~1,109~6,125~1,123~1,125~6,111~6,118~f58,fa6,fb7,fb1 +m+m~180,3~~6,93~1,109~6,120~1,123~1,125~6,106~6,113~f58,fa8 +m+l~181,3~~6,94~1,109~6,120~1,123~1,125~6,106~6,113~f58,fb3 +m+w~182,3~~6,95~1,109~6,120~1,123~1,125~6,106~6,113~f58,fad +m+s~183,3~~6,96~1,109~6,120~1,123~1,125~6,106~6,113~f58,fb6 +m+h~184,3~~6,97~1,109~6,120~1,123~1,125~6,106~6,113~f58,fb7 +y+Y~185,3~~6,98~1,109~6,120~1,123~1,125~6,106~6,113~f61,fbb +y+r~186,3~~6,99~1,109~6,120~1,123~1,125~6,106~6,113~f61,fb2 +y+w~187,3~~6,100~1,109~6,120~1,123~1,125~6,106~6,113~f61,fad +y+s~188,3~~6,101~1,109~6,120~1,123~1,125~6,106~6,113~f61,fb6 +r+kh~189,3~~6,102~1,109~6,120~1,123~1,125~6,106~6,113~f62,f91 +r+g+h~190,3~~6,103~1,109~6,121~1,123~1,125~6,107~6,114~f62,f92,fb7 +r+g+h+y~191,3~~6,104~1,109~6,123~1,123~1,125~6,109~6,116~f62,f92,fb7,fb1 +r+ts+y~192,3~~6,105~1,109~6,121~1,123~1,125~6,107~6,114~f62,fa9,fb1 +r+tsh~193,3~~7,33~1,109~6,120~1,123~1,125~6,106~6,113~f62,faa +r+dz+ny~194,3~~7,34~1,109~6,122~1,123~1,125~6,108~6,115~f62,fab,f99 +r+dz+y~195,3~~7,35~1,109~6,121~1,123~1,125~6,107~6,114~f62,fab,fb1 +r+T~196,3~~7,36~1,109~6,120~1,123~1,125~6,106~6,113~f62,f9a +r+Th~197,3~~7,37~1,109~6,120~1,123~1,125~6,106~6,113~f62,f9b +r+D~198,3~~7,38~1,109~6,120~1,123~1,125~6,106~6,113~f62,f9c +r+N~199,3~~7,39~1,109~6,120~1,123~1,125~6,106~6,113~f62,f9e +r+t+w~33,4~~7,40~1,109~8,121~1,123~1,125~8,107~8,114~f62,f9f,fad +r+t+t~34,4~~7,41~1,109~8,122~1,123~1,125~8,108~8,115~f62,f9f,f9f +r+t+s~35,4~~7,42~1,109~8,121~1,123~1,125~8,107~8,114~f62,f9f,fb6 +r+t+s+n~36,4~~7,43~1,109~8,125~1,123~1,125~8,111~8,118~f62,f9f,fb6,fa3 +r+t+s+n+y~37,4~~7,44~1,109~8,126~1,123~1,125~8,112~8,119~f62,f9f,fb6,fa3,fb1 +r+th~38,4~~7,46~1,109~8,120~1,123~1,125~8,106~8,113~f62,fa0 +r+th+y~39,4~~7,47~1,109~8,121~1,123~1,125~8,107~8,114~f62,fa0,fb1 +r+d+d+h~40,4~~7,48~1,109~8,125~1,123~1,125~8,111~8,118~f62,fa1,fa2 +r+d+d+h+y~41,4~~7,49~1,109~8,126~1,123~1,125~8,112~8,119~f62,fa1,fa2,fb1 +r+d+y~42,4~~7,50~1,109~8,121~1,123~1,125~8,107~8,114~f62,fa1,fb1 +r+d+h~43,4~~7,51~1,109~8,122~1,123~1,125~8,108~8,115~f62,fa1,fb7 +r+d+h+m~44,4~~7,52~1,109~8,125~1,123~1,125~8,111~8,118~f62,fa1,fb7,fa8 +r+d+h+y~252,4~~7,53~1,109~8,123~1,123~1,125~8,109~8,116~f62,fa2,fb1 +r+d+h+r~46,4~~7,54~1,109~8,122~1,123~1,125~8,108~8,115~f62,fa2,fb2 +r+p~47,4~~7,55~1,109~8,120~1,123~1,125~8,106~8,113~f62,fa4 +r+b+p~48,4~~7,56~1,109~8,121~1,123~1,125~8,107~8,114~f62,fa6,fa4 +r+b+b~49,4~~7,57~1,109~8,121~1,123~1,125~8,107~8,114~f62,fa6,fa6 +r+b+h~50,4~~7,58~1,110~8,124~1,123~1,125~8,110~8,117~f62,fa6,fb7 +r+m+m~51,4~~7,59~1,110~8,121~1,123~1,125~8,107~8,114~f62,fa8,fa8 + +// Should we use U+0F62 or U+0F6A for "R+..."? That is the question. +// The Unicode 4.0 standard says the following on page 254: +// +// 'Some instances of "ra" in the head position require that the +// consonant be represented as a full-formed "ra" that never +// changes. This is not standard usage for the Tibetan language +// itself, but occurs in transliteration and transcription. Only in +// these cases should the character U+0F6A ... be used instead of +// U+0F62.... Note that the fixed-form "ra" should be used only in +// combinations where "ra" would normally transform into a short form +// but the user specifically wants to prevent that change.' +// +// Because "R+..." occurs only in non-standard stacks, i.e. stacks +// used for transliteration and transcription, we use U+0F6A. +// +// Note that TPairList.java's unicodeExceptionsMap must be updated if +// we change who uses U+0F6A. +R+Y~52,4~~7,60~1,110~8,120~1,123~1,125~8,106~8,113~f6a,fbb +// R+W is mentioned in ACIPRules.java: +R+W~196,4~~7,61~1,109~8,120~1,123~1,125~8,106~8,113~f6a,fba +R+sh~53,4~~7,62~1,109~8,120~1,123~1,125~8,106~8,113~f6a,fb4 +R+sh+y~54,4~~7,63~1,109~8,122~1,123~1,125~8,108~8,115~f6a,fb4,fb1 +R+Sh~55,4~~7,64~1,109~8,120~1,123~1,125~8,106~8,113~f6a,fb5 +R+Sh+N~56,4~~7,65~1,109~8,123~1,123~1,125~8,109~8,116~f6a,fb5,f9e +R+Sh+N+y~57,4~~7,66~1,109~8,126~1,123~1,125~8,112~8,119~f6a,fb5,f9e,fb1 +R+Sh+m~58,4~~7,67~1,109~8,124~1,123~1,125~8,110~8,117~f6a,fb5,fa8 +R+Sh+y~59,4~~7,68~1,109~8,123~1,123~1,125~8,109~8,116~f6a,fb5,fb1 +R+s~60,4~~7,69~1,109~8,120~1,123~1,125~8,106~8,113~f6a,fb6 +r+h~61,4~~7,70~1,109~8,121~1,123~1,125~8,107~8,114~f62,fb7 +r+k+Sh~62,4~~7,71~1,109~8,121~1,123~1,125~8,107~8,114~f62,f90,fb5 +l+g+w~63,4~~7,72~1,109~8,122~1,123~1,125~8,108~8,115~f63,f92,fad +l+b+y~64,4~~7,73~1,109~8,122~1,123~1,125~8,108~8,115~f63,fa6,fb1 +l+m~65,4~~7,74~1,109~8,120~1,123~1,125~8,106~8,113~f63,fa8 +l+y~66,4~~7,75~1,109~8,120~1,123~1,125~8,106~8,113~f63,fb1 +l+w~67,4~~7,76~1,109~8,120~1,123~1,125~8,106~8,113~f63,fad +l+l~68,4~~7,77~1,109~8,120~1,123~1,125~8,106~8,113~f63,fb3 +l+h+w~197,4~~7,78~1,109~8,121~1,123~1,125~8,106~8,113~f63,fb7,fad +w+y~69,4~~7,79~1,109~8,121~1,123~1,125~8,107~8,114~f5d,fb1 +w+r~70,4~~7,80~1,109~8,121~1,123~1,125~8,107~8,114~f5d,fb2 +w+n~195,4~~7,81~1,109~8,120~1,123~1,125~8,106~8,113~f5d,fa3 +// w+W is mentioned in ACIPRules.java: +w+W~194,4~~7,82~1,109~8,120~1,123~1,125~8,106~8,113~f5d,fba +sh+ts~71,4~~7,83~1,109~8,120~1,123~1,125~8,106~8,113~f64,fa9 +sh+ts+y~72,4~~7,84~1,109~8,122~1,123~1,125~8,108~8,115~f64,fa9,fb1 +sh+tsh~73,4~~7,85~1,109~8,120~1,123~1,125~8,106~8,113~f64,faa +sh+N~74,4~~7,86~1,109~8,120~1,123~1,125~8,106~8,113~f64,f9e +sh+n~75,4~~7,87~1,109~8,120~1,123~1,125~8,106~8,113~f64,fa3 +sh+p~76,4~~7,88~1,109~8,120~1,123~1,125~8,106~8,113~f64,fa4 +sh+b+y~77,4~~7,89~1,109~8,122~1,123~1,125~8,108~8,115~f64,fa6,fb1 +sh+m~78,4~~7,90~1,109~8,120~1,123~1,125~8,106~8,113~f64,fa8 +sh+y~79,4~~7,91~1,109~8,120~1,123~1,125~8,106~8,113~f64,fb1 +sh+r+y~80,4~~7,92~1,109~8,121~1,123~1,125~8,107~8,114~f64,fb2,fb1 +sh+l~81,4~~7,93~1,109~8,120~1,123~1,125~8,106~8,113~f64,fb3 +sh+w+g~82,4~~7,94~1,109~8,122~1,123~1,125~8,108~8,115~f64,fad,f92 +sh+w+y~83,4~~7,95~1,109~8,121~1,123~1,125~8,107~8,114~f64,fad,fb1 +sh+sh~84,4~~7,96~1,109~8,120~1,123~1,125~8,106~8,113~f64,fb4 +Sh+k~85,4~~7,97~1,109~8,120~1,123~1,125~8,106~8,113~f65,f90 +Sh+k+r~86,4~~7,98~1,109~8,121~1,123~1,125~8,107~8,114~f65,f90,fb2 +Sh+T~87,4~~7,99~1,109~8,120~1,123~1,125~8,106~8,113~f65,f9a +Sh+T+y~88,4~~7,100~1,109~8,123~1,123~1,125~8,109~8,116~f65,f9a,fb1 +Sh+T+r~89,4~~7,101~1,109~8,121~1,123~1,125~8,107~8,114~f65,f9a,fb2 +Sh+T+r+y~90,4~~7,102~1,109~8,123~1,123~1,125~8,109~8,116~f65,f9a,fb2,fb1 +Sh+T+w~91,4~~7,103~1,109~8,123~1,123~1,125~8,109~8,116~f65,f9a,fad +Sh+Th~92,4~~7,104~1,109~8,120~1,123~1,125~8,106~8,113~f65,f9b +Sh+Th+y~93,4~~7,105~1,109~8,123~1,123~1,125~8,109~8,116~f65,f9b,fb1 +Sh+N~94,4~~7,106~1,109~8,120~1,123~1,125~8,106~8,113~f65,f9e +Sh+N+y~95,4~~7,107~1,109~8,123~1,123~1,125~8,109~8,116~f65,f9e,fb1 +Sh+D~96,4~~7,108~1,109~8,120~1,123~1,125~8,106~8,113~f65,f9c +Sh+th~191,4~~7,109~1,109~8,120~1,123~1,125~8,106~8,113~f65,fa0 +Sh+p~97,4~~7,110~1,109~8,120~1,123~1,125~8,106~8,113~f65,fa4 +Sh+p+r~98,4~~7,111~1,109~8,121~1,123~1,125~8,107~8,114~f65,fa4,fb2 +Sh+m~99,4~~7,112~1,109~8,120~1,123~1,125~8,106~8,113~f65,fa8 +Sh+y~100,4~~7,113~1,109~8,121~1,123~1,125~8,107~8,114~f65,fb1 +Sh+w~101,4~~7,114~1,109~8,120~1,123~1,125~8,106~8,113~f65,fad +Sh+Sh~102,4~~7,115~1,109~8,120~1,123~1,125~8,106~8,113~f65,fb5 +s+k+s~103,4~~7,116~1,109~8,124~1,123~1,125~8,110~8,117~f66,f90,fb6 +s+kh~104,4~~7,117~1,109~8,120~1,123~1,125~8,106~8,113~f66,f91 +s+ts+y~105,4~~7,118~1,109~8,122~1,123~1,125~8,108~8,115~f66,fa9,fb1 +s+T~106,4~~7,119~1,109~8,120~1,123~1,125~8,106~8,113~f66,f9a +s+Th~107,4~~7,120~1,109~8,120~1,123~1,125~8,106~8,113~f66,f9b +s+t+y~108,4~~7,121~1,109~8,121~1,123~1,125~8,107~8,114~f66,f9f,fb1 +s+t+r~109,4~~7,122~1,109~8,121~1,123~1,125~8,107~8,114~f66,f9f,fb2 +s+t+w~110,4~~7,123~1,109~8,121~1,123~1,125~8,107~8,114~f66,f9f,fad +s+th~111,4~~7,124~1,109~8,120~1,123~1,125~8,106~8,113~f66,fa0 +s+th+y~112,4~~7,125~1,109~8,122~1,123~1,125~8,108~8,115~f66,fa0,fb1 +s+n+y~113,4~~7,126~1,109~8,122~1,123~1,125~8,108~8,115~f66,fa3,fb1 +s+n+w~114,4~~8,33~1,109~8,122~1,123~1,125~8,108~8,115~f66,fa3,fad +s+ph~115,4~~8,34~1,109~8,120~1,123~1,125~8,106~8,113~f66,fa5 +s+ph+y~116,4~~8,35~1,109~8,122~1,123~1,125~8,108~8,115~f66,fa5,fb1 +s+y~117,4~~8,36~1,109~8,120~1,123~1,125~8,106~8,113~f66,fb1 +s+r+w~118,4~~8,37~1,109~8,122~1,123~1,125~8,108~8,115~f66,fb2,fad +s+s~119,4~~8,38~1,109~8,120~1,123~1,125~8,106~8,113~f66,fb6 +s+s+w~120,4~~8,39~1,109~8,122~1,123~1,125~8,108~8,115~f66,fb6,fad +s+h~121,4~~8,40~1,109~8,120~1,123~1,125~8,106~8,113~f66,fb7 +s+w+y~122,4~~8,41~1,109~8,122~1,123~1,125~8,108~8,115~f66,fad,fb1 +h+ny~123,4~~8,42~1,109~8,120~1,123~1,125~8,106~8,113~f67,f99 +h+N~124,4~~8,43~1,109~8,120~1,123~1,125~8,106~8,113~f67,f9e +h+t~125,4~~8,44~1,109~8,120~1,123~1,125~8,106~8,113~f67,f9f +h+n~126,4~~8,46~1,109~8,120~1,123~1,125~8,106~8,113~f67,fa3 +h+n+y~253,4~~8,47~1,109~8,122~1,123~1,125~8,108~8,115~f67,fa3,fb1 +h+p~128,4~~8,48~1,109~8,120~1,123~1,125~8,106~8,113~f67,fa4 +h+ph~129,4~~8,49~1,109~8,120~1,123~1,125~8,106~8,113~f67,fa5 +h+m~130,4~~8,50~1,109~8,120~1,123~1,125~8,106~8,113~f67,fa8 +h+y~131,4~~8,51~1,109~8,120~1,123~1,125~8,106~8,113~f67,fb1 +h+l~132,4~~8,52~1,109~8,120~1,123~1,125~8,106~8,113~f67,fb3 +h+s~133,4~~8,53~1,109~8,120~1,123~1,125~8,106~8,113~f67,fb6 +h+s+w~134,4~~8,54~1,109~8,122~1,123~1,125~8,108~8,115~f67,fb6,fad +h+w+y~135,4~~8,55~1,109~8,121~1,123~1,125~8,107~8,114~f67,fad,fb1 +k+Sh+N~136,4~~8,56~1,109~8,124~1,123~1,125~8,110~8,117~f40,fb5,f9e +k+Sh+m~137,4~~8,57~1,109~8,124~1,123~1,125~8,110~8,117~f40,fb5,fa8 +k+Sh+m+y~138,4~~8,58~1,109~8,126~1,123~1,125~8,112~8,119~f40,fb5,fa8,fb1 +k+Sh+y~139,4~~8,59~1,109~8,123~1,123~1,125~8,109~8,116~f40,fb5,fb1 +k+Sh+R~140,4~~8,60~1,109~8,123~1,123~1,125~8,109~8,116~f40,fb5,fbc +k+Sh+l~141,4~~8,61~1,109~8,124~1,123~1,125~8,110~8,117~f40,fb5,fb3 +k+Sh+w~249,4~~8,62~1,109~8,122~1,123~1,125~8,108~8,115~f40,fb5,fad +a+y~143,4~~8,63~1,109~8,120~1,123~1,125~8,106~8,113~f68,fb1 +a+r~144,4~~8,64~1,109~8,120~1,123~1,125~8,106~8,113~f68,fb2 +a+r+y~145,4~~8,65~1,109~8,121~1,123~1,125~8,107~8,114~f68,fb2,fb1 + + + +//numbers +0~190,1~~10,48~~~~~~~0F20 +1~191,1~~10,49~~~~~~~0F21 +2~192,1~~10,50~~~~~~~0F22 +3~193,1~~10,51~~~~~~~0F23 +4~194,1~~10,52~~~~~~~0F24 +5~195,1~~10,53~~~~~~~0F25 +6~196,1~~10,54~~~~~~~0F26 +7~197,1~~10,55~~~~~~~0F27 +8~198,1~~10,56~~~~~~~0F28 +9~199,1~~10,57~~~~~~~0F29 + +// The following are not numbers, but to Jskad they're very much like +// numbers. They aren't standard Tibetan stacks; they aren't Sanskrit +// stacks; they aren't , either. + +\u0F33~70,5~~9,73~~~~~~~0F33 +\u0F2A~71,5~~9,74~~~~~~~0F2A +\u0F2B~72,5~~9,75~~~~~~~0F2B +\u0F2C~73,5~~9,76~~~~~~~0F2C +\u0F2D~74,5~~9,77~~~~~~~0F2D +\u0F2E~75,5~~9,78~~~~~~~0F2E +\u0F2F~76,5~~9,79~~~~~~~0F2F +\u0F30~77,5~~9,80~~~~~~~0F30 +\u0F31~78,5~~9,81~~~~~~~0F31 +\u0F32~79,5~~9,82~~~~~~~0F32 + +// cantillation sign,heavy beat: +\u0FC0~80,5~~9,83~~~~~~~0FC0 +// cantillation sign,light beat: +\u0FC1~81,5~~9,84~~~~~~~0FC1 +// cantillation sign,cang.te-u: +\u0FC2~82,5~~9,85~~~~~~~0FC2 +// cantillation sign sbub.chal: +\u0FC3~83,5~~9,86~~~~~~~0FC3 +// zhi.rol.btags: +\uF03B~84,5~~9,87~~~~~~~none + +// sher.bu: +\uF039~90,5~~9,88~~~~~~~none +// kuruka: +\uF035~92,5~~9,90~~~~~~~none + +// mchan rtags trailing: +\uF038~99,5~~9,99~~~~~~~none +// mchan rtags leading: +\uF037~100,5~~9,100~~~~~~~none + +// che.mgo: +\u0F38~103,5~~9,103~~~~~~~0F38 +// kuruka: +\u0FBE~104,5~~9,104~~~~~~~0FBE +// Kuruka.mig.lda: +\u0FBF~105,5~~9,105~~~~~~~0FBF +// ornament: +\u0F36~106,5~~9,106~~~~~~~0F36 +// yang.rtags: +\u0F87~107,5~~9,107~~~~~~~0F87 +// lci.rtags: +\u0F86~108,5~~9,108~~~~~~~0F86 +// mchu.can: +\u0F89~109,5~~9,109~~~~~~~0F89 +// gru.can.rgyings: +\u0F8A~110,5~~9,110~~~~~~~0F8A +// gru.med.gyings: +\u0F8B~111,5~~9,111~~~~~~~0F8B + +// single white pebble: +\u0F1A~115,5~~9,115~~~~~~~0F1A +// single black pebble: +\u0F1D~116,5~~9,116~~~~~~~0F1D +// double white pebble: +\u0F1B~117,5~~9,117~~~~~~~0F1B +// double black pebble: +\u0F1E~118,5~~9,118~~~~~~~0F1E +// white and black pebble: +\u0F1F~119,5~~9,119~~~~~~~0F1F +// triple white pebble: +\u0F1C~120,5~~9,120~~~~~~~0F1C +// triple black pebble: +\u0FCF~121,5~~9,121~~~~~~~0FCF + +\uF03C~122,5~~9,122~~~~~~~none +\uF03D~123,5~~9,123~~~~~~~none +\uF03E~124,5~~9,124~~~~~~~none +\uF03F~125,5~~9,125~~~~~~~none +\uF040~126,5~~9,126~~~~~~~none +\uF041~128,5~~10,33~~~~~~~none + +// logo sign chad.rtags: +\u0F15~129,5~~10,34~~~~~~~0F15 +// logo sign lhag.rtags: +\u0F16~130,5~~10,35~~~~~~~0F16 +// sgra.gcan.char.rtags: +\u0F17~131,5~~10,36~~~~~~~0F17 +// khyud.pa: +\u0F18~132,5~~10,37~~~~~~~0F18 +// sdong.tshugs: +\u0F19~133,5~~10,38~~~~~~~0F19 + +// tza.'phru: +^~174,4~~8,67~~~~~~~0F39 +// reversed tza.'phru: (non-reversed is in Unicode, but not this) +\uF034~145,5~~8,68~~~~~~~none +// damaru.rtags: +\u0F88~178,4~~8,72~~~~~~~0F88 +// half a.chen: +\u0F01~179,4~~8,73~~~~~~~0F01 + +// Terton's mark: +\uF023~181,4~~8,75~~~~~~~none +// Terton's mark: +\uF022~182,4~~8,76~~~~~~~none +// Terton's mark: +\uF021~183,4~~8,77~~~~~~~none +// Note that this is close to 0f11: +// Terton's mark: +\uF027~149,5~~8,78~~~~~~~none +// Terma mark: +\uF02D~184,4~~8,79~~~~~~~none +// Terma mark: +\uF02E~185,4~~8,80~~~~~~~none +// Terma mark: +\uF02F~186,4~~8,81~~~~~~~none +// Mark: +\uF030~187,4~~8,82~~~~~~~none + +// dril.bu: +\u0FC4~190,5~~10,62~~~~~~~0FC4 +// rdo.rje: +\u0FC5~191,5~~10,63~~~~~~~0FC5 +// padma.gdan: +\u0FC6~192,5~~10,64~~~~~~~0FC6 +// rdo.rje.rgya.gram: +\u0FC7~193,5~~10,65~~~~~~~0FC7 +// phur.ba: +\u0FC8~194,5~~10,66~~~~~~~0FC8 +// nor.bu: +\u0FC9~195,5~~10,67~~~~~~~0FC9 +// nor.bu.gnyis.khyil: +\u0FCA~196,5~~10,68~~~~~~~0FCA +// nor.bu.gsum.khyil: +\u0FCB~197,5~~10,69~~~~~~~0FCB +// nor.bu.bzhi.khyil: +\u0FCC~198,5~~10,70~~~~~~~0FCC + +// zhu.yig.mgo.rgyan: +\u0F0A~33,5~~9,33~~~~~~~0F0A +// bka'.shog.mgo.rgyan: +\uF024~34,5~~9,34~~~~~~~none +// mnyam.yig.mgo.rgyan: +\uF025~35,5~~9,35~~~~~~~none +// mnyam.yig.mgo.rgyan: +\u0F09~36,5~~9,36~~~~~~~0F09 +// nameless sign: +\uF026~37,5~~9,37~~~~~~~none + +// shad (hooked) + single tsheg: +\uF02B~41,5~~9,44~~~~~~~none +// shad + double tsheg: +\uF02C~42,5~~9,46~~~~~~~none +// sbrul.shad + single ornament: +\uF028~44,5~~9,48~~~~~~~none +// sbrul.shad + double ornament: +\uF02A~46,5~~9,49~~~~~~~none +// sbrul.shad variant form: +\uF029~47,5~~9,50~~~~~~~none + +// reversed hu: +\uF032~147,5~~10,43~~~~~~~none +// Inverted ha: +\uF033~148,5~~10,44~~~~~~~none + +// no name: +\uF036~93,5~~9,91~~~~~~~none + +// nyi.zla editor's mark. This is NOT \u0F82, although it looks very similar. +\uF03A~91,5~~9,89~~~~~~~none + + + +M~238,1~~8,90~~~~~~~0F7E + + + ~~~3,45~~~~~~~0F0B + ~~~4,45~~~~~~~0F0B + ~~~5,45~~~~~~~0F0B + ~~~6,45~~~~~~~0F0B + ~~~7,45~~~~~~~0F0B + ~~~8,45~~~~~~~0F0B + ~~~9,45~~~~~~~0F0B + ~~~10,45~~~~~~~0F0B +// Special combination: +o'i~156,5~~10,61~~~~~~~f7c,f60,f72 +// /* /** unconfuse emacs fontification in java-mode... */ */ ' +//punctuation +// See above: _~32,1~~1,32~~~~~~~0020 +// See above: ~45,1~~1,45~~~~~~~0F0B +_~32,1~~2,32~~~~~~~0020 + ~45,1~~2,45~~~~~~~0F0B +_~32,2~~3,32~~~~~~~0020 +_~32,2~~4,32~~~~~~~0020 +_~32,3~~5,32~~~~~~~0020 +_~32,3~~6,32~~~~~~~0020 +_~32,4~~7,32~~~~~~~0020 +_~32,4~~8,32~~~~~~~0020 +_~32,5~~9,32~~~~~~~0020 +_~32,5~~10,32~~~~~~~0020 + +//bindus +iM~243,1~~8,96~~~~~~~f72,f7e +iM~244,1~~8,97~~~~~~~f72,f7e +-iM~245,1~~8,98~~~~~~~f80,f7e +eM~246,1~~8,99~~~~~~~f7a,f7e +eM~247,1~~8,100~~~~~~~f7a,f7e +aiM~248,1~~8,101~~~~~~~f7b,f7e +oM~249,1~~8,102~~~~~~~f7c,f7e +oM~250,1~~8,103~~~~~~~f7c,f7e +auM~251,1~~8,104~~~~~~~f7d,f7e +// bindu + datse~241,1~~8,94~~~~~~~0F83 +// bindu + kigu~243,1~~8,96 +// bindu + short gigu~244,1~~8,97 +// bindu + log yig gigu~245,1~~8,98 +// bindu + normal drengu~246,1~~8,99 +// bindu + short drengbu~247,1~~8,100 +// bindu + double drengbu~248,1~~8,101 +// bindu + normal naro~249,1~~8,102 +// bindu + raised naro~250,1~~8,103 +// bindu + double naro~251,1~~8,104 + + + +//reduced-height consonants +k~180,1~~1,92~1,109~1,111~1,123~1,125~10,118~10,120~f40 +g~181,1~~1,93~1,109~1,111~1,123~1,125~10,118~10,120~f42 +ny~182,1~~1,94~1,109~1,112~1,123~1,125~10,115~10,121~f49 +t~183,1~~1,95~1,109~1,112~1,123~1,125~10,115~10,121~f4f +d~184,1~~1,96~1,109~1,111~1,123~1,125~10,118~10,120~f51 +n~185,1~~1,97~1,109~1,111~1,123~1,125~10,118~10,120~f53 +zh~186,1~~1,98~1,109~1,111~1,123~1,125~10,118~10,120~f5e +sh~187,1~~1,99~1,109~1,111~1,123~1,125~10,118~10,120~f64 +h~188,1~~1,100~1,109~1,112~1,123~1,125~10,119~~f67 +r-t~189,1~~1,101~1,109~1,113~1,123~1,125~10,116~10,124~f62,f9f +h~156,1~~1,102~1,109~~1,123~1,125~10,114~10,122~f67 + +//half-height consonants +k~200,5~~10,71~1,109~~1,123~1,125~~~0F90 +kh~201,5~~10,72~1,109~~1,123~1,125~~~0F91 +g~202,5~~10,73~1,109~~1,123~1,125~~~0F92 +g+h~203,5~~10,74~1,109~~1,123~1,125~~~0F93 +ng~204,5~~10,75~1,109~~1,123~1,125~~~0F94 +c~205,5~~10,76~1,109~~1,123~1,125~~~0F95 +ch~206,5~~10,77~1,109~~1,123~1,125~~~0F96 +j~207,5~~10,78~1,109~~1,123~1,125~~~0F97 +ny~208,5~~10,79~1,109~~1,123~1,125~~~0F99 +T~209,5~~10,80~1,109~~1,123~1,125~~~0F9A +Th~210,5~~10,81~1,109~~1,123~1,125~~~0F9B +D~211,5~~10,82~1,109~~1,123~1,125~~~0F9C +D+h~212,5~~10,83~1,109~~1,123~1,125~~~0F9D +N~213,5~~10,84~1,109~~1,123~1,125~~~0F9E +t~214,5~~10,85~1,109~~1,123~1,125~~~0F9F +th~215,5~~10,86~1,109~~1,123~1,125~~~0FA0 +d~216,5~~10,87~1,109~~1,123~1,125~~~0FA1 +d+h~217,5~~10,88~1,109~~1,123~1,125~~~0FA2 +n~218,5~~10,89~1,109~~1,123~1,125~~~0FA3 +p~219,5~~10,90~1,109~~1,123~1,125~~~0FA4 +ph~220,5~~10,91~1,109~~1,123~1,125~~~0FA5 +b~221,5~~10,92~1,109~~1,123~1,125~~~0FA6 +b+h~222,5~~10,93~1,109~~1,123~1,125~~~0FA7 +m~223,5~~10,94~1,109~~1,123~1,125~~~0FA8 +ts~224,5~~10,95~1,110~~1,125~1,126~~~0FA9 +tsh~225,5~~10,96~1,110~~1,125~1,126~~~0FAA +dz~226,5~~10,97~1,110~~1,125~1,126~~~0FAB +dz+h~227,5~~10,98~1,110~~1,125~1,126~~~0FAC +zh~229,5~~10,100~1,109~~1,123~1,125~~~0FAE +z~230,5~~10,101~1,109~~1,123~1,125~~~0FAF +'~231,5~~10,102~1,109~~1,123~1,125~~~0FB0 +// Hey emacs: fontify this: ' +l~234,5~~10,105~1,109~~1,123~1,125~~~0FB3 +sh~235,5~~10,106~1,109~~1,123~1,125~~~0FB4 +Sh~236,5~~10,107~1,109~~1,123~1,125~~~0FB5 +s~237,5~~10,108~1,109~~1,123~1,125~~~0FB6 +h~238,5~~10,109~1,109~~1,123~1,125~~~0FB7 +a~239,5~~10,110~1,109~~1,123~1,125~~~0FB8 +k+Sh~240,5~~10,111~1,109~~1,123~1,125~~~0FB9 + +//vowels +i~220,1~~1,109~~~~~~~0F72~~8,96 +i~221,1~~1,110~~~~~~~0F72~~8,97 +u~165,1~~1,111~~~~~~~0F74 +u~226,1~~1,112~~~~~~~0F74 +u~167,1~~1,113~~~~~~~0F74 +u~168,1~~1,114~~~~~~~0F74 +u~169,1~~1,115~~~~~~~0F74 +u~176,1~~1,116~~~~~~~0F74 +u~177,1~~1,117~~~~~~~0F74 +u~223,1~~1,118~~~~~~~0F74 +u~224,1~~1,119~~~~~~~0F74 +u~225,1~~1,120~~~~~~~0F74 +u~227,1~~1,121~~~~~~~0F74 +u~228,1~~1,122~~~~~~~0F74 +e~232,1~~1,123~~~~~~~0F7A~~8,99 +e~233,1~~1,124~~~~~~~0F7A~~8,100 +o~235,1~~1,125~~~~~~~0F7C~~8,102 +o~236,1~~1,126~~~~~~~0F7C~~8,103 +u~178,1~~2,111~~~~~~~0F74 +u~179,1~~2,112~~~~~~~0F74 +u~168,1~~2,113~~~~~~~0F74 +u~169,1~~2,114~~~~~~~0F74 +u~225,1~~2,115~~~~~~~0F74 +u~228,1~~2,116~~~~~~~0F74 +u~229,1~~2,117~~~~~~~0F74 +u~230,1~~2,118~~~~~~~0F74 +u~231,1~~2,119~~~~~~~0F74 +A~201,2~~4,106~~~~~~~0F71 +A~202,2~~4,107~~~~~~~0F71 +A~203,2~~4,108~~~~~~~0F71 +A~204,2~~4,109~~~~~~~0F71 +A~205,2~~4,110~~~~~~~0F71 +A~206,2~~4,111~~~~~~~0F71 +A~207,2~~4,112~~~~~~~0F71 +U~211,2~~4,113~~~~~~~0F75 +U~212,2~~4,114~~~~~~~0F75 +U~213,2~~4,115~~~~~~~0F75 +U~214,2~~4,116~~~~~~~0F75 +U~215,2~~4,117~~~~~~~0F75 +U~216,2~~4,118~~~~~~~0F75 +U~217,2~~4,119~~~~~~~0F75 +u~224,2~~4,120~~~~~~~0F74 +u~225,2~~4,121~~~~~~~0F74 +u~226,2~~4,122~~~~~~~0F74 +u~227,2~~4,123~~~~~~~0F74 +u~228,2~~4,124~~~~~~~0F74 +u~229,2~~4,125~~~~~~~0F74 +u~230,2~~4,126~~~~~~~0F74 +A~201,3~~6,106~~~~~~~0F71 +A~202,3~~6,107~~~~~~~0F71 +A~203,3~~6,108~~~~~~~0F71 +A~204,3~~6,109~~~~~~~0F71 +A~205,3~~6,110~~~~~~~0F71 +A~206,3~~6,111~~~~~~~0F71 +A~207,3~~6,112~~~~~~~0F71 +U~211,3~~6,113~~~~~~~0F75 +U~212,3~~6,114~~~~~~~0F75 +U~213,3~~6,115~~~~~~~0F75 +U~214,3~~6,116~~~~~~~0F75 +U~215,3~~6,117~~~~~~~0F75 +U~216,3~~6,118~~~~~~~0F75 +U~217,3~~6,119~~~~~~~0F75 +u~224,3~~6,120~~~~~~~0F74 +u~225,3~~6,121~~~~~~~0F74 +u~226,3~~6,122~~~~~~~0F74 +u~227,3~~6,123~~~~~~~0F74 +u~228,3~~6,124~~~~~~~0F74 +u~229,3~~6,125~~~~~~~0F74 +u~230,3~~6,126~~~~~~~0F74 +A~201,4~~8,106~~~~~~~0F71 +A~202,4~~8,107~~~~~~~0F71 +A~203,4~~8,108~~~~~~~0F71 +A~204,4~~8,109~~~~~~~0F71 +A~205,4~~8,110~~~~~~~0F71 +A~206,4~~8,111~~~~~~~0F71 +A~207,4~~8,112~~~~~~~0F71 +U~211,4~~8,113~~~~~~~0F75 +U~212,4~~8,114~~~~~~~0F75 +U~213,4~~8,115~~~~~~~0F75 +U~214,4~~8,116~~~~~~~0F75 +U~215,4~~8,117~~~~~~~0F75 +U~216,4~~8,118~~~~~~~0F75 +U~217,4~~8,119~~~~~~~0F75 +u~224,4~~8,120~~~~~~~0F74 +u~225,4~~8,121~~~~~~~0F74 +u~226,4~~8,122~~~~~~~0F74 +u~227,4~~8,123~~~~~~~0F74 +u~228,4~~8,124~~~~~~~0F74 +u~229,4~~8,125~~~~~~~0F74 +u~230,4~~8,126~~~~~~~0F74 +A~161,1~~10,114~~~~~~~0F71 +A~162,1~~10,115~~~~~~~0F71 +A~163,1~~10,116~~~~~~~0F71 +A~164,1~~10,117~~~~~~~0F71 +A~211,1~~10,118~~~~~~~0F71 +A~212,1~~10,119~~~~~~~0F71 +U~213,1~~10,120~~~~~~~0F75 +U~214,1~~10,121~~~~~~~0F75 +U~215,1~~10,122~~~~~~~0F75 +U~216,1~~10,123~~~~~~~0F75 +U~217,1~~10,124~~~~~~~0F75 +U~218,1~~10,125~~~~~~~0F75 +U~219,1~~10,126~~~~~~~0F75 + +// ra.mgo: +r~173,4~~8,66~~~~~~~0F62 +// wa.btags: +w~159,1~~8,69~~~~~~~0FAD +// ya.btags: +y~175,4~~8,70~~~~~~~0FB1 +// ra.btags: +r~176,4~~8,71~~~~~~~0FB2 + +// DLC FIXME: remove the tag and you get TMW->Wylie +// mappings for all these. + + +// DLC see chinese unicode: +// Chinese letter: +\tmw9060~155,5~~10,60~~~~~~~none + +// ITHI secret sign: +// +// f68,fa0,f80,f72 comes close, but fa0 might be larger. The OpenType +// font will probably have had this very glyph in mind if that works! +// DLC FIXME: No way this is Unicode f68,fa0,f80,f72, though: tha is +// small, and gi-gu plus reversed gi-gu together is ill-defined. +// +// DLC FIXME: WHAT'S THE EWTS? +// +// ITHI secret sign: +\tmw7074~180,4~~8,74~~~~~~~none + +// You can't convert these half-numbers to Unicode, but there exist +// half-measures: use U+0F20-U+0F29 and formatted text (such as RTF or +// HTML) +\tmw8053~50,5~~9,53~~~~~~~none +\tmw8054~51,5~~9,54~~~~~~~none +\tmw8055~52,5~~9,55~~~~~~~none +\tmw8056~53,5~~9,56~~~~~~~none +\tmw8057~54,5~~9,57~~~~~~~none +\tmw8058~55,5~~9,58~~~~~~~none +\tmw8059~56,5~~9,59~~~~~~~none +\tmw8060~57,5~~9,60~~~~~~~none +\tmw8061~58,5~~9,61~~~~~~~none +\tmw8062~59,5~~9,62~~~~~~~none +\tmw8063~60,5~~9,63~~~~~~~none +\tmw8064~61,5~~9,64~~~~~~~none +\tmw8065~62,5~~9,65~~~~~~~none +\tmw8066~63,5~~9,66~~~~~~~none +\tmw8067~64,5~~9,67~~~~~~~none +\tmw8068~65,5~~9,68~~~~~~~none +\tmw8069~66,5~~9,69~~~~~~~none +\tmw8070~67,5~~9,70~~~~~~~none +\tmw8071~68,5~~9,71~~~~~~~none +\tmw8072~69,5~~9,72~~~~~~~none + +// yungs.drung (reversed): +\tmw8097~97,5~~9,97~~~~~~~5350 +// yungs.drung (standard): +\tmw8098~98,5~~9,98~~~~~~~534D + +// utsama ka: +\tmw2059~57,2~~3,59~1,109~4,120~1,125~1,123~4,106~4,113~f88,f90 +// utsama kha: +\tmw2060~58,2~~3,60~1,109~4,120~1,125~1,123~4,106~4,113~f88,f91 +