You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
(1) |
Apr
(14) |
May
(36) |
Jun
(148) |
Jul
(33) |
Aug
(2) |
Sep
(17) |
Oct
(42) |
Nov
(137) |
Dec
(88) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(89) |
Feb
(80) |
Mar
(217) |
Apr
(76) |
May
(5) |
Jun
(39) |
Jul
(35) |
Aug
(4) |
Sep
(7) |
Oct
(14) |
Nov
(12) |
Dec
(9) |
2011 |
Jan
(6) |
Feb
(4) |
Mar
(11) |
Apr
(55) |
May
(90) |
Jun
(39) |
Jul
(15) |
Aug
(15) |
Sep
(23) |
Oct
(12) |
Nov
(17) |
Dec
(20) |
2012 |
Jan
(22) |
Feb
(63) |
Mar
|
Apr
(1) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(3) |
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: SourceForge.net <no...@so...> - 2012-06-12 17:28:17
|
Bugs item #3534651, was opened at 2012-06-12 10:28 Message generated for change (Tracker Item Submitted) made by jonesmcc You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3534651&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Priority: 5 Private: No Submitted By: Michael Jones (jonesmcc) Assigned to: Nobody/Anonymous (nobody) Summary: Homonym resolution link null pointer exception error Initial Comment: Upon attempting to resolve some taxa labeling issues for TreeBASE submission 12826 (Sustained high levels of neuregulin-1 in the longest-lived rodents; a key determinant of rodent longevity, by Edrey, Casper et al.), I was presented with the error message: "Hystrix appears to be a homonym; defaulted to first hit, but please validate by hand." When I clicked the hyperlink, I was presented with a null pointer exception error message with the header, "Uncaught Exception Encountered". Furthermore, I found that I was unable to resolve the error message even by going straight to the Taxon Label Editor for the the Hystrix taxa label. A while after initially noticing this error, I discovered that the same message "Hystrix appears to be a homonym; defaulted to first hit, but please validate by hand," shows up in the taxa tab for every other submission that I work on, even though there isn't anything remotely related to Hystrix in any of them. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3534651&group_id=248804 |
From: <hl...@us...> - 2012-06-11 18:10:45
|
Revision: 1094 http://treebase.svn.sourceforge.net/treebase/?rev=1094&view=rev Author: hlapp Date: 2012-06-11 18:10:38 +0000 (Mon, 11 Jun 2012) Log Message: ----------- Fixed spelling error reported by Michael Jones. Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/ListTaxaController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/ListTaxaController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/ListTaxaController.java 2012-05-25 15:25:44 UTC (rev 1093) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/ListTaxaController.java 2012-06-11 18:10:38 UTC (rev 1094) @@ -248,7 +248,7 @@ errors.add(label.getTaxonLabel() + " has not been linked to the external taxonomy"); } else if ( label.getAttemptedLinking() && label.getNcbiTaxID() == null ) { - errors.add(label.getTaxonLabel() + " - an unsuccesful attempt has been made to link this to the external taxonomy"); + errors.add(label.getTaxonLabel() + " - an unsuccessful attempt has been made to link this to the external taxonomy"); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hs...@us...> - 2012-05-25 15:25:55
|
Revision: 1093 http://treebase.svn.sourceforge.net/treebase/?rev=1093&view=rev Author: hshyket Date: 2012-05-25 15:25:44 +0000 (Fri, 25 May 2012) Log Message: ----------- Removing Caching Modified Paths: -------------- trunk/treebase-web/pom.xml trunk/treebase-web/src/main/webapp/WEB-INF/web.xml Modified: trunk/treebase-web/pom.xml =================================================================== --- trunk/treebase-web/pom.xml 2012-04-03 14:24:26 UTC (rev 1092) +++ trunk/treebase-web/pom.xml 2012-05-25 15:25:44 UTC (rev 1093) @@ -419,13 +419,6 @@ </exclusion> </exclusions> </dependency> - - <dependency> - <groupId>opensymphony</groupId> - <artifactId>oscache</artifactId> - <version>2.4.1</version> - </dependency> - </dependencies> </project> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/web.xml =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/web.xml 2012-04-03 14:24:26 UTC (rev 1092) +++ trunk/treebase-web/src/main/webapp/WEB-INF/web.xml 2012-05-25 15:25:44 UTC (rev 1093) @@ -58,47 +58,7 @@ <listener> <listener-class>net.bull.javamelody.SessionListener</listener-class> </listener> - - <filter> - <filter-name>CacheFilter</filter-name> - <filter-class>com.opensymphony.oscache.web.filter.CacheFilter</filter-class> - <init-param> - <param-name>expires</param-name> - <param-value>time</param-value> - </init-param> - <init-param> - <param-name>time</param-name> - <param-value>2592000</param-value> <!-- one month --> - </init-param> - </filter> - <filter-mapping> - <filter-name>CacheFilter</filter-name> - <url-pattern>/search/downloadAStudy.html</url-pattern> - </filter-mapping> - - <filter-mapping> - <filter-name>CacheFilter</filter-name> - <url-pattern>/search/study/anyObjectAsRDF.rdf</url-pattern> - </filter-mapping> - - <filter-mapping> - <filter-name>CacheFilter</filter-name> - <url-pattern>/search/downloadANexusFile.html</url-pattern> - </filter-mapping> - - <filter-mapping> - <filter-name>CacheFilter</filter-name> - <url-pattern>/search/downloadAMatrix.html</url-pattern> - </filter-mapping> - - <filter-mapping> - <filter-name>CacheFilter</filter-name> - <url-pattern>/search/downloadATree.html</url-pattern> - </filter-mapping> - - - <!-- =================================================================== --> <!-- Declarations of JNDI Resources expected from the Tomcat container --> <!-- =================================================================== --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2012-05-14 14:10:52
|
Bugs item #3526567, was opened at 2012-05-14 06:49 Message generated for change (Settings changed) made by jonesmcc You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3526567&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: data Group: None >Status: Deleted Priority: 5 Private: No Submitted By: Michael Jones (jonesmcc) Assigned to: William Piel (sfrgpiel) Summary: Uploading interpretations of published data sets Initial Comment: I'm interested in uploading data from the repository available http://www.graemetlloyd.com/matr.html. According to the sites curator, Dr. Graeme Lloyd, however: "1. The vast majority of the datasets are based on my interpretation of published datasets (usually matrices printed as tables in PDFs), and not the original files used by the author. (In theory these should be the same, but in practice...) 2. Similarly, all trees are from my own (parsimony) searches in TNT and don't necessarily reflect the settings used by the authors. 3. This list is a dynamic one and I am adding to it all the time." Since these files are interpretations of published data, I was wondering wether or not to upload them onto TreeBASE. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3526567&group_id=248804 |
From: SourceForge.net <no...@so...> - 2012-05-14 13:49:40
|
Bugs item #3526567, was opened at 2012-05-14 06:49 Message generated for change (Tracker Item Submitted) made by jonesmcc You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3526567&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: data Group: None Status: Open Priority: 5 Private: No Submitted By: Michael Jones (jonesmcc) Assigned to: William Piel (sfrgpiel) Summary: Uploading interpretations of published data sets Initial Comment: I'm interested in uploading data from the repository available http://www.graemetlloyd.com/matr.html. According to the sites curator, Dr. Graeme Lloyd, however: "1. The vast majority of the datasets are based on my interpretation of published datasets (usually matrices printed as tables in PDFs), and not the original files used by the author. (In theory these should be the same, but in practice...) 2. Similarly, all trees are from my own (parsimony) searches in TNT and don't necessarily reflect the settings used by the authors. 3. This list is a dynamic one and I am adding to it all the time." Since these files are interpretations of published data, I was wondering wether or not to upload them onto TreeBASE. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3526567&group_id=248804 |
From: SourceForge.net <no...@so...> - 2012-05-10 15:20:33
|
Bugs item #3525550, was opened at 2012-05-10 08:20 Message generated for change (Tracker Item Submitted) made by jonesmcc You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3525550&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: ui Group: None Status: Open Priority: 5 Private: No Submitted By: Michael Jones (jonesmcc) Assigned to: Nobody/Anonymous (nobody) Summary: Broken link Initial Comment: On the the page http://www.treebase.org/treebase-web/home.html, which describes the features of treebase, there is a string which reads: "Data are delivered in several serializations, including NEXUS and NeXML" It appears that the link for "NEXUS" is broken. When clicked, the link takes you to this page: http://www.treebase.org/hackathon.nescent.org/Supporting_NEXUS_Documentation, which says: "Sorry, page not found. You may continue your search here". Perhaps the link should direct here (http://informatics.nescent.org/wiki/Supporting_NEXUS), instead? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3525550&group_id=248804 |
From: SourceForge.net <no...@so...> - 2012-05-10 14:49:28
|
Bugs item #3525522, was opened at 2012-05-10 06:47 Message generated for change (Comment added) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3525522&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Priority: 5 Private: No Submitted By: Michael Jones (jonesmcc) Assigned to: Nobody/Anonymous (nobody) Summary: Unable to delete Study Initial Comment: I am unable to delete an in progress submission 12711. When I attempt to delete it, TreeBASE gives me this error message: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 I'm guessing this has something to do with the recent server migration? ---------------------------------------------------------------------- >Comment By: William Piel (sfrgpiel) Date: 2012-05-10 07:49 Message: In the "List of TreeBASE Submissions" page, you should see a message that says "Submissions can only be deleted after all trees and matrices are deleted first." -- i.e., a known bug. If you *still* can't delete the submission after first deleting the tree blocks and matrices, then, indeed, this is a new bug. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3525522&group_id=248804 |
From: SourceForge.net <no...@so...> - 2012-05-10 13:47:54
|
Bugs item #3525522, was opened at 2012-05-10 06:47 Message generated for change (Tracker Item Submitted) made by jonesmcc You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3525522&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Priority: 5 Private: No Submitted By: Michael Jones (jonesmcc) Assigned to: Nobody/Anonymous (nobody) Summary: Unable to delete Study Initial Comment: I am unable to delete an in progress submission 12711. When I attempt to delete it, TreeBASE gives me this error message: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 I'm guessing this has something to do with the recent server migration? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=3525522&group_id=248804 |
From: <sfr...@us...> - 2012-04-03 14:24:35
|
Revision: 1092 http://treebase.svn.sourceforge.net/treebase/?rev=1092&view=rev Author: sfrgpiel Date: 2012-04-03 14:24:26 +0000 (Tue, 03 Apr 2012) Log Message: ----------- Fixing broken links, fixing spelling, etc. Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/dataMan.jsp Added Paths: ----------- trunk/treebase-web/src/main/webapp/images/paypalsub.jpg Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/dataMan.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/dataMan.jsp 2012-02-23 20:03:22 UTC (rev 1091) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/dataMan.jsp 2012-04-03 14:24:26 UTC (rev 1092) @@ -18,8 +18,8 @@ <p>TreeBASE provides an advanced access URL for anonymous reviewers and referees to provide additional quality control before the data are made public. Although additional NSF requirements relating to provenance and how data were generated are not normally required or scrutinized by TreeBASE staff, submitters who flag their submission (in the submission notes section) as NSF-sponsored data will receive special attention by our staff. In these cases, TreeBASE staff will check to make sure that provenance and analysis metadata are adequately provided, and, as needed, communicate with the submitter and assist in properly formatting and ingesting these data. </p> <h2>Data Standards and Dissemination</h2> <p>TreeBASE plans to remain in compliance with the emerging, but still evolving, standard of Minimal Information for a Phylogenetic Analysis (<a href="http://www.nescent.org/sites/evoio/MIAPA" target="_blank">MIAPA</a>). In addition, TreeBASE publishes persistant and resolvable globally unique identifiers (GUIDs) for all major data objects and disseminates data and metadata using commonly accepted standards. A Restful <a href="http://www.nescent.org/wg/evoinfo/index.php?title=PhyloWS" target="_blank">PhyloWS</a> API exposes metadata using RSS feeds in RDF; a <a href="http://www.nexml.org/" target="_blank">NeXML</a> serialization exposes data marked up with metadata using published vocabularies and fully qualified URIs in compliance with <a href="http://linkeddata.org/" target="_blank">Linked Data</a> standards. Basic record metadata are published through an OIA-PMH service, and TreeBASE records are mirrored by Dryad, which provides a secondary Dryad <a href="http://www.datacite.org" target="_blank">DataCite DOI</a>. However, for most people in the scientific community, data will be retrieved using the web user interface and downloaded in the NEXUS format, while metadata can be downloaded separately in a tab-separated text format. </p> -<h2>Data Persistance</h2> -<p>Although no data service can guarantee indefinite persistance, TreeBASE will make every effort to preserve its services as long as possible. Additionally, the Articles of Incorporation of the <a href="http://www.phylofoundation.org" target="_blank">Phyloinformatics Research Foundation</a>, which oversees TreeBASE activities, specify that if dissolution is ever required the assets will be transferred to a similar entity with a comparable mission. </p> +<h2>Data Persistence</h2> +<p>Although no data service can guarantee indefinite persistence, TreeBASE will make every effort to preserve its services as long as possible. Additionally, the Articles of Incorporation of the <a href="http://www.phylofoundation.org" target="_blank">Phyloinformatics Research Foundation</a>, which oversees TreeBASE activities, specify that if dissolution is ever required the assets will be transferred to a similar entity with a comparable mission. </p> <h2>Preparing a Data Management Plan for NSF</h2> <p>Scientists are welcome to designate TreeBASE as their selected repository and dissemination service for phylogenetic data generated by sponsored research. In their Data Management Plan, we suggest that the following be mentioned:</p> <ul> @@ -43,7 +43,7 @@ <table> <tr><td><input type="hidden" name="on0" value="TreeBASE Study URI:">TreeBASE Study URI:</td></tr><tr><td><input type="text" name="os0" maxlength="60"></td></tr> </table> -<input type="image" src="http://www.phylofoundation.org/icns/sub.jpg" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> +<input type="image" src="images/paypalsub.jpg" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/scr/pixel.gif" width="1" height="1"> </form></td> <td><form action="https://www.paypal.com/cgi-bin/webscr" method="post"> Added: trunk/treebase-web/src/main/webapp/images/paypalsub.jpg =================================================================== (Binary files differ) Property changes on: trunk/treebase-web/src/main/webapp/images/paypalsub.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-23 20:03:29
|
Revision: 1091 http://treebase.svn.sourceforge.net/treebase/?rev=1091&view=rev Author: rvos Date: 2012-02-23 20:03:22 +0000 (Thu, 23 Feb 2012) Log Message: ----------- This commit should fix the NPE we were getting at SearchResultsFrozen.java:41 because the result set should now no longer contain null values (it could be an empty set, though). To ensure that this is so and everything behaves as it should I am removing the cludge around line 176. Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java 2012-02-23 19:07:30 UTC (rev 1090) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java 2012-02-23 20:03:22 UTC (rev 1091) @@ -14,6 +14,7 @@ import org.apache.log4j.Logger; import org.cipres.treebase.TreebaseUtil; import org.cipres.treebase.RangeExpression.MalformedRangeExpression; +import org.cipres.treebase.domain.TBPersistable; import org.cipres.treebase.domain.matrix.CharacterMatrix; import org.cipres.treebase.domain.matrix.Matrix; import org.cipres.treebase.domain.matrix.MatrixService; @@ -120,7 +121,6 @@ return results; } - @SuppressWarnings("unchecked") private Collection<Matrix> doSearch( HttpServletRequest request, HttpServletResponse response, @@ -128,64 +128,68 @@ BindException errors, String searchTerm) throws InstantiationException { - Collection<Matrix> matches = null; + Collection<Matrix> results = new HashSet<Matrix>(); MatrixService matrixService = getSearchService().getMatrixService(); switch(searchType) { - case byID: - matches = (Collection<Matrix>) doSearchByIDString(request, matrixService, Matrix.class, searchTerm); - break; - - case byTB1ID: - matches = new HashSet<Matrix>(); - matches.add(matrixService.findByTB1StudyID(searchTerm)); - break; - - case byTitle: - matches = matrixService - .findSomethingBySubstring(Matrix.class, "title", searchTerm); - break; - - case byType: - matches = matrixService - .findSomethingByItsDescription(Matrix.class, "matrixKind", searchTerm, false); - break; - - case byNCHAR: - try { - matches = matrixService - .findSomethingByRangeExpression(CharacterMatrix.class, "nChar", searchTerm); - } catch (MalformedRangeExpression e) { - addMessage(request, "Malformed range expression: " + e.getMessage()); + case byID: { + addMatchesToResults(doSearchByIDString(request, matrixService, Matrix.class, searchTerm), results); + break; } - break; - - - case byNTAX: - try { - matches = matrixService - .findSomethingByRangeExpression(CharacterMatrix.class, "nTax", searchTerm); - } catch (MalformedRangeExpression e) { - addMessage(request, "Malformed range expression: " + e.getMessage()); + case byTB1ID: { + Matrix match = matrixService.findByTB1StudyID(searchTerm); + if ( null != match ) { + results.add(match); + } + break; } - break; + case byTitle: { + addMatchesToResults(matrixService.findSomethingBySubstring(Matrix.class, "title", searchTerm), results); + break; + } + case byType: { + addMatchesToResults(matrixService.findSomethingByItsDescription(Matrix.class, "matrixKind", searchTerm, false),results); + break; + } + case byNCHAR: { + try { + addMatchesToResults(matrixService.findSomethingByRangeExpression(CharacterMatrix.class, "nChar", searchTerm),results); + } catch (MalformedRangeExpression e) { + addMessage(request, "Malformed range expression: " + e.getMessage()); + } + break; + } + case byNTAX: { + try { + addMatchesToResults(matrixService.findSomethingByRangeExpression(CharacterMatrix.class, "nTax", searchTerm),results); + } catch (MalformedRangeExpression e) { + addMessage(request, "Malformed range expression: " + e.getMessage()); + } + break; + } } // XXX need to filter out orphaned matrices or matrices whose studies are unpublished Collection<Matrix> orphanedMatrices = new HashSet<Matrix>(); - for ( Matrix m : matches ) { - if ( null != m ) { - if ( m.getStudy() == null || m.getStudy().isPublished() == false ) { - orphanedMatrices.add(m); - } - } + for ( Matrix m : results ) { + if ( m.getStudy() == null || m.getStudy().isPublished() == false ) { + orphanedMatrices.add(m); + } } - matches.removeAll(orphanedMatrices); - return matches; + results.removeAll(orphanedMatrices); + return results; } + @SuppressWarnings("unchecked") + private void addMatchesToResults(Collection<? extends TBPersistable> matches, + Collection<Matrix> results) { + if ( null != matches && ! matches.isEmpty() ) { + results.addAll((Collection<? extends Matrix>) matches); + } + } + SearchResultsType currentSearchType() { return SearchResultsType.MATRIX; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-23 19:07:36
|
Revision: 1090 http://treebase.svn.sourceforge.net/treebase/?rev=1090&view=rev Author: rvos Date: 2012-02-23 19:07:30 +0000 (Thu, 23 Feb 2012) Log Message: ----------- Actually, we should probably check if query is an empty string (but not null). Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TreeSearchController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java 2012-02-23 18:59:11 UTC (rev 1089) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java 2012-02-23 19:07:30 UTC (rev 1090) @@ -59,7 +59,7 @@ LOGGER.info("in matrixSearchController.onSubmit"); clearMessages(req); String query = req.getParameter("query"); - if ( null != query ) { + if ( ! TreebaseUtil.isEmpty(query) ) { return handleQueryRequest(req, res, err, query); } else { Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java 2012-02-23 18:59:11 UTC (rev 1089) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java 2012-02-23 19:07:30 UTC (rev 1090) @@ -97,7 +97,7 @@ LOGGER.info("in StudySearchController.onSubmit"); clearMessages(req); String query = req.getParameter("query"); - if ( null != query ) { + if ( ! TreebaseUtil.isEmpty(query) ) { return handleQueryRequest(req, res, err, query); } else { Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java 2012-02-23 18:59:11 UTC (rev 1089) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java 2012-02-23 19:07:30 UTC (rev 1090) @@ -50,7 +50,7 @@ protected ModelAndView onSubmit(HttpServletRequest req, HttpServletResponse res, Object comm, BindException err) throws Exception { clearMessages(req); String query = req.getParameter("query"); - if ( null != query ) { + if ( ! TreebaseUtil.isEmpty(query) ) { return handleQueryRequest(req, res, err, query); } else { Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TreeSearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TreeSearchController.java 2012-02-23 18:59:11 UTC (rev 1089) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TreeSearchController.java 2012-02-23 19:07:30 UTC (rev 1090) @@ -58,7 +58,7 @@ LOGGER.info("in TreeSearchController.onSubmit"); clearMessages(req); String query = req.getParameter("query"); - if ( null != query ) { + if ( ! TreebaseUtil.isEmpty(query) ) { return handleQueryRequest(req, res, err, query); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-23 18:59:17
|
Revision: 1089 http://treebase.svn.sourceforge.net/treebase/?rev=1089&view=rev Author: rvos Date: 2012-02-23 18:59:11 +0000 (Thu, 23 Feb 2012) Log Message: ----------- Correcting a bug I introduced: onSubmit() is also visited when buttons that modify the results set are pressed (i.e. there is no CQL query to run). In such cases handling the request should be delegated to super.onSubmit(). Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TreeSearchController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java 2012-02-23 15:43:14 UTC (rev 1088) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java 2012-02-23 18:59:11 UTC (rev 1089) @@ -21,8 +21,6 @@ import org.cipres.treebase.domain.search.SearchResults; import org.cipres.treebase.domain.search.SearchResultsType; import org.cipres.treebase.web.Constants; -import org.cipres.treebase.web.util.RequestMessageSetter; -import org.cipres.treebase.web.util.SearchMessageSetter; import org.springframework.validation.BindException; import org.springframework.web.servlet.ModelAndView; import org.z3950.zing.cql.CQLAndNode; @@ -57,14 +55,16 @@ byTB1ID } - protected ModelAndView onSubmit( - HttpServletRequest request, - HttpServletResponse response, - Object command, - BindException errors) throws Exception { + protected ModelAndView onSubmit(HttpServletRequest req,HttpServletResponse res,Object comm,BindException err) throws Exception { LOGGER.info("in matrixSearchController.onSubmit"); - clearMessages(request); - return handleQueryRequest(request, response, errors, request.getParameter("query")); + clearMessages(req); + String query = req.getParameter("query"); + if ( null != query ) { + return handleQueryRequest(req, res, err, query); + } + else { + return super.onSubmit(req, res, comm, err); + } } protected Set<Matrix> doCQLQuery( Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java 2012-02-23 15:43:14 UTC (rev 1088) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java 2012-02-23 18:59:11 UTC (rev 1089) @@ -26,7 +26,6 @@ import org.cipres.treebase.domain.study.SubmissionService; import org.cipres.treebase.web.Constants; import org.cipres.treebase.web.model.Identify; -import org.cipres.treebase.web.util.RequestMessageSetter; import org.cipres.treebase.web.util.IdentifyUtil; import org.springframework.validation.BindException; import org.springframework.web.servlet.ModelAndView; @@ -40,8 +39,6 @@ import org.z3950.zing.cql.CQLRelation; import org.z3950.zing.cql.CQLTermNode; -import java.text.DateFormat; - /** * StudySearchController.java * @@ -96,14 +93,16 @@ byDOI } - protected ModelAndView onSubmit( - HttpServletRequest request, - HttpServletResponse response, - Object command, - BindException errors) throws Exception { + protected ModelAndView onSubmit(HttpServletRequest req,HttpServletResponse res,Object comm,BindException err) throws Exception { LOGGER.info("in StudySearchController.onSubmit"); - clearMessages(request); - return handleQueryRequest(request, response, errors, request.getParameter("query")); + clearMessages(req); + String query = req.getParameter("query"); + if ( null != query ) { + return handleQueryRequest(req, res, err, query); + } + else { + return super.onSubmit(req, res, comm, err); + } } protected Set<Study> doCQLQuery( Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java 2012-02-23 15:43:14 UTC (rev 1088) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java 2012-02-23 18:59:11 UTC (rev 1089) @@ -47,11 +47,15 @@ private enum NamingAuthority { TREEBASE, UBIO, NCBI }; @Override - protected ModelAndView onSubmit(HttpServletRequest request, - HttpServletResponse response, Object searchCommand, BindException errors) - throws Exception { - clearMessages(request); - return handleQueryRequest(request, response, errors, request.getParameter("query")); + protected ModelAndView onSubmit(HttpServletRequest req, HttpServletResponse res, Object comm, BindException err) throws Exception { + clearMessages(req); + String query = req.getParameter("query"); + if ( null != query ) { + return handleQueryRequest(req, res, err, query); + } + else { + return super.onSubmit(req, res, comm, err); + } } protected Set<Taxon> doCQLQuery(CQLNode node, Set<Taxon> results, HttpServletRequest request) { @@ -125,31 +129,6 @@ logger.debug(node); return results; } - - private ModelAndView modifySearchResults(HttpServletRequest request, - HttpServletResponse response, BindException errors) throws InstantiationException { - TaxonSearchResults results = searchResults(request).convertToTaxa(); - - String buttonName = request.getParameter("taxonResultsaction"); - if (buttonName.equals("addCheckedToResults")) { -// Map<String,String> parameterMap = request.getParameterMap(); - Collection<Taxon> newTaxa = new HashSet<Taxon> (); - for (String taxonIdString : request.getParameterValues("selection")) { - Taxon tx; - try { - tx = getTaxonLabelService().findTaxonByIDString(taxonIdString); - } catch (MalformedTreebaseIDString e) { - // This can only occur if the ID numbers in our web form are - // malformed, so it represents a programming error. 20090312 MJD - throw new Error(e); - } - if (tx != null) newTaxa.add(tx); - } - results.union(newTaxa); - saveSearchResults(request, results); - } - return samePage(request); - } protected Collection<Taxon> doTaxonSearch(HttpServletRequest request, SearchCommand searchCommand, String searchTerm, SearchIndex searchIndex, NamingAuthority namingAuthority) throws Exception { @@ -182,9 +161,6 @@ getTaxonLabelService().resurrectAll(taxa); LOGGER.debug("Found " + taxa.size() + " taxa"); return taxa; -// TaxonSearchResults tsr = new TaxonSearchResults(taxa); -// saveSearchResults(request, tsr); -// return samePage(request); } /** Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TreeSearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TreeSearchController.java 2012-02-23 15:43:14 UTC (rev 1088) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TreeSearchController.java 2012-02-23 18:59:11 UTC (rev 1089) @@ -14,14 +14,12 @@ import org.apache.log4j.Logger; import org.cipres.treebase.TreebaseUtil; import org.cipres.treebase.RangeExpression.MalformedRangeExpression; -import org.cipres.treebase.domain.matrix.Matrix; import org.cipres.treebase.domain.search.SearchResults; import org.cipres.treebase.domain.search.SearchResultsType; import org.cipres.treebase.domain.search.TreeSearchResults; import org.cipres.treebase.domain.tree.PhyloTree; import org.cipres.treebase.domain.tree.PhyloTreeService; import org.cipres.treebase.web.Constants; -import org.cipres.treebase.web.util.RequestMessageSetter; import org.springframework.validation.BindException; import org.springframework.web.servlet.ModelAndView; import org.z3950.zing.cql.CQLAndNode; @@ -56,16 +54,16 @@ byNTAX } - protected ModelAndView onSubmit( - HttpServletRequest request, - HttpServletResponse response, - Object command, - BindException errors) throws Exception { - + protected ModelAndView onSubmit(HttpServletRequest req,HttpServletResponse res,Object comm,BindException err) throws Exception { LOGGER.info("in TreeSearchController.onSubmit"); - - clearMessages(request); - return handleQueryRequest(request, response, errors, request.getParameter("query")); + clearMessages(req); + String query = req.getParameter("query"); + if ( null != query ) { + return handleQueryRequest(req, res, err, query); + } + else { + return super.onSubmit(req, res, comm, err); + } } protected Set<PhyloTree> doCQLQuery( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-23 15:43:23
|
Revision: 1088 http://treebase.svn.sourceforge.net/treebase/?rev=1088&view=rev Author: rvos Date: 2012-02-23 15:43:14 +0000 (Thu, 23 Feb 2012) Log Message: ----------- Added test to ensure we don't get NullPointerExceptions Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java 2012-02-23 15:25:03 UTC (rev 1087) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java 2012-02-23 15:43:14 UTC (rev 1088) @@ -175,9 +175,11 @@ // XXX need to filter out orphaned matrices or matrices whose studies are unpublished Collection<Matrix> orphanedMatrices = new HashSet<Matrix>(); for ( Matrix m : matches ) { - if ( m.getStudy() == null || (m.getStudy().isPublished() == false) ) { - orphanedMatrices.add(m); - } + if ( null != m ) { + if ( m.getStudy() == null || m.getStudy().isPublished() == false ) { + orphanedMatrices.add(m); + } + } } matches.removeAll(orphanedMatrices); return matches; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-23 15:25:12
|
Revision: 1087 http://treebase.svn.sourceforge.net/treebase/?rev=1087&view=rev Author: rvos Date: 2012-02-23 15:25:03 +0000 (Thu, 23 Feb 2012) Log Message: ----------- Removing code dealing with old-style search forms Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TreeSearchController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java 2012-02-22 19:24:32 UTC (rev 1086) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/MatrixSearchController.java 2012-02-23 15:25:03 UTC (rev 1087) @@ -62,60 +62,9 @@ HttpServletResponse response, Object command, BindException errors) throws Exception { - LOGGER.info("in matrixSearchController.onSubmit"); - clearMessages(request); - String formName = request.getParameter("formName"); - String query = request.getParameter("query"); - - LOGGER.info("formName is '" + formName + "'"); - - if ( ! TreebaseUtil.isEmpty(query) ) { - return this.handleQueryRequest(request, response, errors, query); - } - - if (formName.equals("matrixSimple")) { - String buttonName = request.getParameter("searchButton"); - Set<Matrix> matches = new HashSet<Matrix>(); - String searchTerm = convertStars(request.getParameter("searchTerm")); - SearchMessageSetter mSetter = new RequestMessageSetter(request); - MatrixSearchResults oldRes; - { - SearchResults<?> sr = searchResults(request); - if (sr != null) { - oldRes = (MatrixSearchResults) sr.convertToMatrices(); - } else { - oldRes = new MatrixSearchResults (); // TODO: Convert existing search results to new type - } - } - if (buttonName.equals("matrixID")) { - matches.addAll(doSearch(request, response, SearchType.byID, errors,searchTerm)); - } else if (buttonName.equals("matrixTitle")) { - matches.addAll(doSearch(request, response, SearchType.byTitle, errors,searchTerm)); - } else if (buttonName.equals("matrixType")) { - matches.addAll(doSearch(request, response, SearchType.byType, errors,searchTerm)); - } else if (buttonName.equals("matrixNTAX")) { - matches.addAll(doSearch(request, response, SearchType.byNTAX, errors,searchTerm)); - } else if (buttonName.equals("matrixNCHAR")) { - matches.addAll(doSearch(request, response, SearchType.byNCHAR, errors,searchTerm)); - } else { - throw new Error("Unknown search button name '" + buttonName + "'"); - } - if ( TreebaseUtil.isEmpty(request.getParameter("format")) || ! request.getParameter("format").equals("rss1") ) { - SearchResults<Matrix> newRes = intersectSearchResults(oldRes, - new MatrixSearchResults(matches), mSetter, "No matching matrices found"); - saveSearchResults(request, newRes); - return new ModelAndView("search/matrixSearch", Constants.RESULT_SET, newRes); - } - else { - return this.searchResultsAsRDF(new MatrixSearchResults(matches), request, null, "matrix", "matrix"); - } - } - - else { - return super.onSubmit(request, response, command, errors); - } + return handleQueryRequest(request, response, errors, request.getParameter("query")); } protected Set<Matrix> doCQLQuery( @@ -161,7 +110,7 @@ } else if ( index.startsWith("tb.ntax") ) { results.addAll(doSearch(request, response, SearchType.byNTAX, errors, term.getTerm())); } else if ( index.startsWith("tb.nchar") ) { - results.addAll(doSearch(request, response, SearchType.byNTAX, errors, term.getTerm())); + results.addAll(doSearch(request, response, SearchType.byNCHAR, errors, term.getTerm())); } else { // issue warnings addMessage(request, "Unsupported index: " + index); @@ -246,7 +195,6 @@ @Override protected ModelAndView handleQueryRequest(HttpServletRequest request,HttpServletResponse response,BindException errors, String query) throws CQLParseException, IOException, InstantiationException { - //String query = request.getParameter("query"); CQLParser parser = new CQLParser(); CQLNode root = parser.parse(query); root = normalizeParseTree(root); Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java 2012-02-22 19:24:32 UTC (rev 1086) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/StudySearchController.java 2012-02-23 15:25:03 UTC (rev 1087) @@ -101,69 +101,9 @@ HttpServletResponse response, Object command, BindException errors) throws Exception { - LOGGER.info("in StudySearchController.onSubmit"); - clearMessages(request); - String formName = request.getParameter("formName"); - String query = request.getParameter("query"); - - LOGGER.info("formName is '" + formName + "'"); - - if ( ! TreebaseUtil.isEmpty(query) && ! query.equals("")) { - LOGGER.info("query is '" + query + "'"); - return this.handleQueryRequest(request, response, errors, query); - } - - if (formName.equals("searchKeyword")) { - SearchType searchType; - String buttonName = request.getParameter("searchButton"); - String searchTerm = convertStars(request.getParameter("searchTerm")); - StudySearchResults oldRes; - { - SearchResults<?> sr = searchResults(request); - if (sr != null) { - oldRes = (StudySearchResults) sr.convertToStudies(); - } else { - oldRes = new StudySearchResults (); // TODO: Convert existing search results to new type - } - } - if (buttonName.equals("authorKeyword")) { - searchType = SearchType.byAuthorName; - } else if (buttonName.equals("studyID")) { - searchType = SearchType.byID; - } else if (buttonName.equals("legacyStudyID")) { - searchType = SearchType.byLegacyID; - } else if (buttonName.equals("titleKeyword")) { - searchType = SearchType.byTitle; - } else if (buttonName.equals("textKeyword")) { - searchType = SearchType.byKeyword; - } else if (buttonName.equals("citationKeyword")) { - searchType = SearchType.inCitation; - } else if (buttonName.equals("abstractKeyword")) { - searchType = SearchType.inAbstract; - } else if (buttonName.equals("doiKeyword")) { - searchType = SearchType.byDOI; - } - else { - throw new Error("Unknown search button name '" + buttonName + "'"); - } - // XXX we now never do an exact match with terms provided through the web app. We can change - // this, e.g. by adding a check box whose value is the boolean argument of doSearch() - Collection<Study> matches = doSearch(request, response, searchType, errors,searchTerm,false,null); - if ( TreebaseUtil.isEmpty(request.getParameter("format")) || ! request.getParameter("format").equals("rss1") ) { - SearchResults<Study> newRes = intersectSearchResults(oldRes, new StudySearchResults(matches), - new RequestMessageSetter(request), "No matching studies found"); - saveSearchResults(request, newRes); - return new ModelAndView("search/studySearch", Constants.RESULT_SET, newRes); - } - else { - return this.searchResultsAsRDF(new StudySearchResults(matches), request, null,"study","study"); - } - } - else { - return super.onSubmit(request, response, command, errors); - } + return handleQueryRequest(request, response, errors, request.getParameter("query")); } protected Set<Study> doCQLQuery( Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java 2012-02-22 19:24:32 UTC (rev 1086) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java 2012-02-23 15:25:03 UTC (rev 1087) @@ -51,48 +51,7 @@ HttpServletResponse response, Object searchCommand, BindException errors) throws Exception { clearMessages(request); - String formName = request.getParameter("formName"); - String query = request.getParameter("query"); - if ( ! TreebaseUtil.isEmpty(query) ) { - return this.handleQueryRequest(request, response, errors, query); - } - if (formName.equals("searchByTaxonLabel")) { - SearchCommand newSearchCommand = (SearchCommand)searchCommand; - String searchOn = request.getParameter("searchOn"); - String searchTerm = convertStars(request.getParameter("searchTerm")); - String[] searchTerms = searchTerm.split("\\r\\n"); - Collection<Taxon> taxa = new HashSet<Taxon>(); - for ( int i = 0; i < searchTerms.length; i++ ) { - if ( searchOn.equals("TextSearch") ) { - taxa.addAll(doTaxonSearch(request, newSearchCommand, searchTerms[i], SearchIndex.LABEL, null)); - } - else if ( searchOn.equals("Identifiers") ) { - String objectIdentifier = request.getParameter("objectIdentifier"); - if ( objectIdentifier.equals("TreeBASE") ) { - taxa.addAll(doTaxonSearch(request,newSearchCommand,searchTerms[i],SearchIndex.ID,NamingAuthority.TREEBASE)); - } - else if ( objectIdentifier.equals("NCBI") ) { - taxa.addAll(doTaxonSearch(request,newSearchCommand,searchTerms[i],SearchIndex.ID,NamingAuthority.NCBI)); - } - else if ( objectIdentifier.equals("uBio") ) { - taxa.addAll(doTaxonSearch(request,newSearchCommand,searchTerms[i],SearchIndex.ID,NamingAuthority.UBIO)); - } - } - } - TaxonSearchResults tsr = new TaxonSearchResults(taxa); - saveSearchResults(request, tsr); - if ( TreebaseUtil.isEmpty(request.getParameter("format")) || ! request.getParameter("format").equals("rss1") ) { - return samePage(request); - } - else { - return this.searchResultsAsRDF(tsr, request, null,"taxon","taxon"); - } - - } else if (formName.equals("taxonResultsAction")) { - return modifySearchResults(request, response, errors); - } else { - return super.onSubmit(request, response, (SearchCommand) searchCommand, errors); - } + return handleQueryRequest(request, response, errors, request.getParameter("query")); } protected Set<Taxon> doCQLQuery(CQLNode node, Set<Taxon> results, HttpServletRequest request) { Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TreeSearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TreeSearchController.java 2012-02-22 19:24:32 UTC (rev 1086) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TreeSearchController.java 2012-02-23 15:25:03 UTC (rev 1087) @@ -65,65 +65,7 @@ LOGGER.info("in TreeSearchController.onSubmit"); clearMessages(request); - String formName = request.getParameter("formName"); - String query = request.getParameter("query"); - - LOGGER.info("formName is '" + formName + "'"); - - if ( ! TreebaseUtil.isEmpty(query) ) { - return this.handleQueryRequest(request, response, errors, query); - } - - if (formName.equals("treeSimple")) { - String buttonName = request.getParameter("searchButton"); - String searchTerm = convertStars(request.getParameter("searchTerm")); - Collection<PhyloTree> matches = null; - TreeSearchResults oldRes; - { - SearchResults<?> sr = searchResults(request); - if (sr != null) { - oldRes = (TreeSearchResults) sr.convertToTrees(); - } else { - oldRes = new TreeSearchResults (); // TODO: Convert existing search results to new type - } - } - if (buttonName.equals("treeID")) { - matches = doSearch(request, response, SearchType.byID, errors, searchTerm); - } else if (buttonName.equals("treeTitle")) { - matches = doSearch(request, response, SearchType.byTitle, errors, searchTerm); - } else if (buttonName.equals("treeType")) { - matches = doSearch(request, response, SearchType.byType, errors, searchTerm); - } else if (buttonName.equals("treeKind")) { - matches = doSearch(request, response, SearchType.byKind, errors, searchTerm); - } else if (buttonName.equals("treeQuality")) { - matches = doSearch(request, response, SearchType.byQuality, errors, searchTerm); - } else if (buttonName.equals("treeNTAX")) { - matches = doSearch(request, response, SearchType.byNTAX, errors, searchTerm); - } else { - throw new Error("Unknown search button name '" + buttonName + "'"); - } - - // XXX need to filter out orphaned matrices or matrices whose studies are unpublished - Collection<PhyloTree> orphanedTrees = new HashSet<PhyloTree>(); - for ( PhyloTree t : matches ) { - if (t.getStudy() == null || (t.getStudy().isPublished() == false)){ - orphanedTrees.add(t); - } - } - matches.removeAll(orphanedTrees); - - SearchResults<PhyloTree> newRes = intersectSearchResults(oldRes, new TreeSearchResults(matches), - new RequestMessageSetter(request), "No matching trees found"); - saveSearchResults(request, newRes); - if ( TreebaseUtil.isEmpty(request.getParameter("format")) || ! request.getParameter("format").equals("rss1") ) { - return new ModelAndView("search/treeSearch", Constants.RESULT_SET, newRes); - } - else { - return this.searchResultsAsRDF(newRes, request, null,"tree","tree"); - } - } else { - return super.onSubmit(request, response, command, errors); - } + return handleQueryRequest(request, response, errors, request.getParameter("query")); } protected Set<PhyloTree> doCQLQuery( @@ -248,7 +190,6 @@ protected ModelAndView handleQueryRequest(HttpServletRequest request, HttpServletResponse response, BindException errors, String query) throws CQLParseException, IOException, InstantiationException { - //String query = request.getParameter("query"); CQLParser parser = new CQLParser(); CQLNode root = parser.parse(query); root = normalizeParseTree(root); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-22 19:24:39
|
Revision: 1086 http://treebase.svn.sourceforge.net/treebase/?rev=1086&view=rev Author: rvos Date: 2012-02-22 19:24:32 +0000 (Wed, 22 Feb 2012) Log Message: ----------- Deploying simple search box for all searches. Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/matrixSearch.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/studySearch.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeSearch.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/matrixSearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/matrixSearch.jsp 2012-02-21 22:38:31 UTC (rev 1085) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/matrixSearch.jsp 2012-02-22 19:24:32 UTC (rev 1086) @@ -15,16 +15,25 @@ 'integer' : [ 'tb.identifier.matrix', 'tb.identifier.matrix.tb1', 'tb.ntax.matrix', 'tb.nchar.matrix' ], 'id' : [ 'tb.identifier.matrix', 'tb.identifier.matrix.tb1' ], 'word' : [ 'tb.title.matrix', 'tb.type.matrix' ], - 'doi' : [ 'prism.doi' ] // this doesn't work yet, we have no search on doi }; - // purlBase is assigned in /common/search-nav.jsp + // purlBase is assigned in /common/search-nav.jsp var phyloWSURI = purlBase + 'matrix/find?query='; //]]> </script> -<jsp:include page="matrixSimpleSearchForm.jsp"/> +<%-- jsp:include page="matrixSimpleSearchForm.jsp"/ --%> +<fieldset> + <legend> + Matrix search + <a href="#" class="openHelp" onclick="openHelp('matrixSimpleSearchForm')"> + <img class="iconButton" src="<fmt:message key="icons.help"/>" /> + </a> + </legend> +<jsp:include page="simpleSearchForm.jsp"/> +</fieldset> + <c:set var="searchType" value="matrix" scope="request"/> <div id="s-clear"></div> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/studySearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/studySearch.jsp 2012-02-21 22:38:31 UTC (rev 1085) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/studySearch.jsp 2012-02-22 19:24:32 UTC (rev 1086) @@ -20,15 +20,25 @@ 'doi' : [ 'prism.doi' ] }; - // purlBase is assigned in /common/search-nav.jsp + // purlBase is assigned in /common/search-nav.jsp var phyloWSURI = purlBase + 'study/find?query='; //]]> </script> <c:set var="searchType" value="study" scope="request"/> -<jsp:include page="studyKeywordSearchForm.jsp"/> +<%-- jsp:include page="studyKeywordSearchForm.jsp"/ --%> +<fieldset> + <legend> + Study search + <a href="#" class="openHelp" onclick="openHelp('studyKeywordSearchForm')"> + <img class="iconButton" src="<fmt:message key="icons.help"/>" /> + </a> + </legend> +<jsp:include page="simpleSearchForm.jsp"/> +</fieldset> + <div id="s-clear"></div> <jsp:include page="searchMessages.jsp"/> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp 2012-02-21 22:38:31 UTC (rev 1085) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp 2012-02-22 19:24:32 UTC (rev 1086) @@ -15,10 +15,9 @@ 'integer' : [ 'tb.identifier.ncbi', 'tb.identifier.ubio', 'tb.identifier.taxon', 'tb.identifier.taxon.tb1' ], 'id' : [ 'tb.identifier.taxon', 'tb.identifier.taxon.tb1' ], 'word' : [ 'tb.title.taxon', 'tb.title.taxonLabel', 'tb.title.taxonVariant' ], - 'doi' : [ 'prism.doi' ] // this doesn't work yet, we have no search on doi }; - // purlBase is assigned in /common/search-nav.jsp + // purlBase is assigned in /common/search-nav.jsp var phyloWSURI = purlBase + 'taxon/find?query='; //]]> </script> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeSearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeSearch.jsp 2012-02-21 22:38:31 UTC (rev 1085) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeSearch.jsp 2012-02-22 19:24:32 UTC (rev 1086) @@ -19,13 +19,23 @@ 'word' : [ 'tb.title.tree', 'tb.type.tree', 'tb.kind.tree', 'tb.quality.tree' ], }; - // purlBase is assigned in /common/search-nav.jsp + // purlBase is assigned in /common/search-nav.jsp var phyloWSURI = purlBase + 'tree/find?query='; //]]> </script> -<jsp:include page="treeSimpleSearchForm.jsp"/> +<%-- jsp:include page="treeSimpleSearchForm.jsp"/ --%> +<fieldset> + <legend> + Tree search + <a href="#" class="openHelp" onclick="openHelp('treeSimpleSearchForm')"> + <img class="iconButton" src="<fmt:message key="icons.help"/>" /> + </a> + </legend> +<jsp:include page="simpleSearchForm.jsp"/> +</fieldset> + <c:set var="searchType" value="tree" scope="request"/> <div id="s-clear"></div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-21 22:38:37
|
Revision: 1085 http://treebase.svn.sourceforge.net/treebase/?rev=1085&view=rev Author: rvos Date: 2012-02-21 22:38:31 +0000 (Tue, 21 Feb 2012) Log Message: ----------- Defensive code against NPEs Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java 2012-02-21 12:52:13 UTC (rev 1084) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/TaxonSearchController.java 2012-02-21 22:38:31 UTC (rev 1085) @@ -263,16 +263,20 @@ } if ( null != tb1LegacyId && null != index && index.matches(".*taxonVariant.*") ) { TaxonVariant tv = getTaxonHome().findVariantByTB1LegacyId(tb1LegacyId); - LOGGER.debug("Found taxon variant: " + tv.getId()); - if ( null != tv.getTaxon() ) { - taxaFound.add(tv.getTaxon()); + if ( null != tv ) { + LOGGER.debug("Found taxon variant: " + tv.getId()); + if ( null != tv.getTaxon() ) { + taxaFound.add(tv.getTaxon()); + } } } else if ( null != tb1LegacyId ){ Taxon taxon = getTaxonHome().findByTB1LegacyId(tb1LegacyId); - LOGGER.debug("Found taxon: " + taxon.getId()); if ( null != taxon ) { - taxaFound.add(taxon); + LOGGER.debug("Found taxon: " + taxon.getId()); + if ( null != taxon ) { + taxaFound.add(taxon); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-21 12:52:24
|
Revision: 1084 http://treebase.svn.sourceforge.net/treebase/?rev=1084&view=rev Author: rvos Date: 2012-02-21 12:52:13 +0000 (Tue, 21 Feb 2012) Log Message: ----------- Made link to plus icon relative. Trivial commit. Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/simpleSearchForm.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/simpleSearchForm.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/simpleSearchForm.jsp 2012-02-21 10:16:47 UTC (rev 1083) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/simpleSearchForm.jsp 2012-02-21 12:52:13 UTC (rev 1084) @@ -5,7 +5,7 @@ <input type="radio" name="join" onclick="TreeBASE.expandQuery(); return true;" id="all" value="and"/> All <input type="radio" name="join" onclick="TreeBASE.expandQuery(); return true;" value="or" checked="checked"/> Any<br/> <a onclick="TreeBASE.collapseExpand('expanded','block',this)" id="expander"> - <img src="http://www.treebase.org/treebase-web/images/plus.gif"/> + <img src="/treebase-web/images/plus.gif"/> <small style="color:silver">Advanced search</small> </a> <textarea id="expanded" style="display:none;width:500px;height:300px"></textarea><br/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-21 10:16:56
|
Revision: 1083 http://treebase.svn.sourceforge.net/treebase/?rev=1083&view=rev Author: rvos Date: 2012-02-21 10:16:47 +0000 (Tue, 21 Feb 2012) Log Message: ----------- Typo fix, trivial commit. Modified Paths: -------------- trunk/treebase-web/src/main/webapp/scripts/common.js Modified: trunk/treebase-web/src/main/webapp/scripts/common.js =================================================================== --- trunk/treebase-web/src/main/webapp/scripts/common.js 2012-02-21 10:00:10 UTC (rev 1082) +++ trunk/treebase-web/src/main/webapp/scripts/common.js 2012-02-21 10:16:47 UTC (rev 1083) @@ -248,7 +248,7 @@ var split = new Array(); for ( var i = 0; i < words.length; i++ ) { var word = words[i].replace(/^ */,''); - word = word.replace(/ *$/,'';) + word = word.replace(/ *$/,''); if ( word.match(/ /) && ! word.match(/^".*"$/) ) { split.push('"' + word + '"'); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-21 10:00:19
|
Revision: 1082 http://treebase.svn.sourceforge.net/treebase/?rev=1082&view=rev Author: rvos Date: 2012-02-21 10:00:10 +0000 (Tue, 21 Feb 2012) Log Message: ----------- Don't quote words that are already quoted. Modified Paths: -------------- trunk/treebase-web/src/main/webapp/scripts/common.js Modified: trunk/treebase-web/src/main/webapp/scripts/common.js =================================================================== --- trunk/treebase-web/src/main/webapp/scripts/common.js 2012-02-21 09:59:04 UTC (rev 1081) +++ trunk/treebase-web/src/main/webapp/scripts/common.js 2012-02-21 10:00:10 UTC (rev 1082) @@ -249,7 +249,7 @@ for ( var i = 0; i < words.length; i++ ) { var word = words[i].replace(/^ */,''); word = word.replace(/ *$/,'';) - if ( word.match(/ /) ) { + if ( word.match(/ /) && ! word.match(/^".*"$/) ) { split.push('"' + word + '"'); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-21 09:59:15
|
Revision: 1081 http://treebase.svn.sourceforge.net/treebase/?rev=1081&view=rev Author: rvos Date: 2012-02-21 09:59:04 +0000 (Tue, 21 Feb 2012) Log Message: ----------- TreeBASE.splitWords() now splits on commas, afterwords double-quotes words with spaces in them. Modified Paths: -------------- trunk/treebase-web/src/main/webapp/scripts/common.js Modified: trunk/treebase-web/src/main/webapp/scripts/common.js =================================================================== --- trunk/treebase-web/src/main/webapp/scripts/common.js 2012-02-20 21:59:00 UTC (rev 1080) +++ trunk/treebase-web/src/main/webapp/scripts/common.js 2012-02-21 09:59:04 UTC (rev 1081) @@ -242,10 +242,21 @@ return false; }; -// splits a string on words (including curies) and quoted phrases +// splits a string on commas, strip leading and trailing white space, quote words with spaces in them TreeBASE.splitWords = function(query){ - //return query.match(/[A-Za-z0-9: ]+|"[^"]+"|'[^']+'|/g); - return query.split(","); + var words = query.split(","); + var split = new Array(); + for ( var i = 0; i < words.length; i++ ) { + var word = words[i].replace(/^ */,''); + word = word.replace(/ *$/,'';) + if ( word.match(/ /) ) { + split.push('"' + word + '"'); + } + else { + split.push(word); + } + } + return split; }; // infers whether a search word is an identifier or a string This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-20 21:59:06
|
Revision: 1080 http://treebase.svn.sourceforge.net/treebase/?rev=1080&view=rev Author: rvos Date: 2012-02-20 21:59:00 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Splitting query string on commas instead Modified Paths: -------------- trunk/treebase-web/src/main/webapp/scripts/common.js Modified: trunk/treebase-web/src/main/webapp/scripts/common.js =================================================================== --- trunk/treebase-web/src/main/webapp/scripts/common.js 2012-02-20 21:39:26 UTC (rev 1079) +++ trunk/treebase-web/src/main/webapp/scripts/common.js 2012-02-20 21:59:00 UTC (rev 1080) @@ -244,7 +244,8 @@ // splits a string on words (including curies) and quoted phrases TreeBASE.splitWords = function(query){ - return query.match(/[A-Za-z0-9:]+|"[^"]+"|'[^']+'/g); + //return query.match(/[A-Za-z0-9: ]+|"[^"]+"|'[^']+'|/g); + return query.split(","); }; // infers whether a search word is an identifier or a string This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-20 21:39:32
|
Revision: 1079 http://treebase.svn.sourceforge.net/treebase/?rev=1079&view=rev Author: rvos Date: 2012-02-20 21:39:26 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Make sure it doesn't try to parse non-numerical identifiers as integers Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp 2012-02-20 21:24:31 UTC (rev 1078) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp 2012-02-20 21:39:26 UTC (rev 1079) @@ -13,7 +13,7 @@ // These are the mappings from inferred search term types to search predicates for this scope var predicates = { 'integer' : [ 'tb.identifier.ncbi', 'tb.identifier.ubio', 'tb.identifier.taxon', 'tb.identifier.taxon.tb1' ], - 'id' : [ 'tb.identifier.ncbi', 'tb.identifier.ubio', 'tb.identifier.taxon', 'tb.identifier.taxon.tb1' ], + 'id' : [ 'tb.identifier.taxon', 'tb.identifier.taxon.tb1' ], 'word' : [ 'tb.title.taxon', 'tb.title.taxonLabel', 'tb.title.taxonVariant' ], 'doi' : [ 'prism.doi' ] // this doesn't work yet, we have no search on doi }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-20 21:24:38
|
Revision: 1078 http://treebase.svn.sourceforge.net/treebase/?rev=1078&view=rev Author: rvos Date: 2012-02-20 21:24:31 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Prettifying simple taxon search form Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/simpleSearchForm.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/simpleSearchForm.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/simpleSearchForm.jsp 2012-02-20 21:03:30 UTC (rev 1077) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/simpleSearchForm.jsp 2012-02-20 21:24:31 UTC (rev 1078) @@ -1,11 +1,12 @@ -<form onsubmit="return TreeBASE.redirect(phyloWSURI + escape($('expanded').value));"> - <input type="text" id="query" onchange="return TreeBASE.expandQuery();"/> - <input type="submit" onclick="return TreeBASE.redirect(phyloWSURI + escape($('expanded').value));" value="Go"/><br/> - <input type="radio" name="join" onclick="TreeBASE.expandQuery(); return true;" id="all" value="and"/> All - <input type="radio" name="join" onclick="TreeBASE.expandQuery(); return true;" value="or" checked="checked"/> Any<br/> - <a onclick="TreeBASE.collapseExpand('expanded','block',this)" id="expander"> - <img src="http://www.treebase.org/treebase-web/images/plus.gif"/> - <small style="color:silver">Advanced search</small> - </a> - <textarea id="expanded" style="display:none;width:500px;height:300px"></textarea><br/> -</form> \ No newline at end of file + + <form onsubmit="return TreeBASE.redirect(phyloWSURI + escape($('expanded').value));"> + <input type="text" id="query" onchange="return TreeBASE.expandQuery();" class="textCell" style="width:150px" /> + <input type="submit" onclick="return TreeBASE.redirect(phyloWSURI + escape($('expanded').value));" value="Go"/><br/> + <input type="radio" name="join" onclick="TreeBASE.expandQuery(); return true;" id="all" value="and"/> All + <input type="radio" name="join" onclick="TreeBASE.expandQuery(); return true;" value="or" checked="checked"/> Any<br/> + <a onclick="TreeBASE.collapseExpand('expanded','block',this)" id="expander"> + <img src="http://www.treebase.org/treebase-web/images/plus.gif"/> + <small style="color:silver">Advanced search</small> + </a> + <textarea id="expanded" style="display:none;width:500px;height:300px"></textarea><br/> + </form> \ No newline at end of file Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp 2012-02-20 21:03:30 UTC (rev 1077) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp 2012-02-20 21:24:31 UTC (rev 1078) @@ -27,7 +27,15 @@ <%--jsp:include page="taxonSearchForm.jsp"/ --%> +<fieldset> + <legend> + Taxon search + <a href="#" class="openHelp" onclick="openHelp('taxonSearchTextSearch')"> + <img class="iconButton" src="<fmt:message key="icons.help"/>" /> + </a> + </legend> <jsp:include page="simpleSearchForm.jsp"/> +</fieldset> <div id="s-clear"></div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-20 21:03:37
|
Revision: 1077 http://treebase.svn.sourceforge.net/treebase/?rev=1077&view=rev Author: rvos Date: 2012-02-20 21:03:30 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Testing out simple search form in place of taxon search form. Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp Added Paths: ----------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/simpleSearchForm.jsp Added: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/simpleSearchForm.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/simpleSearchForm.jsp (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/simpleSearchForm.jsp 2012-02-20 21:03:30 UTC (rev 1077) @@ -0,0 +1,11 @@ +<form onsubmit="return TreeBASE.redirect(phyloWSURI + escape($('expanded').value));"> + <input type="text" id="query" onchange="return TreeBASE.expandQuery();"/> + <input type="submit" onclick="return TreeBASE.redirect(phyloWSURI + escape($('expanded').value));" value="Go"/><br/> + <input type="radio" name="join" onclick="TreeBASE.expandQuery(); return true;" id="all" value="and"/> All + <input type="radio" name="join" onclick="TreeBASE.expandQuery(); return true;" value="or" checked="checked"/> Any<br/> + <a onclick="TreeBASE.collapseExpand('expanded','block',this)" id="expander"> + <img src="http://www.treebase.org/treebase-web/images/plus.gif"/> + <small style="color:silver">Advanced search</small> + </a> + <textarea id="expanded" style="display:none;width:500px;height:300px"></textarea><br/> +</form> \ No newline at end of file Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp 2012-02-20 20:32:40 UTC (rev 1076) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp 2012-02-20 21:03:30 UTC (rev 1077) @@ -25,8 +25,9 @@ <c:set var="searchType" value="taxon" scope="request"/> -<jsp:include page="taxonSearchForm.jsp"/> +<%--jsp:include page="taxonSearchForm.jsp"/ --%> +<jsp:include page="simpleSearchForm.jsp"/> <div id="s-clear"></div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2012-02-20 20:32:46
|
Revision: 1076 http://treebase.svn.sourceforge.net/treebase/?rev=1076&view=rev Author: rvos Date: 2012-02-20 20:32:40 +0000 (Mon, 20 Feb 2012) Log Message: ----------- Adding javascript page variables for simplified search box Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/matrixSearch.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/studySearch.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeSearch.jsp trunk/treebase-web/src/main/webapp/common/search-nav.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/matrixSearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/matrixSearch.jsp 2012-02-20 19:35:10 UTC (rev 1075) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/matrixSearch.jsp 2012-02-20 20:32:40 UTC (rev 1076) @@ -8,13 +8,25 @@ <div id="s-clear"></div> +<script type="text/javascript"> + //<![CDATA[ + // These are the mappings from inferred search term types to search predicates for this scope + var predicates = { + 'integer' : [ 'tb.identifier.matrix', 'tb.identifier.matrix.tb1', 'tb.ntax.matrix', 'tb.nchar.matrix' ], + 'id' : [ 'tb.identifier.matrix', 'tb.identifier.matrix.tb1' ], + 'word' : [ 'tb.title.matrix', 'tb.type.matrix' ], + 'doi' : [ 'prism.doi' ] // this doesn't work yet, we have no search on doi + }; + + // purlBase is assigned in /common/search-nav.jsp + var phyloWSURI = purlBase + 'matrix/find?query='; + //]]> +</script> <jsp:include page="matrixSimpleSearchForm.jsp"/> <c:set var="searchType" value="matrix" scope="request"/> -<%-- <jsp:include page="studyTaxonLabelSearchForm.jsp"/> --%> - <div id="s-clear"></div> <jsp:include page="searchMessages.jsp"/> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/studySearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/studySearch.jsp 2012-02-20 19:35:10 UTC (rev 1075) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/studySearch.jsp 2012-02-20 20:32:40 UTC (rev 1076) @@ -10,10 +10,24 @@ <div id="s-clear"></div> +<script type="text/javascript"> + //<![CDATA[ + // These are the mappings from inferred search term types to search predicates for this scope + var predicates = { + 'integer' : [ 'tb.identifier.study', 'tb.identifier.study.tb1' ], + 'id' : [ 'tb.identifier.study', 'tb.identifier.study.tb1' ], + 'word' : [ 'tb.title.study', 'dcterms.contributor', 'dcterms.abstract', 'dcterms.bibliographicCitation', 'dcterms.subject' ], + 'doi' : [ 'prism.doi' ] + }; + + // purlBase is assigned in /common/search-nav.jsp + var phyloWSURI = purlBase + 'study/find?query='; + //]]> +</script> + <c:set var="searchType" value="study" scope="request"/> <jsp:include page="studyKeywordSearchForm.jsp"/> -<%-- <jsp:include page="studyTaxonLabelSearchForm.jsp"/> --%> <div id="s-clear"></div> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp 2012-02-20 19:35:10 UTC (rev 1075) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/taxonSearch.jsp 2012-02-20 20:32:40 UTC (rev 1076) @@ -8,6 +8,21 @@ <div id="s-clear"></div> +<script type="text/javascript"> + //<![CDATA[ + // These are the mappings from inferred search term types to search predicates for this scope + var predicates = { + 'integer' : [ 'tb.identifier.ncbi', 'tb.identifier.ubio', 'tb.identifier.taxon', 'tb.identifier.taxon.tb1' ], + 'id' : [ 'tb.identifier.ncbi', 'tb.identifier.ubio', 'tb.identifier.taxon', 'tb.identifier.taxon.tb1' ], + 'word' : [ 'tb.title.taxon', 'tb.title.taxonLabel', 'tb.title.taxonVariant' ], + 'doi' : [ 'prism.doi' ] // this doesn't work yet, we have no search on doi + }; + + // purlBase is assigned in /common/search-nav.jsp + var phyloWSURI = purlBase + 'taxon/find?query='; + //]]> +</script> + <c:set var="searchType" value="taxon" scope="request"/> <jsp:include page="taxonSearchForm.jsp"/> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeSearch.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeSearch.jsp 2012-02-20 19:35:10 UTC (rev 1075) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeSearch.jsp 2012-02-20 20:32:40 UTC (rev 1076) @@ -10,13 +10,24 @@ <div id="s-clear"></div> +<script type="text/javascript"> + //<![CDATA[ + // These are the mappings from inferred search term types to search predicates for this scope + var predicates = { + 'integer' : [ 'tb.identifier.tree', 'tb.ntax.tree' ], + 'id' : [ 'tb.identifier.tree' ], + 'word' : [ 'tb.title.tree', 'tb.type.tree', 'tb.kind.tree', 'tb.quality.tree' ], + }; + + // purlBase is assigned in /common/search-nav.jsp + var phyloWSURI = purlBase + 'tree/find?query='; + //]]> +</script> + <jsp:include page="treeSimpleSearchForm.jsp"/> <c:set var="searchType" value="tree" scope="request"/> - -<%-- <jsp:include page="studyTaxonLabelSearchForm.jsp"/> --%> - <div id="s-clear"></div> <jsp:include page="searchMessages.jsp"/> Modified: trunk/treebase-web/src/main/webapp/common/search-nav.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/common/search-nav.jsp 2012-02-20 19:35:10 UTC (rev 1075) +++ trunk/treebase-web/src/main/webapp/common/search-nav.jsp 2012-02-20 20:32:40 UTC (rev 1076) @@ -6,6 +6,10 @@ <% String purlBase = TreebaseUtil.getPurlBase(); %> +<script type="text/javascript"> + var purlBase = '<%= purlBase %>'; +</script> + <% Calendar cal = Calendar.getInstance(); cal.add(Calendar.MONTH, -6); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |