You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
(1) |
Apr
(14) |
May
(36) |
Jun
(148) |
Jul
(33) |
Aug
(2) |
Sep
(17) |
Oct
(42) |
Nov
(137) |
Dec
(88) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(89) |
Feb
(80) |
Mar
(217) |
Apr
(76) |
May
(5) |
Jun
(39) |
Jul
(35) |
Aug
(4) |
Sep
(7) |
Oct
(14) |
Nov
(12) |
Dec
(9) |
2011 |
Jan
(6) |
Feb
(4) |
Mar
(11) |
Apr
(55) |
May
(90) |
Jun
(39) |
Jul
(15) |
Aug
(15) |
Sep
(23) |
Oct
(12) |
Nov
(17) |
Dec
(20) |
2012 |
Jan
(22) |
Feb
(63) |
Mar
|
Apr
(1) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(3) |
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: SourceForge.net <no...@so...> - 2010-01-29 19:40:57
|
Bugs item #2825363, was opened at 2009-07-22 09:23 Message generated for change (Settings changed) made by youjun You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2825363&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: 7 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: youjun guo (youjun) Summary: Analysis falsely reports taxon mismatch when tree in+out Initial Comment: when creating an analysis step that has trees as input and trees as output, software reports that the taxon labels among the input objects do not match with those in the output objects, when in fact they do. example is here: http://8ball.sdsc.edu:6666/treebase-web/user/summary.html?id=2383 ---------------------------------------------------------------------- >Comment By: youjun guo (youjun) Date: 2010-01-29 14:40 Message: this bug was fix by some other developer ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2825363&group_id=248804 |
From: SourceForge.net <no...@so...> - 2010-01-27 17:21:36
|
Bugs item #2941145, was opened at 2010-01-27 12: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=2941145&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: 9 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: Nobody/Anonymous (nobody) Summary: Exception when editing a taxon label Initial Comment: After uploading a tree, I tried to edit a taxon label (http://treebasedb-dev.nescent.org:6666/treebase-web/user/editTaxonLabel.html?taxonlabelid=160000022315) and got a big exception -- something about a missing class. Uncaught Exception Encountered java.lang.NoClassDefFoundError: Could not initialize class org.cipres.treebase.domain.study.Study$$EnhancerByCGLIB$$3a7ae697 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 net.sf.cglib.proxy.Enhancer.setCallbacksHelper(Enhancer.java:616) at net.sf.cglib.proxy.Enhancer.setThreadCallbacks(Enhancer.java:609) at net.sf.cglib.proxy.Enhancer.registerCallbacks(Enhancer.java:578) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyInstance(CGLIBLazyInitializer.java:110) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxy(CGLIBLazyInitializer.java:93) at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.getProxy(CGLIBProxyFactory.java:49) at org.hibernate.tuple.entity.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:379) at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3460) at org.hibernate.event.def.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:257) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:191) 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.EntityType.resolve(EntityType.java:379) at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:120) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854) at org.hibernate.loader.Loader.doQuery(Loader.java:729) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) at org.hibernate.loader.Loader.doList(Loader.java:2213) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) at org.hibernate.loader.Loader.list(Loader.java:2099) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305) at org.cipres.treebase.dao.AbstractDAO.findPersistedObjectByID(AbstractDAO.java:118) at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source) 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 $Proxy64.findPersistedObjectByID(Unknown Source) at org.cipres.treebase.service.taxon.TaxonLabelServiceImpl.findByID(TaxonLabelServiceImpl.java:106) 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.findByID(Unknown Source) at org.cipres.treebase.web.controllers.EditTaxonLabelController.formBackingObject(EditTaxonLabelController.java:283) at org.springframework.web.servlet.mvc.AbstractFormController.getErrorsForNewForm(AbstractFormController.java:358) at org.springframework.web.servlet.mvc.AbstractFormController.showNewForm(AbstractFormController.java:338) at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:278) 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.doGet(FrameworkServlet.java:431) at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) 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.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%3A6666/treebase-web/user/taxaList.html] JSESSIONID=[D8DBFE309A8CE8933D7C825D25810660] __utma=[53240375.1924499357.1236724314.1263756485.1264137469.40] __utmz=[53240375.1263756485.39.6.utmccn] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2941145&group_id=248804 |
From: <yo...@us...> - 2010-01-25 20:28:18
|
Revision: 480 http://treebase.svn.sourceforge.net/treebase/?rev=480&view=rev Author: youjun Date: 2010-01-25 20:27:40 +0000 (Mon, 25 Jan 2010) Log Message: ----------- use spring test avoid committing testing data to tables Modified Paths: -------------- trunk/treebase-core/src/test/java/org/cipres/treebase/service/matrix/MatrixServiceImplTest.java Modified: trunk/treebase-core/src/test/java/org/cipres/treebase/service/matrix/MatrixServiceImplTest.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/service/matrix/MatrixServiceImplTest.java 2010-01-25 13:43:57 UTC (rev 479) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/service/matrix/MatrixServiceImplTest.java 2010-01-25 20:27:40 UTC (rev 480) @@ -221,18 +221,14 @@ matrix.addRow(r1); // TODO: add a second row. - - getMatrixHome().store(taxonLabel); + + //getMatrixHome().store(taxonLabel); getMatrixHome().store(c1); getMatrixHome().store(c2); getMatrixHome().store(e1); getMatrixHome().store(e2); getMatrixHome().store(matrix); - // force commit immediately, important: - setComplete(); - endTransaction(); - // 2. verify Long matrixID = matrix.getId(); Long c1ID = c1.getId(); @@ -244,47 +240,61 @@ Long e2ID = e2.getId(); Long taxonID = taxonLabel.getId(); - logger.info("matrix created: " + matrix.getTitle() + "id = " + matrixID + " symbols=" + matrix.getSymbols() + " gap =" + matrix.getGapSymbol()); + logger.info("matrix created: " + matrix.getTitle() + "id = " + matrixID + " symbols=" + matrix.getSymbols() + " gap =" + matrix.getGapSymbol()); logger.info("taxonLabel created: " + taxonLabel.getTaxonLabel() + "id = " + taxonID); logger.info("2 columns created: id = " + c1ID + ", " + c2ID); logger.info("2 rows created: id = " + r1.getId() + ", "); logger.info("2 segments created: id = " + seg1.getId() + ", " + seg2.getId()); logger.info("2 elements created: id = " + e1.getId() + ", " + e2.getId()); - String sqlStr = "select count(*) from matrix where matrix_id=" + matrixID; - int count = jdbcTemplate.queryForInt(sqlStr); - assertTrue(count == 1); + // force commit immediately, important: + //setComplete(); + //endTransaction(); + + Matrix m = (Matrix)loadObject(Matrix.class, matrixID); + TaxonLabel tl = (TaxonLabel)loadObject(TaxonLabel.class, taxonID); + //String sqlStr = "select count(*) from matrix where matrix_id=" + matrixID; + //int count = jdbcTemplate.queryForInt(sqlStr); + //assertTrue(count == 1); + assertTrue( m!=null ); + //assertTrue( tl!=null ); assertTrue(c1ID != null && c2ID != null); assertTrue(r1.getId() != null); assertTrue(seg1ID != null && seg2ID != null); assertTrue(e1ID != null && e2ID != null); - assertTrue(taxonID != null); + // 3. delete + //startNewTransaction(); getFixture().deleteMatrix(matrix); getMatrixHome().deletePersist(taxonLabel); - setComplete(); + //setComplete(); // 4. verify delte: - int countVerify = jdbcTemplate.queryForInt(sqlStr); - assertTrue("Deletion failed.", countVerify == 0); + m = (Matrix)loadObject(Matrix.class, matrixID); + assertTrue( m == null ); + //int countVerify = jdbcTemplate.queryForInt(sqlStr); + //assertTrue("Deletion failed.", countVerify == 0); - String sqlStrRow = "select count(*) from matrixrow where matrixrow_id=" + r1ID; - countVerify = jdbcTemplate.queryForInt(sqlStrRow); - assertTrue("cascade delete row failed.", countVerify == 0); + //String sqlStrRow = "select count(*) from matrixrow where matrixrow_id=" + r1ID; + //countVerify = jdbcTemplate.queryForInt(sqlStrRow); + //assertTrue("cascade delete row failed.", countVerify == 0); - String sqlStrElement = "select count(*) from matrixelement where matrixelement_id=" + e2ID; - countVerify = jdbcTemplate.queryForInt(sqlStrElement); - assertTrue("cascade delete element failed.", countVerify == 0); + //String sqlStrElement = "select count(*) from matrixelement where matrixelement_id=" + e2ID; + //countVerify = jdbcTemplate.queryForInt(sqlStrElement); + //assertTrue("cascade delete element failed.", countVerify == 0); - String sqlStrColumn = "select count(*) from matrixcolumn where matrixcolumn_id=" + c2ID; - countVerify = jdbcTemplate.queryForInt(sqlStrColumn); - assertTrue("cascade delete column failed.", countVerify == 0); + //String sqlStrColumn = "select count(*) from matrixcolumn where matrixcolumn_id=" + c2ID; + //countVerify = jdbcTemplate.queryForInt(sqlStrColumn); + //assertTrue("cascade delete column failed.", countVerify == 0); - String sqlStrTaxonLabel = "select count(*) from taxonLabel where taxonLabel_id=" + taxonID; - countVerify = jdbcTemplate.queryForInt(sqlStrTaxonLabel); - assertTrue("delete taxonLabel failed.", countVerify == 0); + tl = (TaxonLabel)loadObject(TaxonLabel.class, taxonID); + assertTrue( tl == null ); + //String sqlStrTaxonLabel = "select count(*) from taxonLabel where taxonLabel_id=" + taxonID; + //countVerify = jdbcTemplate.queryForInt(sqlStrTaxonLabel); + //assertTrue("delete taxonLabel failed.", countVerify == 0); logger.info("Done. matrix Deleted: " + matrixID); } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-01-25 13:44:04
|
Revision: 479 http://treebase.svn.sourceforge.net/treebase/?rev=479&view=rev Author: youjun Date: 2010-01-25 13:43:57 +0000 (Mon, 25 Jan 2010) Log Message: ----------- avoid infinity loop Modified Paths: -------------- trunk/treebase-core/src/test/java/org/cipres/treebase/service/tree/PhyloTreeServiceImplTest.java Modified: trunk/treebase-core/src/test/java/org/cipres/treebase/service/tree/PhyloTreeServiceImplTest.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/service/tree/PhyloTreeServiceImplTest.java 2010-01-19 18:10:35 UTC (rev 478) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/service/tree/PhyloTreeServiceImplTest.java 2010-01-25 13:43:57 UTC (rev 479) @@ -125,11 +125,11 @@ } } //this line may cause infinity loop, but it is needed for pick up a set of test node - else searchResult=null; + //else searchResult=null; } - assertTrue(searchResult); + //assertTrue(searchResult); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2010-01-21 18:08:39
|
Bugs item #2931592, was opened at 2010-01-13 15:32 Message generated for change (Settings changed) made by youjun 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: 8 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: <rv...@us...> - 2010-01-19 18:10:41
|
Revision: 478 http://treebase.svn.sourceforge.net/treebase/?rev=478&view=rev Author: rvos Date: 2010-01-19 18:10:35 +0000 (Tue, 19 Jan 2010) Log Message: ----------- Added bean configuration properties so that all download controllers can reconstruct their focal study for access control verification. 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-01-19 18:07:52 UTC (rev 477) +++ trunk/treebase-web/src/main/webapp/WEB-INF/treebase-servlet.xml 2010-01-19 18:10:35 UTC (rev 478) @@ -121,9 +121,11 @@ </bean> <bean id="downloadATreeBlockController" class="org.cipres.treebase.web.controllers.DownloadATreeBlockController"> + <property name="studyService"><ref bean="studyService"></ref></property> <property name="phyloTreeHome"><ref bean="phyloTreeHome"></ref></property> <property name="nexmlService"><ref bean="nexmlService"></ref></property> - <property name="rdfaService"><ref bean="rdfaService"></ref></property> + <property name="rdfaService"><ref bean="rdfaService"></ref></property> + <property name="submissionHome"><ref bean="submissionHome"></ref></property> </bean> <!-- Download A Matrix --> @@ -149,7 +151,8 @@ <property name="matrixService"><ref bean="matrixService"></ref></property> <property name="analysisStepService"><ref bean="analysisStepService"></ref></property> <property name="nexmlService"><ref bean="nexmlService"></ref></property> - <property name="rdfaService"><ref bean="rdfaService"></ref></property> + <property name="rdfaService"><ref bean="rdfaService"></ref></property> + <property name="studyService"><ref bean="studyService"></ref></property> </bean> <!-- Download A NexusFile --> @@ -572,7 +575,9 @@ </bean> <bean id="searchMapToPhyloWidgetController" class="org.cipres.treebase.web.controllers.SearchMapToPhyloWidgetController" - parent="directMapToPhyloWidgetController"> + parent="directMapToPhyloWidgetController"> + <property name="submissionHome"><ref bean="submissionHome"></ref></property> + <property name="studyService"><ref bean="studyService"></ref></property> <property name="defaultView"><value>redirect:/test/newPhylowidget.html</value></property> </bean> @@ -911,14 +916,18 @@ <prop key="/searchResult.html">filenameController</prop> <prop key="/searchStudyList.html">listSearchStudyController</prop> <prop key="/searchStudy.html">searchStudyController</prop> - <prop key="/study-query.html">updateStudyQueryController</prop> + <prop key="/study-query.html">updateStudyQueryController</prop> + + <!-- SEARCH SECTION --> <prop key="/search/">studySearchController</prop> <prop key="/search/studySearch.html">studySearchController</prop> <prop key="/search/treeSearch.html">treeSearchController</prop> <prop key="/search/treeTopSearch.html">treeTopSearchController</prop> <prop key="/search/matrixSearch.html">matrixSearchController</prop> - <prop key="/search/taxonSearch.html">taxonSearchController</prop> - <prop key="/search/study/summary.html">searchSummaryController</prop> + <prop key="/search/taxonSearch.html">taxonSearchController</prop> + + <!-- SEARCH RESULTS SECTION --> + <prop key="/search/study/summary.html">searchSummaryController</prop> <prop key="/search/study/analyses.html">searchSummaryController</prop> <prop key="/search/study/matrices.html">searchSummaryController</prop> <prop key="/search/study/trees.html">searchSummaryController</prop> @@ -929,7 +938,8 @@ <prop key="/search/study/analysis.html">searchSummaryController</prop> <prop key="/search/study/taxa.html">searchSummaryController</prop> <prop key="/search/study/rowSegments.html">searchSummaryController</prop> - <prop key="/search/study/anyObjectAsRDF.html">anyObjectAsRDFController</prop> + <prop key="/search/study/anyObjectAsRDF.html">anyObjectAsRDFController</prop> + <prop key="/search/searchResultsAsRDF.html">searchResultsAsRDFController</prop> <prop key="/search/matrixRowList.html">listMatrixRowController</prop> <prop key="/search/taxonList.html">listTaxaSearchController</prop> @@ -940,7 +950,8 @@ <prop key="/search/downloadAnAnalysisStep.html">downloadAnAnalysisStepController</prop> <prop key="/search/downloadANexusFile.html">downloadANexusFileController</prop> <prop key="/search/downloadANexusRCTFile.html">downloadANexusRCTFileController</prop> - + + <!-- SUBMISSION SECTION --> <prop key="/user/updateProfile.html">userFormController</prop> <prop key="/user/submissionList.html">listSubmissionController</prop> <prop key="/user/studyForm.html">studyFormController</prop> @@ -983,6 +994,8 @@ <prop key="/user/treeParser.html">treeParserController</prop> <prop key="/user/treeParserResult.html">treeParserResultController</prop> + + <!-- JSON related bean mappings --> <prop key="/json/submissionIsland.html">submissionToJsonController</prop> </props> </property> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2010-01-19 18:07:58
|
Revision: 477 http://treebase.svn.sourceforge.net/treebase/?rev=477&view=rev Author: rvos Date: 2010-01-19 18:07:52 +0000 (Tue, 19 Jan 2010) Log Message: ----------- Implemented getStudy in the download controllers. Each controller has its own way of reconstructing the focal study, but they all need to return it somehow so that access rights to the study can be established, either by it having been published or access having been granted to it explicitly through the reviewer access control system. Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadAMatrixController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadANexusFileController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadANexusRCTFileController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadAStudyController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadATreeBlockController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadATreeController.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadAnAnalysisStepController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadAMatrixController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadAMatrixController.java 2010-01-19 18:05:40 UTC (rev 476) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadAMatrixController.java 2010-01-19 18:07:52 UTC (rev 477) @@ -115,4 +115,10 @@ } } + @Override + protected Study getStudy(long objectId, HttpServletRequest request) { + Matrix matrix = getMatrixService().findByID(objectId); + return matrix.getStudy(); + } + } Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadANexusFileController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadANexusFileController.java 2010-01-19 18:05:40 UTC (rev 476) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadANexusFileController.java 2010-01-19 18:07:52 UTC (rev 477) @@ -140,6 +140,11 @@ return nexusString != null ? nexusString : "File Not Found. File Name is: " + nexusFileName; + } + + @Override + protected Study getStudy(long objectId, HttpServletRequest request) { + return ControllerUtil.findStudy(request, mStudyService); } } Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadANexusRCTFileController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadANexusRCTFileController.java 2010-01-19 18:05:40 UTC (rev 476) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadANexusRCTFileController.java 2010-01-19 18:07:52 UTC (rev 477) @@ -98,4 +98,9 @@ } } + @Override + protected Study getStudy(long objectId, HttpServletRequest request) { + return ControllerUtil.findStudy(request, mStudyService); + } + } Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadAStudyController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadAStudyController.java 2010-01-19 18:05:40 UTC (rev 476) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadAStudyController.java 2010-01-19 18:07:52 UTC (rev 477) @@ -89,4 +89,9 @@ return null; } + @Override + protected Study getStudy(long objectId, HttpServletRequest request) { + return getStudyService().findByID(objectId); + } + } Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadATreeBlockController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadATreeBlockController.java 2010-01-19 18:05:40 UTC (rev 476) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadATreeBlockController.java 2010-01-19 18:07:52 UTC (rev 477) @@ -8,6 +8,10 @@ import org.springframework.web.servlet.mvc.Controller; import org.cipres.treebase.domain.nexus.NexusDataSet; +import org.cipres.treebase.domain.study.Study; +import org.cipres.treebase.domain.study.StudyService; +import org.cipres.treebase.domain.study.Submission; +import org.cipres.treebase.domain.study.SubmissionHome; import org.cipres.treebase.domain.tree.PhyloTreeHome; import org.cipres.treebase.domain.tree.TreeBlock; @@ -20,8 +24,44 @@ public class DownloadATreeBlockController extends AbstractDownloadController implements Controller { private PhyloTreeHome mPhyloTreeHome; + private StudyService mStudyService; + private SubmissionHome mSubmissionHome; + + /** + * Return the SubmissionHome field + * + * @return + */ + public SubmissionHome getSubmissionHome() { + return mSubmissionHome; + } + + /** + * Set the SubmissionHome field + * + * @param pSubmissionHome + */ + public void setSubmissionHome(SubmissionHome pSubmissionHome) { + mSubmissionHome = pSubmissionHome; + } /** + * Return the StudyService field. + * + * @return StudyService mStudyService + */ + public StudyService getStudyService() { + return mStudyService; + } + + /** + * Set the StudyService field. + */ + public void setStudyService(StudyService pNewStudyService) { + mStudyService = pNewStudyService; + } + + /** * @return the phyloTreeHome */ public PhyloTreeHome getPhyloTreeHome() { @@ -77,4 +117,11 @@ } } + @Override + protected Study getStudy(long objectId, HttpServletRequest request) { + TreeBlock treeBlock = getPhyloTreeHome().findTreeBlockById(objectId); + Submission submission = getSubmissionHome().findByTreeBlock(treeBlock); + return submission.getStudy(); + } + } Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadATreeController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadATreeController.java 2010-01-19 18:05:40 UTC (rev 476) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadATreeController.java 2010-01-19 18:07:52 UTC (rev 477) @@ -125,4 +125,10 @@ } } + @Override + protected Study getStudy(long objectId, HttpServletRequest request) { + PhyloTree tree = getPhyloTreeService().findByID(objectId); + return tree.getStudy(); + } + } Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadAnAnalysisStepController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadAnAnalysisStepController.java 2010-01-19 18:05:40 UTC (rev 476) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/DownloadAnAnalysisStepController.java 2010-01-19 18:07:52 UTC (rev 477) @@ -17,6 +17,8 @@ import org.cipres.treebase.domain.study.AnalysisStep; import org.cipres.treebase.domain.study.AnalysisStepService; import org.cipres.treebase.domain.study.AnalyzedData; +import org.cipres.treebase.domain.study.Study; +import org.cipres.treebase.domain.study.StudyService; import org.cipres.treebase.domain.taxon.TaxonLabelSet; import org.cipres.treebase.domain.tree.PhyloTree; import org.cipres.treebase.domain.tree.PhyloTreeService; @@ -34,8 +36,25 @@ private MatrixService mMatrixService; private PhyloTreeService mPhyloTreeService; private AnalysisStepService mAnalysisStepService; + private StudyService mStudyService; /** + * Return the StudyService field. + * + * @return StudyService mStudyService + */ + public StudyService getStudyService() { + return mStudyService; + } + + /** + * Set the StudyService field. + */ + public void setStudyService(StudyService pNewStudyService) { + mStudyService = pNewStudyService; + } + + /** * Return the PhyloTreeService field * * @return PhyloTreeService mPhyloTreeService @@ -95,7 +114,7 @@ if ( request.getParameter("analysisid") == null ) { return null; } - long analysisId = Long.parseLong(request.getParameter("analysisid")); + long analysisId = Long.parseLong(request.getParameter("analysisid")); generateAFileDynamically(request, response, analysisId); return null; } @@ -151,4 +170,10 @@ return stepContent.toString(); } + @Override + protected Study getStudy(long objectId, HttpServletRequest request) { + AnalysisStep step = getAnalysisStepService().findByID(objectId); + return step.getAnalysis().getStudy(); + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2010-01-19 18:05:50
|
Revision: 476 http://treebase.svn.sourceforge.net/treebase/?rev=476&view=rev Author: rvos Date: 2010-01-19 18:05:40 +0000 (Tue, 19 Jan 2010) Log Message: ----------- Added isReviewerAccessGranted static method, which is moved over from BaseFormController because the download controllers and the phylowidget controller also need access to it. Hence it is made into a static. Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/ControllerUtil.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/ControllerUtil.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/ControllerUtil.java 2010-01-19 18:04:11 UTC (rev 475) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/util/ControllerUtil.java 2010-01-19 18:05:40 UTC (rev 476) @@ -5,9 +5,12 @@ import java.util.Map; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; import org.apache.log4j.Logger; +import org.cipres.treebase.TreebaseIDString; +import org.cipres.treebase.TreebaseUtil; import org.cipres.treebase.domain.admin.User; import org.cipres.treebase.domain.admin.UserService; import org.cipres.treebase.domain.matrix.Matrix; @@ -273,5 +276,44 @@ } return test; } + + /** + * This method looks up (and manipulates) two session attributes: + * <li>Constants.REVIEWER_AGREEMENT_ACCEPTED, whose value is a boolean. + * This attribute flags whether the reviewer has accepted the agreement + * regarding embargoed data.</li> + * <li>Constants.X_ACCESS_CODE, whose value is a string. This attribute + * stores the hashed ID string for the focal study.</li> + * @param req + * @return + */ + public static boolean isReviewerAccessGranted(HttpServletRequest req) { + boolean passedHashedIDCheck = false; + HttpSession session = req.getSession(); + if ( "cancel".equals(req.getParameter("agreement")) ) { + session.setAttribute(Constants.REVIEWER_AGREEMENT_ACCEPTED, false); + } + if ( "ok".equals(req.getParameter("agreement")) ) { + session.setAttribute(Constants.REVIEWER_AGREEMENT_ACCEPTED, true); + } + Object xAccesCodeObject = session.getAttribute(Constants.X_ACCESS_CODE); + if ( xAccesCodeObject != null ) { + String suppliedHashedID = xAccesCodeObject.toString(); + TreebaseIDString tbidstr = new TreebaseIDString(Study.class,Long.parseLong(req.getParameter("id"))); + if ( suppliedHashedID.equals(tbidstr.getNamespacedGUID().getHashedIDString()) ) { + passedHashedIDCheck = true; + Object agreementAccepted = session.getAttribute(Constants.REVIEWER_AGREEMENT_ACCEPTED); + if ( agreementAccepted == null || ((Boolean)agreementAccepted).booleanValue() == false ) { + LOGGER.info("Going to display agreement - agreement acceptance: "+agreementAccepted); + session.setAttribute("displayAgreement",true); + } + else { + LOGGER.info("Not displaying agreement"); + session.setAttribute("displayAgreement",false); + } + } + } + return passedHashedIDCheck; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2010-01-19 18:04:17
|
Revision: 475 http://treebase.svn.sourceforge.net/treebase/?rev=475&view=rev Author: rvos Date: 2010-01-19 18:04:11 +0000 (Tue, 19 Jan 2010) Log Message: ----------- Added a child override of handleRequest which verifies access rights before handing over to super.handleRequest or redirection to an authorization violation view. Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/SearchMapToPhyloWidgetController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/SearchMapToPhyloWidgetController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/SearchMapToPhyloWidgetController.java 2010-01-19 18:02:17 UTC (rev 474) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/SearchMapToPhyloWidgetController.java 2010-01-19 18:04:11 UTC (rev 475) @@ -1,5 +1,61 @@ package org.cipres.treebase.web.controllers; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.cipres.treebase.domain.study.Study; +import org.cipres.treebase.domain.study.StudyService; +import org.cipres.treebase.domain.study.SubmissionHome; +import org.cipres.treebase.domain.tree.PhyloTree; +import org.cipres.treebase.domain.tree.TreeBlock; +import org.cipres.treebase.web.util.ControllerUtil; +import org.springframework.web.servlet.ModelAndView; + class SearchMapToPhyloWidgetController extends DirectMapToPhyloWidgetController { - // Empty subclass + private SubmissionHome mSubmissionHome; + private StudyService mStudyService; + + public SubmissionHome getSubmissionHome() { + return mSubmissionHome; + } + + public void setSubmissionHome(SubmissionHome pSubmissionHome) { + mSubmissionHome = pSubmissionHome; + } + + public ModelAndView handleRequest(HttpServletRequest pRequest, HttpServletResponse pResponse) + throws Exception { + Study study = null; + if (pRequest.getParameter("treeid") != null) { + String treeId = pRequest.getParameter("treeid"); + PhyloTree tree = getPhyloTreeService().findByID(Long.parseLong(treeId)); + study = tree.getStudy(); + } + if (pRequest.getParameter("treeblockid") != null) { + String treeBlockId = pRequest.getParameter("treeblockid"); + Long value = Long.parseLong(treeBlockId); + TreeBlock treeBlock = getPhyloTreeHome().findTreeBlockById(value); + study = getSubmissionHome().findByTreeBlock(treeBlock).getStudy(); + } + if ( ControllerUtil.isReviewerAccessGranted(pRequest) || ( study != null && study.isPublished() ) ) { + return super.handleRequest(pRequest, pResponse); + } + else { + return new ModelAndView("redirect:/accessviolation.html"); + } + } + + /** + * @param mStudyService the mStudyService to set + */ + public void setStudyService(StudyService mStudyService) { + this.mStudyService = mStudyService; + } + + /** + * @return the mStudyService + */ + public StudyService getStudyService() { + return mStudyService; + } } \ 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: <rv...@us...> - 2010-01-19 18:02:23
|
Revision: 474 http://treebase.svn.sourceforge.net/treebase/?rev=474&view=rev Author: rvos Date: 2010-01-19 18:02:17 +0000 (Tue, 19 Jan 2010) Log Message: ----------- Added access control for the download controllers. This has two moving parts: 1) a call to ControllerUtil.isReviewerAccessGranted which verifies that access has been granted to the focal study (i.e. the study that contains the object for which a serialization is being requested) during this session; 2) a check that the focal study has been published (in which case access is always granted). Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AbstractDownloadController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AbstractDownloadController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AbstractDownloadController.java 2010-01-19 17:59:08 UTC (rev 473) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/AbstractDownloadController.java 2010-01-19 18:02:17 UTC (rev 474) @@ -9,6 +9,9 @@ import org.cipres.treebase.TreebaseUtil; import org.cipres.treebase.domain.nexus.NexusService; +import org.cipres.treebase.domain.study.Study; +import org.cipres.treebase.domain.study.StudyService; +import org.cipres.treebase.web.util.ControllerUtil; import org.cipres.treebase.web.util.WebUtil; import org.springframework.web.servlet.mvc.Controller; @@ -21,6 +24,18 @@ private NexusService mRdfaService; private static String mNexmlContentType = "application/xml"; private static String mRdfContentType = "application/rdf+xml"; + + /** + * Return the StudyService field. + * + * @return StudyService mStudyService + */ + public abstract StudyService getStudyService(); + + /** + * Set the StudyService field. + */ + public abstract void setStudyService(StudyService pNewStudyService); protected Properties getDefaultProperties(HttpServletRequest request) { Properties properties = new Properties(); @@ -85,6 +100,13 @@ */ protected abstract String getFileContent(long objectId,HttpServletRequest request); + /** + * + * @param objectId - the id of the focal object (e.g. a tree) + * @return the study to which the focal object belongs + */ + protected abstract Study getStudy(long objectId,HttpServletRequest request); + protected String getDownloadDir (HttpServletRequest request) { String downloadDir = request.getSession().getServletContext().getRealPath( TreebaseUtil.FILESEP + "NexusFileDownload") @@ -100,29 +122,35 @@ * @param downloadDirName */ protected void generateAFileDynamically(HttpServletRequest request, HttpServletResponse response, long objectId) { - String downloadDirName = getDownloadDir(request); - File dirPath = new File(downloadDirName); - if (!dirPath.exists()) { - dirPath.mkdirs(); - } - String fileName = getFileName(objectId,request); - try { - File file = new File(downloadDirName + TreebaseUtil.FILESEP + fileName); - FileWriter out = new FileWriter(file); - out.write(getFileContent(objectId,request)); - out.close(); - if ( getFormat(request) == FORMAT_NEXML ) { - WebUtil.downloadFile(response, downloadDirName, fileName, mNexmlContentType); + if ( ! ControllerUtil.isReviewerAccessGranted(request) && ! getStudy(objectId,request).isPublished() ) { + response.setStatus(HttpServletResponse.SC_SEE_OTHER); + response.setHeader("Location", "/treebase-web/accessviolation.html"); + } + else { + String downloadDirName = getDownloadDir(request); + File dirPath = new File(downloadDirName); + if (!dirPath.exists()) { + dirPath.mkdirs(); } - else if ( getFormat(request) == FORMAT_RDF ) { - WebUtil.downloadFile(response, downloadDirName, fileName, mRdfContentType); - } - else { - WebUtil.downloadFile(response, downloadDirName, fileName); + String fileName = getFileName(objectId,request); + try { + File file = new File(downloadDirName + TreebaseUtil.FILESEP + fileName); + FileWriter out = new FileWriter(file); + out.write(getFileContent(objectId,request)); + out.close(); + if ( getFormat(request) == FORMAT_NEXML ) { + WebUtil.downloadFile(response, downloadDirName, fileName, mNexmlContentType); + } + else if ( getFormat(request) == FORMAT_RDF ) { + WebUtil.downloadFile(response, downloadDirName, fileName, mRdfContentType); + } + else { + WebUtil.downloadFile(response, downloadDirName, fileName); + } + } catch (Exception e) { + e.printStackTrace(); } - } catch (Exception e) { - e.printStackTrace(); - } + } } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2010-01-19 17:59:15
|
Revision: 473 http://treebase.svn.sourceforge.net/treebase/?rev=473&view=rev Author: rvos Date: 2010-01-19 17:59:08 +0000 (Tue, 19 Jan 2010) Log Message: ----------- Factored isReviewerAccessGranted out to ControllerUtil - this is necessary because not just form controllers but also download controllers and the phylowidget controller need to have access to it. Also, it can be a static anyway so it looks like a utility method. Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java 2010-01-19 17:54:19 UTC (rev 472) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java 2010-01-19 17:59:08 UTC (rev 473) @@ -153,7 +153,7 @@ protected ModelAndView getConditionalModelAndView( HttpServletRequest pRequest, ModelAndView pModelAndView) { - if ( isReviewerAccessGranted(pRequest) || isAuthorizationChecked() ) { + if ( ControllerUtil.isReviewerAccessGranted(pRequest) || isAuthorizationChecked() ) { return pModelAndView; } else { return new ModelAndView(AUTHORIZATION_VIOLATION_VIEW); @@ -170,7 +170,7 @@ LOGGER.info("returning supplied ModelAndView because access was granted explicitly"); return super.showForm(pRequest, pResponse, pBindException, pMap); } - if (isReviewerAccessGranted(pRequest)) { + if (ControllerUtil.isReviewerAccessGranted(pRequest)) { LOGGER.info("returning supplied ModelAndView because reviewer access was granted"); return super.showForm(pRequest, pResponse, pBindException, pMap); } else { @@ -179,35 +179,6 @@ } } - private boolean isReviewerAccessGranted(HttpServletRequest req) { - boolean passedHashedIDCheck = false; - HttpSession session = req.getSession(); - if ( "cancel".equals(req.getParameter("agreement")) ) { - session.setAttribute(Constants.REVIEWER_AGREEMENT_ACCEPTED, false); - } - if ( "ok".equals(req.getParameter("agreement")) ) { - session.setAttribute(Constants.REVIEWER_AGREEMENT_ACCEPTED, true); - } - Object xAccesCodeObject = session.getAttribute(Constants.X_ACCESS_CODE); - if ( xAccesCodeObject != null ) { - String suppliedHashedID = xAccesCodeObject.toString(); - TreebaseIDString tbidstr = new TreebaseIDString(Study.class,Long.parseLong(req.getParameter("id"))); - if ( suppliedHashedID.equals(tbidstr.getNamespacedGUID().getHashedIDString()) ) { - passedHashedIDCheck = true; - Object agreementAccepted = session.getAttribute(Constants.REVIEWER_AGREEMENT_ACCEPTED); - if ( agreementAccepted == null || ((Boolean)agreementAccepted).booleanValue() == false ) { - LOGGER.info("Going to display agreement - agreement acceptance: "+agreementAccepted); - session.setAttribute("displayAgreement",true); - } - else { - LOGGER.info("Not displaying agreement"); - session.setAttribute("displayAgreement",false); - } - } - } - return passedHashedIDCheck; - } - protected ModelAndView setAttributeAndShowForm( HttpServletRequest request, HttpServletResponse response, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2010-01-19 17:54:26
|
Revision: 472 http://treebase.svn.sourceforge.net/treebase/?rev=472&view=rev Author: rvos Date: 2010-01-19 17:54:19 +0000 (Tue, 19 Jan 2010) Log Message: ----------- Added study id so that reviewer study-level access can be verified. Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/algorithm.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/algorithm.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/algorithm.jsp 2010-01-19 16:24:47 UTC (rev 471) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/algorithm.jsp 2010-01-19 17:54:19 UTC (rev 472) @@ -44,7 +44,7 @@ title="<fmt:message key="analysis.notvalidated"/>" alt="<fmt:message key="analysis.notvalidated"/>"/> </span> - <a href="/treebase-web/search/downloadAnAnalysisStep.html?analysisid=${analysisStepCommand.id}"> + <a href="/treebase-web/search/downloadAnAnalysisStep.html?analysisid=${analysisStepCommand.id}&id=${analysisStepCommand.analysis.study.id}"> <img class="iconButton" src="<fmt:message key="icons.download.reconstructed"/>" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-01-19 16:24:54
|
Revision: 471 http://treebase.svn.sourceforge.net/treebase/?rev=471&view=rev Author: youjun Date: 2010-01-19 16:24:47 +0000 (Tue, 19 Jan 2010) Log Message: ----------- exclude non-exist test suite Modified Paths: -------------- trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PackageTestSuite.java Modified: trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PackageTestSuite.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PackageTestSuite.java 2010-01-19 15:41:55 UTC (rev 470) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PackageTestSuite.java 2010-01-19 16:24:47 UTC (rev 471) @@ -35,7 +35,7 @@ TestSuite suite = new TestSuite("Tests in package " + PackageTestSuite.class.getName()); suite.addTestSuite(MesquiteConverterTest.class); - suite.addTestSuite(NexusNCLDataSetTest.class); + suite.addTestSuite(NexusMesquiteDataSetTest.class); return suite; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-01-19 15:42:03
|
Revision: 470 http://treebase.svn.sourceforge.net/treebase/?rev=470&view=rev Author: youjun Date: 2010-01-19 15:41:55 +0000 (Tue, 19 Jan 2010) Log Message: ----------- delete out of date test Modified Paths: -------------- trunk/treebase-core/src/test/java/org/cipres/treebase/service/nexus/NexusParserTest.java Removed Paths: ------------- trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/AbstractPhyloDataSet.java trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexusNCLDataSetTest.java trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PhyloDataSetM12c11.java trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PhyloDataSetM1389.java trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PhyloDataSetProvider.java trunk/treebase-core/src/test/java/org/cipres/treebase/migration/ Deleted: trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/AbstractPhyloDataSet.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/AbstractPhyloDataSet.java 2010-01-19 14:30:44 UTC (rev 469) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/AbstractPhyloDataSet.java 2010-01-19 15:41:55 UTC (rev 470) @@ -1,128 +0,0 @@ - -package org.cipres.treebase.domain.nexus; - -import java.util.Iterator; -import java.util.List; - -import junit.framework.Assert; - -import org.cipres.CipresIDL.api1.DataMatrix; -import org.cipres.CipresIDL.api1.Tree; -import org.cipres.datatypes.PhyloDataset; - -import org.cipres.treebase.TreebaseUtil; -import org.cipres.treebase.domain.matrix.Matrix; -import org.cipres.treebase.domain.taxon.TaxonLabel; -import org.cipres.treebase.domain.tree.PhyloTree; - -/** - * AbstractPhyloDataSet.java - * - * Created on Jun 19, 2006 - * - * @author Jin Ruan - * - */ -public abstract class AbstractPhyloDataSet implements PhyloDataSetProvider { - - /** - * Constructor. - */ - public AbstractPhyloDataSet() { - super(); - } - - /** - * - * @see org.cipres.treebase.domain.nexus.PhyloDataSetProvider#getCipresData() - */ - public abstract PhyloDataset getCipresData(); - - /** - * - * @see org.cipres.treebase.domain.nexus.PhyloDataSetProvider#getTaxaLabels() - */ - public abstract List<String> getTaxaLabels(); - - /** - * Return the DataMatrix. - * - * @return - */ - protected abstract DataMatrix getDataMatrix(); - - /** - * Return the Trees field. - * - * @return Tree[] - */ - protected abstract Tree[] getTrees(); - - /** - * - * @see org.cipres.treebase.domain.nexus.PhyloDataSetProvider#verify(org.cipres.treebase.domain.nexus.NexusDataSet) - */ - public void verify(NexusDataSet pNexusData) { - verifyTaxonLabel(pNexusData.getTaxonLabels()); - verifyTrees(pNexusData.getPhyloTrees()); - verifyMatrix(pNexusData.getMatrices()); - } - - /** - * - * @param pMatrices - */ - protected void verifyMatrix(List<Matrix> pMatrices) { - // NCL has only one matrix in one nexus: - Assert.assertTrue("matrix size does not match.", pMatrices.size() == 1); - - // TODO: verifyMatrix, need in subclass. - - } - - /** - * - * @param pPhyloTrees - */ - protected void verifyTrees(List<PhyloTree> pPhyloTrees) { - Tree[] cipresTrees = getTrees(); - Assert.assertTrue("tree size does not match.", pPhyloTrees.size() == cipresTrees.length); - - for (int i = 0; i < cipresTrees.length; i++) { - Tree cipresTree = cipresTrees[i]; - - // Iterator<PhyloTree> treeIter = pPhyloTrees.iterator(); - boolean foundMatch = false; - for (PhyloTree aTree : pPhyloTrees) { - - if (TreebaseUtil.isEqual(aTree.getLabel(), cipresTree.m_name)) { - foundMatch = true; - - // TODO: verifyTrees - - } - } - - Assert.assertTrue("Cannot find match: " + cipresTree.m_name, foundMatch); - } - - } - - /** - * - * @param pTaxonLabels - */ - protected void verifyTaxonLabel(List<TaxonLabel> pTaxonLabels) { - List<String> cipresTaxonLabels = getTaxaLabels(); - Assert.assertTrue("taxon size does not match.", pTaxonLabels.size() == cipresTaxonLabels - .size()); - - Iterator<TaxonLabel> labelIter = pTaxonLabels.iterator(); - for (String cipresTaxonLabel : cipresTaxonLabels) { - - Assert.assertTrue("taxon does not match: " + cipresTaxonLabel, cipresTaxonLabel - .compareTo(labelIter.next().getTaxonLabel()) == 0); - } - } - -} Deleted: trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexusNCLDataSetTest.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexusNCLDataSetTest.java 2010-01-19 14:30:44 UTC (rev 469) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/NexusNCLDataSetTest.java 2010-01-19 15:41:55 UTC (rev 470) @@ -1,197 +0,0 @@ -package org.cipres.treebase.domain.nexus; - -import java.util.List; -import java.util.StringTokenizer; - -import org.cipres.treebase.dao.AbstractDAOTest; -import org.cipres.treebase.domain.matrix.Matrix; -import org.cipres.treebase.domain.matrix.MatrixDataTypeHome; -import org.cipres.treebase.domain.nexus.ncl.NCLNexusConverter; -import org.cipres.treebase.domain.taxon.TaxonLabel; -import org.cipres.treebase.domain.taxon.TaxonLabelHome; -import org.cipres.treebase.domain.tree.PhyloTree; - -/** - * The class <code>NexusNCLDataSetTest</code> contains tests for the class {@link - * <code>NexusDataSet</code>} - * - * @pattern JUnit Test Case - * - * @generatedBy CodePro at 6/8/06 10:21 AM - * - * @author Jin Ruan - * - * @version $Revision$ - */ -public class NexusNCLDataSetTest extends AbstractDAOTest { - - private NexusDataSet fixture = new NexusDataSet(); - - private TaxonLabelHome mTaxonLabelHome; - private MatrixDataTypeHome mMatrixDataTypeHome; - - /** - * Return the object that is being tested. - * - * @return the test fixture - * - * @see org.cipres.treebase.domain.nexus.NexusDataSet - */ - public NexusDataSet getFixture() { - return fixture; - } - - /** - * Set the object that is being tested. - * - * @param fixture the test fixture - */ - private void setFixture(NexusDataSet fixture) { - this.fixture = fixture; - } - - /** - * Return the TaxonLabelHome field. - * - * @return TaxonLabelHome mTaxonLabelHome - */ - private TaxonLabelHome getTaxonLabelHome() { - return mTaxonLabelHome; - } - - /** - * - * @param pTaxonLabelHome - */ - public void setTaxonLabelHome(TaxonLabelHome pTaxonLabelHome) { - mTaxonLabelHome = pTaxonLabelHome; - } - - /** - * Return the MatrixDataTypeHome field. - * - * @return MatrixDataTypeHome mMatrixDataTypeHome - */ - private MatrixDataTypeHome getMatrixDataTypeHome() { - return mMatrixDataTypeHome; - } - - /** - * Set the MatrixDataTypeHome field. - */ - public void setMatrixDataTypeHome(MatrixDataTypeHome pNewMatrixDataTypeHome) { - mMatrixDataTypeHome = pNewMatrixDataTypeHome; - } - - /** - * - * Creation date: Jun 8, 2006 10:26:17 AM - */ - public void testNewickParsing() { - String newick = "(21,(20,(((((19,18,17,16),15,14,13,12,11),10,9,8,7,6,5),((3,2),1)),4)));"; - String delim = "(),: "; - StringBuffer newick2 = new StringBuffer(); - PhyloDataSetProvider datasetM1389 = new PhyloDataSetM1389(); - - int taxaSize = datasetM1389.getTaxaLabels().size(); - - System.out.println("NexusNCLDataSetTest:newickParsingTest: "); - System.out.println("newick: " + newick); - - StringTokenizer st = new StringTokenizer(newick, delim, true); - while (st.hasMoreTokens()) { - String element = st.nextToken(); - int i = -1; - boolean isNumber = false; - try { - // Notes: NCL parsed output is 1 based. - i = Integer.parseInt(element) - 1; - if (i >= 0 && i < taxaSize) { - isNumber = true; - } - - } catch (NumberFormatException ex) { - isNumber = false; - } - - if (isNumber) { - newick2.append(datasetM1389.getTaxaLabels().get(i)); - } else { - newick2.append(element); - } - } - - System.out.println("newick2: " + newick2.toString()); - - } - - /** - * - * Creation date: Jun 14, 2006 8:15:55 PM - */ - public void testM1389Parsing() { - - String dataName = "m1389"; - PhyloDataSetProvider datasetM1389 = new PhyloDataSetM1389(); - - parseTest(dataName, datasetM1389); - } - - /** - * - * Creation date: Jun 14, 2006 8:15:55 PM - */ - public void testM12c11Parsing() { - - String dataName = "m12c11"; - PhyloDataSetProvider dataset = new PhyloDataSetM12c11(); - - parseTest(dataName, dataset); - - } - - /** - * - * @param pCipresDataSet - */ - @SuppressWarnings("unused") - private void parseTest(String pDataName, PhyloDataSetProvider pCipresDataSet) { - StringBuffer newick2 = new StringBuffer(); - - System.out.println(pDataName + " Parsing: "); - - NexusDataSet nexusData = new NexusDataSet(); - - NCLNexusConverter converter = new NCLNexusConverter(); - converter.setMatrixDataTypeHome(getMatrixDataTypeHome()); - converter.setTaxonLabelHome(getTaxonLabelHome()); - converter.parsePhyloDataSet(null, nexusData, pCipresDataSet.getCipresData()); - - List<TaxonLabel> taxonLabels = nexusData.getTaxonLabels(); - List<PhyloTree> trees = nexusData.getPhyloTrees(); - List<Matrix> matrices = nexusData.getMatrices(); - - // verify parsing. - pCipresDataSet.verify(nexusData); - - System.out.println(" " + pDataName + " parsing done: "); - } - - public static void main(String[] args) { - NexusNCLDataSetTest test = new NexusNCLDataSetTest(); - test.testNewickParsing(); - - System.exit(0); - } -} - -/* - * $CPS$ This comment was generated by CodePro. Do not edit it. patternId = - * com.instantiations.assist.eclipse.pattern.testCasePattern strategyId = - * com.instantiations.assist.eclipse.pattern.testCasePattern.junitTestCase additionalTestNames = - * assertTrue = false callTestMethod = true createMain = false createSetUp = false createTearDown = - * false createTestFixture = true createTestStubs = false methods = package = - * org.cipres.treebase.domain.nexus package.sourceFolder = treebase-core/src/test/java - * superclassType = junit.framework.TestCase testCase = NexusNCLDataSetTest testClassType = - * org.cipres.treebase.domain.nexus.NexusDataSet - */ \ No newline at end of file Deleted: trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PhyloDataSetM12c11.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PhyloDataSetM12c11.java 2010-01-19 14:30:44 UTC (rev 469) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PhyloDataSetM12c11.java 2010-01-19 15:41:55 UTC (rev 470) @@ -1,226 +0,0 @@ - -package org.cipres.treebase.domain.nexus; - -import java.util.ArrayList; -import java.util.List; - -import org.cipres.CipresIDL.api1.DataMatrix; -import org.cipres.CipresIDL.api1.DiscreteDatatypes; -import org.cipres.CipresIDL.api1.Tree; -import org.cipres.datatypes.PhyloDataset; - -/** - * PhyloDataSetM12c11.java - * - * A test data set w/ char label and state label info. - * - * Created on Jun 14, 2006 - * - * @author Jin Ruan - * - */ -public class PhyloDataSetM12c11 extends AbstractPhyloDataSet implements PhyloDataSetProvider { - - private PhyloDataset mCipresData; - private List<String> mTaxaLabels; - private Tree[] mTrees; - private DataMatrix mDataMatrix; - - /** - * Constructor. - */ - public PhyloDataSetM12c11() { - super(); - } - - /** - * - * @see org.cipres.treebase.domain.nexus.PhyloDataSetProvider#getCipresData() - */ - @Override - public PhyloDataset getCipresData() { - if (mCipresData == null) { - mCipresData = new PhyloDataset(); - - mCipresData.setDataMatrix(getDataMatrix()); - mCipresData.setTrees(getTrees()); - mCipresData.setTaxaInfo(getTaxaLabels().toArray(new String[1])); - } - return mCipresData; - } - - /** - * Return the DataMatrix field. Uses lazy initialization. - * - * @return DataMatrix mDataMatrix - */ - @Override - protected DataMatrix getDataMatrix() { - if (mDataMatrix == null) { - mDataMatrix = new DataMatrix(); - - // based on m1389 - mDataMatrix.m_symbols = "0123?"; - mDataMatrix.m_numStates = 4; - mDataMatrix.m_numCharacters = 54; - mDataMatrix.m_datatype = DiscreteDatatypes.from_int(4); - mDataMatrix.m_charStateLookup = new short[][] { {0}, {1}, {2},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, 1, 2, 4, 0, 0, 1, 4, 0, 4, - 0, 0, 1, 1, 1, 1, 4, 1, 4, 1, 0, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 1, 0, 0, 4, 0}, - - {0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 4, 0, 4, 2, 0, 1, 1, 2, 2, 0, 0, 0, 0, 1, - 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 4, 0, 0, 0, 0, 4}, - - {0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 4, 0, 4, 4, 0, 1, 1, 2, 2, 0, 0, 0, 0, 1, - 0, 0, 1, 1, 1, 1, 4, 1, 4, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 4, 0, 0, 0, 4}, - - {1, 1, 2, 0, 4, 4, 0, 0, 0, 0, 4, 0, 0, 1, 4, 4, 4, 4, 4, 4, 4, 1, 0, 1, 1, 0, 1, - 0, 0, 0, 0, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 4, 4, 0, 0, 0, 4, 0, 0, 4, 4}}; - - } - return mDataMatrix; - } - - /** - * Return the Trees field. Uses lazy initialization. - * - * @return Tree[] mTrees - */ - @Override - protected Tree[] getTrees() { - if (mTrees == null) { - - // based on m1389 - mTrees = new Tree[1]; - Tree tree = new Tree(); - tree.m_name = "NYMPH-BASAL"; - tree.m_newick = "(1,((20,21),(((26,27),(25,22)),((((18,17),28),(19,16)),(((23,24),3),(((((12,13),(11,15)),10),14),(6,(8,(5,(4,(2,(9,7))))))))))));"; - tree.m_score = null; // not needed. - tree.m_leafSet = new int[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28}; - - mTrees[0] = tree; - } - return mTrees; - } - - /** - * - * @see org.cipres.treebase.domain.nexus.PhyloDataSetProvider#getTaxaLabels() - */ - @Override - public List<String> getTaxaLabels() { - if (mTaxaLabels == null) { - // based on m1389: - mTaxaLabels = new ArrayList<String>(); - - mTaxaLabels.add("Hyp. Ancestor"); - mTaxaLabels.add("GMagnoliaceae"); - mTaxaLabels.add("Winteraceae"); - mTaxaLabels.add("Degeneria"); - mTaxaLabels.add("Eupomatia"); - mTaxaLabels.add("Himantandraceae"); - mTaxaLabels.add("Annonaceae"); - mTaxaLabels.add("Canellaceae"); - mTaxaLabels.add("Myristicaceae"); - mTaxaLabels.add("Austrobaileya"); - - mTaxaLabels.add("Amborella"); - mTaxaLabels.add("Trimeniaceae"); - mTaxaLabels.add("Chloranthaceae"); - mTaxaLabels.add("Calycanthaceae"); - mTaxaLabels.add("Monimiaceae"); - mTaxaLabels.add("Lactoris"); - mTaxaLabels.add("Saururaceae"); - mTaxaLabels.add("Piperaceae"); - mTaxaLabels.add("Aritolochiaceae"); - mTaxaLabels.add("Nymphaeaceae"); - - mTaxaLabels.add("Cobombaceae"); - mTaxaLabels.add("Nelumbo"); - mTaxaLabels.add("Illicium"); - mTaxaLabels.add("Schisandraceae"); - mTaxaLabels.add("Ranunculaceae"); - mTaxaLabels.add("Trochodendrales"); - mTaxaLabels.add("Hamamelidales"); - mTaxaLabels.add("Liliopsida"); - } - return mTaxaLabels; - } - -} Deleted: trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PhyloDataSetM1389.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PhyloDataSetM1389.java 2010-01-19 14:30:44 UTC (rev 469) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PhyloDataSetM1389.java 2010-01-19 15:41:55 UTC (rev 470) @@ -1,427 +0,0 @@ - -package org.cipres.treebase.domain.nexus; - -import java.util.ArrayList; -import java.util.List; - -import org.cipres.CipresIDL.api1.DataMatrix; -import org.cipres.CipresIDL.api1.DiscreteDatatypes; -import org.cipres.CipresIDL.api1.Tree; -import org.cipres.datatypes.PhyloDataset; - -/** - * PhyloDataSetM1389.java - * - * Created on Jun 14, 2006 - * - * @author Jin Ruan - * - */ -public class PhyloDataSetM1389 extends AbstractPhyloDataSet implements PhyloDataSetProvider { - - private PhyloDataset mCipresData; - private List<String> mTaxaLabels; - private Tree[] mTrees; - private DataMatrix mDataMatrix; - - /** - * Constructor. - */ - public PhyloDataSetM1389() { - super(); - } - - /** - * - * @see org.cipres.treebase.domain.nexus.PhyloDataSetProvider#getCipresData() - */ - @Override - public PhyloDataset getCipresData() { - if (mCipresData == null) { - mCipresData = new PhyloDataset(); - - mCipresData.setDataMatrix(getDataMatrix()); - mCipresData.setTrees(getTrees()); - mCipresData.setTaxaInfo(getTaxaLabels().toArray(new String[1])); - } - return mCipresData; - } - - /** - * Return the DataMatrix field. Uses lazy initialization. - * - * @return DataMatrix mDataMatrix - */ - @Override - protected DataMatrix getDataMatrix() { - if (mDataMatrix == null) { - mDataMatrix = new DataMatrix(); - - // based on m1389 - mDataMatrix.m_symbols = "ACGT?NYRW"; - mDataMatrix.m_numStates = 4; - mDataMatrix.m_numCharacters = 350; - mDataMatrix.m_datatype = DiscreteDatatypes.from_int(0); - mDataMatrix.m_charStateLookup = new short[][] { {0}, {1}, {2}, {3}, {-1, 0, 1, 2, 3}, - {0, 1, 2, 3}, {1, 3}, {0, 2}, {0, 3},}; - - mDataMatrix.m_matrix = new short[][] { - {0, 3, 3, 1, 1, 1, 2, 2, 1, 1, 2, 1, 3, 3, 0, 0, 0, 1, 1, 0, 0, 0, 1, 3, 3, 1, 2, - 3, 3, 0, 3, 3, 3, 0, 3, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 2, 3, 3, 3, 0, 3, 0, - 1, 3, 0, 3, 2, 2, 0, 1, 0, 0, 3, 2, 3, 0, 2, 3, 2, 0, 2, 0, 3, 3, 3, 2, 3, 2, - 2, 2, 0, 3, 3, 0, 0, 3, 1, 0, 3, 2, 2, 3, 3, 3, 3, 0, 3, 2, 1, 1,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 0, 3, 3, 3, 0, 3, 2, 0, 2, 0, 0, 3, 3, 3, 1, - 3, 2, 3, 0, 0, 3, 0, 1, 0, 0, 3, 3, 0, 0, 3, 3, 3, 3, 0, 3, 3, 0, 0, 3, 3, 0, - 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 0, 3, 3, 0, 3, 3, 3, 3, 3, 3, 0, 0, 3, 3, 1, 0, - 0, 0, 3, 3, 1, 0, 1, 0, 0, 0, 3, 3, 2, 3, 3, 0, 0, 0, 0, 0, 1, 3, 3, 3, 1, 2, - 3, 2, 0, 0, 3, 3, 2, 0, 3, 1, 0, 0, 0, 1, 0, 0, 3, 3, 3, 3, 3, 1, 0, 0, 0, 1, - 0, 0, 0, 3, 0, 3, 1, 0, 0, 0, 0, 3, 0, 2, 3, 0, 0, 3, 3, 2, 3, -1, 0, 0, 0, 0, - 0, 3, 2, 2, 1, 3, 3, 3, 3, 3, 3, 0, 0, 1, 3, 1, 0, 2, 0, 3, 3, 3, 1, 0, 0, 0, - 0, 3, 1, 3, 0, 3, 0, 1, 0, 0, 0}}; - } - return mDataMatrix; - } - - /** - * Return the Trees field. Uses lazy initialization. - * - * @return Tree[] mTrees - */ - @Override - protected Tree[] getTrees() { - if (mTrees == null) { - - // based on m1389 - mTrees = new Tree[1]; - Tree tree = new Tree(); - tree.m_name = "Fig. 5"; - tree.m_newick = "(21,(20,(((((19,18,17,16),15,14,13,12,11),10,9,8,7,6,5),((3,2),1)),4)));"; - tree.m_score = null; // not needed. - tree.m_leafSet = new int[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21}; - - mTrees[0] = tree; - } - return mTrees; - } - - /** - * - * @see org.cipres.treebase.domain.nexus.PhyloDataSetProvider#getTaxaLabels() - */ - @Override - public List<String> getTaxaLabels() { - if (mTaxaLabels == null) { - // based on m1389: - mTaxaLabels = new ArrayList<String>(); - - mTaxaLabels.add("Grateloupia sp Spain 3"); - mTaxaLabels.add("Grateloupia sp Oregon"); - mTaxaLabels.add("Grateloupia sp California"); - mTaxaLabels.add("Grateloupia sp northcarolina 1"); - mTaxaLabels.add("Grateloupia doryphora Roscoff 1"); - mTaxaLabels.add("Grateloupia doryphora Roscoff 2"); - mTaxaLabels.add("Grateloupia doryphora Herault 10"); - mTaxaLabels.add("Grateloupia doryphora Herault 4"); - mTaxaLabels.add("Grateloupia doryphora Roscoff 5"); - mTaxaLabels.add("Grateloupia doryphora Roscoff 4"); - - mTaxaLabels.add("Grateloupia doryphora England 1"); - mTaxaLabels.add("Grateloupia doryphora Netherlands 2"); - mTaxaLabels.add("Grateloupia doryphora Netherlands 1"); - mTaxaLabels.add("Grateloupia doryphora FortBloque 3"); - mTaxaLabels.add("Grateloupia doryphora England 2"); - mTaxaLabels.add("Grateloupia doryphora RhodeIsland 4"); - mTaxaLabels.add("Grateloupia doryphora RhodeIsland 11"); - mTaxaLabels.add("Grateloupia doryphora RhodeIsland 10"); - mTaxaLabels.add("Grateloupia doryphora RhodeIsland 6"); - mTaxaLabels.add("Grateloupia sp Herault 3"); - - mTaxaLabels.add("Grateloupia sp Herault 1"); - } - return mTaxaLabels; - } - -} Deleted: trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PhyloDataSetProvider.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PhyloDataSetProvider.java 2010-01-19 14:30:44 UTC (rev 469) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/domain/nexus/PhyloDataSetProvider.java 2010-01-19 15:41:55 UTC (rev 470) @@ -1,41 +0,0 @@ - -package org.cipres.treebase.domain.nexus; - -import java.util.List; - -import org.cipres.datatypes.PhyloDataset; - -/** - * PhyloDataSetProvider.java - * - * Created on Jun 16, 2006 - * - * @author Jin Ruan - * - */ -public interface PhyloDataSetProvider { - - /** - * Return the cipres phylo data set field. - * - * @return PhyloDataset - */ - PhyloDataset getCipresData(); - - /** - * Return the TaxaLabels field. - * - * @return List<String> - */ - List<String> getTaxaLabels(); - - /** - * Verify the nexus data set is mapped from the cipres phylodataset. - * - * Use Assert.assert to check the mapping. - * - * @param pNexusData - */ - void verify(NexusDataSet pNexusData); - -} \ No newline at end of file Modified: trunk/treebase-core/src/test/java/org/cipres/treebase/service/nexus/NexusParserTest.java =================================================================== --- trunk/treebase-core/src/test/java/org/cipres/treebase/service/nexus/NexusParserTest.java 2010-01-19 14:30:44 UTC (rev 469) +++ trunk/treebase-core/src/test/java/org/cipres/treebase/service/nexus/NexusParserTest.java 2010-01-19 15:41:55 UTC (rev 470) @@ -2,10 +2,8 @@ import java.io.File; -import org.cipres.CipresIDL.api1.DataMatrix; -import org.cipres.CipresIDL.api1.Tree; -import org.cipres.datatypes.PhyloDataset; + import org.cipres.treebase.service.AbstractServiceTest; /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-01-19 14:30:51
|
Revision: 469 http://treebase.svn.sourceforge.net/treebase/?rev=469&view=rev Author: youjun Date: 2010-01-19 14:30:44 +0000 (Tue, 19 Jan 2010) Log Message: ----------- Modified Paths: -------------- trunk/treebase-core/pom.xml Modified: trunk/treebase-core/pom.xml =================================================================== --- trunk/treebase-core/pom.xml 2010-01-19 14:29:50 UTC (rev 468) +++ trunk/treebase-core/pom.xml 2010-01-19 14:30:44 UTC (rev 469) @@ -47,7 +47,13 @@ </repositories> <dependencies> - + <!--dependency> + <groupId>org.cipres</groupId> + <artifactId>framework</artifactId> + <version>1.0.1</version> + <scope>compile</scope> + </dependency--> + <dependency> <groupId>org.acegisecurity</groupId> <artifactId>acegi-security</artifactId> @@ -131,18 +137,10 @@ </dependency> <dependency> - <groupId>org.cipres</groupId> - <artifactId>framework</artifactId> - <version>1.0.1</version> - <scope>compile</scope> - </dependency> - - <dependency> <groupId>org.jdom</groupId> <artifactId>jdom</artifactId> <version>1.1</version> </dependency> - <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> @@ -159,7 +157,6 @@ </exclusion> </exclusions> </dependency> - <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> @@ -176,7 +173,6 @@ </exclusion> </exclusions> </dependency> - <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http-jetty</artifactId> @@ -191,26 +187,22 @@ <artifactId>slf4j-jdk14</artifactId> </exclusion> </exclusions> - </dependency> - + </dependency> <dependency> <groupId>dom4j</groupId> <artifactId>dom4j</artifactId> <version>1.6.1</version> - </dependency> - + </dependency> <dependency> <groupId>javax.sql</groupId> <artifactId>jdbc-stdext</artifactId> <version>2.0</version> - </dependency> - + </dependency> <dependency> <groupId>ibm</groupId> <artifactId>db2jcc_license_cu</artifactId> <version>2.6.80</version> - </dependency> - + </dependency> <dependency> <groupId>ibm</groupId> <artifactId>db2jcc</artifactId> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yo...@us...> - 2010-01-19 14:30:06
|
Revision: 468 http://treebase.svn.sourceforge.net/treebase/?rev=468&view=rev Author: youjun Date: 2010-01-19 14:29:50 +0000 (Tue, 19 Jan 2010) Log Message: ----------- delete cipres framework delete ncl stuffs Modified Paths: -------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/NexusParserFinder.java Removed Paths: ------------- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/ncl/ trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceNCL.java Modified: trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/NexusParserFinder.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/NexusParserFinder.java 2010-01-15 18:47:28 UTC (rev 467) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/domain/nexus/NexusParserFinder.java 2010-01-19 14:29:50 UTC (rev 468) @@ -7,7 +7,7 @@ import org.cipres.treebase.domain.matrix.MatrixDataTypeHome; import org.cipres.treebase.domain.taxon.TaxonLabelHome; import org.cipres.treebase.service.nexus.NexusServiceMesquite; -import org.cipres.treebase.service.nexus.NexusServiceNCL; +//import org.cipres.treebase.service.nexus.NexusServiceNCL; /** * NexusParserFinder.java @@ -43,14 +43,14 @@ */ private NexusService getNexusServiceImpl() { if (mNexusServiceImpl == null) { - if (PARSER_NCL.compareToIgnoreCase(getNexusParserStr()) == 0) { - NexusServiceNCL serviceNCL = new NexusServiceNCL(); + //if (PARSER_NCL.compareToIgnoreCase(getNexusParserStr()) == 0) { + //NexusServiceNCL serviceNCL = new NexusServiceNCL(); - serviceNCL.setMatrixDataTypeHome(getMatrixDataTypeHome()); - serviceNCL.setTaxonLabelHome(getTaxonLabelHome()); + //serviceNCL.setMatrixDataTypeHome(getMatrixDataTypeHome()); + //serviceNCL.setTaxonLabelHome(getTaxonLabelHome()); - mNexusServiceImpl = serviceNCL; - } else { + //mNexusServiceImpl = serviceNCL; + //} else { NexusServiceMesquite serviceMesquite = new NexusServiceMesquite(); serviceMesquite.setItemDefinitionHome(getItemDefinitionHome()); @@ -59,7 +59,7 @@ mNexusServiceImpl = serviceMesquite; - } + //} } return mNexusServiceImpl; } Deleted: trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceNCL.java =================================================================== --- trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceNCL.java 2010-01-15 18:47:28 UTC (rev 467) +++ trunk/treebase-core/src/main/java/org/cipres/treebase/service/nexus/NexusServiceNCL.java 2010-01-19 14:29:50 UTC (rev 468) @@ -1,169 +0,0 @@ - -package org.cipres.treebase.service.nexus; - -import java.io.File; -import java.util.Collection; -import java.util.Properties; - -import org.apache.log4j.Logger; - -import org.cipres.treebase.domain.DomainHome; -import org.cipres.treebase.domain.matrix.MatrixDataTypeHome; -import org.cipres.treebase.domain.nexus.NexusDataSet; -import org.cipres.treebase.domain.nexus.NexusService; -import org.cipres.treebase.domain.nexus.ncl.NCLNexusConverter; -import org.cipres.treebase.domain.study.Study; -import org.cipres.treebase.domain.taxon.TaxonLabelHome; -import org.cipres.treebase.event.ProgressionListener; -import org.cipres.treebase.service.AbstractServiceImpl; - -/** - * NexusServiceNCL.java - * - * Created on Apr 21, 2006 - * - * @author Jin Ruan - * - */ -public class NexusServiceNCL extends AbstractServiceImpl implements NexusService { - private static final Logger LOGGER = Logger.getLogger(NexusServiceNCL.class); - - private TaxonLabelHome mTaxonLabelHome; - private MatrixDataTypeHome mMatrixDataTypeHome; - - /** - * Constructor. - */ - public NexusServiceNCL() { - super(); - } - - /** - * Return the TaxonLabelHome field. - * - * @return TaxonLabelHome mTaxonLabelHome - */ - private TaxonLabelHome getTaxonLabelHome() { - return mTaxonLabelHome; - } - - /** - * Set the TaxonLabelHome field. - */ - public void setTaxonLabelHome(TaxonLabelHome pNewTaxonLabelHome) { - mTaxonLabelHome = pNewTaxonLabelHome; - } - - /** - * Return the MatrixDataTypeHome field. - * - * @return MatrixDataTypeHome mMatrixDataTypeHome - */ - private MatrixDataTypeHome getMatrixDataTypeHome() { - return mMatrixDataTypeHome; - } - - /** - * Set the MatrixDataTypeHome field. - */ - public void setMatrixDataTypeHome(MatrixDataTypeHome pNewMatrixDataTypeHome) { - mMatrixDataTypeHome = pNewMatrixDataTypeHome; - } - - /** - * - * @see org.cipres.treebase.service.AbstractServiceImpl#getDomainHome() - */ - @Override - protected DomainHome getDomainHome() { - return null; // do not need persistence service. - } - - /** - * Returns true only if all files exist. - * - * @param pNexusFiles - * @return - */ - private boolean checkFiles(Collection<File> pNexusFiles) { - if (pNexusFiles == null) { - return false; - } - - boolean hasError = false; - for (File file : pNexusFiles) { - if (!file.exists()) { - if (LOGGER.isInfoEnabled()) { - LOGGER.info(" input file does not exist:" + file.getAbsolutePath()); //$NON-NLS-1$ - } - hasError = true; - } - } - - return !hasError; - } - - /** - * - * @see org.cipres.treebase.domain.nexus.NexusService#parseNexus(org.cipres.treebase.domain.study.Study, java.util.Collection, org.cipres.treebase.event.ProgressionListener) - */ - public NexusDataSet parseNexus(Study pStudy, Collection<File> pNexusFiles, ProgressionListener pListener) { - - if (pStudy == null) { - if (LOGGER.isInfoEnabled()) { - LOGGER - .info("parseNexus - Study is null"); //$NON-NLS-1$ - } - return null; - } - - if (!checkFiles(pNexusFiles)) { - return null; - } - - NexusDataSet data = new NexusDataSet(); - - NCLNexusConverter converter = new NCLNexusConverter(); - converter.setMatrixDataTypeHome(getMatrixDataTypeHome()); - converter.setTaxonLabelHome(getTaxonLabelHome()); - - converter.processLoadFile(pNexusFiles, pStudy, data, pListener); - - return data; - } - - /** - * - * @see org.cipres.treebase.domain.nexus.NexusService#parseNexus(org.cipres.treebase.domain.study.Study, java.io.File) - */ - public NexusDataSet parseNexus(Study pStudy, File pNexusFile) { - //TODO: parseNexus - return null; - } - - @Override - public Class defaultResultClass() { - return null; - } - - public String serialize(NexusDataSet nexusDataSet) { - // TODO Auto-generated method stub - return null; - } - - public String serialize(Study study) { - // TODO Auto-generated method stub - return null; - } - - public String serialize(NexusDataSet nexusDataSet, Properties properties) { - // TODO Auto-generated method stub - return null; - } - - public String serialize(Study study, Properties properties) { - // TODO Auto-generated method stub - return null; - } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2010-01-15 19:07:48
|
Bugs item #2854768, was opened at 2009-09-08 19:07 Message generated for change (Comment added) made by youjun You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2854768&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Priority: 7 Private: No Submitted By: William Piel (sfrgpiel) Assigned to: youjun guo (youjun) Summary: Editors and Administrators Cannot Edit Ready Submissions Initial Comment: When an Associate Editor or Administrator is examining a submission with the status of "Ready", the submission should be editable to the Associate Editor or Administrator but not to the User. Currently, it is editable by nobody, except that an Associate Editor or Administrator can toggle it to "Published" status. ---------------------------------------------------------------------- >Comment By: youjun guo (youjun) Date: 2010-01-15 14:07 Message: This one had been solve ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2854768&group_id=248804 |
From: SourceForge.net <no...@so...> - 2010-01-15 18:57:59
|
Bugs item #2826165, was opened at 2009-07-23 19:36 Message generated for change (Comment added) made by rvos You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2826165&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: Rutger Vos (rvos) Summary: Reviewer/Referee Access Initial Comment: I'm making this a priority of 9 only because it is needed before TreeBASE2 can be made public. We need to make sure that reviewers or referees can have access to datasets that are "in progress" and associated with a manuscript that is in the review process of a journal. Jin Ruan initially created a user role called "reviewer" which gives someone read-only access to the private sections of the database. We decided that this is a bad solution because it requires that each reviewer get a login name and password, which implies a huge amount of admin overhead. A better solution is to auto-generate a long random string which can be used in an URL to give someone a read-only access to the submission page. But however which way we do this, it is needed because some journals depend on this as part of their review process. ---------------------------------------------------------------------- >Comment By: Rutger Vos (rvos) Date: 2010-01-15 18:57 Message: Implemented as of revision 467 ---------------------------------------------------------------------- Comment By: Rutger Vos (rvos) Date: 2010-01-15 18:57 Message: Your bug has been resolved. Thanks for the report. ---------------------------------------------------------------------- Comment By: William Piel (sfrgpiel) Date: 2009-12-11 00:37 Message: Here are some more comments on how I envision this feature -- but of course I'm open to input from everyone regarding this. The basic requirement is that the submitter gets either a PIN or an URL for each submission/study that s/he initiates. This should be provided to the submitter at the submission summary page. For example, here is the "summary" page that a submitter might see: http://treebasedb-dev.nescent.org:6666/treebase-web/user/summary.html?id=1937 ... in this case, the submission is "published" so it is visible to everyone -- but in the event that the submission was "in progress" or "ready," only the submitter or an administrator can view the submission. In the "Summary" box that you can see after following the url (above), we currently have the following items: (1) submission id (2) the date submission initiated (3) citation (4) abstract For submissions regardless of status, we should add the following: (a) the date last modified (b) the following statement: "To cite your data in a paper or other data resources, please use the following Universal Resource Identifier (URI): http://purl.org/phylo/treebase/phylows/study/TB2:S1936" For submissions that are "in progress" or "ready," we should add the following: (c) "Until your submission status is change to "published," your data will remain invisible to everyone except you, TreeBASE staff, and anyone who uses your URI together with a unique "x-reviewer_pin" parameter. To provide journal editors or reviewers of your paper with advanced access to your data, please email the following URL to them: http://purl.org/phylo/treebase/phylows/study/TB2:S1936?x-reviewer_pin=1234567890&format=html This URL contains the unique x-reviewer_pin parameter that provides read-only access to your data. It is recommended that you provide this to your editor or reviews only after your submission is complete." So... for this to work we need to modify Rutger's phylows code to read the extra parameter "x-reviewer_pin" and to use this to give anonymous access to the corresponding submission even though its status is "in progress" or "ready." My guess is that this would involve generating a cookie so that once the user's browser resolves the phylows + x-reviewer_pin URL, the reviewer can continue clicking on the related analysis, matrix, tree, and taxa tabs. Additionally, the cookie allows the reviewer to download matrices and trees for this study. How should we generate the PIN? One way is to add a new field to the study table to store a randomly-generated PIN. But that means modifying the schema, which is probably not ideal. Another way is to generate an md5 on, for example, a concatenation of the study_id and the date that the submission was first created. The other thing that would be good is that when the reviewer first follows the phylows + x-reviewer_pin URL, he/she is confronted with an "agreement" page or pop-up. This "agreement" page or popup contains an "Accept" and a "Cancel" button. The Cancel button closes out the browser page. The "Accept" button continues to the submission. The verbiage for this "agreement" page is written below. regards, Bill ===================== Reviewer/Referee Access Agreement You have reached this page using a PIN that is intended to be used by journal editors and reviewers or referees of a paper that is under consideration for publication. This PIN gives you access to the submitted data and metadata associated with analyses and results presented in the paper under review. Please carefully examine the data paying special attention to the following: - The citation data (authors, year, citation, abstract) should be complete, except for information that is not yet known (e.g. volume or page numbers). - Verify that nexus files are error-free and executable by software programs (e.g. PAUP, Mesquite, MacClade, etc). Please make sure that the taxon labels for trees are identical, or a subset of, the taxon labels in data matrices connected by way of an analysis. If taxon labels in trees do not match with taxon labels in associated data matrices, the data will not be useful to the scientific community. - Verify that data are not missing and that opportunities to supply valuable metadata are not overlooked. For example, TreeBASE can store Genbank accession numbers, museum voucher IDs, latitude and longitudes for specimen localities, character names and character state names for morphological data, etc. Including these metadata are sometimes overlooked by submitting authors, yet sharing this metadata is extremely valuable to the scientific community. Please use your power as a reviewer to encourage the sharing of richly-annotated metadata. - Verify that analyses are not missing and that, where possible, analysis entries include software commands (e.g. the contents of a PAUP block or MrBayes block) so that analyses can be replicated easily (e.g. commands that describe substitution models, data partitions, and heuristic search parameters). - Verify that taxon labels are mapped against TreeBASE's taxonomic dictionary. Data in TreeBASE can only be found using a taxon name search if the taxon labels are properly mapped. By clicking the "Accept" button below, you agree to keep these data confidential; you agree not retain these data after completing your report to the journal editor; you agree not use these data or knowledge of these data for the purposes of your research until and unless the paper under review has been published and the data have been made available to the general public; you agree to keep the PIN confidential. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2826165&group_id=248804 |
From: <rv...@us...> - 2010-01-15 18:47:34
|
Revision: 467 http://treebase.svn.sourceforge.net/treebase/?rev=467&view=rev Author: rvos Date: 2010-01-15 18:47:28 +0000 (Fri, 15 Jan 2010) Log Message: ----------- Refactoring reviewer login logic Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp 2010-01-15 18:39:46 UTC (rev 466) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp 2010-01-15 18:47:28 UTC (rev 467) @@ -244,7 +244,7 @@ <script type="text/javascript"> function processAgreementResponse(response) { var currentLocation = location.href; - var newLocation = currentLocation.replace(/&agreement=[ok|cancel]/,"") + '&agreement=' + response; + var newLocation = currentLocation.replace(/&agreement=(ok|cancel)/g,"") + '&agreement=' + response; window.location=newLocation; } </script> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2010-01-15 18:39:52
|
Revision: 466 http://treebase.svn.sourceforge.net/treebase/?rev=466&view=rev Author: rvos Date: 2010-01-15 18:39:46 +0000 (Fri, 15 Jan 2010) Log Message: ----------- Refactoring reviewer login logic Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp 2010-01-15 18:16:45 UTC (rev 465) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp 2010-01-15 18:39:46 UTC (rev 466) @@ -241,8 +241,15 @@ general public; you agree to keep the URL confidential. </div> <div style="width:100%;text-align:center;padding-top:10px"> - <input type="submit" id="agreementOk" value="OK" onclick="window.location=location.href+'&agreement=ok'"/> - <input type="submit" id="agreementCancel" value="Cancel" onclick="window.location=location.href+'&agreement=cancel'"/> + <script type="text/javascript"> + function processAgreementResponse(response) { + var currentLocation = location.href; + var newLocation = currentLocation.replace(/&agreement=[ok|cancel]/,"") + '&agreement=' + response; + window.location=newLocation; + } + </script> + <input type="submit" id="agreementOk" value="OK" onclick="processAgreementResponse('ok')"/> + <input type="submit" id="agreementCancel" value="Cancel" onclick="processAgreementResponse('cancel')"/> </div> </div> </c:if> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2010-01-15 18:16:55
|
Revision: 465 http://treebase.svn.sourceforge.net/treebase/?rev=465&view=rev Author: rvos Date: 2010-01-15 18:16:45 +0000 (Fri, 15 Jan 2010) Log Message: ----------- Refactoring reviewer login logic Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/Constants.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/Constants.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/Constants.java 2010-01-15 18:00:16 UTC (rev 464) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/Constants.java 2010-01-15 18:16:45 UTC (rev 465) @@ -25,8 +25,7 @@ * objects to be stores in the session */ public static final String X_ACCESS_CODE = "x-access-code"; - public static final String REVIEWER_ACCESS_GRANTED = "reviewerAccessGranted"; - public static final String REVIEWER_ACCESS_DENIED = "reviewerAccessDenied"; + public static final String REVIEWER_AGREEMENT_ACCEPTED = "reviewerAgreementAccepted"; public static final String STUDY_MAP = "studyMap"; public static final String ANALYSIS_MAP = "analysisMap"; Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java 2010-01-15 18:00:16 UTC (rev 464) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java 2010-01-15 18:16:45 UTC (rev 465) @@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; import org.apache.log4j.Logger; import org.cipres.treebase.NamespacedGUID; @@ -178,33 +179,33 @@ } } - private boolean isReviewerAccessGranted(HttpServletRequest pRequest) { - boolean reviewerAccessGranted = false; - if ( "cancel".equals(pRequest.getParameter("agreement")) ) { - pRequest.getSession().setAttribute(Constants.REVIEWER_ACCESS_GRANTED, false); + private boolean isReviewerAccessGranted(HttpServletRequest req) { + boolean passedHashedIDCheck = false; + HttpSession session = req.getSession(); + if ( "cancel".equals(req.getParameter("agreement")) ) { + session.setAttribute(Constants.REVIEWER_AGREEMENT_ACCEPTED, false); } - if ( "ok".equals(pRequest.getParameter("agreement")) ) { - pRequest.getSession().setAttribute(Constants.REVIEWER_ACCESS_GRANTED, true); + if ( "ok".equals(req.getParameter("agreement")) ) { + session.setAttribute(Constants.REVIEWER_AGREEMENT_ACCEPTED, true); } - Object xAccesCodeObject = pRequest.getSession().getAttribute(Constants.X_ACCESS_CODE); + Object xAccesCodeObject = session.getAttribute(Constants.X_ACCESS_CODE); if ( xAccesCodeObject != null ) { - String storedHashedStudyId = xAccesCodeObject.toString(); - TreebaseIDString tbidstr = new TreebaseIDString(Study.class,Long.parseLong(pRequest.getParameter("id"))); - if ( storedHashedStudyId.equals(tbidstr.getNamespacedGUID().getHashedIDString()) ) { - Object accessGranted = pRequest.getSession().getAttribute(Constants.REVIEWER_ACCESS_GRANTED); - if ( accessGranted == null || ((Boolean)accessGranted).booleanValue() == false ) { - LOGGER.info("Going to display agreement"); - pRequest.getSession().setAttribute("displayAgreement",true); + String suppliedHashedID = xAccesCodeObject.toString(); + TreebaseIDString tbidstr = new TreebaseIDString(Study.class,Long.parseLong(req.getParameter("id"))); + if ( suppliedHashedID.equals(tbidstr.getNamespacedGUID().getHashedIDString()) ) { + passedHashedIDCheck = true; + Object agreementAccepted = session.getAttribute(Constants.REVIEWER_AGREEMENT_ACCEPTED); + if ( agreementAccepted == null || ((Boolean)agreementAccepted).booleanValue() == false ) { + LOGGER.info("Going to display agreement - agreement acceptance: "+agreementAccepted); + session.setAttribute("displayAgreement",true); } else { - LOGGER.info("Reviewer access is granted"); - reviewerAccessGranted = true; - pRequest.getSession().setAttribute("displayAgreement",false); - } - pRequest.getSession().setAttribute(Constants.REVIEWER_ACCESS_GRANTED, reviewerAccessGranted); + LOGGER.info("Not displaying agreement"); + session.setAttribute("displayAgreement",false); + } } } - return reviewerAccessGranted; + return passedHashedIDCheck; } protected ModelAndView setAttributeAndShowForm( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2010-01-15 18:00:22
|
Revision: 464 http://treebase.svn.sourceforge.net/treebase/?rev=464&view=rev Author: rvos Date: 2010-01-15 18:00:16 +0000 (Fri, 15 Jan 2010) Log Message: ----------- Refactoring reviewer login logic Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java 2010-01-15 17:23:48 UTC (rev 463) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java 2010-01-15 18:00:16 UTC (rev 464) @@ -180,45 +180,29 @@ private boolean isReviewerAccessGranted(HttpServletRequest pRequest) { boolean reviewerAccessGranted = false; + if ( "cancel".equals(pRequest.getParameter("agreement")) ) { + pRequest.getSession().setAttribute(Constants.REVIEWER_ACCESS_GRANTED, false); + } + if ( "ok".equals(pRequest.getParameter("agreement")) ) { + pRequest.getSession().setAttribute(Constants.REVIEWER_ACCESS_GRANTED, true); + } Object xAccesCodeObject = pRequest.getSession().getAttribute(Constants.X_ACCESS_CODE); if ( xAccesCodeObject != null ) { String storedHashedStudyId = xAccesCodeObject.toString(); - LOGGER.info("x-access-code="+storedHashedStudyId); - Long studyId = Long.parseLong(pRequest.getParameter("id")); - LOGGER.info("studyId="+studyId); - TreebaseIDString tbidstr = new TreebaseIDString(Study.class,studyId); - LOGGER.info("TreebaseIDString="+tbidstr); - NamespacedGUID nsguid = tbidstr.getNamespacedGUID(); - LOGGER.info("NamespacedGUID="+nsguid); - String computedHashedStudyId = nsguid.getHashedIDString(); - LOGGER.info("computedHashedStudyId="+computedHashedStudyId); - if ( storedHashedStudyId.equals(computedHashedStudyId) ) { - reviewerAccessGranted = true; - //saveMessage(pRequest,"You are in reviewer access mode."); - LOGGER.info("x-access-code matches computed hashed study id"); - LOGGER.info("Reviewer access is granted"); - if ( pRequest.getSession().getAttribute(Constants.REVIEWER_ACCESS_GRANTED) == null ) { + TreebaseIDString tbidstr = new TreebaseIDString(Study.class,Long.parseLong(pRequest.getParameter("id"))); + if ( storedHashedStudyId.equals(tbidstr.getNamespacedGUID().getHashedIDString()) ) { + Object accessGranted = pRequest.getSession().getAttribute(Constants.REVIEWER_ACCESS_GRANTED); + if ( accessGranted == null || ((Boolean)accessGranted).booleanValue() == false ) { + LOGGER.info("Going to display agreement"); pRequest.getSession().setAttribute("displayAgreement",true); } else { + LOGGER.info("Reviewer access is granted"); + reviewerAccessGranted = true; pRequest.getSession().setAttribute("displayAgreement",false); } pRequest.getSession().setAttribute(Constants.REVIEWER_ACCESS_GRANTED, reviewerAccessGranted); - pRequest.getSession().removeAttribute(Constants.REVIEWER_ACCESS_DENIED); } - else { - LOGGER.info("x-access-code doesn't match computed hashed study id"); - LOGGER.info("access denied"); - } - } - else { - LOGGER.info("No x-access-code parameter supplied"); - } - if ( "cancel".equals(pRequest.getParameter("agreement")) || pRequest.getSession().getAttribute(Constants.REVIEWER_ACCESS_DENIED) != null) { - pRequest.getSession().setAttribute(Constants.REVIEWER_ACCESS_GRANTED, false); - pRequest.getSession().setAttribute("displayAgreement",true); - pRequest.getSession().setAttribute(Constants.REVIEWER_ACCESS_DENIED, true); - return false; } return reviewerAccessGranted; } Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp 2010-01-15 17:23:48 UTC (rev 463) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp 2010-01-15 18:00:16 UTC (rev 464) @@ -185,8 +185,9 @@ <img src="<fmt:message key="icons.info"/>" alt="<fmt:message key="icon.information"/>" class="icon" /> <span style="color: red; ">You are in reviewer mode.</span> </div> - <c:if test="${displayAgreement || reviewerAccessDenied}"> - <div id="agreement" style="position:fixed;left:10%;top:5%;width:80%;height:80%;background-color:white;padding:10px;border:5px solid orange"> +</c:if> +<c:if test="${displayAgreement}"> + <div id="agreement" style="position:fixed;left:10%;top:5%;width:80%;height:80%;background-color:white;padding:10px;border:5px solid orange"> <h2>Reviewer/Referee Access Agreement</h2> <div style="width:100%;overflow:auto"> You have reached this page using a special URL that is intended to be used @@ -240,11 +241,10 @@ general public; you agree to keep the URL confidential. </div> <div style="width:100%;text-align:center;padding-top:10px"> - <input type="submit" id="agreementOk" value="OK" onclick="$('agreement').style.display = 'none'"/> + <input type="submit" id="agreementOk" value="OK" onclick="window.location=location.href+'&agreement=ok'"/> <input type="submit" id="agreementCancel" value="Cancel" onclick="window.location=location.href+'&agreement=cancel'"/> </div> </div> - </c:if> </c:if> <c:if test="${! empty study.citation.title}"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2010-01-15 17:23:54
|
Revision: 463 http://treebase.svn.sourceforge.net/treebase/?rev=463&view=rev Author: rvos Date: 2010-01-15 17:23:48 +0000 (Fri, 15 Jan 2010) Log Message: ----------- Added switch to template. Modified Paths: -------------- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp Modified: trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp =================================================================== --- trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp 2010-01-15 17:19:50 UTC (rev 462) +++ trunk/treebase-web/src/main/webapp/WEB-INF/pages/search/study/nav.jsp 2010-01-15 17:23:48 UTC (rev 463) @@ -185,7 +185,7 @@ <img src="<fmt:message key="icons.info"/>" alt="<fmt:message key="icon.information"/>" class="icon" /> <span style="color: red; ">You are in reviewer mode.</span> </div> - <c:if test="${displayAgreement}"> + <c:if test="${displayAgreement || reviewerAccessDenied}"> <div id="agreement" style="position:fixed;left:10%;top:5%;width:80%;height:80%;background-color:white;padding:10px;border:5px solid orange"> <h2>Reviewer/Referee Access Agreement</h2> <div style="width:100%;overflow:auto"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2010-01-15 17:19:56
|
Revision: 462 http://treebase.svn.sourceforge.net/treebase/?rev=462&view=rev Author: rvos Date: 2010-01-15 17:19:50 +0000 (Fri, 15 Jan 2010) Log Message: ----------- Now stores access denied explicitly in session. Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/Constants.java trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/Constants.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/Constants.java 2010-01-15 17:09:07 UTC (rev 461) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/Constants.java 2010-01-15 17:19:50 UTC (rev 462) @@ -26,6 +26,7 @@ */ public static final String X_ACCESS_CODE = "x-access-code"; public static final String REVIEWER_ACCESS_GRANTED = "reviewerAccessGranted"; + public static final String REVIEWER_ACCESS_DENIED = "reviewerAccessDenied"; public static final String STUDY_MAP = "studyMap"; public static final String ANALYSIS_MAP = "analysisMap"; Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java 2010-01-15 17:09:07 UTC (rev 461) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java 2010-01-15 17:19:50 UTC (rev 462) @@ -179,11 +179,6 @@ } private boolean isReviewerAccessGranted(HttpServletRequest pRequest) { - if ( "cancel".equals(pRequest.getParameter("agreement")) ) { - pRequest.getSession().setAttribute(Constants.REVIEWER_ACCESS_GRANTED, false); - pRequest.getSession().setAttribute("displayAgreement",true); - return false; - } boolean reviewerAccessGranted = false; Object xAccesCodeObject = pRequest.getSession().getAttribute(Constants.X_ACCESS_CODE); if ( xAccesCodeObject != null ) { @@ -209,6 +204,7 @@ pRequest.getSession().setAttribute("displayAgreement",false); } pRequest.getSession().setAttribute(Constants.REVIEWER_ACCESS_GRANTED, reviewerAccessGranted); + pRequest.getSession().removeAttribute(Constants.REVIEWER_ACCESS_DENIED); } else { LOGGER.info("x-access-code doesn't match computed hashed study id"); @@ -218,6 +214,12 @@ else { LOGGER.info("No x-access-code parameter supplied"); } + if ( "cancel".equals(pRequest.getParameter("agreement")) || pRequest.getSession().getAttribute(Constants.REVIEWER_ACCESS_DENIED) != null) { + pRequest.getSession().setAttribute(Constants.REVIEWER_ACCESS_GRANTED, false); + pRequest.getSession().setAttribute("displayAgreement",true); + pRequest.getSession().setAttribute(Constants.REVIEWER_ACCESS_DENIED, true); + return false; + } return reviewerAccessGranted; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rv...@us...> - 2010-01-15 17:09:13
|
Revision: 461 http://treebase.svn.sourceforge.net/treebase/?rev=461&view=rev Author: rvos Date: 2010-01-15 17:09:07 +0000 (Fri, 15 Jan 2010) Log Message: ----------- Added shortcut for when the reviewer hits cancel: no access is granted, the agreement is again displayed if the reviewer re-visits the same special URL Modified Paths: -------------- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java Modified: trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java =================================================================== --- trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java 2010-01-15 17:07:52 UTC (rev 460) +++ trunk/treebase-web/src/main/java/org/cipres/treebase/web/controllers/BaseFormController.java 2010-01-15 17:09:07 UTC (rev 461) @@ -179,6 +179,11 @@ } private boolean isReviewerAccessGranted(HttpServletRequest pRequest) { + if ( "cancel".equals(pRequest.getParameter("agreement")) ) { + pRequest.getSession().setAttribute(Constants.REVIEWER_ACCESS_GRANTED, false); + pRequest.getSession().setAttribute("displayAgreement",true); + return false; + } boolean reviewerAccessGranted = false; Object xAccesCodeObject = pRequest.getSession().getAttribute(Constants.X_ACCESS_CODE); if ( xAccesCodeObject != null ) { @@ -204,7 +209,6 @@ pRequest.getSession().setAttribute("displayAgreement",false); } pRequest.getSession().setAttribute(Constants.REVIEWER_ACCESS_GRANTED, reviewerAccessGranted); - } else { LOGGER.info("x-access-code doesn't match computed hashed study id"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |