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: <yo...@us...> - 2010-04-11 14:40:26
|
Revision: 682 http://treebase.svn.sourceforge.net/treebase/?rev=682&view=rev Author: youjun Date: 2010-04-11 14:40:20 +0000 (Sun, 11 Apr 2010) Log Message: ----------- clean sub_taxonlabel table before delete a taxonlabel Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/dao/taxon/TaxonLabelDAO.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/dao/taxon/TaxonLabelDAO.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/dao/taxon/TaxonLabelDAO.java 2010-04-09 03:30:14 UTC (rev 681) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/dao/taxon/TaxonLabelDAO.java 2010-04-11 14:40:20 UTC (rev 682) @@ -489,7 +489,11 @@ q.setParameter("tl", tl); count += ((Long)q.iterate().next()).intValue(); - if(count==0)deletePersist(tl); + if(count==0){ + Submission sub=tl.getSubmission(); + if(sub!=null)sub.removeTaxonLabel(tl); + deletePersist(tl); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2010-04-09 15:14:09
|
Bugs item #2977860, was opened at 2010-03-27 23:41 Message generated for change (Comment added) made by vgapeyev You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2977860&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: internals Group: None Status: Open Priority: 8 Private: No Submitted By: William Piel (sfrgpiel) >Assigned to: Vladimir Gapeyev (vgapeyev) Summary: Exception when requesting password Initial Comment: When user forgets password and asks to have it emailed, exception barf returns. Uncaught Exception Encountered javax.mail.SendFailedException: Send failure (javax.mail.SendFailedException: Invalid Addresses (com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. (javax.mail.SendFailedException: Invalid Addresses (com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. )))) at javax.mail.Transport.send(Transport.java:163) at javax.mail.Transport.send(Transport.java:48) at org.cipres.treebase.web.controllers.PasswordFormController.onSubmit(PasswordFormController.java:132) at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267) at org.springframework.web.servlet.mvc.CancellableFormController.processFormSubmission(CancellableFormController.java:140) at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:265) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:858) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:636) Caused by: javax.mail.SendFailedException: Invalid Addresses (com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. (javax.mail.SendFailedException: Invalid Addresses (com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. ))) at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584) at javax.mail.Transport.send(Transport.java:95) ... 54 more Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. (javax.mail.SendFailedException: Invalid Addresses (com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. )) at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047) ... 56 more Caused by: javax.mail.SendFailedException: Invalid Addresses (com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. ) at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196) ... 56 more Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047) ... 56 more Cookies: JSESSIONID=[887390FE613CEE56D2EEFCCE3D7FF91C] __utma=[216002130.839762607.1263756393.1264687215.1264739521.8] __utmz=[216002130.1263756393.1.1.utmccn] ---------------------------------------------------------------------- >Comment By: Vladimir Gapeyev (vgapeyev) Date: 2010-04-09 11:14 Message: On Apr 9, 2010, at 11:00 AM, youjun guo wrote: The problem is "Relaying denied", the cause is org.cipres.treebase.web.controllers.PasswordFormController.onSubmit(PasswordFormController.java:132). I quote the line below: 'props.put("mail.smtp.host", "smtp.ucsd.edu");' AS you can see we need to replace that ucsd smtp server url with NESCent's smtp. The problem is I cannot test it from my personnel server even I have the correct url. There will be most likely another "Relaying denied". ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2977860&group_id=248804 |
From: SourceForge.net <no...@so...> - 2010-04-09 15:00:36
|
Bugs item #2984516, was opened at 2010-04-09 11:00 Message generated for change (Tracker Item Submitted) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2984516&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: 8 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: youjun guo (youjun) Summary: Analysis step broken in IE8 Initial Comment: When creating a new analysis step, the user should be able to select inputs and outputs. In IE8, the user cannot pick the inputs or outputs (IETester http://www.my-debugbar.com/wiki/IETester/HomePage reports a NULL value for the object ID). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2984516&group_id=248804 |
From: <sfr...@us...> - 2010-04-09 03:30:20
|
Revision: 681 http://treebase.svn.sourceforge.net/treebase/?rev=681&view=rev Author: sfrgpiel Date: 2010-04-09 03:30:14 +0000 (Fri, 09 Apr 2010) Log Message: ----------- clarified some language in the instructions Modified Paths: -------------- trunk/treebase-web/src/main/webapp/login.jsp Modified: trunk/treebase-web/src/main/webapp/login.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/login.jsp 2010-04-08 19:37:09 UTC (rev 680) +++ trunk/treebase-web/src/main/webapp/login.jsp 2010-04-09 03:30:14 UTC (rev 681) @@ -84,7 +84,7 @@ <ul> <li>Do not abbreviate taxon names (e.g. write "Homo sapiens", not "H. sapiens")</li> - <li>The NEXUS file should use underscores ("_") to represent spaces</li> + <li>The NEXUS file should use underscores ("_") to represent spaces (but when using the Mesquite GUI, use spaces: it will correctly save them as underscores in the NEXUS)</li> <li>Avoid using quotation marks, brackets, parentheses, commas, colons, and semicolons.</li> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-04-08 19:37:15
|
Revision: 680 http://treebase.svn.sourceforge.net/treebase/?rev=680&view=rev Author: youjun Date: 2010-04-08 19:37:09 +0000 (Thu, 08 Apr 2010) Log Message: ----------- avoid using sub_taxonlabel table Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonLabel.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonLabel.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonLabel.java 2010-04-07 20:33:07 UTC (rev 679) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/taxon/TaxonLabel.java 2010-04-08 19:37:09 UTC (rev 680) @@ -58,7 +58,7 @@ private TaxonVariant mTaxonVariant; private Study mStudy; - private Submission mSubmission; + //private Submission mSubmission; private Set<TaxonLabelSet> mTaxonLabelSet; /** * Constructor. @@ -174,29 +174,34 @@ } /** - * Return the submission this taxonLabel inhabits - * - * @return the submission - * @author mjd 20080929 - * modified by Youjun - */ - @ManyToOne(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) - @JoinTable(name = "sub_taxonlabel", - joinColumns = @JoinColumn(name = "taxonlabel_id"), - inverseJoinColumns = @JoinColumn(name="submission_id") + * Return the submission this taxonLabel inhabits + * + * @return the submission + * @author mjd 20080929 + */ + @Transient + public Submission getSubmission() { + Study s = getStudy(); + return s == null ? null : s.getSubmission(); + } + + //@ManyToOne(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + //@JoinTable(name = "sub_taxonlabel", + // joinColumns = @JoinColumn(name = "taxonlabel_id"), + // inverseJoinColumns = @JoinColumn(name="submission_id") - ) - public Submission getSubmission() { + //) + //public Submission getSubmission() { - return mSubmission; - } + // return mSubmission; + //} /** * Set the Submission field. */ - public void setSubmission(Submission pNewSubmission) { - mSubmission = pNewSubmission; - } + //public void setSubmission(Submission pNewSubmission) { + // mSubmission = pNewSubmission; + //} /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2010-04-08 19:15:50
|
Bugs item #2931592, was opened at 2010-01-13 15:32 Message generated for change (Settings changed) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2931592&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: 4 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: youjun guo (youjun) Summary: submissions with orphaned records cannot be deleted Initial Comment: Study_id 22 and 23 have treeblock records that lack phylotree records. This causes errors in the unit tests. But additionally, we cannot delete these submission. (i.e. http://treebasedb-dev.nescent.org:8180/treebase-web/user/deleteStudy.html?submissionid=22 throws and error). Either the orphans should be deleted separately (e.g. with a SQL statement), or the deletion feature should be make capable for deleting them. The orphaned records can be found like so: SELECT tb.treeblock_id FROM study st JOIN submission sub ON (st.study_id = sub.study_id) JOIN sub_treeblock stb ON (sub.submission_id = stb.submission_id) JOIN treeblock tb ON (stb.treeblock_id = tb.treeblock_id) LEFT JOIN phylotree pt ON (pt.treeblock_id = tb.treeblock_id) WHERE pt.phylotree_id IS NULL AND st.study_id = 22 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2931592&group_id=248804 |
From: SourceForge.net <no...@so...> - 2010-04-08 19:14:58
|
Bugs item #2960886, was opened at 2010-02-28 17:20 Message generated for change (Settings changed) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2960886&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: performance Group: None >Status: Closed Priority: 8 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: youjun guo (youjun) Summary: Cannot delete a matrix -- too slow so time-out Initial Comment: I tried to delete a 45x4548 matrix, but after 10 minutes I got a time-out. The matrix is attached in case anyone wants to repeat it. ================== Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request POST /treebase-web/user/deleteAMatrix.html. Reason: Error reading from remote server Apache/2.2.3 (CentOS) Server at treebasedb-dev.nescent.org Port 80 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2960886&group_id=248804 |
From: SourceForge.net <no...@so...> - 2010-04-08 19:13:30
|
Bugs item #2977860, was opened at 2010-03-27 23:41 Message generated for change (Settings changed) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2977860&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: 8 Private: No Submitted By: William Piel (sfrgpiel) >Assigned to: youjun guo (youjun) Summary: Exception when requesting password Initial Comment: When user forgets password and asks to have it emailed, exception barf returns. Uncaught Exception Encountered javax.mail.SendFailedException: Send failure (javax.mail.SendFailedException: Invalid Addresses (com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. (javax.mail.SendFailedException: Invalid Addresses (com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. )))) at javax.mail.Transport.send(Transport.java:163) at javax.mail.Transport.send(Transport.java:48) at org.cipres.treebase.web.controllers.PasswordFormController.onSubmit(PasswordFormController.java:132) at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267) at org.springframework.web.servlet.mvc.CancellableFormController.processFormSubmission(CancellableFormController.java:140) at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:265) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:858) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:636) Caused by: javax.mail.SendFailedException: Invalid Addresses (com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. (javax.mail.SendFailedException: Invalid Addresses (com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. ))) at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584) at javax.mail.Transport.send(Transport.java:95) ... 54 more Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. (javax.mail.SendFailedException: Invalid Addresses (com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. )) at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047) ... 56 more Caused by: javax.mail.SendFailedException: Invalid Addresses (com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. ) at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196) ... 56 more Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 ... Relaying denied. Proper authentication required. at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047) ... 56 more Cookies: JSESSIONID=[887390FE613CEE56D2EEFCCE3D7FF91C] __utma=[216002130.839762607.1263756393.1264687215.1264739521.8] __utmz=[216002130.1263756393.1.1.utmccn] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2977860&group_id=248804 |
From: SourceForge.net <no...@so...> - 2010-04-08 19:11:35
|
Bugs item #2981217, was opened at 2010-04-02 13:21 Message generated for change (Comment added) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2981217&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: Closed Priority: 8 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: youjun guo (youjun) Summary: Ghost records cause Exception Initial Comment: Here's a weird bug. 1. Start by uploading the two attached matrices to a new submission (attached to this bug report). 2. Run "select count(*) from sub_taxonlabel where submission_id = <sub_id>" or "select count(*) from taxonlabel where study_id = <study_id>" and the result is 48 taxon labels in both cases. 3. Delete the matrix called "concatenated" 4. Run the count(*) queries again, and you get 37 taxa (so far so good) 5. Go to the taxaList.html page and click the edit tool for the "Asterochloris italiana ex cf Xanthoria parietina CCAP 519 5B" taxon. 6. Choose "I did a uBio lookup..." item and enter "3530703" as the namebankid 7. Click "Update" and you get the Exception (below). The weird thing is that I was asking to edit taxonlabelid 277197, but the exception says that taxonlabel 277205 does not exist. And that is correct: Taxonlabel 277205 was deleted when the concatenated matrix was deleted, however, here I'm trying to update taxonlabelid 277197, so I don't know why it is trying to update 277205 -- especially since 277205 does not exist. For some reason the software has a "ghost memory" of this taxonlabel still existing, even though it has been deleted along with the deleted matrix using pure Hibernate (no direct SQL). Likewise, if I try to delete the whole submission (http://treebasedb-dev.nescent.org/treebase-web/user/deleteStudy.html?submissionid=10324), I also get an exception with a very similar result (see below). So there's some sort of ghost memory for deleted records that's preventing deletion of submissions or update of taxon labels after having deleted a matrix (and I think a tree too). regards, Bill ******** Error when editing taxonlabel: Uncaught Exception Encountered org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.cipres.treebase.domain.taxon.TaxonLabel#277205] at org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl.java:377) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:145) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878) at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:846) at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:557) at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:196) at org.hibernate.collection.PersistentSet.initializeFromCache(PersistentSet.java:124) at org.hibernate.cache.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:35) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:133) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:51) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86) at org.hibernate.collection.PersistentSet.toArray(PersistentSet.java:171) at java.util.ArrayList.addAll(ArrayList.java:497) at org.cipres.treebase.domain.study.Submission.getSubmittedTaxonLabelsReadOnly(Submission.java:279) at org.cipres.treebase.web.validators.TaxonLabelValidator.validate(TaxonLabelValidator.java:48) at org.springframework.validation.ValidationUtils.invokeValidator(ValidationUtils.java:63) at org.springframework.web.servlet.mvc.BaseCommandController.bindAndValidate(BaseCommandController.java:373) at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:263) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:858) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:837) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286) at java.lang.Thread.run(Thread.java:636) Cookies: itemToHighlight=[http%3A//treebasedb-dev.nescent.org/treebase-web/user/taxaList.html] JSESSIONID=[7D0D4BAD900FBD0DE51EE36BAE354FF1] __utma=[53240375.1924499357.1236724314.1268887193.1269487089.61] __utmz=[53240375.1269487089.61.11.utmccn] ******** Error when trying to delete entire submission: Uncaught Exception Encountered org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.cipres.treebase.domain.taxon.TaxonLabel#277205] at org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl.java:377) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:145) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878) at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:846) at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:557) at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:196) at org.hibernate.collection.PersistentSet.initializeFromCache(PersistentSet.java:124) at org.hibernate.cache.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:35) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:133) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:51) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86) at org.hibernate.collection.PersistentSet.toArray(PersistentSet.java:171) at java.util.ArrayList.addAll(ArrayList.java:497) at org.cipres.treebase.domain.study.Submission.getSubmittedTaxonLabelsReadOnly(Submission.java:279) at org.cipres.treebase.service.study.SubmissionServiceImpl.deleteSubmittedData(SubmissionServiceImpl.java:482) at org.cipres.treebase.service.study.SubmissionServiceImpl.deleteSubmission(SubmissionServiceImpl.java:374) at org.cipres.treebase.service.study.SubmissionServiceImpl.deleteSubmission(SubmissionServiceImpl.java:900) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy81.deleteSubmission(Unknown Source) at org.cipres.treebase.web.controllers.DeleteStudyController.onSubmit(DeleteStudyController.java:71) at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267) at org.springframework.web.servlet.mvc.CancellableFormController.processFormSubmission(CancellableFormController.java:140) at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:265) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:858) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:837) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286) at java.lang.Thread.run(Thread.java:636) Cookies: itemToHighlight=[http%3A//treebasedb-dev.nescent.org/treebase-web/user/submissionList.html] JSESSIONID=[7D0D4BAD900FBD0DE51EE36BAE354FF1] __utma=[53240375.1924499357.1236724314.1268887193.1269487089.61] __utmz=[53240375.1269487089.61.11.utmccn] ---------------------------------------------------------------------- >Comment By: William Piel (sfrgpiel) Date: 2010-04-08 15:11 Message: Fixed by no longer making use of the sub_taxonlabel table (in standby). Ultimately, this is not a desirable solution but to solve it requires major surgery. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2981217&group_id=248804 |
From: <yo...@us...> - 2010-04-07 20:33:15
|
Revision: 679 http://treebase.svn.sourceforge.net/treebase/?rev=679&view=rev Author: youjun Date: 2010-04-07 20:33:07 +0000 (Wed, 07 Apr 2010) Log Message: ----------- template modification on oai-pmh-provider Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListMetadataFormats.vm Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java 2010-04-06 20:37:41 UTC (rev 678) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java 2010-04-07 20:33:07 UTC (rev 679) @@ -232,24 +232,24 @@ List<Person> authors=citation.getAuthors(); - map.put("title", IdentifyUtil.escape4XML(citation.getTitle())); + map.put("title", IdentifyUtil.escape4XML(study.getId(),citation.getTitle())); map.put("creator", authors); - map.put("subject", IdentifyUtil.escape4XML(citation.getKeywords())); + map.put("subject", IdentifyUtil.escape4XML(study.getId(),citation.getKeywords())); if(study.getName()!=null&study.getNotes()!=null) - map.put("description", IdentifyUtil.escape4XML(study.getName()+" "+study.getNotes())); + map.put("description", IdentifyUtil.escape4XML(study.getId(),study.getName()+" "+study.getNotes())); else if(study.getNotes()==null) - map.put("description",IdentifyUtil.escape4XML(study.getName())); + map.put("description",IdentifyUtil.escape4XML(study.getId(),study.getName())); else - map.put("description",IdentifyUtil.escape4XML(study.getNotes())); - map.put("publisher", IdentifyUtil.escape4XML(publisher)); + map.put("description",IdentifyUtil.escape4XML(study.getId(),study.getNotes())); + map.put("publisher", IdentifyUtil.escape4XML(study.getId(),publisher)); map.put("date", "published on "+citation.getPublishYear()); map.put("identifier", "TreeBASE.org/study/TB2:s"+study.getId()); map.put("datestamp", study.getReleaseDate()); - }catch(NullPointerException e){ + }catch(Exception e){ //study 253 citation= null, data should be fixed System.err.println("study "+study.getId()+ - " citation= "+e.getMessage()); + " citation= "+e.toString()); return null; } Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java 2010-04-06 20:37:41 UTC (rev 678) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java 2010-04-07 20:33:07 UTC (rev 679) @@ -51,32 +51,41 @@ return new Date(utcMiliseconds + cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET)); } - public static String escape4XML(String aText){ - final StringBuilder result = new StringBuilder(); - final StringCharacterIterator iterator = new StringCharacterIterator(aText); - char character = iterator.current(); - while (character != CharacterIterator.DONE ){ - if (character == '<') { + public static String escape4XML(long study_id, String xmlStr){ + if(xmlStr==null)return null; + StringBuilder result = new StringBuilder(); + StringCharacterIterator sci = new StringCharacterIterator(xmlStr); + char c = sci.current(); + while (c != CharacterIterator.DONE ){ + if (c == '<') { result.append("<"); } - else if (character == '>') { + else if (c == '>') { result.append(">"); } - else if (character == '\"') { + else if (c == '\"') { result.append("""); } - else if (character == '\'') { + else if (c == '\'') { result.append("'"); } - else if (character == '&') { + else if (c == '&') { result.append("&"); } else { - //the char is not a special one - //add it to the result as is - result.append(character); + if (!Character.isDefined(c)) { + try { + throw new Exception(); + } catch (Exception e) { + // TODO Auto-generated catch block + System.err.println("study:"+ study_id+" undefined charachter:"+ c + " in " + xmlStr ); + } + + + } + result.append(c); } - character = iterator.next(); + c = sci.next(); } return result.toString(); } Modified: trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListMetadataFormats.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListMetadataFormats.vm 2010-04-06 20:37:41 UTC (rev 678) +++ trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListMetadataFormats.vm 2010-04-07 20:33:07 UTC (rev 679) @@ -2,17 +2,14 @@ <ListMetadataFormats> <metadataFormat> <metadataPrefix>oai_dc</metadataPrefix> - <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd - </schema> - <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/ - </metadataNamespace> + <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema> + <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace> </metadataFormat> <metadataFormat> <metadataPrefix>dryad</metadataPrefix> <schema>http://ils.unc.edu/mrc/dryad/version1_0/dryad_1_0.xsd</schema> - <metadataNamespace>http://ils.unc.edu/mrc/dryad/ - </metadataNamespace> + <metadataNamespace>http://ils.unc.edu/mrc/dryad/</metadataNamespace> </metadataFormat> </ListMetadataFormats> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-04-06 20:37:53
|
Revision: 678 http://treebase.svn.sourceforge.net/treebase/?rev=678&view=rev Author: youjun Date: 2010-04-06 20:37:41 +0000 (Tue, 06 Apr 2010) Log Message: ----------- modify oai-pmh-data-provider code to fit in treebase Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java trunk/treebase-web/src/main/webapp/WEB-INF/identify.properties trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml Added Paths: ----------- trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/GetRecord.vm trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/Identify.vm trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListMetadataFormats.vm trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListRecords.vm trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListSets.vm trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/error.vm trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/head.vm trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/oai_dc_ListIdentifiers.vm trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/oai_dc_record.vm Removed Paths: ------------- trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/ Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java 2010-04-06 01:55:28 UTC (rev 677) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java 2010-04-06 20:37:41 UTC (rev 678) @@ -24,6 +24,7 @@ import org.cipres.treebase.domain.study.Submission; import org.cipres.treebase.domain.study.SubmissionService; import org.cipres.treebase.domain.study.StudyService; + /** * OAIPMHController.java * @@ -231,16 +232,16 @@ List<Person> authors=citation.getAuthors(); - map.put("title", citation.getTitle()); + map.put("title", IdentifyUtil.escape4XML(citation.getTitle())); map.put("creator", authors); - map.put("subject", citation.getKeywords()); + map.put("subject", IdentifyUtil.escape4XML(citation.getKeywords())); if(study.getName()!=null&study.getNotes()!=null) - map.put("description", study.getName()+" "+study.getNotes()); + map.put("description", IdentifyUtil.escape4XML(study.getName()+" "+study.getNotes())); else if(study.getNotes()==null) - map.put("description",study.getName()); + map.put("description",IdentifyUtil.escape4XML(study.getName())); else - map.put("description",study.getNotes()); - map.put("publisher", publisher); + map.put("description",IdentifyUtil.escape4XML(study.getNotes())); + map.put("publisher", IdentifyUtil.escape4XML(publisher)); map.put("date", "published on "+citation.getPublishYear()); map.put("identifier", "TreeBASE.org/study/TB2:s"+study.getId()); map.put("datestamp", study.getReleaseDate()); Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java 2010-04-06 01:55:28 UTC (rev 677) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java 2010-04-06 20:37:41 UTC (rev 678) @@ -1,7 +1,9 @@ package org.cipres.treebase.web.util; +import java.text.CharacterIterator; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.text.StringCharacterIterator; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; @@ -48,4 +50,35 @@ cal.setTimeInMillis(utcMiliseconds); return new Date(utcMiliseconds + cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET)); } + + public static String escape4XML(String aText){ + final StringBuilder result = new StringBuilder(); + final StringCharacterIterator iterator = new StringCharacterIterator(aText); + char character = iterator.current(); + while (character != CharacterIterator.DONE ){ + if (character == '<') { + result.append("<"); + } + else if (character == '>') { + result.append(">"); + } + else if (character == '\"') { + result.append("""); + } + else if (character == '\'') { + result.append("'"); + } + else if (character == '&') { + result.append("&"); + } + else { + //the char is not a special one + //add it to the result as is + result.append(character); + } + character = iterator.next(); + } + return result.toString(); + } + } Modified: trunk/treebase-web/src/main/webapp/WEB-INF/identify.properties =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/identify.properties 2010-04-06 01:55:28 UTC (rev 677) +++ trunk/treebase-web/src/main/webapp/WEB-INF/identify.properties 2010-04-06 20:37:41 UTC (rev 678) @@ -1,4 +1,4 @@ -identify.baseURL=www.***.***:port/top +identify.baseURL=www.treebase.org/treebase-web/top/oai identify.repositoryName=TreeBASE repository identify.protocolVersion=2.0 identify.adminEmail=you...@ya... Modified: trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml 2010-04-06 01:55:28 UTC (rev 677) +++ trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml 2010-04-06 20:37:41 UTC (rev 678) @@ -13,11 +13,9 @@ <!-- velocity configure --> <!-- ========================================================== --> - <bean id="velocityConfigurer" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer"> - <property name="resourceLoaderPath"> - <value>WEB-INF/vmFiles/</value> - </property> - </bean> + <bean id="velocityConfigurer" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer"> + <property name="resourceLoaderPath" value="/WEB-INF/vmFiles/" /> + </bean> <!-- ========================================================== --> <!-- LIST OF CONTROLLERS FOR WEB-TIER --> @@ -860,14 +858,11 @@ <!-- ========================================================== --> <!-- Spring View Resolvers for JSPs and .vm files --> <!-- ========================================================== --> - <!-- + <bean id="chainableVelocityViewResolver" class="org.cipres.treebase.web.viewresolver.ChainableVelocityViewResolver"> <property name="chainableResolver"> - <bean class="org.springframework.web.servlet.view.velocity. VelocityViewResolver"> - <property name="order" value="1"></property> - <property name="suffix"> - <value>.vm</value> - </property> + <bean class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"> + <property name="suffix" value=".vm"/> <property name="exposeRequestAttributes"> <value>true</value> </property> @@ -876,8 +871,7 @@ </property> <property name="contentType" value="application/xml;charset=UTF-8" /> </bean> - </property> - <property name="order"><value>1</value></property> + </property> <property name="views"> <list> <value>error</value> @@ -891,7 +885,7 @@ </property> </bean> - --> + <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="requestContextAttribute" value="rc"/> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> Added: trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/GetRecord.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/GetRecord.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/GetRecord.vm 2010-04-06 20:37:41 UTC (rev 678) @@ -0,0 +1,7 @@ +#parse("head.vm") +<GetRecord> +#if($!requestParams.metadataPrefix=="oai_dc") +#parse("oai_dc_record.vm") +#end +</GetRecord> +</OAI-PMH> Added: trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/Identify.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/Identify.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/Identify.vm 2010-04-06 20:37:41 UTC (rev 678) @@ -0,0 +1,25 @@ +#parse("head.vm") + <Identify> + <repositoryName>${identify.repositoryName}</repositoryName> + <baseURL>${identify.baseURL}</baseURL> + <protocolVersion>${identify.protocolVersion}</protocolVersion> + <adminEmail>${identify.adminEmail}</adminEmail> + <earliestDatestamp>${identify.earliestDatestamp}</earliestDatestamp> + <deletedRecord>${identify.deletedRecord}</deletedRecord> + <granularity>${identify.granularity}</granularity> + + <description> + <oai-identifier + xmlns="http://www.openarchives.org/OAI/2.0/oai-identifier" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation= + "http://www.openarchives.org/OAI/2.0/oai-identifier + http://www.openarchives.org/OAI/2.0/oai-identifier.xsd"> + <scheme>oai</scheme> + <repositoryIdentifier>${identify.repositoryIdentifier}</repositoryIdentifier> + <delimiter>${identify.identifierDelimiter}</delimiter> + <sampleIdentifier>${identify.sampleIdentifier}</sampleIdentifier> + </oai-identifier> + </description> + </Identify> +</OAI-PMH> Added: trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListMetadataFormats.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListMetadataFormats.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListMetadataFormats.vm 2010-04-06 20:37:41 UTC (rev 678) @@ -0,0 +1,19 @@ +#parse("head.vm") + <ListMetadataFormats> + <metadataFormat> + <metadataPrefix>oai_dc</metadataPrefix> + <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd + </schema> + <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/ + </metadataNamespace> + </metadataFormat> + + <metadataFormat> + <metadataPrefix>dryad</metadataPrefix> + <schema>http://ils.unc.edu/mrc/dryad/version1_0/dryad_1_0.xsd</schema> + <metadataNamespace>http://ils.unc.edu/mrc/dryad/ + </metadataNamespace> + </metadataFormat> + + </ListMetadataFormats> +</OAI-PMH> Added: trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListRecords.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListRecords.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListRecords.vm 2010-04-06 20:37:41 UTC (rev 678) @@ -0,0 +1,9 @@ +#parse("head.vm") +<ListRecords> +#if($!requestParams.metadataPrefix=="oai_dc") +#foreach($record in $recordList) +#parse("oai_dc_record.vm") +#end +#end +</ListRecords> +</OAI-PMH> Added: trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListSets.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListSets.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/ListSets.vm 2010-04-06 20:37:41 UTC (rev 678) @@ -0,0 +1,3 @@ +#parse("head.vm") + <error code="noSetHierarchy">This repository does not support sets</error> +</OAI-PMH> Added: trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/error.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/error.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/error.vm 2010-04-06 20:37:41 UTC (rev 678) @@ -0,0 +1,3 @@ +#parse("head.vm") +<error code="$!error_code">$!error</error> +</OAI-PMH> Added: trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/head.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/head.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/head.vm 2010-04-06 20:37:41 UTC (rev 678) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ + http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"> +<responseDate>${identify.getResponseDate()}</responseDate> +<request #if($!requestParams.verb)verb="$!requestParams.verb" #end +#if($!requestParams.identifier)identifier="$!requestParams.identifier" #end +#if($!requestParams.metadataPrefix)metadataPrefix="$!requestParams.metadataPrefix" #end +#if($!requestParams.from)from="$!requestParams.from" #end +#if($!requestParams.until)until="$!requestParams.until" #end +#if($!requestParams.resumptionToken)resumptionToken="$!requestParams.resumptionToken" #end +#if($!requestParams.set)set="$!requestParams.set" #end> +$!identify.BaseURL</request> Added: trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/oai_dc_ListIdentifiers.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/oai_dc_ListIdentifiers.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/oai_dc_ListIdentifiers.vm 2010-04-06 20:37:41 UTC (rev 678) @@ -0,0 +1,10 @@ +#parse("head.vm") +<ListIdentifiers> +#foreach ( $record in $recordList) +<header> +<identifier>${record.identifier}</identifier> +<datestamp>$!record.datestamp</datestamp> +</header> +#end +</ListIdentifiers> +</OAI-PMH> Added: trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/oai_dc_record.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/oai_dc_record.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/vmFiles/oai_dc_record.vm 2010-04-06 20:37:41 UTC (rev 678) @@ -0,0 +1,64 @@ +<record> +<header> +<identifier>${record.identifier}</identifier> +<datestamp>$!record.datestamp</datestamp> +</header> +<metadata> +<oai_dc:dc + xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ + http://www.openarchives.org/OAI/2.0/oai_dc.xsd"> +#if($record.title) +<dc:title>${record.title}</dc:title> +#end +#if($record.creator) +#foreach ($person in $record.creator) +<dc:creator>${person.lastName}, ${person.firstName}</dc:creator> +#end +#end +#if($record.subject) +<dc:subject>${record.subject}</dc:subject> +#end +#if($record.description) +<dc:description>${record.description}</dc:description> +#end +#if($record.publisher) +<dc:publisher>${record.publisher}</dc:publisher> +#end +#if($record.contributor) +<dc:contributor>${record.contributor}</dc:contributor> +#end +#if($record.date) +<dc:date>${record.date}</dc:date> +#end +#if($record.type) +<dc:type>${record.type}</dc:type> +#end +#if($record.format) +<dc:format>${record.format}</dc:format> +#end + +#if($record.identifier) +<dc:identifier>${record.identifier}</dc:identifier> +#end + +#if($record.source) +<dc:source>{record.source}</dc:source> +#end +#if($record.language) +<dc:language>${record.language}</dc:language> +#end +#if($record.relation) +<dc:relation>${record.relation}</dc:relation> +#end +#if($record.coverage) +<dc:coverage>${record.coverage}</dc:coverage> +#end +#if($record.rights) +<dc:rights>${record.rights}</dc:rights> +#end +</oai_dc:dc> +</metadata> +</record> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-04-06 01:55:34
|
Revision: 677 http://treebase.svn.sourceforge.net/treebase/?rev=677&view=rev Author: youjun Date: 2010-04-06 01:55:28 +0000 (Tue, 06 Apr 2010) Log Message: ----------- add customized view resolver Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml Added Paths: ----------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/viewresolver/ trunk/treebase-web/src/main/java/org/cipres/treebase/web/viewresolver/ChainableVelocityViewResolver.java Added: trunk/treebase-web/src/main/java/org/cipres/treebase/web/viewresolver/ChainableVelocityViewResolver.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/viewresolver/ChainableVelocityViewResolver.java (rev 0) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/viewresolver/ChainableVelocityViewResolver.java 2010-04-06 01:55:28 UTC (rev 677) @@ -0,0 +1,33 @@ +package org.cipres.treebase.web.viewresolver; + +import java.util.List; +import java.util.Locale; + +import org.springframework.web.servlet.View; +import org.springframework.web.servlet.ViewResolver; +import org.springframework.web.servlet.view.velocity.VelocityViewResolver; + +public class ChainableVelocityViewResolver implements ViewResolver { + + private VelocityViewResolver chainableResolver; + private List<String> views; + + public void setChainableResolver(VelocityViewResolver chainableResolver) { + this.chainableResolver = chainableResolver; + } + + public void setViews(List<String> views) { + this.views = views; + } + + public View resolveViewName(String viewName, Locale locale) throws Exception { + + if(views.contains(viewName)) + + return chainableResolver.resolveViewName(viewName, locale); + + return null; + + } + +} Modified: trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml 2010-04-05 19:40:55 UTC (rev 676) +++ trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml 2010-04-06 01:55:28 UTC (rev 677) @@ -860,20 +860,38 @@ <!-- ========================================================== --> <!-- Spring View Resolvers for JSPs and .vm files --> <!-- ========================================================== --> - <!-- - <bean id="vmViewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"> - <property name="order" value="1"></property> - <property name="suffix"> - <value>.vm</value> + <!-- + <bean id="chainableVelocityViewResolver" class="org.cipres.treebase.web.viewresolver.ChainableVelocityViewResolver"> + <property name="chainableResolver"> + <bean class="org.springframework.web.servlet.view.velocity. VelocityViewResolver"> + <property name="order" value="1"></property> + <property name="suffix"> + <value>.vm</value> + </property> + <property name="exposeRequestAttributes"> + <value>true</value> + </property> + <property name="exposeSessionAttributes"> + <value>true</value> + </property> + <property name="contentType" value="application/xml;charset=UTF-8" /> + </bean> + </property> + <property name="order"><value>1</value></property> + <property name="views"> + <list> + <value>error</value> + <value>ListRecords</value> + <value>GetRecord</value> + <value>Identify</value> + <value>ListMetadataFormats</value> + <value>oai_dc_ListIdentifiers</value> + <value>ListSets</value> + </list> </property> - <property name="exposeRequestAttributes"> - <value>true</value> - </property> - <property name="exposeSessionAttributes"> - <value>true</value> - </property> - </bean> - --> + + </bean> + --> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="requestContextAttribute" value="rc"/> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2010-04-05 19:58:49
|
Bugs item #2978838, was opened at 2010-03-29 17:19 Message generated for change (Comment added) made by vgapeyev You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2978838&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: internals Group: None >Status: Closed Priority: 8 Private: No Submitted By: Vladimir Gapeyev (vgapeyev) Assigned to: Vladimir Gapeyev (vgapeyev) Summary: Move PURL prefix value from build to Tomcat config Initial Comment: Currently, the value of a PURL prefix is specified at compile time in the source code. Instead, it should come at run time as a parameter from Tomcat, e.g., should be specified as a JNDI parameter in treebase-web.xml config file in Tomcat. Fixing this is essential for restoring proper functionality of the development instance (and any other non-production instance). Make sure to modify installation instructions on the wiki: mention the need to set up a PURL account and define purl redirection there. ---------------------------------------------------------------------- >Comment By: Vladimir Gapeyev (vgapeyev) Date: 2010-04-05 15:58 Message: Resolved as of SVN rev 664 ---------------------------------------------------------------------- Comment By: Vladimir Gapeyev (vgapeyev) Date: 2010-03-31 13:39 Message: On Mar 19, 2010, at 10:34 AM, Hilmar Lapp wrote: I created the following alternative base URLs, with obvious redirection: http://purl.org/phylo/treebase/dev/phylows/ http://purl.org/phylo/treebase/stage/phylows/ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2978838&group_id=248804 |
From: <vga...@us...> - 2010-04-05 19:41:02
|
Revision: 676 http://treebase.svn.sourceforge.net/treebase/?rev=676&view=rev Author: vgapeyev Date: 2010-04-05 19:40:55 +0000 (Mon, 05 Apr 2010) Log Message: ----------- Rutger's email on how to use 'check' and 'digester' scripts. Added Paths: ----------- trunk/treebase-core/src/main/perl/check/README_consistency_checks.txt Added: trunk/treebase-core/src/main/perl/check/README_consistency_checks.txt =================================================================== --- trunk/treebase-core/src/main/perl/check/README_consistency_checks.txt (rev 0) +++ trunk/treebase-core/src/main/perl/check/README_consistency_checks.txt 2010-04-05 19:40:55 UTC (rev 676) @@ -0,0 +1,73 @@ + From: rut...@gm... + Subject: Re: [Treebase-devel] Consistency tests... + Date: March 18, 2010 7:30:58 AM EDT + To: vla...@du... + Cc: tre...@li... + +Hi all, + +sorry about the late response. Here's how it works, (to the extent +that I've managed to understand MJD's code): there is a "check" +script. This script needs two arguments: a table name (out of which +MJD's code creates a perl ORM object) and an ID in that table. The +script then tries to construct the logically expected subtended object +hierarchy starting from the focal object. Anything unexpected is +written two STDERR. The most useful way to use this is to say "check +Study $studyID". What I've done in the past is to dump all study IDs +to a file "STUDIES", and then running the following shell script: + +#!/bin/bash +studies=`cat STUDIES` +for study in $studies; do + check Study $study 2> $study.err + logfilesize=`wc -l $study.err | cut -f1 -d' '` + if [[ $logfilesize > 0 ]] + then + gzip -9 $study.err + else + rm $study.err + fi +done + +This will create a $studyID.gz file for every inconsistent study. On +closer examination of these, most inconsistencies lead back to only a +handful of problems, mostly related to incomplete repatriation of +objects from dummy study 22 to their destination study. It's therefore +more informative to bin the inconsistencies by category as opposed to +by study. For this, MJD has written a "digester" script. Assuming you +have a directory full of gzipped study reports, you can then run the +following shell script to categorize the reports: + +#!/bin/bash +zips=`ls *.gz` +for zip in $zips; do + gunzip $zip + base=`echo $zip | sed -e 's/\.gz//'` + dir=`echo $base | sed -e 's/\.err//'` + grep '\*' $base | digester -d $dir + gzip -9 $base + cd $dir + logs=`ls *` + for log in $logs; do + cat $log >> ../$log + done + cd ../ +done + +This will create files such as "tree_references_tls_but_its_no", which +lists the PhyloTree objects that reference TaxonLabelSet X, whereas +some of its nodes reference a TaxonLabel that is in TaxonLabelSet Y. +In all these cases, X is still linked to Study 22 (so not repatriated +correctly) while the individual labels and their Y are in the right +place. + +By the way, the "gc" script is to be ignored. The idea was that this +would be a garbage collector that could automatically figure out all +inconsistencies and fix them. MJD never quite completed it and/or +worked up the confidence and courage to let it loose on a live +database. + +Hope this helps, + +Rutger + \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-04-05 14:37:28
|
Revision: 675 http://treebase.svn.sourceforge.net/treebase/?rev=675&view=rev Author: youjun Date: 2010-04-05 14:37:21 +0000 (Mon, 05 Apr 2010) Log Message: ----------- viewresolver confliction Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml Modified: trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml 2010-04-03 17:43:07 UTC (rev 674) +++ trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml 2010-04-05 14:37:21 UTC (rev 675) @@ -860,7 +860,7 @@ <!-- ========================================================== --> <!-- Spring View Resolvers for JSPs and .vm files --> <!-- ========================================================== --> - + <!-- <bean id="vmViewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"> <property name="order" value="1"></property> <property name="suffix"> @@ -873,14 +873,14 @@ <value>true</value> </property> </bean> - + --> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="requestContextAttribute" value="rc"/> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> <property name="prefix" value="/WEB-INF/pages/"/> <property name="suffix" value=".jsp"/> </bean> - + <!-- ========================================================== --> <!-- URL MAPPING --> <!-- ========================================================== --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-04-03 17:43:13
|
Revision: 674 http://treebase.svn.sourceforge.net/treebase/?rev=674&view=rev Author: youjun Date: 2010-04-03 17:43:07 +0000 (Sat, 03 Apr 2010) Log Message: ----------- modify configure files to import oai-pmh-provider Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/Identify.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/OAIPMHCommand.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/validators/OAIPMHValidator.java trunk/treebase-web/src/main/webapp/WEB-INF/applicationContext.xml trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml trunk/treebase-web/src/main/webapp/WEB-INF/web.xml Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java 2010-04-03 15:01:36 UTC (rev 673) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java 2010-04-03 17:43:07 UTC (rev 674) @@ -1,4 +1,4 @@ -package org.treebase.oai.web.controller; +package org.cipres.treebase.web.controllers; import java.lang.reflect.Method; import java.text.ParseException; @@ -13,9 +13,9 @@ import org.springframework.validation.BindException; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.AbstractCommandController; -import org.treebase.oai.web.command.Identify; -import org.treebase.oai.web.command.OAIPMHCommand; -import org.treebase.oai.web.util.IdentifyUtil; +import org.cipres.treebase.web.model.Identify; +import org.cipres.treebase.web.model.OAIPMHCommand; +import org.cipres.treebase.web.util.IdentifyUtil; import org.cipres.treebase.domain.admin.Person; import org.cipres.treebase.domain.study.ArticleCitation; import org.cipres.treebase.domain.study.BookCitation; Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/Identify.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/Identify.java 2010-04-03 15:01:36 UTC (rev 673) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/Identify.java 2010-04-03 17:43:07 UTC (rev 674) @@ -1,4 +1,4 @@ -package org.treebase.oai.web.command; +package org.cipres.treebase.web.model; import java.text.SimpleDateFormat; import java.util.Calendar; Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/OAIPMHCommand.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/OAIPMHCommand.java 2010-04-03 15:01:36 UTC (rev 673) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/OAIPMHCommand.java 2010-04-03 17:43:07 UTC (rev 674) @@ -1,4 +1,4 @@ -package org.treebase.oai.web.command; +package org.cipres.treebase.web.model; /** * * @author youjun Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java 2010-04-03 15:01:36 UTC (rev 673) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java 2010-04-03 17:43:07 UTC (rev 674) @@ -1,4 +1,4 @@ -package org.treebase.oai.web.util; +package org.cipres.treebase.web.util; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -7,8 +7,8 @@ import java.util.GregorianCalendar; import java.util.TimeZone; -import org.treebase.oai.web.command.Identify; -import org.treebase.oai.web.command.OAIPMHCommand; +import org.cipres.treebase.web.model.Identify; +import org.cipres.treebase.web.model.OAIPMHCommand; /* * * @author youjun Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/validators/OAIPMHValidator.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/validators/OAIPMHValidator.java 2010-04-03 15:01:36 UTC (rev 673) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/validators/OAIPMHValidator.java 2010-04-03 17:43:07 UTC (rev 674) @@ -1,9 +1,9 @@ -package org.treebase.oai.web.validator; +package org.cipres.treebase.web.validators; import org.springframework.validation.Errors; import org.springframework.validation.ValidationUtils; import org.springframework.validation.Validator; -import org.treebase.oai.web.command.OAIPMHCommand; +import org.cipres.treebase.web.model.OAIPMHCommand; public class OAIPMHValidator implements Validator { Modified: trunk/treebase-web/src/main/webapp/WEB-INF/applicationContext.xml =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/applicationContext.xml 2010-04-03 15:01:36 UTC (rev 673) +++ trunk/treebase-web/src/main/webapp/WEB-INF/applicationContext.xml 2010-04-03 17:43:07 UTC (rev 674) @@ -11,6 +11,36 @@ <!-- ========================================================== --> + <!-- oai-pmh-provider properties bean--> + <!-- ========================================================== --> + + <bean id="top.propertyConfigurer" + class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="ignoreUnresolvablePlaceholders" value="true" /> + <property name="locations"> + <list> + <value>/WEB-INF/identify.properties</value> + </list> + </property> + </bean> + + <bean id="top.identify" class="org.cipres.treebase.web.model.Identify"> + <property name="baseURL" value="${identify.baseURL}" /> + <property name="repositoryName" value="${identify.repositoryName}" /> + <property name="protocolVersion" value="${identify.protocolVersion}" /> + <property name="adminEmail" value="${identify.adminEmail}" /> + <property name="earliestDatestamp" value="${identify.earliestDatestamp}" /> + <property name="deletedRecord" value="${identify.deletedRecord}" /> + <property name="granularity" value="${identify.granularity}" /> + <property name="granularityPattern" value="${identify.granularityPattern}" /> + <property name="repositoryIdentifier" value="${identify.repositoryIdentifier}" /> + <property name="sampleIdentifier" value="${identify.sampleIdentifier}" /> + <property name="identifierDelimiter" value="${identify.identifierDelimiter}" /> + <property name="dublinPerfix" value="${identify.dublinPerfix}" /> + <property name="dryadPerfix" value="${identify.dryadPerfix}" /> + </bean> + + <!-- ========================================================== --> <!-- LIST OF DWR beans/methods --> <!-- ========================================================== --> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml 2010-04-03 15:01:36 UTC (rev 673) +++ trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml 2010-04-03 17:43:07 UTC (rev 674) @@ -8,6 +8,16 @@ http://www.directwebremoting.org/schema/spring-dwr http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd"> + + <!-- ========================================================== --> + <!-- velocity configure --> + <!-- ========================================================== --> + + <bean id="velocityConfigurer" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer"> + <property name="resourceLoaderPath"> + <value>WEB-INF/vmFiles/</value> + </property> + </bean> <!-- ========================================================== --> <!-- LIST OF CONTROLLERS FOR WEB-TIER --> @@ -826,6 +836,16 @@ <property name="userService"><ref bean="userService"></ref></property> <property name="helpService"><ref bean="helpService"></ref></property> </bean> + + + <bean id="OAIPMHController" class="org.cipres.treebase.web.controllers.OAIPMHController"> + <property name="submissionService"><ref bean="submissionService"></ref></property> + <property name="studyService"><ref bean="studyService"></ref></property> + <property name="identify"><ref bean="top.identify"></ref></property> + <property name="validator"> + <bean class="org.cipres.treebase.web.validators.OAIPMHValidator"/> + </property> + </bean> <!-- ========================================================== --> <!-- LIST OF VALIDATORS FOR CONTROLLER --> @@ -838,15 +858,29 @@ </bean> <!-- ========================================================== --> - <!-- Spring View Resolvers for JSPs --> + <!-- Spring View Resolvers for JSPs and .vm files --> <!-- ========================================================== --> - <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> - <property name="requestContextAttribute" value="rc"/> - <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> - <property name="prefix" value="/WEB-INF/pages/"/> - <property name="suffix" value=".jsp"/> + + <bean id="vmViewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver"> + <property name="order" value="1"></property> + <property name="suffix"> + <value>.vm</value> + </property> + <property name="exposeRequestAttributes"> + <value>true</value> + </property> + <property name="exposeSessionAttributes"> + <value>true</value> + </property> </bean> - + + <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> + <property name="requestContextAttribute" value="rc"/> + <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> + <property name="prefix" value="/WEB-INF/pages/"/> + <property name="suffix" value=".jsp"/> + </bean> + <!-- ========================================================== --> <!-- URL MAPPING --> <!-- ========================================================== --> @@ -854,7 +888,8 @@ <property name="alwaysUseFullPath" value="true"/> <property name="mappings"> - <props> + <props> + <prop key="/top/**">OAIPMHController</prop> <prop key="/phylows/**">phyloWSController</prop> <prop key="/about.html">filenameController</prop> <prop key="/home.html">filenameController</prop> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/web.xml =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/web.xml 2010-04-03 15:01:36 UTC (rev 673) +++ trunk/treebase-web/src/main/webapp/WEB-INF/web.xml 2010-04-03 17:43:07 UTC (rev 674) @@ -209,6 +209,10 @@ <servlet-name>treebase</servlet-name> <url-pattern>/phylows/*</url-pattern> </servlet-mapping> + <servlet-mapping> + <servlet-name>treebase</servlet-name> + <url-pattern>/top/*</url-pattern> + </servlet-mapping> <!-- ========================================================== --> <!-- url pattern that will be processed by XFireSpringServlet --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-04-03 15:01:48
|
Revision: 673 http://treebase.svn.sourceforge.net/treebase/?rev=673&view=rev Author: youjun Date: 2010-04-03 15:01:36 +0000 (Sat, 03 Apr 2010) Log Message: ----------- import velocity template from oai-pmh-provider Added Paths: ----------- trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/ trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/GetRecord.vm trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/Identify.vm trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/ListMetadataFormats.vm trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/ListRecords.vm trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/ListSets.vm trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/error.vm trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/head.vm trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/oai_dc_ListIdentifiers.vm trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/oai_dc_record.vm Added: trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/GetRecord.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/GetRecord.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/GetRecord.vm 2010-04-03 15:01:36 UTC (rev 673) @@ -0,0 +1,7 @@ +#parse("head.vm") +<GetRecord> +#if($!requestParams.metadataPrefix=="oai_dc") +#parse("oai_dc_record.vm") +#end +</GetRecord> +</OAI-PMH> Added: trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/Identify.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/Identify.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/Identify.vm 2010-04-03 15:01:36 UTC (rev 673) @@ -0,0 +1,25 @@ +#parse("head.vm") + <Identify> + <repositoryName>${identify.repositoryName}</repositoryName> + <baseURL>${identify.baseURL}</baseURL> + <protocolVersion>${identify.protocolVersion}</protocolVersion> + <adminEmail>${identify.adminEmail}</adminEmail> + <earliestDatestamp>${identify.earliestDatestamp}</earliestDatestamp> + <deletedRecord>${identify.deletedRecord}</deletedRecord> + <granularity>${identify.granularity}</granularity> + + <description> + <oai-identifier + xmlns="http://www.openarchives.org/OAI/2.0/oai-identifier" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation= + "http://www.openarchives.org/OAI/2.0/oai-identifier + http://www.openarchives.org/OAI/2.0/oai-identifier.xsd"> + <scheme>oai</scheme> + <repositoryIdentifier>${identify.repositoryIdentifier}</repositoryIdentifier> + <delimiter>${identify.identifierDelimiter}</delimiter> + <sampleIdentifier>${identify.sampleIdentifier}</sampleIdentifier> + </oai-identifier> + </description> + </Identify> +</OAI-PMH> Added: trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/ListMetadataFormats.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/ListMetadataFormats.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/ListMetadataFormats.vm 2010-04-03 15:01:36 UTC (rev 673) @@ -0,0 +1,19 @@ +#parse("head.vm") + <ListMetadataFormats> + <metadataFormat> + <metadataPrefix>oai_dc</metadataPrefix> + <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd + </schema> + <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/ + </metadataNamespace> + </metadataFormat> + + <metadataFormat> + <metadataPrefix>dryad</metadataPrefix> + <schema>http://ils.unc.edu/mrc/dryad/version1_0/dryad_1_0.xsd</schema> + <metadataNamespace>http://ils.unc.edu/mrc/dryad/ + </metadataNamespace> + </metadataFormat> + + </ListMetadataFormats> +</OAI-PMH> Added: trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/ListRecords.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/ListRecords.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/ListRecords.vm 2010-04-03 15:01:36 UTC (rev 673) @@ -0,0 +1,9 @@ +#parse("head.vm") +<ListRecords> +#if($!requestParams.metadataPrefix=="oai_dc") +#foreach($record in $recordList) +#parse("oai_dc_record.vm") +#end +#end +</ListRecords> +</OAI-PMH> Added: trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/ListSets.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/ListSets.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/ListSets.vm 2010-04-03 15:01:36 UTC (rev 673) @@ -0,0 +1,3 @@ +#parse("head.vm") + <error code="noSetHierarchy">This repository does not support sets</error> +</OAI-PMH> Added: trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/error.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/error.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/error.vm 2010-04-03 15:01:36 UTC (rev 673) @@ -0,0 +1,3 @@ +#parse("head.vm") +<error code="$!error_code">$!error</error> +</OAI-PMH> Added: trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/head.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/head.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/head.vm 2010-04-03 15:01:36 UTC (rev 673) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ + http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"> +<responseDate>${identify.getResponseDate()}</responseDate> +<request #if($!requestParams.verb)verb="$!requestParams.verb" #end +#if($!requestParams.identifier)identifier="$!requestParams.identifier" #end +#if($!requestParams.metadataPrefix)metadataPrefix="$!requestParams.metadataPrefix" #end +#if($!requestParams.from)from="$!requestParams.from" #end +#if($!requestParams.until)until="$!requestParams.until" #end +#if($!requestParams.resumptionToken)resumptionToken="$!requestParams.resumptionToken" #end +#if($!requestParams.set)set="$!requestParams.set" #end> +$!identify.BaseURL</request> Added: trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/oai_dc_ListIdentifiers.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/oai_dc_ListIdentifiers.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/oai_dc_ListIdentifiers.vm 2010-04-03 15:01:36 UTC (rev 673) @@ -0,0 +1,10 @@ +#parse("head.vm") +<ListIdentifiers> +#foreach ( $record in $recordList) +<header> +<identifier>${record.identifier}</identifier> +<datestamp>$!record.datestamp</datestamp> +</header> +#end +</ListIdentifiers> +</OAI-PMH> Added: trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/oai_dc_record.vm =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/oai_dc_record.vm (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/mvFiles/oai_dc_record.vm 2010-04-03 15:01:36 UTC (rev 673) @@ -0,0 +1,64 @@ +<record> +<header> +<identifier>${record.identifier}</identifier> +<datestamp>$!record.datestamp</datestamp> +</header> +<metadata> +<oai_dc:dc + xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ + http://www.openarchives.org/OAI/2.0/oai_dc.xsd"> +#if($record.title) +<dc:title>${record.title}</dc:title> +#end +#if($record.creator) +#foreach ($person in $record.creator) +<dc:creator>${person.lastName}, ${person.firstName}</dc:creator> +#end +#end +#if($record.subject) +<dc:subject>${record.subject}</dc:subject> +#end +#if($record.description) +<dc:description>${record.description}</dc:description> +#end +#if($record.publisher) +<dc:publisher>${record.publisher}</dc:publisher> +#end +#if($record.contributor) +<dc:contributor>${record.contributor}</dc:contributor> +#end +#if($record.date) +<dc:date>${record.date}</dc:date> +#end +#if($record.type) +<dc:type>${record.type}</dc:type> +#end +#if($record.format) +<dc:format>${record.format}</dc:format> + +#end +##if($record.identifier) +##<dc:identifier>${record.identifier}</dc:identifier> +##end + +#if($record.source) +<dc:source>{record.source}</dc:source> +#end +#if($record.language) +<dc:language>${record.language}</dc:language> +#end +#if($record.relation) +<dc:relation>${record.relation}</dc:relation> +#end +#if($record.coverage) +<dc:coverage>${record.coverage}</dc:coverage> +#end +#if($record.rights) +<dc:rights>${record.rights}</dc:rights> +#end +</oai_dc:dc> +</metadata> +</record> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-04-03 14:52:27
|
Revision: 672 http://treebase.svn.sourceforge.net/treebase/?rev=672&view=rev Author: youjun Date: 2010-04-03 14:52:13 +0000 (Sat, 03 Apr 2010) Log Message: ----------- import oai-pmh-provider Modified Paths: -------------- trunk/treebase-web/pom.xml Added Paths: ----------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/Identify.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/OAIPMHCommand.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/validators/OAIPMHValidator.java trunk/treebase-web/src/main/webapp/WEB-INF/identify.properties Modified: trunk/treebase-web/pom.xml =================================================================== --- trunk/treebase-web/pom.xml 2010-04-03 14:08:25 UTC (rev 671) +++ trunk/treebase-web/pom.xml 2010-04-03 14:52:13 UTC (rev 672) @@ -326,5 +326,20 @@ <version>3.0.4</version> </dependency> + <dependency> + <groupId>velocity-tools</groupId> + <artifactId>velocity-tools</artifactId> + <version>1.1</version> + </dependency> + <dependency> + <groupId>velocity-tools</groupId> + <artifactId>velocity-tools-generic</artifactId> + <version>1.1</version> + </dependency> + <dependency> + <groupId>velocity-tools</groupId> + <artifactId>velocity-tools-view</artifactId> + <version>1.1</version> + </dependency> </dependencies> </project> Added: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java (rev 0) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/OAIPMHController.java 2010-04-03 14:52:13 UTC (rev 672) @@ -0,0 +1,275 @@ +package org.treebase.oai.web.controller; + +import java.lang.reflect.Method; +import java.text.ParseException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.validation.BindException; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.web.servlet.mvc.AbstractCommandController; +import org.treebase.oai.web.command.Identify; +import org.treebase.oai.web.command.OAIPMHCommand; +import org.treebase.oai.web.util.IdentifyUtil; +import org.cipres.treebase.domain.admin.Person; +import org.cipres.treebase.domain.study.ArticleCitation; +import org.cipres.treebase.domain.study.BookCitation; +import org.cipres.treebase.domain.study.Citation; +import org.cipres.treebase.domain.study.Study; +import org.cipres.treebase.domain.study.Submission; +import org.cipres.treebase.domain.study.SubmissionService; +import org.cipres.treebase.domain.study.StudyService; +/** + * OAIPMHController.java + * + * Created on Nov. 1, 2009 + * + * @author Youjun Guo + * + */ +public class OAIPMHController extends AbstractCommandController{ + + private SubmissionService submissionService; + private StudyService studyService; + private Identify identify; + + public OAIPMHController(){ + setCommandClass(OAIPMHCommand.class); + setCommandName("requestParams"); + } + + public SubmissionService getSubmissionService() { + return submissionService; + } + + public void setSubmissionService(SubmissionService submissionService) { + this.submissionService = submissionService; + } + + public StudyService getStudyService() { + return studyService; + } + + public void setStudyService(StudyService studyService) { + this.studyService = studyService; + } + + public Identify getIdentify() { + return identify; + } + + public void setIdentify(Identify identify) { + this.identify = identify; + } + + + + @Override + protected ModelAndView handle(HttpServletRequest request, + HttpServletResponse response, Object command, BindException errors) + throws Exception { + // TODO Auto-generated method stub + + OAIPMHCommand params = (OAIPMHCommand) command; + + Map model=errors.getModel(); + model.put("requestParams", params); + model.put("identify", this.identify); + + if(errors.getErrorCount()>0){ + if(errors.hasFieldErrors("metadataPrefix")){ + model.put("error_code", "cannotDisseminateFormat"); + model.put("error", "bad metadataPrefix"); + return new ModelAndView("error",model); + } + if(errors.hasFieldErrors("verb")){ + model.put("error_code", "badVerb"); + model.put("error", "no verb was found"); + return new ModelAndView("error",model); + } + if(errors.hasFieldErrors("identifier")){ + model.put("error_code", "idDoesNotExist"); + model.put("error", "no id was found"); + return new ModelAndView("error",model); + } + } + + Method method=null; + try{ + method=this.getClass().getMethod(params.getVerb(), new Class[]{OAIPMHCommand.class, Map.class}); + }catch(NoSuchMethodException nsme){ + model.put("error_code", "badVerb"); + model.put("error", "invalid verb"); + return new ModelAndView("error",model); + }catch(NullPointerException e){ + model.put("error_code", "badVerb"); + model.put("error", "missing verb"); + return (new ModelAndView("error",model)); + } + + return (ModelAndView) method.invoke(this, params, model); + + } + + public ModelAndView ListRecords(OAIPMHCommand params, Map model){ + + List<Submission> list=null; + try { + list = (List)submissionService.findSubmissionByCreateDateRange(IdentifyUtil.parseGranularity(identify.getGranularityPattern(),params.getModifiedFrom()), + IdentifyUtil.parseGranularity(identify.getGranularityPattern(),params.getModifiedUntil())); + } catch (ParseException e) { + model.put("error_code", "badArgument"); + model.put("error", "invalid from or until format"); + return (new ModelAndView("error",model)); + } + model.put("recordList", getRecordList(list)); + return (new ModelAndView("ListRecords",model)); + + } + + + public ModelAndView ListIdentifiers( OAIPMHCommand params, Map model){ + + List<Submission> list=null; + try { + list = (List)submissionService.findSubmissionByCreateDateRange(IdentifyUtil.parseGranularity(identify.getGranularityPattern(),params.getModifiedFrom()), + IdentifyUtil.parseGranularity(identify.getGranularityPattern(), params.getModifiedUntil())); + } catch (ParseException e) { + model.put("error_code", "badArgument"); + model.put("error", "invalid from or until format"); + return (new ModelAndView("error",model)); + } + model.put("recordList", getRecordList(list)); + return (new ModelAndView(params.getMetadataPrefix()+"_ListIdentifiers",model)); + + } + + public ModelAndView GetRecord( OAIPMHCommand params, Map model){ + + Submission submission = null; + + try{ + long id = IdentifyUtil.parseID(params); + submission = studyService.findByID(id).getSubmission(); + }catch(NumberFormatException nfe){ + model.put("error_code", "badArgument"); + model.put("error", "invalid id format"); + return (new ModelAndView("error",model)); + + } + catch (NullPointerException e){ + + model.put("error_code", "idDoesNotExist"); + model.put("error", "invalid id"); + return (new ModelAndView("error",model)); + + } + model.put("record", getRecordMap(submission)); + return (new ModelAndView("GetRecord",model)); + + } + + public ModelAndView Identify(OAIPMHCommand params, Map model){ + + + return (new ModelAndView("Identify",model)); + + } + + public ModelAndView ListSets(OAIPMHCommand params, Map model){ + model.put("error_code", "noSetHierarchy"); + model.put("error", "This repository does not support sets"); + return (new ModelAndView("error",model)); + + } + + public ModelAndView ListMetadataFormats(OAIPMHCommand params, Map model){ + + Submission submission = null; + + try{ + long id = IdentifyUtil.parseID(params); + submission = studyService.findByID(id).getSubmission(); + }catch(NumberFormatException nfe){ + model.put("error_code", "badArgument"); + model.put("error", "invalid id format"); + return (new ModelAndView("error",model)); + + } + catch (NullPointerException e){ + //id is optional for ListMetadataFormats + //return (new ModelAndView("error",model)); + } + + + return (new ModelAndView("ListMetadataFormats",model)); + + } + + + private Map getRecordMap(Submission submission){ + + Map map= new HashMap(); + + Study study=submission.getStudy(); + Citation citation=study.getCitation(); + String publisher=null; + if(!study.isPublished())return null; + + //System.out.println("ctype: "+citation.getCitationType()); + try{ + if(citation.getCitationType().toUpperCase().contains("BOOK")) + publisher=((BookCitation)citation).getPublisher(); + else publisher=((ArticleCitation)citation).getJournal(); + + + List<Person> authors=citation.getAuthors(); + + + map.put("title", citation.getTitle()); + map.put("creator", authors); + map.put("subject", citation.getKeywords()); + if(study.getName()!=null&study.getNotes()!=null) + map.put("description", study.getName()+" "+study.getNotes()); + else if(study.getNotes()==null) + map.put("description",study.getName()); + else + map.put("description",study.getNotes()); + map.put("publisher", publisher); + map.put("date", "published on "+citation.getPublishYear()); + map.put("identifier", "TreeBASE.org/study/TB2:s"+study.getId()); + map.put("datestamp", study.getReleaseDate()); + + }catch(NullPointerException e){ + //study 253 citation= null, data should be fixed + System.err.println("study "+study.getId()+ + " citation= "+e.getMessage()); + return null; + } + + //map.put("type", "text"); + //map.put("language", "en"); + + //map.put("issued", citation.getPublishYear()); + //map.put("abstract", citation.getAbstract()); + + + return map; + } + + private List getRecordList(List<Submission> sList) + { + List recordList=new ArrayList<Map>(); + + for(int i =0; i< sList.size(); i++){ + Map map=getRecordMap(sList.get(i)); + if(map!=null)recordList.add(map); + } + return recordList; + } +} Added: trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/Identify.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/Identify.java (rev 0) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/Identify.java 2010-04-03 14:52:13 UTC (rev 672) @@ -0,0 +1,125 @@ +package org.treebase.oai.web.command; + +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.SimpleTimeZone; +import java.util.TimeZone; +/** + * + * @author youjun + * class hold identify data about the service + */ + +public class Identify { + + + private String baseURL; + private String repositoryName; + private String protocolVersion; + private String adminEmail; + private String earliestDatestamp; + private String deletedRecord; + private String granularity; + private String granularityPattern; + private String repositoryIdentifier; + private String sampleIdentifier; + private String dryadPerfix; + private String identifierDelimiter; + private String dublinPerfix; + + + public String getGranularityPattern() { + return granularityPattern; + } + public void setGranularityPattern(String granularityPattern) { + this.granularityPattern = granularityPattern; + } + + + public String getIdentifierDelimiter() { + return identifierDelimiter; + } + public void setIdentifierDelimiter(String identifierDelimiter) { + this.identifierDelimiter = identifierDelimiter; + } + public String getDublinPerfix() { + return dublinPerfix; + } + public void setDublinPerfix(String dublinPerfix) { + this.dublinPerfix = dublinPerfix; + } + public String getDryadPerfix() { + return dryadPerfix; + } + public void setDryadPerfix(String dryadPerfix) { + this.dryadPerfix = dryadPerfix; + } + + public String getRepositoryIdentifier() { + return repositoryIdentifier; + } + public void setRepositoryIdentifier(String repositoryIdentifier) { + this.repositoryIdentifier = repositoryIdentifier; + } + public String getSampleIdentifier() { + return sampleIdentifier; + } + public void setSampleIdentifier(String sampleIdentifier) { + this.sampleIdentifier = sampleIdentifier; + } + + public String getBaseURL() { + return baseURL; + } + public void setBaseURL(String baseRUL) { + this.baseURL = baseRUL; + } + public String getRepositoryName() { + return repositoryName; + } + public void setRepositoryName(String repositoryName) { + this.repositoryName = repositoryName; + } + public String getProtocolVersion() { + return protocolVersion; + } + public void setProtocolVersion(String protocolVersion) { + this.protocolVersion = protocolVersion; + } + public String getAdminEmail() { + return adminEmail; + } + public void setAdminEmail(String adminEmail) { + this.adminEmail = adminEmail; + } + public String getEarliestDatestamp() { + return earliestDatestamp; + } + public void setEarliestDatestamp(String earliestDatestamp) { + this.earliestDatestamp = earliestDatestamp; + } + public String getDeletedRecord() { + return deletedRecord; + } + public void setDeletedRecord(String deletedRecord) { + this.deletedRecord = deletedRecord; + } + public String getGranularity() { + return granularity; + } + public void setGranularity(String granularity) { + this.granularity = granularity; + } + + // return a current date object in UTC + public String getResponseDate(){ + SimpleDateFormat format = new SimpleDateFormat(granularityPattern); + Calendar cal = Calendar.getInstance(new SimpleTimeZone(0, "GMT")); + format.setCalendar(cal); + return format.format(new Date()); + + } + +} Added: trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/OAIPMHCommand.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/OAIPMHCommand.java (rev 0) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/model/OAIPMHCommand.java 2010-04-03 14:52:13 UTC (rev 672) @@ -0,0 +1,74 @@ +package org.treebase.oai.web.command; +/** + * + * @author youjun + * class transfer page/query input data to controller + */ +public class OAIPMHCommand { + + private String from; + private String until; + private String resumptionToken; + private String identifier; + private String metadataPrefix; + private String set; + private String verb; + + public String getVerb() { + return verb; + } + public void setVerb(String verb) { + this.verb = verb; + } + public String getModifiedFrom() { + if(from!=null&&from.trim()!="")return from; + return "1995-11-04T00:00:00Z"; + } + + public String getFrom() { + return from; + } + + public void setFrom(String from) { + this.from = from; + } + public String getModifiedUntil() { + if(until != null && until.trim()!="") return until; + return ""; + } + + public String getUntil() { + return until; + } + + public void setUntil(String until) { + this.until = until; + } + public String getResumptionToken() { + return resumptionToken; + } + public void setResumptionToken(String resumptionToken) { + this.resumptionToken = resumptionToken; + } + public String getIdentifier() { + return identifier; + } + public void setIdentifier(String identifier) { + this.identifier = identifier; + } + public String getMetadataPrefix() { + return metadataPrefix; + } + public void setMetadataPrefix(String metadataPrefix) { + this.metadataPrefix = metadataPrefix; + } + public String getSet() { + return set; + } + public void setSet(String set) { + this.set = set; + } + + + +} Added: trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java (rev 0) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/IdentifyUtil.java 2010-04-03 14:52:13 UTC (rev 672) @@ -0,0 +1,51 @@ +package org.treebase.oai.web.util; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +import org.treebase.oai.web.command.Identify; +import org.treebase.oai.web.command.OAIPMHCommand; +/* + * + * @author youjun + * + */ +public class IdentifyUtil { + + // return a studyID by parsing params.identifier + + public static long parseID(OAIPMHCommand params) + { + String [] ids = params.getIdentifier().split("[/:.]"); + + return Long.parseLong(ids[ids.length-1].replaceAll("[a-zA-Z]","")); + } + + + // convert a time String to date object based on granularity + + public static Date parseGranularity(String granularity, String time ) throws ParseException + { + if(time=="")return new Date(); + SimpleDateFormat sdf = new SimpleDateFormat(granularity); + Date utcDate = sdf.parse(time); + return utcToLocal(utcDate); + + + } + + //convert a date object from utc to local + + protected static Date utcToLocal(Date utcDate) + { + long utcMiliseconds = utcDate.getTime(); + + Calendar cal = new GregorianCalendar(); + cal.setTimeInMillis(utcMiliseconds); + return new Date(utcMiliseconds + cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET)); + } +} Added: trunk/treebase-web/src/main/java/org/cipres/treebase/web/validators/OAIPMHValidator.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/validators/OAIPMHValidator.java (rev 0) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/validators/OAIPMHValidator.java 2010-04-03 14:52:13 UTC (rev 672) @@ -0,0 +1,40 @@ +package org.treebase.oai.web.validator; + +import org.springframework.validation.Errors; +import org.springframework.validation.ValidationUtils; +import org.springframework.validation.Validator; +import org.treebase.oai.web.command.OAIPMHCommand; + +public class OAIPMHValidator implements Validator { + + public boolean supports(Class pClass) { + return OAIPMHCommand.class.equals(pClass); + } + + public void validate(Object pValidatable, Errors pError) { + // ValidationUtils.rejectIfEmpty(e, "name", "name.empty"); + OAIPMHCommand command = (OAIPMHCommand) pValidatable; + + String verb = command.getVerb(); + String fPrefix = command.getMetadataPrefix(); + + ValidationUtils.rejectIfEmptyOrWhitespace(pError, "verb", "empyt verb"); + + + if(verb!=null && verb.equals("GetRecord")) + ValidationUtils.rejectIfEmptyOrWhitespace(pError, "identifier", "empyt id"); + + // check format prefix + if(verb!=null){ + if(verb.equals("GetRecord")||verb.equals("ListIdentifiers")||verb.equals("ListRecords")){ + + ValidationUtils.rejectIfEmptyOrWhitespace(pError, "metadataPrefix", "cannotDisseminateFormat"); + + if(fPrefix!=null) + if(!(fPrefix.equals("oai_dc")||fPrefix.equals("dryad"))) + pError.rejectValue("metadataPrefix","cannotDisseminateFormat"); + } + } + } + +} Added: trunk/treebase-web/src/main/webapp/WEB-INF/identify.properties =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/identify.properties (rev 0) +++ trunk/treebase-web/src/main/webapp/WEB-INF/identify.properties 2010-04-03 14:52:13 UTC (rev 672) @@ -0,0 +1,13 @@ +identify.baseURL=www.***.***:port/top +identify.repositoryName=TreeBASE repository +identify.protocolVersion=2.0 +identify.adminEmail=you...@ya... +identify.earliestDatestamp=1995-11-04T00:00:00Z +identify.deletedRecord=transient +identify.granularity=YYYY-MM-DDThh:mm:ssZ +identify.granularityPattern=yyyy-MM-dd'T'hh:mm:ss'Z' +identify.sampleIdentifier=TreeBASE.org/study/TB2:s6705 +identify.repositoryIdentifier=TreeBASE.org +identify.identifierDelimiter=: +identify.dublinPerfix=oai_dc +identify.dryadPerfix=dryad \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-04-03 14:08:31
|
Revision: 671 http://treebase.svn.sourceforge.net/treebase/?rev=671&view=rev Author: youjun Date: 2010-04-03 14:08:25 +0000 (Sat, 03 Apr 2010) Log Message: ----------- refactor:change package names Added Paths: ----------- trunk/oai-pmh_data_provider/data_provider_web/src/main/java/org/cipres/treebase/web/controllers/ trunk/oai-pmh_data_provider/data_provider_web/src/main/java/org/cipres/treebase/web/validators/ Removed Paths: ------------- trunk/oai-pmh_data_provider/data_provider_web/src/main/java/org/cipres/treebase/web/controller/ trunk/oai-pmh_data_provider/data_provider_web/src/main/java/org/cipres/treebase/web/validator/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-04-03 14:06:10
|
Revision: 670 http://treebase.svn.sourceforge.net/treebase/?rev=670&view=rev Author: youjun Date: 2010-04-03 14:06:04 +0000 (Sat, 03 Apr 2010) Log Message: ----------- Added Paths: ----------- trunk/oai-pmh_data_provider/data_provider_web/src/main/java/org/cipres/treebase/web/model/ Removed Paths: ------------- trunk/oai-pmh_data_provider/data_provider_web/src/main/java/org/cipres/treebase/web/command/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-04-03 13:56:06
|
Revision: 669 http://treebase.svn.sourceforge.net/treebase/?rev=669&view=rev Author: youjun Date: 2010-04-03 13:56:00 +0000 (Sat, 03 Apr 2010) Log Message: ----------- refactor:change package name Added Paths: ----------- trunk/oai-pmh_data_provider/data_provider_web/src/main/java/org/cipres/ trunk/oai-pmh_data_provider/data_provider_web/src/main/java/org/cipres/treebase/ Removed Paths: ------------- trunk/oai-pmh_data_provider/data_provider_web/src/main/java/org/cipres/oai/ trunk/oai-pmh_data_provider/data_provider_web/src/main/java/org/treebase/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-04-02 18:58:37
|
Revision: 668 http://treebase.svn.sourceforge.net/treebase/?rev=668&view=rev Author: youjun Date: 2010-04-02 18:58:31 +0000 (Fri, 02 Apr 2010) Log Message: ----------- move the javascript function Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeList.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp 2010-04-02 00:44:31 UTC (rev 667) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp 2010-04-02 18:58:31 UTC (rev 668) @@ -12,7 +12,7 @@ <script type="text/javascript"> function openPhylowidget(tree_id) { - var realURL = "http://www.phylowidget.org/full/?tree='http://"+location.host+"${url}"+"TB2:Tr"+tree_id+"'"; + var realURL = "http://www.phylowidget.org/full/?tree='http://"+location.host+"/treebase-web/tree_for_phylowidget/"+"TB2:Tr"+tree_id+"'"; window.open(realURL,'myplwidget') } </script> Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeList.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeList.jsp 2010-04-02 00:44:31 UTC (rev 667) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeList.jsp 2010-04-02 18:58:31 UTC (rev 668) @@ -7,7 +7,7 @@ <script type="text/javascript"> function openPhylowidget(tree_id) { - var realURL = "http://www.phylowidget.org/full/?tree='http://"+location.host+"${url}"+"TB2:Tr"+tree_id+"'"; + var realURL = "http://www.phylowidget.org/full/?tree='http://"+location.host+"/treebase-web/tree_for_phylowidget/"+"TB2:Tr"+tree_id+"'"; window.open(realURL,'myplwidget') } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2010-04-02 17:21:31
|
Bugs item #2981217, was opened at 2010-04-02 13:21 Message generated for change (Tracker Item Submitted) made by sfrgpiel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2981217&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: 8 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: youjun guo (youjun) Summary: Ghost records cause Exception Initial Comment: Here's a weird bug. 1. Start by uploading the two attached matrices to a new submission (attached to this bug report). 2. Run "select count(*) from sub_taxonlabel where submission_id = <sub_id>" or "select count(*) from taxonlabel where study_id = <study_id>" and the result is 48 taxon labels in both cases. 3. Delete the matrix called "concatenated" 4. Run the count(*) queries again, and you get 37 taxa (so far so good) 5. Go to the taxaList.html page and click the edit tool for the "Asterochloris italiana ex cf Xanthoria parietina CCAP 519 5B" taxon. 6. Choose "I did a uBio lookup..." item and enter "3530703" as the namebankid 7. Click "Update" and you get the Exception (below). The weird thing is that I was asking to edit taxonlabelid 277197, but the exception says that taxonlabel 277205 does not exist. And that is correct: Taxonlabel 277205 was deleted when the concatenated matrix was deleted, however, here I'm trying to update taxonlabelid 277197, so I don't know why it is trying to update 277205 -- especially since 277205 does not exist. For some reason the software has a "ghost memory" of this taxonlabel still existing, even though it has been deleted along with the deleted matrix using pure Hibernate (no direct SQL). Likewise, if I try to delete the whole submission (http://treebasedb-dev.nescent.org/treebase-web/user/deleteStudy.html?submissionid=10324), I also get an exception with a very similar result (see below). So there's some sort of ghost memory for deleted records that's preventing deletion of submissions or update of taxon labels after having deleted a matrix (and I think a tree too). regards, Bill ******** Error when editing taxonlabel: Uncaught Exception Encountered org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.cipres.treebase.domain.taxon.TaxonLabel#277205] at org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl.java:377) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:145) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878) at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:846) at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:557) at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:196) at org.hibernate.collection.PersistentSet.initializeFromCache(PersistentSet.java:124) at org.hibernate.cache.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:35) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:133) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:51) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86) at org.hibernate.collection.PersistentSet.toArray(PersistentSet.java:171) at java.util.ArrayList.addAll(ArrayList.java:497) at org.cipres.treebase.domain.study.Submission.getSubmittedTaxonLabelsReadOnly(Submission.java:279) at org.cipres.treebase.web.validators.TaxonLabelValidator.validate(TaxonLabelValidator.java:48) at org.springframework.validation.ValidationUtils.invokeValidator(ValidationUtils.java:63) at org.springframework.web.servlet.mvc.BaseCommandController.bindAndValidate(BaseCommandController.java:373) at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:263) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:858) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:837) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286) at java.lang.Thread.run(Thread.java:636) Cookies: itemToHighlight=[http%3A//treebasedb-dev.nescent.org/treebase-web/user/taxaList.html] JSESSIONID=[7D0D4BAD900FBD0DE51EE36BAE354FF1] __utma=[53240375.1924499357.1236724314.1268887193.1269487089.61] __utmz=[53240375.1269487089.61.11.utmccn] ******** Error when trying to delete entire submission: Uncaught Exception Encountered org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.cipres.treebase.domain.taxon.TaxonLabel#277205] at org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl.java:377) at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:145) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878) at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:846) at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:557) at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:196) at org.hibernate.collection.PersistentSet.initializeFromCache(PersistentSet.java:124) at org.hibernate.cache.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:35) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:133) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:51) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86) at org.hibernate.collection.PersistentSet.toArray(PersistentSet.java:171) at java.util.ArrayList.addAll(ArrayList.java:497) at org.cipres.treebase.domain.study.Submission.getSubmittedTaxonLabelsReadOnly(Submission.java:279) at org.cipres.treebase.service.study.SubmissionServiceImpl.deleteSubmittedData(SubmissionServiceImpl.java:482) at org.cipres.treebase.service.study.SubmissionServiceImpl.deleteSubmission(SubmissionServiceImpl.java:374) at org.cipres.treebase.service.study.SubmissionServiceImpl.deleteSubmission(SubmissionServiceImpl.java:900) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy81.deleteSubmission(Unknown Source) at org.cipres.treebase.web.controllers.DeleteStudyController.onSubmit(DeleteStudyController.java:71) at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267) at org.springframework.web.servlet.mvc.CancellableFormController.processFormSubmission(CancellableFormController.java:140) at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:265) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:858) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:837) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286) at java.lang.Thread.run(Thread.java:636) Cookies: itemToHighlight=[http%3A//treebasedb-dev.nescent.org/treebase-web/user/submissionList.html] JSESSIONID=[7D0D4BAD900FBD0DE51EE36BAE354FF1] __utma=[53240375.1924499357.1236724314.1268887193.1269487089.61] __utmz=[53240375.1269487089.61.11.utmccn] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2981217&group_id=248804 |
From: <yo...@us...> - 2010-04-02 00:44:38
|
Revision: 667 http://treebase.svn.sourceforge.net/treebase/?rev=667&view=rev Author: youjun Date: 2010-04-02 00:44:31 +0000 (Fri, 02 Apr 2010) Log Message: ----------- close open bracket, move javascript function out of table Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeList.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp 2010-04-01 23:16:26 UTC (rev 666) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp 2010-04-02 00:44:31 UTC (rev 667) @@ -9,7 +9,13 @@ <c:url var="studyURL" value="summary.html"> <c:param name="id" value="${study.id}"/> </c:url> - +<script type="text/javascript"> + function openPhylowidget(tree_id) + { + var realURL = "http://www.phylowidget.org/full/?tree='http://"+location.host+"${url}"+"TB2:Tr"+tree_id+"'"; + window.open(realURL,'myplwidget') + } +</script> <display:table name="trees" requestURI="" class="list" @@ -23,14 +29,8 @@ <!--c:param name="treeid" value="${tree.id}" /--> <!--c:param name="id" value="${tree.study.id}" /--> </c:url> - <script type="text/javascript"> - function openPhylowidget(tree_id) - { - var realURL = "http://www.phylowidget.org/full/?tree='http://"+location.host+"${url}"+"TB2:Tr"+tree_id+"'"; - window.open(realURL,'myplwidget') - } - </script> - <a href="javascript:void(0)" onClick="openPhylowidget(${tree.id}">Tr${tree.id}</a> + + <a href="javascript:void(0)" onClick="openPhylowidget(${tree.id})">Tr${tree.id}</a> </display:column> <display:column Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeList.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeList.jsp 2010-04-01 23:16:26 UTC (rev 666) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/treeList.jsp 2010-04-02 00:44:31 UTC (rev 667) @@ -4,8 +4,15 @@ <%--content tag="heading"><fmt:message key="search.results.title.trees"/></content> <body id="trees"/ --%> +<script type="text/javascript"> + function openPhylowidget(tree_id) + { + var realURL = "http://www.phylowidget.org/full/?tree='http://"+location.host+"${url}"+"TB2:Tr"+tree_id+"'"; + window.open(realURL,'myplwidget') + } + +</script> - <display:table name="${resultSet.results}" requestURI="" class="list" @@ -19,14 +26,7 @@ <!--c:param name="treeid" value="${tree.id}" /--> <!--c:param name="id" value="${tree.study.id}" /--> </c:url> - <script type="text/javascript"> - function openPhylowidget(tree_id) - { - var realURL = "http://www.phylowidget.org/full/?tree='http://"+location.host+"${url}"+"TB2:Tr"+tree_id+"'"; - window.open(realURL,'myplwidget') - } - - </script> + <input type="checkbox" id="s-${tree.id }" name="selection" value="${tree.id }" /> <a href="javascript:void(0)" onClick="openPhylowidget(${tree.id})">Tr${tree.id}</a> </display:column> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sfr...@us...> - 2010-04-01 23:16:32
|
Revision: 666 http://treebase.svn.sourceforge.net/treebase/?rev=666&view=rev Author: sfrgpiel Date: 2010-04-01 23:16:26 +0000 (Thu, 01 Apr 2010) Log Message: ----------- added missing ) from phylowidget link function call Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp 2010-04-01 21:05:13 UTC (rev 665) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/trees.jsp 2010-04-01 23:16:26 UTC (rev 666) @@ -131,7 +131,7 @@ <!--c:param name="id" value="${tree.study.id}" /--> </c:url> - <a href="javascript:void(0)" onClick="openPhylowidget(${tree.id}"> + <a href="javascript:void(0)" onClick="openPhylowidget(${tree.id})"> <img class="iconButton" src="<fmt:message key="icons.list"/>" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |