diff --git a/config/hibernate.properties b/config/hibernate.properties deleted file mode 100644 index b1b4820..0000000 --- a/config/hibernate.properties +++ /dev/null @@ -1,9 +0,0 @@ -hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect -hibernate.connection.driver_class=com.mysql.jdbc.Driver -hibernate.connection.url=jdbc:mysql://localhost/Lex -hibernate.connection.username= -hibernate.connection.password= -hibernate.connection.useUnicode=true -hibernate.connection.characterEncoding=utf-8 -#hibernate.connection.pool_size=10 - diff --git a/config/lex-codegen-cfg.xml b/config/lex-codegen-cfg.xml deleted file mode 100644 index bfce532..0000000 --- a/config/lex-codegen-cfg.xml +++ /dev/null @@ -1,6 +0,0 @@ - - abstract public - - - - diff --git a/config/lex-context-config.xml b/config/lex-context-config.xml deleted file mode 100644 index 4511363..0000000 --- a/config/lex-context-config.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - factory - org.apache.commons.dbcp.BasicDataSourceFactory - - - - - url - jdbc:mysql://localhost/Lex?useUnicode=true&characterEncoding=UTF-8 - - - driverClassName - com.mysql.jdbc.Driver - - - username - username - - - password - password - - - - - maxWait - 5000 - - - maxIdle - 7 - - - maxActive - 15 - - - removeAbandoned - true - - - - - - - factory - org.apache.commons.dbcp.BasicDataSourceFactory - - - - - url - jdbc:mysql://localhost/ThdlUser - - - driverClassName - com.mysql.jdbc.Driver - - - username - username - - - password - password - - - useUnicode - true - - - characterEncoding - utf-8 - - - - - maxWait - 5000 - - - maxIdle - 7 - - - maxActive - 15 - - - removeAbandoned - true - - - - - - diff --git a/config/web.xml b/config/web.xml deleted file mode 100644 index 6af70aa..0000000 --- a/config/web.xml +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - -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 - - - - authentication - /jsp/*.jsp - - - - authentication - /jsp/*.jsf - - - - 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://java.sun.com/jstl/core_rt - /WEB-INF/tld/c-rt.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/images/def.gif b/images/def.gif deleted file mode 100644 index 7db166b..0000000 Binary files a/images/def.gif and /dev/null differ diff --git a/images/edit.gif b/images/edit.gif deleted file mode 100644 index de70f49..0000000 Binary files a/images/edit.gif and /dev/null differ diff --git a/images/ency.gif b/images/ency.gif deleted file mode 100644 index 470d9a7..0000000 Binary files a/images/ency.gif and /dev/null differ diff --git a/images/etym.gif b/images/etym.gif deleted file mode 100644 index cbf313d..0000000 Binary files a/images/etym.gif and /dev/null differ diff --git a/images/gram.gif b/images/gram.gif deleted file mode 100644 index 2d31b44..0000000 Binary files a/images/gram.gif and /dev/null differ diff --git a/images/key.gif b/images/key.gif deleted file mode 100644 index 0b25a77..0000000 Binary files a/images/key.gif and /dev/null differ diff --git a/images/meta.gif b/images/meta.gif deleted file mode 100644 index af57cc0..0000000 Binary files a/images/meta.gif and /dev/null differ diff --git a/images/metadata.gif b/images/metadata.gif deleted file mode 100644 index a382ab0..0000000 Binary files a/images/metadata.gif and /dev/null differ diff --git a/images/note.gif b/images/note.gif deleted file mode 100644 index f53067b..0000000 Binary files a/images/note.gif and /dev/null differ diff --git a/images/pass.gif b/images/pass.gif deleted file mode 100644 index 14f003b..0000000 Binary files a/images/pass.gif and /dev/null differ diff --git a/images/pron.gif b/images/pron.gif deleted file mode 100644 index 136ee72..0000000 Binary files a/images/pron.gif and /dev/null differ diff --git a/images/reg.gif b/images/reg.gif deleted file mode 100644 index 1cb90ae..0000000 Binary files a/images/reg.gif and /dev/null differ diff --git a/images/rel-term.gif b/images/rel-term.gif deleted file mode 100644 index 8fc76f8..0000000 Binary files a/images/rel-term.gif and /dev/null differ diff --git a/images/remove.gif b/images/remove.gif deleted file mode 100644 index 78e1023..0000000 Binary files a/images/remove.gif and /dev/null differ diff --git a/images/sent.gif b/images/sent.gif deleted file mode 100644 index e45958e..0000000 Binary files a/images/sent.gif and /dev/null differ diff --git a/images/spell.gif b/images/spell.gif deleted file mode 100644 index 98c3c3b..0000000 Binary files a/images/spell.gif and /dev/null differ diff --git a/images/subdef.gif b/images/subdef.gif deleted file mode 100644 index dd50db2..0000000 Binary files a/images/subdef.gif and /dev/null differ diff --git a/images/trans-eqv.gif b/images/trans-eqv.gif deleted file mode 100644 index 936c438..0000000 Binary files a/images/trans-eqv.gif and /dev/null differ diff --git a/images/trans.gif b/images/trans.gif deleted file mode 100644 index 76d6604..0000000 Binary files a/images/trans.gif and /dev/null differ diff --git a/lib/commons/commons-beanutils.jar b/lib/commons/commons-beanutils.jar deleted file mode 100755 index 16dcf6f..0000000 Binary files a/lib/commons/commons-beanutils.jar and /dev/null differ diff --git a/lib/dlese-oai/DLESETools.jar b/lib/dlese-oai/DLESETools.jar deleted file mode 100644 index d600857..0000000 Binary files a/lib/dlese-oai/DLESETools.jar and /dev/null differ diff --git a/lib/dlese-oai/lucene-1.3-rc1.jar b/lib/dlese-oai/lucene-1.3-rc1.jar deleted file mode 100644 index 0870dd7..0000000 Binary files a/lib/dlese-oai/lucene-1.3-rc1.jar and /dev/null differ diff --git a/lib/hibernate/cglib.jar b/lib/hibernate/cglib.jar deleted file mode 100644 index 098d6ed..0000000 Binary files a/lib/hibernate/cglib.jar and /dev/null differ diff --git a/lib/hibernate/cglib2.jar b/lib/hibernate/cglib2.jar deleted file mode 100644 index 594f652..0000000 Binary files a/lib/hibernate/cglib2.jar and /dev/null differ diff --git a/lib/hibernate/commons-beanutils-1.6.1.jar b/lib/hibernate/commons-beanutils-1.6.1.jar deleted file mode 100644 index 795655a..0000000 Binary files a/lib/hibernate/commons-beanutils-1.6.1.jar and /dev/null differ diff --git a/lib/hibernate/commons-dbcp.jar b/lib/hibernate/commons-dbcp.jar deleted file mode 100644 index c3c4d1f..0000000 Binary files a/lib/hibernate/commons-dbcp.jar and /dev/null differ diff --git a/lib/hibernate/commons-lang.jar b/lib/hibernate/commons-lang.jar deleted file mode 100644 index 37ddb9b..0000000 Binary files a/lib/hibernate/commons-lang.jar and /dev/null differ diff --git a/lib/hibernate/commons-logging.jar b/lib/hibernate/commons-logging.jar deleted file mode 100644 index b99c937..0000000 Binary files a/lib/hibernate/commons-logging.jar and /dev/null differ diff --git a/lib/hibernate/dom4j.jar b/lib/hibernate/dom4j.jar deleted file mode 100644 index 2a58756..0000000 Binary files a/lib/hibernate/dom4j.jar and /dev/null differ diff --git a/lib/hibernate/ehcache.jar b/lib/hibernate/ehcache.jar deleted file mode 100644 index ac0fcad..0000000 Binary files a/lib/hibernate/ehcache.jar and /dev/null differ diff --git a/lib/hibernate/hibernate2.jar b/lib/hibernate/hibernate2.jar deleted file mode 100644 index 7216687..0000000 Binary files a/lib/hibernate/hibernate2.jar and /dev/null differ diff --git a/lib/hibernate/jta.jar b/lib/hibernate/jta.jar deleted file mode 100644 index e0822a9..0000000 Binary files a/lib/hibernate/jta.jar and /dev/null differ diff --git a/lib/hibernate/odmg.jar b/lib/hibernate/odmg.jar deleted file mode 100644 index 258b673..0000000 Binary files a/lib/hibernate/odmg.jar and /dev/null differ diff --git a/lib/jstl/jstl.jar b/lib/jstl/jstl.jar deleted file mode 100644 index 99f7965..0000000 Binary files a/lib/jstl/jstl.jar and /dev/null differ diff --git a/lib/jstl/standard.jar b/lib/jstl/standard.jar deleted file mode 100644 index 1fe3321..0000000 Binary files a/lib/jstl/standard.jar and /dev/null differ diff --git a/lib/jstl/taglibs-input.jar b/lib/jstl/taglibs-input.jar deleted file mode 100644 index 33fecdf..0000000 Binary files a/lib/jstl/taglibs-input.jar and /dev/null differ diff --git a/lib/jstl/taglibs-request.jar b/lib/jstl/taglibs-request.jar deleted file mode 100644 index 1bb0813..0000000 Binary files a/lib/jstl/taglibs-request.jar and /dev/null differ diff --git a/lib/jstl/taglibs-response.jar b/lib/jstl/taglibs-response.jar deleted file mode 100644 index e54c3db..0000000 Binary files a/lib/jstl/taglibs-response.jar and /dev/null differ diff --git a/lib/jstl/taglibs-session.jar b/lib/jstl/taglibs-session.jar deleted file mode 100644 index fe77f30..0000000 Binary files a/lib/jstl/taglibs-session.jar and /dev/null differ diff --git a/lib/jstl/taglibs-string.jar b/lib/jstl/taglibs-string.jar deleted file mode 100644 index 326a00e..0000000 Binary files a/lib/jstl/taglibs-string.jar and /dev/null differ diff --git a/lib/jwebunit/httpunit.jar b/lib/jwebunit/httpunit.jar deleted file mode 100644 index 9a294a3..0000000 Binary files a/lib/jwebunit/httpunit.jar and /dev/null differ diff --git a/lib/jwebunit/js.jar b/lib/jwebunit/js.jar deleted file mode 100644 index dad560c..0000000 Binary files a/lib/jwebunit/js.jar and /dev/null differ diff --git a/lib/jwebunit/junit.jar b/lib/jwebunit/junit.jar deleted file mode 100644 index 9c87c65..0000000 Binary files a/lib/jwebunit/junit.jar and /dev/null differ diff --git a/lib/jwebunit/jwebunit.jar b/lib/jwebunit/jwebunit.jar deleted file mode 100644 index 17df856..0000000 Binary files a/lib/jwebunit/jwebunit.jar and /dev/null differ diff --git a/lib/jwebunit/nekohtml.jar b/lib/jwebunit/nekohtml.jar deleted file mode 100644 index f4389af..0000000 Binary files a/lib/jwebunit/nekohtml.jar and /dev/null differ diff --git a/lib/jwebunit/optional.jar b/lib/jwebunit/optional.jar deleted file mode 100644 index 10e0c97..0000000 Binary files a/lib/jwebunit/optional.jar and /dev/null differ diff --git a/lib/jwebunit/servlet.jar b/lib/jwebunit/servlet.jar deleted file mode 100644 index c40e1ef..0000000 Binary files a/lib/jwebunit/servlet.jar and /dev/null differ diff --git a/lib/jwebunit/xercesImpl.jar b/lib/jwebunit/xercesImpl.jar deleted file mode 100644 index 3197095..0000000 Binary files a/lib/jwebunit/xercesImpl.jar and /dev/null differ diff --git a/lib/jwebunit/xml-apis.jar b/lib/jwebunit/xml-apis.jar deleted file mode 100644 index 8331d27..0000000 Binary files a/lib/jwebunit/xml-apis.jar and /dev/null differ diff --git a/lib/log4j/log4j-1.2.6.jar b/lib/log4j/log4j-1.2.6.jar deleted file mode 100644 index be4a917..0000000 Binary files a/lib/log4j/log4j-1.2.6.jar and /dev/null differ diff --git a/lib/oai-xmlbeans/oai-dc.jar b/lib/oai-xmlbeans/oai-dc.jar deleted file mode 100644 index 585229d..0000000 Binary files a/lib/oai-xmlbeans/oai-dc.jar and /dev/null differ diff --git a/lib/oai-xmlbeans/xbean.jar b/lib/oai-xmlbeans/xbean.jar deleted file mode 100644 index d7e3b36..0000000 Binary files a/lib/oai-xmlbeans/xbean.jar and /dev/null differ diff --git a/lib/oai-xmlbeans/xmlpublic.jar b/lib/oai-xmlbeans/xmlpublic.jar deleted file mode 100644 index efe687c..0000000 Binary files a/lib/oai-xmlbeans/xmlpublic.jar and /dev/null differ diff --git a/lib/thdl/Jskad.jar b/lib/thdl/Jskad.jar deleted file mode 100644 index d5a1f64..0000000 Binary files a/lib/thdl/Jskad.jar and /dev/null differ diff --git a/loadtests/LoadTest.jmx b/loadtests/LoadTest.jmx deleted file mode 100644 index f270699..0000000 --- a/loadtests/LoadTest.jmx +++ /dev/null @@ -1,134 +0,0 @@ - - - - -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 deleted file mode 100644 index 07175d2..0000000 --- a/loadtests/LoadTestRecorder.jmx +++ /dev/null @@ -1,124 +0,0 @@ - - - - -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/css/lex-advanced.css b/src/css/lex-advanced.css deleted file mode 100644 index 03b6594..0000000 --- a/src/css/lex-advanced.css +++ /dev/null @@ -1,165 +0,0 @@ -/* 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/src/css/lex.css b/src/css/lex.css deleted file mode 100644 index db73b12..0000000 --- a/src/css/lex.css +++ /dev/null @@ -1,136 +0,0 @@ -/* IMPORTS */ - -@import url( "thdl-styles.css" ); -@import url( "lex-advanced.css" ); - - -#main input, #main textarea, #main p, #main li -{ /*--------- '*' = everything -------------*/ -font-family: '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/src/css/thdl-advanced.css b/src/css/thdl-advanced.css deleted file mode 100644 index dbbd4cd..0000000 --- a/src/css/thdl-advanced.css +++ /dev/null @@ -1,385 +0,0 @@ -/*-------- -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/src/css/thdl-styles.css b/src/css/thdl-styles.css deleted file mode 100644 index cb7affc..0000000 --- a/src/css/thdl-styles.css +++ /dev/null @@ -1,108 +0,0 @@ -/*------------------ - 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/src/java/dictionary-importer.properties.sample b/src/java/dictionary-importer.properties.sample deleted file mode 100644 index caf745a..0000000 --- a/src/java/dictionary-importer.properties.sample +++ /dev/null @@ -1 +0,0 @@ -# Default localized resources for DictionaryImporter dictionaryimporter.driverclassname=org.gjt.mm.mysql.Driver dictionaryimporter.url=jdbc:mysql://localhost:3306/lex?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&user=USERNAME&password=PASSWORD \ No newline at end of file diff --git a/src/java/hibernate.cfg.xml b/src/java/hibernate.cfg.xml deleted file mode 100644 index d23a992..0000000 --- a/src/java/hibernate.cfg.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - java:comp/env/jdbc/lex-datasource - false - true - net.sf.hibernate.dialect.MySQLDialect - - - - - - - diff --git a/src/java/log4j.properties b/src/java/log4j.properties deleted file mode 100644 index 90dfb36..0000000 --- a/src/java/log4j.properties +++ /dev/null @@ -1,36 +0,0 @@ -### 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=/usr/local/Dictionary/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=/usr/local/Dictionary/dictionary.log -log4j.appender.lex-out.layout=org.apache.log4j.PatternLayout -log4j.appender.lex-out.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n - -### set log levels - for more verbose logging change 'info' to 'debug' ## - -log4j.rootLogger=warn, stdout - -log4j.logger.net.sf.hibernate=info, file - -log4j.logger.org.thdl.lex=info, lex-out - -### enable the following line if you want to track down connection ### -### leakages when using DriverManagerConnectionProvider ### -#log4j.logger.net.sf.hibernate.connection.DriverManagerConnectionProvider=trace - -### log JDBC bind parameters ### -#log4j.logger.net.sf.hibernate.type=info - -### log prepared statement cache activity ### -#log4j.logger.net.sf.hibernate.ps.PreparedStatementCache=info - diff --git a/src/java/org/thdl/lex/.cvsignore b/src/java/org/thdl/lex/.cvsignore deleted file mode 100644 index 1c8b4a2..0000000 --- a/src/java/org/thdl/lex/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -LexConstantsSecure.java diff --git a/src/java/org/thdl/lex/AuthenticationFilter.java b/src/java/org/thdl/lex/AuthenticationFilter.java deleted file mode 100644 index 1af0d3e..0000000 --- a/src/java/org/thdl/lex/AuthenticationFilter.java +++ /dev/null @@ -1,143 +0,0 @@ -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.*; - - -/** - * 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 deleted file mode 100644 index 5a01e05..0000000 --- a/src/java/org/thdl/lex/CharEncFilter.java +++ /dev/null @@ -1,71 +0,0 @@ -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.*; - - -/** - * 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/DisplayHelper.java b/src/java/org/thdl/lex/DisplayHelper.java deleted file mode 100644 index 15d45dc..0000000 --- a/src/java/org/thdl/lex/DisplayHelper.java +++ /dev/null @@ -1,349 +0,0 @@ -package org.thdl.lex; -import java.text.DateFormat; - -import java.util.*; -import org.apache.commons.beanutils.*; -import org.thdl.lex.component.*; -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 deleted file mode 100644 index f32246e..0000000 --- a/src/java/org/thdl/lex/Global.java +++ /dev/null @@ -1,212 +0,0 @@ -package org.thdl.lex; -import java.io.*; -import java.util.*; -import org.thdl.lex.component.*; - - -/** - * 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 deleted file mode 100644 index 43eb1f6..0000000 --- a/src/java/org/thdl/lex/GuestFilter.java +++ /dev/null @@ -1,110 +0,0 @@ -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.*; - - -/** - * 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 deleted file mode 100644 index 9fc0ed5..0000000 --- a/src/java/org/thdl/lex/HibernateSession.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.thdl.lex; - -import net.sf.hibernate.*; -import net.sf.hibernate.cfg.*; - - -/** - * 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/HibernateTestServlet.java b/src/java/org/thdl/lex/HibernateTestServlet.java deleted file mode 100644 index 61e8372..0000000 --- a/src/java/org/thdl/lex/HibernateTestServlet.java +++ /dev/null @@ -1,242 +0,0 @@ -package org.thdl.lex; -import java.io.IOException; -import java.io.PrintWriter; -import java.sql.*; -import java.util.*; -import javax.servlet.ServletException; -// import net.sf.hibernate.tool.hbm2ddl.*; - -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -// import org.thdl.lex.component.peers.*; - -import net.sf.hibernate.*; -import net.sf.hibernate.cfg.*; - -import org.thdl.lex.component.*; - - -/** - * 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 deleted file mode 100644 index a3e974a..0000000 --- a/src/java/org/thdl/lex/HibernateTransaction.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.thdl.lex; - -import net.sf.hibernate.*; -import net.sf.hibernate.cfg.*; - - -/** - * 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/LexActionServlet.java b/src/java/org/thdl/lex/LexActionServlet.java deleted file mode 100644 index eed069c..0000000 --- a/src/java/org/thdl/lex/LexActionServlet.java +++ /dev/null @@ -1,243 +0,0 @@ -package org.thdl.lex; - -import java.io.IOException; -import java.util.*; -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 javax.servlet.http.HttpSession; -import org.apache.log4j.*; -import org.thdl.lex.commands.*; - -import org.thdl.lex.component.*; - - -/** - * 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 deleted file mode 100644 index ec5c94d..0000000 --- a/src/java/org/thdl/lex/LexComponentFilter.java +++ /dev/null @@ -1,227 +0,0 @@ -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 javax.servlet.http.HttpSession; -import org.apache.log4j.*; - -import org.thdl.lex.component.*; - - -/** - * 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 deleted file mode 100644 index 5ef499d..0000000 --- a/src/java/org/thdl/lex/LexComponentRepository.java +++ /dev/null @@ -1,942 +0,0 @@ -package org.thdl.lex; -import java.sql.*; -import java.util.*; - -import net.sf.hibernate.*; -import org.apache.log4j.*; - -import org.thdl.lex.component.*; - - - -/** - * 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/LexConstants.java b/src/java/org/thdl/lex/LexConstants.java deleted file mode 100644 index e3686bc..0000000 --- a/src/java/org/thdl/lex/LexConstants.java +++ /dev/null @@ -1,249 +0,0 @@ -package org.thdl.lex; - -import org.thdl.lex.component.*; - - -/** - * 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 deleted file mode 100644 index 10c59e6..0000000 --- a/src/java/org/thdl/lex/LexConstantsSecure.java +++ /dev/null @@ -1,18 +0,0 @@ -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 deleted file mode 100644 index 9a2d73e..0000000 --- a/src/java/org/thdl/lex/LexFlatDataRepository.java +++ /dev/null @@ -1,755 +0,0 @@ -package org.thdl.lex; - -import org.thdl.users.ThdlUserRepository; -import java.util.HashMap; -import java.sql.Connection; -import java.sql.ResultSet; -import java.sql.ResultSetMetaData; -import java.sql.SQLException; - - -/** - * 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 deleted file mode 100644 index af96227..0000000 --- a/src/java/org/thdl/lex/LexLogger.java +++ /dev/null @@ -1,222 +0,0 @@ -package org.thdl.lex; -import java.io.*; -import java.util.*; -import javax.servlet.ServletContext; -import javax.servlet.http.*; - -import org.apache.commons.beanutils.*; -import org.apache.log4j.*; -import org.thdl.lex.component.*; - - -/** - * 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 enum = req.getParameterNames(); - while ( enum.hasMoreElements() ) - { - String parm = (String) enum.nextElement(); - LOGGER.debug( "Request Parameter: " + parm + " = '" + req.getParameter( parm ) + "'" ); - } - enum = req.getAttributeNames(); - while ( enum.hasMoreElements() ) - { - String att = (String) enum.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 enum = ses.getAttributeNames(); - while ( enum.hasMoreElements() ) - { - String att = (String) enum.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 enum = context.getAttributeNames(); - while ( enum.hasMoreElements() ) - { - String att = (String) enum.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 deleted file mode 100644 index e6ed70c..0000000 --- a/src/java/org/thdl/lex/LexQuery.hbm.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - org.thdl.lex.components.BaseLexQuery - - - - - - diff --git a/src/java/org/thdl/lex/LexQuery.java b/src/java/org/thdl/lex/LexQuery.java deleted file mode 100644 index e503910..0000000 --- a/src/java/org/thdl/lex/LexQuery.java +++ /dev/null @@ -1,248 +0,0 @@ -package org.thdl.lex; -import java.sql.*; -import java.util.*; - -import net.sf.hibernate.*; -import org.apache.commons.beanutils.BeanUtils; - -import org.thdl.lex.component.*; - - -/** - * 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 deleted file mode 100644 index a1e7659..0000000 --- a/src/java/org/thdl/lex/LexRepository.java +++ /dev/null @@ -1,176 +0,0 @@ -package org.thdl.lex; -import java.sql.*; - -import java.util.*; -import javax.naming.*; -import javax.sql.*; - - -/** - * 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 deleted file mode 100644 index 1e0f9bf..0000000 --- a/src/java/org/thdl/lex/LexRepositoryException.java +++ /dev/null @@ -1,59 +0,0 @@ -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 deleted file mode 100644 index 770f741..0000000 --- a/src/java/org/thdl/lex/LexSourceRepository.java +++ /dev/null @@ -1,299 +0,0 @@ -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 deleted file mode 100644 index 32be1db..0000000 --- a/src/java/org/thdl/lex/LexUser.java +++ /dev/null @@ -1,23 +0,0 @@ -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; - } -} diff --git a/src/java/org/thdl/lex/LexUtilities.java b/src/java/org/thdl/lex/LexUtilities.java deleted file mode 100644 index 3a299bd..0000000 --- a/src/java/org/thdl/lex/LexUtilities.java +++ /dev/null @@ -1,192 +0,0 @@ -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 deleted file mode 100644 index 6a62cde..0000000 --- a/src/java/org/thdl/lex/LoginServlet.java +++ /dev/null @@ -1,229 +0,0 @@ -package org.thdl.lex; -import java.io.IOException; -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 javax.servlet.http.HttpSession; - -import org.thdl.lex.component.*; -import org.thdl.users.*; - - -/** - * 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 deleted file mode 100644 index 85b1aaa..0000000 --- a/src/java/org/thdl/lex/LogoutServlet.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.thdl.lex; -import java.io.IOException; -import javax.servlet.*; -import javax.servlet.http.*; - - -/** - * 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 deleted file mode 100644 index ae8bddd..0000000 --- a/src/java/org/thdl/lex/Preferences.java +++ /dev/null @@ -1,700 +0,0 @@ -package org.thdl.lex; - -import java.sql.Connection; -import java.sql.ResultSet; -import java.sql.SQLException; -import org.thdl.lex.component.*; - -import org.thdl.users.*; - - -/** - * 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 deleted file mode 100644 index 7d4bca9..0000000 --- a/src/java/org/thdl/lex/ThdlUtilities.java +++ /dev/null @@ -1,164 +0,0 @@ -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 deleted file mode 100644 index 57e2318..0000000 --- a/src/java/org/thdl/lex/UserSessionManager.java +++ /dev/null @@ -1,131 +0,0 @@ -package org.thdl.lex; -import java.io.IOException; - -import javax.servlet.http.*; -import org.thdl.lex.component.*; - -import org.thdl.users.*; - - -/** - * 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 deleted file mode 100644 index f533dea..0000000 --- a/src/java/org/thdl/lex/Visit.java +++ /dev/null @@ -1,243 +0,0 @@ -package org.thdl.lex; -import java.io.IOException; - -import javax.servlet.http.*; -import org.thdl.lex.component.*; - -import org.thdl.users.*; - - -/** - * 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/.cvsignore b/src/java/org/thdl/lex/commands/.cvsignore deleted file mode 100644 index 3367afd..0000000 --- a/src/java/org/thdl/lex/commands/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -old diff --git a/src/java/org/thdl/lex/commands/AbortCommand.java b/src/java/org/thdl/lex/commands/AbortCommand.java deleted file mode 100644 index d2fb106..0000000 --- a/src/java/org/thdl/lex/commands/AbortCommand.java +++ /dev/null @@ -1,47 +0,0 @@ -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 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 deleted file mode 100644 index 4473776..0000000 --- a/src/java/org/thdl/lex/commands/Command.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.thdl.lex.commands; - -import org.thdl.lex.*; -import org.thdl.lex.component.*; - - -/** - * 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 deleted file mode 100644 index 6610df2..0000000 --- a/src/java/org/thdl/lex/commands/CommandException.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.thdl.lex.commands; - -import org.thdl.lex.*; -import org.thdl.lex.component.*; - - -/** - * 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 deleted file mode 100644 index 22ca067..0000000 --- a/src/java/org/thdl/lex/commands/CommandToken.java +++ /dev/null @@ -1,88 +0,0 @@ -package org.thdl.lex.commands; - -import java.security.MessageDigest; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -import org.thdl.lex.*; -import org.thdl.lex.component.*; - - -/** - * Description of the Class - * - * @author travis - * @created October 22, 2003 - */ -public class CommandToken -{ - /** - * 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 deleted file mode 100644 index f5bbb82..0000000 --- a/src/java/org/thdl/lex/commands/DisplayCommand.java +++ /dev/null @@ -1,124 +0,0 @@ -package org.thdl.lex.commands; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.HashMap; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; -import org.apache.commons.beanutils.*; - -import org.thdl.lex.*; -import org.thdl.lex.component.*; - - -/** - * 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 deleted file mode 100644 index 1e2f2bb..0000000 --- a/src/java/org/thdl/lex/commands/FindCommand.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.thdl.lex.commands; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -import org.thdl.lex.*; -import org.thdl.lex.component.*; - - -/** - * Description of the Class - * - * @author travis - * @created October 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 deleted file mode 100644 index 234380d..0000000 --- a/src/java/org/thdl/lex/commands/GetInsertFormCommand.java +++ /dev/null @@ -1,189 +0,0 @@ -package org.thdl.lex.commands; - -import java.util.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -import org.thdl.lex.*; -import org.thdl.lex.component.*; -import org.thdl.users.*; - - -/** - * 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 deleted file mode 100644 index 9e20125..0000000 --- a/src/java/org/thdl/lex/commands/GetRemoveFormCommand.java +++ /dev/null @@ -1,153 +0,0 @@ -package org.thdl.lex.commands; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -import org.thdl.lex.*; -import org.thdl.lex.component.*; -import org.thdl.users.*; - - -/** - * 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 deleted file mode 100644 index 97bdd9c..0000000 --- a/src/java/org/thdl/lex/commands/GetUpdateFormCommand.java +++ /dev/null @@ -1,155 +0,0 @@ -package org.thdl.lex.commands; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.*; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -import org.thdl.lex.*; -import org.thdl.lex.component.*; -import org.thdl.users.*; - - -/** - * 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 deleted file mode 100644 index 42b2642..0000000 --- a/src/java/org/thdl/lex/commands/InsertCommand.java +++ /dev/null @@ -1,206 +0,0 @@ -package org.thdl.lex.commands; - -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.*; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -import org.thdl.lex.*; -import org.thdl.lex.component.*; -import org.thdl.users.*; - - -/** - * 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 deleted file mode 100644 index 74c9670..0000000 --- a/src/java/org/thdl/lex/commands/LexCommand.java +++ /dev/null @@ -1,130 +0,0 @@ -package org.thdl.lex.commands; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.Map; -//import org.apache.commons.beanutils.*; - -import javax.servlet.http.HttpServletRequest; - -import org.thdl.lex.*; -import org.thdl.lex.component.*; -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 deleted file mode 100644 index b66dc47..0000000 --- a/src/java/org/thdl/lex/commands/LexCommandException.java +++ /dev/null @@ -1,59 +0,0 @@ -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 deleted file mode 100644 index 8f2d230..0000000 --- a/src/java/org/thdl/lex/commands/NullCommand.java +++ /dev/null @@ -1,49 +0,0 @@ -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 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 deleted file mode 100644 index a4c8ac2..0000000 --- a/src/java/org/thdl/lex/commands/PreferencesCommand.java +++ /dev/null @@ -1,119 +0,0 @@ -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 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 deleted file mode 100644 index fd3f58f..0000000 --- a/src/java/org/thdl/lex/commands/RefreshSourcesCommand.java +++ /dev/null @@ -1,52 +0,0 @@ -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 deleted file mode 100644 index c56ffde..0000000 --- a/src/java/org/thdl/lex/commands/RemoveCommand.java +++ /dev/null @@ -1,166 +0,0 @@ -package org.thdl.lex.commands; - -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.*; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -import org.thdl.lex.*; -import org.thdl.lex.component.*; -import org.thdl.users.*; - - -/** - * 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 deleted file mode 100644 index b1c0212..0000000 --- a/src/java/org/thdl/lex/commands/UpdateCommand.java +++ /dev/null @@ -1,175 +0,0 @@ -package org.thdl.lex.commands; - -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.*; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -import org.thdl.lex.*; -import org.thdl.lex.component.*; -import org.thdl.users.*; - - -/** - * 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 deleted file mode 100644 index fbe66b1..0000000 --- a/src/java/org/thdl/lex/component/AnalyticalNote.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; - - -public class AnalyticalNote extends BaseAnalyticalNote implements Serializable -{ - -} diff --git a/src/java/org/thdl/lex/component/BaseAnalyticalNote.java b/src/java/org/thdl/lex/component/BaseAnalyticalNote.java deleted file mode 100644 index e3bd662..0000000 --- a/src/java/org/thdl/lex/component/BaseAnalyticalNote.java +++ /dev/null @@ -1,66 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseDefinition.java b/src/java/org/thdl/lex/component/BaseDefinition.java deleted file mode 100644 index 31d25c3..0000000 --- a/src/java/org/thdl/lex/component/BaseDefinition.java +++ /dev/null @@ -1,195 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseEncyclopediaArticle.java b/src/java/org/thdl/lex/component/BaseEncyclopediaArticle.java deleted file mode 100644 index 1e8e84c..0000000 --- a/src/java/org/thdl/lex/component/BaseEncyclopediaArticle.java +++ /dev/null @@ -1,80 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseEtymology.java b/src/java/org/thdl/lex/component/BaseEtymology.java deleted file mode 100644 index 290e9b9..0000000 --- a/src/java/org/thdl/lex/component/BaseEtymology.java +++ /dev/null @@ -1,130 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseGloss.java b/src/java/org/thdl/lex/component/BaseGloss.java deleted file mode 100644 index 5890c5c..0000000 --- a/src/java/org/thdl/lex/component/BaseGloss.java +++ /dev/null @@ -1,78 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseGrammaticalFunction.java b/src/java/org/thdl/lex/component/BaseGrammaticalFunction.java deleted file mode 100644 index 2bc835f..0000000 --- a/src/java/org/thdl/lex/component/BaseGrammaticalFunction.java +++ /dev/null @@ -1,67 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseKeyword.java b/src/java/org/thdl/lex/component/BaseKeyword.java deleted file mode 100644 index a2bb9c7..0000000 --- a/src/java/org/thdl/lex/component/BaseKeyword.java +++ /dev/null @@ -1,66 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseLexComponent.java b/src/java/org/thdl/lex/component/BaseLexComponent.java deleted file mode 100644 index f93f70e..0000000 --- a/src/java/org/thdl/lex/component/BaseLexComponent.java +++ /dev/null @@ -1,87 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseMeta.java b/src/java/org/thdl/lex/component/BaseMeta.java deleted file mode 100644 index 8a1213e..0000000 --- a/src/java/org/thdl/lex/component/BaseMeta.java +++ /dev/null @@ -1,167 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseModelSentence.java b/src/java/org/thdl/lex/component/BaseModelSentence.java deleted file mode 100644 index 390beb7..0000000 --- a/src/java/org/thdl/lex/component/BaseModelSentence.java +++ /dev/null @@ -1,91 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BasePassage.java b/src/java/org/thdl/lex/component/BasePassage.java deleted file mode 100644 index a9d7e5a..0000000 --- a/src/java/org/thdl/lex/component/BasePassage.java +++ /dev/null @@ -1,127 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BasePronunciation.java b/src/java/org/thdl/lex/component/BasePronunciation.java deleted file mode 100644 index ade625a..0000000 --- a/src/java/org/thdl/lex/component/BasePronunciation.java +++ /dev/null @@ -1,80 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseRelatedTerm.java b/src/java/org/thdl/lex/component/BaseRelatedTerm.java deleted file mode 100644 index e796b82..0000000 --- a/src/java/org/thdl/lex/component/BaseRelatedTerm.java +++ /dev/null @@ -1,79 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseSpeechRegister.java b/src/java/org/thdl/lex/component/BaseSpeechRegister.java deleted file mode 100644 index ee5a2a8..0000000 --- a/src/java/org/thdl/lex/component/BaseSpeechRegister.java +++ /dev/null @@ -1,67 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseSpelling.java b/src/java/org/thdl/lex/component/BaseSpelling.java deleted file mode 100644 index 4974e1e..0000000 --- a/src/java/org/thdl/lex/component/BaseSpelling.java +++ /dev/null @@ -1,80 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseSubdefinition.java b/src/java/org/thdl/lex/component/BaseSubdefinition.java deleted file mode 100644 index 929d525..0000000 --- a/src/java/org/thdl/lex/component/BaseSubdefinition.java +++ /dev/null @@ -1,182 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseTerm.java b/src/java/org/thdl/lex/component/BaseTerm.java deleted file mode 100644 index 387000e..0000000 --- a/src/java/org/thdl/lex/component/BaseTerm.java +++ /dev/null @@ -1,205 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseTransitionalData.java b/src/java/org/thdl/lex/component/BaseTransitionalData.java deleted file mode 100644 index 817472f..0000000 --- a/src/java/org/thdl/lex/component/BaseTransitionalData.java +++ /dev/null @@ -1,91 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/BaseTranslationEquivalent.java b/src/java/org/thdl/lex/component/BaseTranslationEquivalent.java deleted file mode 100644 index 6a70f34..0000000 --- a/src/java/org/thdl/lex/component/BaseTranslationEquivalent.java +++ /dev/null @@ -1,66 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/Definition.java b/src/java/org/thdl/lex/component/Definition.java deleted file mode 100644 index f6b23e2..0000000 --- a/src/java/org/thdl/lex/component/Definition.java +++ /dev/null @@ -1,195 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; -import java.util.*; -import org.thdl.lex.*; -import org.apache.commons.beanutils.MethodUtils; - - -/** - * 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 deleted file mode 100644 index a4f8b6f..0000000 --- a/src/java/org/thdl/lex/component/EncyclopediaArticle.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; - -public class EncyclopediaArticle extends BaseEncyclopediaArticle implements Serializable -{ - -} diff --git a/src/java/org/thdl/lex/component/Etymology.java b/src/java/org/thdl/lex/component/Etymology.java deleted file mode 100644 index 67b3368..0000000 --- a/src/java/org/thdl/lex/component/Etymology.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; - -public class Etymology extends BaseEtymology implements Serializable, Translatable -{ - -} diff --git a/src/java/org/thdl/lex/component/Gloss.java b/src/java/org/thdl/lex/component/Gloss.java deleted file mode 100644 index b51089e..0000000 --- a/src/java/org/thdl/lex/component/Gloss.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; - -public class Gloss extends BaseGloss implements Serializable -{ - -} diff --git a/src/java/org/thdl/lex/component/GrammaticalFunction.java b/src/java/org/thdl/lex/component/GrammaticalFunction.java deleted file mode 100644 index 07ad5a6..0000000 --- a/src/java/org/thdl/lex/component/GrammaticalFunction.java +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index e59ba5d..0000000 --- a/src/java/org/thdl/lex/component/IAnalyticalNote.java +++ /dev/null @@ -1,64 +0,0 @@ -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 deleted file mode 100644 index 0c850c6..0000000 --- a/src/java/org/thdl/lex/component/IDefinition.java +++ /dev/null @@ -1,243 +0,0 @@ -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 deleted file mode 100644 index 1d4f549..0000000 --- a/src/java/org/thdl/lex/component/IEncyclopediaArticle.java +++ /dev/null @@ -1,67 +0,0 @@ -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 deleted file mode 100644 index 11893ff..0000000 --- a/src/java/org/thdl/lex/component/IEtymology.java +++ /dev/null @@ -1,99 +0,0 @@ -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 deleted file mode 100644 index 38b8e0e..0000000 --- a/src/java/org/thdl/lex/component/IFunction.java +++ /dev/null @@ -1,51 +0,0 @@ -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 deleted file mode 100644 index f8dd9c3..0000000 --- a/src/java/org/thdl/lex/component/IGloss.java +++ /dev/null @@ -1,67 +0,0 @@ -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 deleted file mode 100644 index 5e07912..0000000 --- a/src/java/org/thdl/lex/component/IKeyword.java +++ /dev/null @@ -1,52 +0,0 @@ -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 deleted file mode 100644 index e24f312..0000000 --- a/src/java/org/thdl/lex/component/ILexComponent.java +++ /dev/null @@ -1,184 +0,0 @@ -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 deleted file mode 100644 index b4d3ce9..0000000 --- a/src/java/org/thdl/lex/component/IMeta.java +++ /dev/null @@ -1,211 +0,0 @@ -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 deleted file mode 100644 index 344c94f..0000000 --- a/src/java/org/thdl/lex/component/IModelSentence.java +++ /dev/null @@ -1,50 +0,0 @@ -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 deleted file mode 100644 index 991a25f..0000000 --- a/src/java/org/thdl/lex/component/IPassage.java +++ /dev/null @@ -1,106 +0,0 @@ -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 deleted file mode 100644 index b4bbbab..0000000 --- a/src/java/org/thdl/lex/component/IPronunciation.java +++ /dev/null @@ -1,67 +0,0 @@ -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 deleted file mode 100644 index 39832cd..0000000 --- a/src/java/org/thdl/lex/component/IRegister.java +++ /dev/null @@ -1,51 +0,0 @@ -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 deleted file mode 100644 index 6df73f4..0000000 --- a/src/java/org/thdl/lex/component/IRelatedTerm.java +++ /dev/null @@ -1,67 +0,0 @@ -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 deleted file mode 100644 index 74e26af..0000000 --- a/src/java/org/thdl/lex/component/ISpelling.java +++ /dev/null @@ -1,67 +0,0 @@ -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 deleted file mode 100644 index 89458da..0000000 --- a/src/java/org/thdl/lex/component/ISubdefinition.java +++ /dev/null @@ -1,210 +0,0 @@ -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 deleted file mode 100644 index 2b25538..0000000 --- a/src/java/org/thdl/lex/component/ITerm.java +++ /dev/null @@ -1,339 +0,0 @@ -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 deleted file mode 100644 index aa4d359..0000000 --- a/src/java/org/thdl/lex/component/ITransitionalData.java +++ /dev/null @@ -1,79 +0,0 @@ -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 deleted file mode 100644 index 5c8f70f..0000000 --- a/src/java/org/thdl/lex/component/ITranslationEquivalent.java +++ /dev/null @@ -1,33 +0,0 @@ -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 deleted file mode 100644 index ea22fe6..0000000 --- a/src/java/org/thdl/lex/component/Keyword.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; - -public class Keyword extends BaseKeyword implements Serializable -{ - -} diff --git a/src/java/org/thdl/lex/component/LexComponent.hbm.xml b/src/java/org/thdl/lex/component/LexComponent.hbm.xml deleted file mode 100644 index 672f973..0000000 --- a/src/java/org/thdl/lex/component/LexComponent.hbm.xml +++ /dev/null @@ -1,455 +0,0 @@ - - - - - - - - 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 deleted file mode 100644 index 6d40599..0000000 --- a/src/java/org/thdl/lex/component/LexComponent.java +++ /dev/null @@ -1,285 +0,0 @@ -package org.thdl.lex.component; -import java.io.Serializable; -import java.util.*; - -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 deleted file mode 100644 index 61b9bf0..0000000 --- a/src/java/org/thdl/lex/component/LexComponentException.java +++ /dev/null @@ -1,59 +0,0 @@ -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 deleted file mode 100644 index 1abc615..0000000 --- a/src/java/org/thdl/lex/component/LexComponentNode.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.thdl.lex.component; - -import java.util.List; - - -/** - * 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 deleted file mode 100644 index e01f0cf..0000000 --- a/src/java/org/thdl/lex/component/LexEntryException.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.thdl.lex.component; - -public class LexEntryException extends Exception -{ - public LexEntryException() - { - super(); - } - - public LexEntryException(String msg) - { - super(msg); - } -} diff --git a/src/java/org/thdl/lex/component/Meta.java b/src/java/org/thdl/lex/component/Meta.java deleted file mode 100644 index cf1e787..0000000 --- a/src/java/org/thdl/lex/component/Meta.java +++ /dev/null @@ -1,80 +0,0 @@ -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.*; - - -/** - * @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 deleted file mode 100644 index 45227ed..0000000 --- a/src/java/org/thdl/lex/component/ModelSentence.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; - -public class ModelSentence extends BaseModelSentence implements Serializable, Translatable -{ - -} diff --git a/src/java/org/thdl/lex/component/Passage.java b/src/java/org/thdl/lex/component/Passage.java deleted file mode 100644 index 826c8fd..0000000 --- a/src/java/org/thdl/lex/component/Passage.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; - -public class Passage extends BasePassage implements Serializable, Translatable -{ - -} diff --git a/src/java/org/thdl/lex/component/Pronunciation.java b/src/java/org/thdl/lex/component/Pronunciation.java deleted file mode 100644 index 072864b..0000000 --- a/src/java/org/thdl/lex/component/Pronunciation.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; - -public class Pronunciation extends BasePronunciation implements Serializable -{ - -} diff --git a/src/java/org/thdl/lex/component/RelatedTerm.java b/src/java/org/thdl/lex/component/RelatedTerm.java deleted file mode 100644 index 3d40efd..0000000 --- a/src/java/org/thdl/lex/component/RelatedTerm.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; - -public class RelatedTerm extends BaseRelatedTerm implements Serializable -{ - -} diff --git a/src/java/org/thdl/lex/component/SpeechRegister.java b/src/java/org/thdl/lex/component/SpeechRegister.java deleted file mode 100644 index 04f2016..0000000 --- a/src/java/org/thdl/lex/component/SpeechRegister.java +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index d9c23fc..0000000 --- a/src/java/org/thdl/lex/component/Spelling.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; - -public class Spelling extends BaseSpelling implements Serializable -{ - -} diff --git a/src/java/org/thdl/lex/component/Subdefinition.java b/src/java/org/thdl/lex/component/Subdefinition.java deleted file mode 100644 index 57765cf..0000000 --- a/src/java/org/thdl/lex/component/Subdefinition.java +++ /dev/null @@ -1,172 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; -import java.util.*; -import org.thdl.lex.*; -import org.apache.commons.beanutils.MethodUtils; - - - -/** - * 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 deleted file mode 100644 index bd5a45b..0000000 --- a/src/java/org/thdl/lex/component/Term.java +++ /dev/null @@ -1,291 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; -import java.util.*; -import org.thdl.lex.*; - - - -/** - * 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 deleted file mode 100644 index 93f4be9..0000000 --- a/src/java/org/thdl/lex/component/TransitionalData.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; - -public class TransitionalData extends BaseTransitionalData implements Serializable -{ - -} diff --git a/src/java/org/thdl/lex/component/Translatable.java b/src/java/org/thdl/lex/component/Translatable.java deleted file mode 100644 index af467c1..0000000 --- a/src/java/org/thdl/lex/component/Translatable.java +++ /dev/null @@ -1,44 +0,0 @@ -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 deleted file mode 100644 index 464c041..0000000 --- a/src/java/org/thdl/lex/component/TranslationEquivalent.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.thdl.lex.component; - -import java.io.Serializable; - -public class TranslationEquivalent extends BaseTranslationEquivalent implements Serializable -{ - -} diff --git a/src/java/org/thdl/lex/component/child/Author.hbm.xml b/src/java/org/thdl/lex/component/child/Author.hbm.xml deleted file mode 100644 index 33dd9e1..0000000 --- a/src/java/org/thdl/lex/component/child/Author.hbm.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/Author.java b/src/java/org/thdl/lex/component/child/Author.java deleted file mode 100644 index ecd3b9c..0000000 --- a/src/java/org/thdl/lex/component/child/Author.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/Dialect.hbm.xml b/src/java/org/thdl/lex/component/child/Dialect.hbm.xml deleted file mode 100644 index f9348a6..0000000 --- a/src/java/org/thdl/lex/component/child/Dialect.hbm.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/Dialect.java b/src/java/org/thdl/lex/component/child/Dialect.java deleted file mode 100644 index 5458f09..0000000 --- a/src/java/org/thdl/lex/component/child/Dialect.java +++ /dev/null @@ -1,74 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/EtymologyType.hbm.xml b/src/java/org/thdl/lex/component/child/EtymologyType.hbm.xml deleted file mode 100644 index 79d4bb7..0000000 --- a/src/java/org/thdl/lex/component/child/EtymologyType.hbm.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/EtymologyType.java b/src/java/org/thdl/lex/component/child/EtymologyType.java deleted file mode 100644 index b11d009..0000000 --- a/src/java/org/thdl/lex/component/child/EtymologyType.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/Function.hbm.xml b/src/java/org/thdl/lex/component/child/Function.hbm.xml deleted file mode 100644 index 453522e..0000000 --- a/src/java/org/thdl/lex/component/child/Function.hbm.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/Function.java b/src/java/org/thdl/lex/component/child/Function.java deleted file mode 100644 index 18650dd..0000000 --- a/src/java/org/thdl/lex/component/child/Function.java +++ /dev/null @@ -1,74 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/FunctionGeneral.java b/src/java/org/thdl/lex/component/child/FunctionGeneral.java deleted file mode 100644 index aec6588..0000000 --- a/src/java/org/thdl/lex/component/child/FunctionGeneral.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/FunctionPrimitive.java b/src/java/org/thdl/lex/component/child/FunctionPrimitive.java deleted file mode 100644 index 514ab07..0000000 --- a/src/java/org/thdl/lex/component/child/FunctionPrimitive.java +++ /dev/null @@ -1,74 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/FunctionSpecific.java b/src/java/org/thdl/lex/component/child/FunctionSpecific.java deleted file mode 100644 index 8945781..0000000 --- a/src/java/org/thdl/lex/component/child/FunctionSpecific.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/FunctionsGeneral.hbm.xml b/src/java/org/thdl/lex/component/child/FunctionsGeneral.hbm.xml deleted file mode 100644 index 51c51ff..0000000 --- a/src/java/org/thdl/lex/component/child/FunctionsGeneral.hbm.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/FunctionsGeneral.java b/src/java/org/thdl/lex/component/child/FunctionsGeneral.java deleted file mode 100644 index 0b6fe37..0000000 --- a/src/java/org/thdl/lex/component/child/FunctionsGeneral.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/FunctionsSpecific.hbm.xml b/src/java/org/thdl/lex/component/child/FunctionsSpecific.hbm.xml deleted file mode 100644 index 1fb47ad..0000000 --- a/src/java/org/thdl/lex/component/child/FunctionsSpecific.hbm.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/FunctionsSpecific.java b/src/java/org/thdl/lex/component/child/FunctionsSpecific.java deleted file mode 100644 index 1da5c39..0000000 --- a/src/java/org/thdl/lex/component/child/FunctionsSpecific.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/Language.hbm.xml b/src/java/org/thdl/lex/component/child/Language.hbm.xml deleted file mode 100644 index ee25d68..0000000 --- a/src/java/org/thdl/lex/component/child/Language.hbm.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/Language.java b/src/java/org/thdl/lex/component/child/Language.java deleted file mode 100644 index 09bc784..0000000 --- a/src/java/org/thdl/lex/component/child/Language.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/LiteraryForm.hbm.xml b/src/java/org/thdl/lex/component/child/LiteraryForm.hbm.xml deleted file mode 100644 index 44b7841..0000000 --- a/src/java/org/thdl/lex/component/child/LiteraryForm.hbm.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/LiteraryForm.java b/src/java/org/thdl/lex/component/child/LiteraryForm.java deleted file mode 100644 index 67dd6b5..0000000 --- a/src/java/org/thdl/lex/component/child/LiteraryForm.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/LiteraryGenre.hbm.xml b/src/java/org/thdl/lex/component/child/LiteraryGenre.hbm.xml deleted file mode 100644 index 03bbe6c..0000000 --- a/src/java/org/thdl/lex/component/child/LiteraryGenre.hbm.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/LiteraryGenre.java b/src/java/org/thdl/lex/component/child/LiteraryGenre.java deleted file mode 100644 index 271c2a1..0000000 --- a/src/java/org/thdl/lex/component/child/LiteraryGenre.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/LiteraryPeriod.hbm.xml b/src/java/org/thdl/lex/component/child/LiteraryPeriod.hbm.xml deleted file mode 100644 index e20c009..0000000 --- a/src/java/org/thdl/lex/component/child/LiteraryPeriod.hbm.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/LiteraryPeriod.java b/src/java/org/thdl/lex/component/child/LiteraryPeriod.java deleted file mode 100644 index b01191b..0000000 --- a/src/java/org/thdl/lex/component/child/LiteraryPeriod.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/LiterarySource.hbm.xml b/src/java/org/thdl/lex/component/child/LiterarySource.hbm.xml deleted file mode 100644 index a133000..0000000 --- a/src/java/org/thdl/lex/component/child/LiterarySource.hbm.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/LiterarySource.java b/src/java/org/thdl/lex/component/child/LiterarySource.java deleted file mode 100644 index 8ea6244..0000000 --- a/src/java/org/thdl/lex/component/child/LiterarySource.java +++ /dev/null @@ -1,212 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/MajorDialectFamily.hbm.xml b/src/java/org/thdl/lex/component/child/MajorDialectFamily.hbm.xml deleted file mode 100644 index af3e28f..0000000 --- a/src/java/org/thdl/lex/component/child/MajorDialectFamily.hbm.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/MajorDialectFamily.java b/src/java/org/thdl/lex/component/child/MajorDialectFamily.java deleted file mode 100644 index 69c58b9..0000000 --- a/src/java/org/thdl/lex/component/child/MajorDialectFamily.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/PhoneticsType.hbm.xml b/src/java/org/thdl/lex/component/child/PhoneticsType.hbm.xml deleted file mode 100644 index 9d78f8d..0000000 --- a/src/java/org/thdl/lex/component/child/PhoneticsType.hbm.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/PhoneticsType.java b/src/java/org/thdl/lex/component/child/PhoneticsType.java deleted file mode 100644 index 0a4392a..0000000 --- a/src/java/org/thdl/lex/component/child/PhoneticsType.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/Preferences.hbm.xml b/src/java/org/thdl/lex/component/child/Preferences.hbm.xml deleted file mode 100644 index 24c6129..0000000 --- a/src/java/org/thdl/lex/component/child/Preferences.hbm.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/ProjectSubject.hbm.xml b/src/java/org/thdl/lex/component/child/ProjectSubject.hbm.xml deleted file mode 100644 index 4b23e11..0000000 --- a/src/java/org/thdl/lex/component/child/ProjectSubject.hbm.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/ProjectSubject.java b/src/java/org/thdl/lex/component/child/ProjectSubject.java deleted file mode 100644 index 1f50cb7..0000000 --- a/src/java/org/thdl/lex/component/child/ProjectSubject.java +++ /dev/null @@ -1,91 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/Register.hbm.xml b/src/java/org/thdl/lex/component/child/Register.hbm.xml deleted file mode 100644 index af64d80..0000000 --- a/src/java/org/thdl/lex/component/child/Register.hbm.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/Register.java b/src/java/org/thdl/lex/component/child/Register.java deleted file mode 100644 index 01bb0ae..0000000 --- a/src/java/org/thdl/lex/component/child/Register.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/RelatedTermType.hbm.xml b/src/java/org/thdl/lex/component/child/RelatedTermType.hbm.xml deleted file mode 100644 index 84a6ba8..0000000 --- a/src/java/org/thdl/lex/component/child/RelatedTermType.hbm.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/RelatedTermType.java b/src/java/org/thdl/lex/component/child/RelatedTermType.java deleted file mode 100644 index 3b80f87..0000000 --- a/src/java/org/thdl/lex/component/child/RelatedTermType.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/Script.hbm.xml b/src/java/org/thdl/lex/component/child/Script.hbm.xml deleted file mode 100644 index 7c733bf..0000000 --- a/src/java/org/thdl/lex/component/child/Script.hbm.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/Script.java b/src/java/org/thdl/lex/component/child/Script.java deleted file mode 100644 index bbe4dcd..0000000 --- a/src/java/org/thdl/lex/component/child/Script.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/Source.hbm.xml b/src/java/org/thdl/lex/component/child/Source.hbm.xml deleted file mode 100644 index e5dee6b..0000000 --- a/src/java/org/thdl/lex/component/child/Source.hbm.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/Source.java b/src/java/org/thdl/lex/component/child/Source.java deleted file mode 100644 index d40eca8..0000000 --- a/src/java/org/thdl/lex/component/child/Source.java +++ /dev/null @@ -1,79 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/SpecificDialect.hbm.xml b/src/java/org/thdl/lex/component/child/SpecificDialect.hbm.xml deleted file mode 100644 index e2c2bf2..0000000 --- a/src/java/org/thdl/lex/component/child/SpecificDialect.hbm.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/SpecificDialect.java b/src/java/org/thdl/lex/component/child/SpecificDialect.java deleted file mode 100644 index 459d4b0..0000000 --- a/src/java/org/thdl/lex/component/child/SpecificDialect.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/SpellingType.hbm.xml b/src/java/org/thdl/lex/component/child/SpellingType.hbm.xml deleted file mode 100644 index 9d9727e..0000000 --- a/src/java/org/thdl/lex/component/child/SpellingType.hbm.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/SpellingType.java b/src/java/org/thdl/lex/component/child/SpellingType.java deleted file mode 100644 index c8871fd..0000000 --- a/src/java/org/thdl/lex/component/child/SpellingType.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/TransitionalDataLabel.hbm.xml b/src/java/org/thdl/lex/component/child/TransitionalDataLabel.hbm.xml deleted file mode 100644 index 70df7fa..0000000 --- a/src/java/org/thdl/lex/component/child/TransitionalDataLabel.hbm.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/component/child/TransitionalDataLabel.java b/src/java/org/thdl/lex/component/child/TransitionalDataLabel.java deleted file mode 100644 index 397e6ba..0000000 --- a/src/java/org/thdl/lex/component/child/TransitionalDataLabel.java +++ /dev/null @@ -1,62 +0,0 @@ -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(); - } - -} diff --git a/src/java/org/thdl/lex/component/child/User.hbm.xml b/src/java/org/thdl/lex/component/child/User.hbm.xml deleted file mode 100644 index 6847f73..0000000 --- a/src/java/org/thdl/lex/component/child/User.hbm.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/java/org/thdl/lex/test/LexTestCase.java b/src/java/org/thdl/lex/test/LexTestCase.java deleted file mode 100644 index ec013f4..0000000 --- a/src/java/org/thdl/lex/test/LexTestCase.java +++ /dev/null @@ -1,80 +0,0 @@ -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/ConvertDataToNewMapping.java b/src/java/org/thdl/lex/util/ConvertDataToNewMapping.java deleted file mode 100644 index 9e8312f..0000000 --- a/src/java/org/thdl/lex/util/ConvertDataToNewMapping.java +++ /dev/null @@ -1,92 +0,0 @@ -package org.thdl.lex; - -import junit.framework.*; -import org.thdl.lex.*; -import org.thdl.lex.component.*; -import org.apache.commons.dbcp.BasicDataSourceFactory; -import java.util.*; -import javax.naming.InitialContext; -import javax.naming.Name; -import net.sf.hibernate.*; -import java.io.File; - -/** - * 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/util/DictionaryImporter.java b/src/java/org/thdl/lex/util/DictionaryImporter.java deleted file mode 100644 index 7316cc6..0000000 --- a/src/java/org/thdl/lex/util/DictionaryImporter.java +++ /dev/null @@ -1,523 +0,0 @@ -package org.thdl.lex.util; - -import java.net.*; -import java.io.*; -import java.util.*; -import org.thdl.lex.*; -import org.thdl.lex.component.*; -import org.thdl.tib.scanner.Manipulate; -import java.sql.*; - -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 && marker0) - { - alternateWords = s1.split(";"); - for (marker2=0; marker2= 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(); - } -} diff --git a/src/java/org/thdl/lex/util/HibernateSessionDataTransfer.java b/src/java/org/thdl/lex/util/HibernateSessionDataTransfer.java deleted file mode 100644 index 8db15b9..0000000 --- a/src/java/org/thdl/lex/util/HibernateSessionDataTransfer.java +++ /dev/null @@ -1,107 +0,0 @@ -package org.thdl.lex; - -import net.sf.hibernate.*; -import net.sf.hibernate.cfg.*; -import java.io.File; - -/** - * 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/util/HibernateTransactionDataTransfer.java b/src/java/org/thdl/lex/util/HibernateTransactionDataTransfer.java deleted file mode 100644 index 4852623..0000000 --- a/src/java/org/thdl/lex/util/HibernateTransactionDataTransfer.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.thdl.lex; - -import net.sf.hibernate.*; -import net.sf.hibernate.cfg.*; - - -/** - * 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/util/LexComponentDataTransfer.hbm.xml b/src/java/org/thdl/lex/util/LexComponentDataTransfer.hbm.xml deleted file mode 100644 index 4e7e620..0000000 --- a/src/java/org/thdl/lex/util/LexComponentDataTransfer.hbm.xml +++ /dev/null @@ -1,471 +0,0 @@ - - - - - - - - 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/LexComponentRepositoryDataTransfer.java b/src/java/org/thdl/lex/util/LexComponentRepositoryDataTransfer.java deleted file mode 100644 index 1a413ec..0000000 --- a/src/java/org/thdl/lex/util/LexComponentRepositoryDataTransfer.java +++ /dev/null @@ -1,898 +0,0 @@ -package org.thdl.lex; -import java.sql.*; -import java.util.*; - -import net.sf.hibernate.*; -import org.apache.log4j.*; - -import org.thdl.lex.component.*; - - - -/** - * 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/util/hibernate-data-transfer.cfg.xml.sample b/src/java/org/thdl/lex/util/hibernate-data-transfer.cfg.xml.sample deleted file mode 100644 index e7a765f..0000000 --- a/src/java/org/thdl/lex/util/hibernate-data-transfer.cfg.xml.sample +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - -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 deleted file mode 100644 index ab53bd3..0000000 --- a/src/java/org/thdl/tib/scanner/Manipulate.java +++ /dev/null @@ -1,382 +0,0 @@ -/* -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; - -import java.io.*; -import org.thdl.util.*; - -/** 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; j0) - { - 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 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; i0 && i0) - { - 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(); - }*/ -} diff --git a/src/js/lex.js b/src/js/lex.js deleted file mode 100644 index ea9b9e9..0000000 --- a/src/js/lex.js +++ /dev/null @@ -1,73 +0,0 @@ -/* -==================== -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/src/jsp/index.jsp b/src/jsp/index.jsp deleted file mode 100644 index 90e64a3..0000000 --- a/src/jsp/index.jsp +++ /dev/null @@ -1,15 +0,0 @@ -<%@ page buffer="12kb" autoFlush="true" import="org.thdl.lex.*" errorPage="/jsp/error.jsp" %> - - -<%--
THDL Tibetan Collaborative Dictionaries Home Page
-
Last Updated:October 18, 2003
--%> -
-

Dictionary Welcome Page

-

- -

- -
- - - diff --git a/src/jsp/jsp/.cvsignore b/src/jsp/jsp/.cvsignore deleted file mode 100644 index 3367afd..0000000 --- a/src/jsp/jsp/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -old diff --git a/src/jsp/jsp/analyticalNoteForm.jsf b/src/jsp/jsp/analyticalNoteForm.jsf deleted file mode 100644 index 0910918..0000000 --- a/src/jsp/jsp/analyticalNoteForm.jsf +++ /dev/null @@ -1,42 +0,0 @@ -<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - -Analysis:
- -
- - - - -

-
diff --git a/src/jsp/jsp/debug.jsf b/src/jsp/jsp/debug.jsf deleted file mode 100644 index 07b94cc..0000000 --- a/src/jsp/jsp/debug.jsf +++ /dev/null @@ -1,77 +0,0 @@ -<%@ 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/src/jsp/jsp/definitionForm.jsf b/src/jsp/jsp/definitionForm.jsf deleted file mode 100644 index 064813f..0000000 --- a/src/jsp/jsp/definitionForm.jsf +++ /dev/null @@ -1,57 +0,0 @@ -<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - -Definition:
- - -
- - - - -

-
diff --git a/src/jsp/jsp/displayDefinition.jsf b/src/jsp/jsp/displayDefinition.jsf deleted file mode 100644 index 748be15..0000000 --- a/src/jsp/jsp/displayDefinition.jsf +++ /dev/null @@ -1,63 +0,0 @@ -<%@ 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/src/jsp/jsp/displayEncyclopediaArticle.jsf b/src/jsp/jsp/displayEncyclopediaArticle.jsf deleted file mode 100644 index f17dffb..0000000 --- a/src/jsp/jsp/displayEncyclopediaArticle.jsf +++ /dev/null @@ -1,26 +0,0 @@ -<%@ 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/src/jsp/jsp/displayEntry.jsp b/src/jsp/jsp/displayEntry.jsp deleted file mode 100644 index ec7b9f5..0000000 --- a/src/jsp/jsp/displayEntry.jsp +++ /dev/null @@ -1,140 +0,0 @@ -<%@ 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/src/jsp/jsp/displayEtymology.jsf b/src/jsp/jsp/displayEtymology.jsf deleted file mode 100644 index 281b329..0000000 --- a/src/jsp/jsp/displayEtymology.jsf +++ /dev/null @@ -1,78 +0,0 @@ -<%@ 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/src/jsp/jsp/displayForm.jsp b/src/jsp/jsp/displayForm.jsp deleted file mode 100644 index ca8a2df..0000000 --- a/src/jsp/jsp/displayForm.jsp +++ /dev/null @@ -1,205 +0,0 @@ -<%@ 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/src/jsp/jsp/displayFunction.jsf b/src/jsp/jsp/displayFunction.jsf deleted file mode 100644 index 60ba8ae..0000000 --- a/src/jsp/jsp/displayFunction.jsf +++ /dev/null @@ -1,28 +0,0 @@ -<%@ 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/src/jsp/jsp/displayKeyword.jsf b/src/jsp/jsp/displayKeyword.jsf deleted file mode 100644 index b15ffdc..0000000 --- a/src/jsp/jsp/displayKeyword.jsf +++ /dev/null @@ -1,32 +0,0 @@ -<%@ 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/src/jsp/jsp/displayMeta.jsf b/src/jsp/jsp/displayMeta.jsf deleted file mode 100644 index a1f4799..0000000 --- a/src/jsp/jsp/displayMeta.jsf +++ /dev/null @@ -1,53 +0,0 @@ -<%@ page %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> - - - - - - - -<%--
--%> - - - view metadata - - - - - - -
- - diff --git a/src/jsp/jsp/displayModelSentence.jsf b/src/jsp/jsp/displayModelSentence.jsf deleted file mode 100644 index 90223ac..0000000 --- a/src/jsp/jsp/displayModelSentence.jsf +++ /dev/null @@ -1,63 +0,0 @@ -<%@ 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/src/jsp/jsp/displayNotes.jsf b/src/jsp/jsp/displayNotes.jsf deleted file mode 100644 index 771149c..0000000 --- a/src/jsp/jsp/displayNotes.jsf +++ /dev/null @@ -1,41 +0,0 @@ -<%@ 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/src/jsp/jsp/displayPassage.jsf b/src/jsp/jsp/displayPassage.jsf deleted file mode 100644 index 70d7d57..0000000 --- a/src/jsp/jsp/displayPassage.jsf +++ /dev/null @@ -1,109 +0,0 @@ -<%@ 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/src/jsp/jsp/displayPronunciation.jsf b/src/jsp/jsp/displayPronunciation.jsf deleted file mode 100644 index a08e680..0000000 --- a/src/jsp/jsp/displayPronunciation.jsf +++ /dev/null @@ -1,33 +0,0 @@ -<%@ 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/src/jsp/jsp/displayRegister.jsf b/src/jsp/jsp/displayRegister.jsf deleted file mode 100644 index 305985e..0000000 --- a/src/jsp/jsp/displayRegister.jsf +++ /dev/null @@ -1,30 +0,0 @@ -<%@ 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/src/jsp/jsp/displayRelatedTerm.jsf b/src/jsp/jsp/displayRelatedTerm.jsf deleted file mode 100644 index bdfd4d6..0000000 --- a/src/jsp/jsp/displayRelatedTerm.jsf +++ /dev/null @@ -1,33 +0,0 @@ -<%@ 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/src/jsp/jsp/displaySpelling.jsf b/src/jsp/jsp/displaySpelling.jsf deleted file mode 100644 index 8a3ef43..0000000 --- a/src/jsp/jsp/displaySpelling.jsf +++ /dev/null @@ -1,28 +0,0 @@ -<%@ 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/src/jsp/jsp/displaySubdefinition.jsf b/src/jsp/jsp/displaySubdefinition.jsf deleted file mode 100644 index 842fa41..0000000 --- a/src/jsp/jsp/displaySubdefinition.jsf +++ /dev/null @@ -1,65 +0,0 @@ -<%@ 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/src/jsp/jsp/displayTerm.jsf b/src/jsp/jsp/displayTerm.jsf deleted file mode 100644 index 7d85a80..0000000 --- a/src/jsp/jsp/displayTerm.jsf +++ /dev/null @@ -1,46 +0,0 @@ -<%@ 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/src/jsp/jsp/displayTransitionalData.jsf b/src/jsp/jsp/displayTransitionalData.jsf deleted file mode 100644 index 78d0e1d..0000000 --- a/src/jsp/jsp/displayTransitionalData.jsf +++ /dev/null @@ -1,27 +0,0 @@ -<%@ 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/src/jsp/jsp/displayTranslationEquivalent.jsf b/src/jsp/jsp/displayTranslationEquivalent.jsf deleted file mode 100644 index 4fcfe21..0000000 --- a/src/jsp/jsp/displayTranslationEquivalent.jsf +++ /dev/null @@ -1,28 +0,0 @@ -<%@ 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/src/jsp/jsp/displayTree.jsf b/src/jsp/jsp/displayTree.jsf deleted file mode 100644 index 60b17ad..0000000 --- a/src/jsp/jsp/displayTree.jsf +++ /dev/null @@ -1,274 +0,0 @@ -<%@ 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/src/jsp/jsp/displayTreeToc.jsf b/src/jsp/jsp/displayTreeToc.jsf deleted file mode 100644 index e48feae..0000000 --- a/src/jsp/jsp/displayTreeToc.jsf +++ /dev/null @@ -1,141 +0,0 @@ -<%@ 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/src/jsp/jsp/encyclopedia.jsf b/src/jsp/jsp/encyclopedia.jsf deleted file mode 100644 index 7d68b8b..0000000 --- a/src/jsp/jsp/encyclopedia.jsf +++ /dev/null @@ -1,19 +0,0 @@ -<%@ 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/src/jsp/jsp/encyclopediaArticleForm.jsf b/src/jsp/jsp/encyclopediaArticleForm.jsf deleted file mode 100644 index ffa5511..0000000 --- a/src/jsp/jsp/encyclopediaArticleForm.jsf +++ /dev/null @@ -1,54 +0,0 @@ -<%-- <%@ 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/src/jsp/jsp/error.jsp b/src/jsp/jsp/error.jsp deleted file mode 100644 index f9a7dbb..0000000 --- a/src/jsp/jsp/error.jsp +++ /dev/null @@ -1,68 +0,0 @@ -<%@ 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/src/jsp/jsp/etymologyForm.jsf b/src/jsp/jsp/etymologyForm.jsf deleted file mode 100644 index a7d1b13..0000000 --- a/src/jsp/jsp/etymologyForm.jsf +++ /dev/null @@ -1,114 +0,0 @@ -<%@ 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/src/jsp/jsp/footer.jsf b/src/jsp/jsp/footer.jsf deleted file mode 100644 index a776a64..0000000 --- a/src/jsp/jsp/footer.jsf +++ /dev/null @@ -1,28 +0,0 @@ -<%@ 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/src/jsp/jsp/functionForm.jsf b/src/jsp/jsp/functionForm.jsf deleted file mode 100644 index a50a2dc..0000000 --- a/src/jsp/jsp/functionForm.jsf +++ /dev/null @@ -1,55 +0,0 @@ -<%-- <%@ 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/src/jsp/jsp/goodbye.jsp b/src/jsp/jsp/goodbye.jsp deleted file mode 100644 index c596508..0000000 --- a/src/jsp/jsp/goodbye.jsp +++ /dev/null @@ -1,10 +0,0 @@ -<%@ 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/src/jsp/jsp/header.jsf b/src/jsp/jsp/header.jsf deleted file mode 100644 index 92b7328..0000000 --- a/src/jsp/jsp/header.jsf +++ /dev/null @@ -1,84 +0,0 @@ -<%@ page import="org.thdl.lex.*" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> - - - - - - - - - - - -THDL Tibetan Collaborative Dictionaries - - - - - - -
- - - -
- -
- -<%-- - --%> diff --git a/src/jsp/jsp/keywordForm.jsf b/src/jsp/jsp/keywordForm.jsf deleted file mode 100644 index 570af23..0000000 --- a/src/jsp/jsp/keywordForm.jsf +++ /dev/null @@ -1,44 +0,0 @@ -<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - -Keyword:
- -
- - - - -

-
diff --git a/src/jsp/jsp/menu.jsp b/src/jsp/jsp/menu.jsp deleted file mode 100644 index 264ce3b..0000000 --- a/src/jsp/jsp/menu.jsp +++ /dev/null @@ -1,121 +0,0 @@ -<%@ 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/src/jsp/jsp/metaDefaultsForm.jsp b/src/jsp/jsp/metaDefaultsForm.jsp deleted file mode 100644 index 1abd5a6..0000000 --- a/src/jsp/jsp/metaDefaultsForm.jsp +++ /dev/null @@ -1,257 +0,0 @@ -<%@ 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/src/jsp/jsp/metaForm.jsf b/src/jsp/jsp/metaForm.jsf deleted file mode 100644 index 5e613f1..0000000 --- a/src/jsp/jsp/metaForm.jsf +++ /dev/null @@ -1,278 +0,0 @@ -<%@ 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/src/jsp/jsp/metaPrefsForm.jsp b/src/jsp/jsp/metaPrefsForm.jsp deleted file mode 100644 index 38dbc23..0000000 --- a/src/jsp/jsp/metaPrefsForm.jsp +++ /dev/null @@ -1,143 +0,0 @@ -<%@ 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/src/jsp/jsp/modelSentenceForm.jsf b/src/jsp/jsp/modelSentenceForm.jsf deleted file mode 100644 index 2328499..0000000 --- a/src/jsp/jsp/modelSentenceForm.jsf +++ /dev/null @@ -1,61 +0,0 @@ -<%@ 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/src/jsp/jsp/navLinks.jsf b/src/jsp/jsp/navLinks.jsf deleted file mode 100644 index eb12fe5..0000000 --- a/src/jsp/jsp/navLinks.jsf +++ /dev/null @@ -1,26 +0,0 @@ -<%@ page %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> - diff --git a/src/jsp/jsp/passageForm.jsf b/src/jsp/jsp/passageForm.jsf deleted file mode 100644 index e906255..0000000 --- a/src/jsp/jsp/passageForm.jsf +++ /dev/null @@ -1,74 +0,0 @@ -<%@ 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/src/jsp/jsp/pronunciationForm.jsf b/src/jsp/jsp/pronunciationForm.jsf deleted file mode 100644 index 1794e30..0000000 --- a/src/jsp/jsp/pronunciationForm.jsf +++ /dev/null @@ -1,62 +0,0 @@ -<%-- <%@ 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/src/jsp/jsp/registerForm.jsf b/src/jsp/jsp/registerForm.jsf deleted file mode 100644 index 086a2c7..0000000 --- a/src/jsp/jsp/registerForm.jsf +++ /dev/null @@ -1,54 +0,0 @@ -<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> - - - - - - - - - <%-- --%> - - - - - - - - <%-- --%> - - - - - - - <%-- --%> - - - - -
-

- - - - - - -Register: - -
- - - -

-
diff --git a/src/jsp/jsp/relatedTermForm.jsf b/src/jsp/jsp/relatedTermForm.jsf deleted file mode 100644 index dc3ac63..0000000 --- a/src/jsp/jsp/relatedTermForm.jsf +++ /dev/null @@ -1,63 +0,0 @@ -<%@ 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/src/jsp/jsp/search.jsp b/src/jsp/jsp/search.jsp deleted file mode 100644 index 0e40d30..0000000 --- a/src/jsp/jsp/search.jsp +++ /dev/null @@ -1,53 +0,0 @@ -<%@ 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/src/jsp/jsp/spellingForm.jsf b/src/jsp/jsp/spellingForm.jsf deleted file mode 100644 index c2a1c6a..0000000 --- a/src/jsp/jsp/spellingForm.jsf +++ /dev/null @@ -1,60 +0,0 @@ -<%@ 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/src/jsp/jsp/subdefinitionForm.jsf b/src/jsp/jsp/subdefinitionForm.jsf deleted file mode 100644 index dc31bef..0000000 --- a/src/jsp/jsp/subdefinitionForm.jsf +++ /dev/null @@ -1,60 +0,0 @@ -<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

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

-
diff --git a/src/jsp/jsp/termForm.jsf b/src/jsp/jsp/termForm.jsf deleted file mode 100644 index 352e83f..0000000 --- a/src/jsp/jsp/termForm.jsf +++ /dev/null @@ -1,47 +0,0 @@ -<%@ 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/src/jsp/jsp/test.jsp b/src/jsp/jsp/test.jsp deleted file mode 100644 index e236fbc..0000000 --- a/src/jsp/jsp/test.jsp +++ /dev/null @@ -1,39 +0,0 @@ -<%@ 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/src/jsp/jsp/testing.jsf b/src/jsp/jsp/testing.jsf deleted file mode 100644 index 3aeecb9..0000000 --- a/src/jsp/jsp/testing.jsf +++ /dev/null @@ -1,27 +0,0 @@ -<%@ 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/src/jsp/jsp/transitionalDataForm.jsf b/src/jsp/jsp/transitionalDataForm.jsf deleted file mode 100644 index ecc0298..0000000 --- a/src/jsp/jsp/transitionalDataForm.jsf +++ /dev/null @@ -1,53 +0,0 @@ -<%@ 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/src/jsp/jsp/translationEquivalentForm.jsf b/src/jsp/jsp/translationEquivalentForm.jsf deleted file mode 100644 index 6ad82ae..0000000 --- a/src/jsp/jsp/translationEquivalentForm.jsf +++ /dev/null @@ -1,47 +0,0 @@ -<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> - - - - - - - - - <%-- --%> - - - - - - - - <%-- --%> - - - - - - - <%-- --%> - - - - -
-

- - - - - - -Translation Equivalent:
- -
- - - - -

-
diff --git a/src/jsp/login.jsp b/src/jsp/login.jsp deleted file mode 100644 index 0da6e02..0000000 --- a/src/jsp/login.jsp +++ /dev/null @@ -1,36 +0,0 @@ -<%@ page buffer="512kb" autoFlush="false" import="org.thdl.lex.*" errorPage="/jsp/error.jsp" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%> - -
-Please login to use the THDL Tibetan Collaborative Dictionaries -
-
Message
-
-
- - -

Invalid username/password combination.

- -
- - -
-

-Username: -
-Password: -
- -

-
-
-

-If you would just like to browse the dictionary without contributing please proceed here. - -

-
-
-
- - - diff --git a/src/jsp/logout.jsp b/src/jsp/logout.jsp deleted file mode 100644 index 9f5e221..0000000 --- a/src/jsp/logout.jsp +++ /dev/null @@ -1,23 +0,0 @@ -<%@ page buffer="512kb" autoFlush="false" import="org.thdl.lex.*" errorPage="/jsp/error.jsp" %> -<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%> - - -
-
-
-Log out of THDL Tibetan Collaborative Dictionaries
- -
- -

-Log out account -

- -
- -
- -
-
-
- diff --git a/src/sql/import-updates.sql b/src/sql/import-updates.sql deleted file mode 100644 index d546bae..0000000 --- a/src/sql/import-updates.sql +++ /dev/null @@ -1,15 +0,0 @@ -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 deleted file mode 100644 index 2448ac1..0000000 --- a/src/sql/lex-flat-data.sql +++ /dev/null @@ -1,272 +0,0 @@ -# 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 deleted file mode 100644 index df53fe9..0000000 --- a/src/sql/lex-flat-schema.sql +++ /dev/null @@ -1,552 +0,0 @@ --- 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 deleted file mode 100644 index 99a6598..0000000 --- a/src/sql/lex-schema.sql +++ /dev/null @@ -1,344 +0,0 @@ -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/tld/c-rt.tld b/tld/c-rt.tld deleted file mode 100644 index 2203657..0000000 --- a/tld/c-rt.tld +++ /dev/null @@ -1,393 +0,0 @@ - - - - 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/tld/c.tld b/tld/c.tld deleted file mode 100644 index ce80e8d..0000000 --- a/tld/c.tld +++ /dev/null @@ -1,416 +0,0 @@ - - - - 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/tld/taglibs-input.tld b/tld/taglibs-input.tld deleted file mode 100644 index d4e4d38..0000000 --- a/tld/taglibs-input.tld +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - - - - 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/tld/taglibs-request.tld b/tld/taglibs-request.tld deleted file mode 100644 index e71f522..0000000 --- a/tld/taglibs-request.tld +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - - - - - 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/tld/taglibs-response.tld b/tld/taglibs-response.tld deleted file mode 100644 index 774ca09..0000000 --- a/tld/taglibs-response.tld +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - - - - 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/tld/taglibs-session.tld b/tld/taglibs-session.tld deleted file mode 100644 index 8b6c04e..0000000 --- a/tld/taglibs-session.tld +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - 1.0 - 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/tld/taglibs-string.tld b/tld/taglibs-string.tld deleted file mode 100644 index dd9f471..0000000 --- a/tld/taglibs-string.tld +++ /dev/null @@ -1,700 +0,0 @@ - - - - - - - - - - 1.0 - 1.1 - string - http://jakarta.apache.org/taglibs/string-1.0 - - 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. - - - 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 - - - - 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 - - - - - - - -