From 8b84bd41a01db7fee0365b4c92d3ebbf10a03348 Mon Sep 17 00:00:00 2001 From: mohr Date: Thu, 7 Sep 2017 15:07:33 +0200 Subject: [PATCH] Update workflow API for new references, fix search engine, add export as TSV of tables --- ...pi_ac750ec.jar => workflowapi_1087929.jar} | Bin 10026768 -> 10026902 bytes .../BiologicalSamplesComponent.java | 87 ++++++++++----- .../qbicmainportlet/DatasetComponent.java | 24 ++++- .../qbicmainportlet/ExperimentComponent.java | 29 +++-- .../qbic/qbicmainportlet/HomeView.java | 7 +- .../qbic/qbicmainportlet/LevelComponent.java | 34 +++++- .../qbicmainportlet/QbicmainportletUI.java | 56 +++++----- .../qbicmainportlet/SearchEngineView.java | 100 ++++++++++-------- .../qbicmainportlet/SearchResultsView.java | 63 +++++------ QBiCMainPortlet/src/helpers/Utils.java | 63 +++++------ 10 files changed, 264 insertions(+), 199 deletions(-) rename QBiCMainPortlet/WebContent/WEB-INF/lib/{workflowapi_ac750ec.jar => workflowapi_1087929.jar} (99%) diff --git a/QBiCMainPortlet/WebContent/WEB-INF/lib/workflowapi_ac750ec.jar b/QBiCMainPortlet/WebContent/WEB-INF/lib/workflowapi_1087929.jar similarity index 99% rename from QBiCMainPortlet/WebContent/WEB-INF/lib/workflowapi_ac750ec.jar rename to QBiCMainPortlet/WebContent/WEB-INF/lib/workflowapi_1087929.jar index 5f3217a0f49b09b43db0ae0c517102ec944115a3..7b05cff887be8e202448a45a3577200f3f429509 100644 GIT binary patch delta 7615 zcmZYE2RN1Q`vCA`A4JE9?Ci+iTU2CaR|v`8TlUEc8D+jN8GQ*!MC62!?3K(A3PpA{ z8T}uQe!p+Ozsu*ko^!wVeLv6hzOQp#Jv};{#!vk{jZdzlfrn3xKq8R{JXdawGIDDq zK7lW%Mv@b;L|8F0vKWa2-~xC6K0p8v0z|;kbz*=7AO%hVWB@sE8bARQ03|>LPy=TG z8h{o!3(x`d00Y1XFagW}3vdo#1=s*~fCJzJxBzb8Jir6+0v7;2fFBS51OXvH7!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w(I8555HvFf z2|!{SFz(4#+JIT`A8pN=r>``wz6R$Rh|ri0B`@leos`esamQqH59!0 zXJN6MU|}wov3(-yFb(wnzkT12`m)rI`nVy%Etv6misT@%oeLBQL^~G(q42K>5Qy*B zj#9O-SE6tW6er$Vqx_nqypK?U4lsLLHbE%N{O z_FYW$S~u8{GsyqDga!)y1&iP|^b0(Jd{8?G96y2G{DPIs;0|8lL?BrInurpj-GPO% zRmwY{N)0mIfyJ?b7!V+k&x4^)d0;yOJAbw_4dVDEFQC2uW{U5EQddZ47v?#>@QIV_ z1GPk8LK+0()L#?szk*_RVgBR&C&ZF{bqD*81^Wjp``7QF6o#_OU@p=B-+wCA5E&~d z5e9=Z|EmCjsH-?GISC2vz;xL4>;49-;((lf!;;uQ76=f$MZ=I~6)XlV{r`Fg&gz0^l{kWK4@j(kaD5e8X>))@I+b}j&Xar{b*P6`^z%XCOv3+1u|K3m8 zQJ?iBwhw&3sUeL++}qB4@3syfn1>X+!UBIS(tQS-|K|fQ!MivQBW}AoN;;nt^SyIh XPn!sQArJ^n@TZdrfe`-+gMa-8R(KjN diff --git a/QBiCMainPortlet/src/de/uni_tuebingen/qbic/qbicmainportlet/BiologicalSamplesComponent.java b/QBiCMainPortlet/src/de/uni_tuebingen/qbic/qbicmainportlet/BiologicalSamplesComponent.java index d167fef..6eeb1ec 100644 --- a/QBiCMainPortlet/src/de/uni_tuebingen/qbic/qbicmainportlet/BiologicalSamplesComponent.java +++ b/QBiCMainPortlet/src/de/uni_tuebingen/qbic/qbicmainportlet/BiologicalSamplesComponent.java @@ -1,6 +1,6 @@ /******************************************************************************* - * QBiC Project qNavigator enables users to manage their projects. Copyright (C) "2016” - * Christopher Mohr, David Wojnar, Andreas Friedrich + * QBiC Project qNavigator enables users to manage their projects. Copyright (C) "2016” Christopher + * Mohr, David Wojnar, Andreas Friedrich * * This program is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 of the @@ -20,14 +20,6 @@ import java.util.List; import java.util.Map; -import logging.Log4j2Logger; -import logging.Logger; -import model.BiologicalEntitySampleBean; -import model.BiologicalSampleBean; -import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Sample; -import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Vocabulary; -import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.VocabularyTerm; - import com.vaadin.data.Item; import com.vaadin.data.util.BeanItem; import com.vaadin.data.util.BeanItemContainer; @@ -37,9 +29,12 @@ import com.vaadin.event.ItemClickEvent.ItemClickListener; import com.vaadin.event.SelectionEvent; import com.vaadin.event.SelectionEvent.SelectionListener; +import com.vaadin.server.FileDownloader; import com.vaadin.server.FontAwesome; +import com.vaadin.server.StreamResource; import com.vaadin.shared.ui.MarginInfo; import com.vaadin.shared.ui.label.ContentMode; +import com.vaadin.ui.Button; import com.vaadin.ui.CustomComponent; import com.vaadin.ui.Grid; import com.vaadin.ui.HorizontalLayout; @@ -55,6 +50,15 @@ import com.vaadin.ui.renderers.ClickableRenderer.RendererClickListener; import com.vaadin.ui.renderers.HtmlRenderer; +import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Sample; +import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Vocabulary; +import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.VocabularyTerm; +import helpers.Utils; +import logging.Log4j2Logger; +import logging.Logger; +import model.BiologicalEntitySampleBean; +import model.BiologicalSampleBean; + public class BiologicalSamplesComponent extends CustomComponent { @@ -81,6 +85,12 @@ private enum propertyTypes { private BeanItemContainer samplesBio; private BeanItemContainer samplesEntity; private String currentID; + private Button exportSources = new Button("Export as TSV"); + private Button exportSamples = new Button("Export as TSV"); + private FileDownloader fileDownloaderSources; + private FileDownloader fileDownloaderSamples; + + /** * @@ -89,7 +99,8 @@ private enum propertyTypes { * @param resourceurl * @param caption */ - public BiologicalSamplesComponent(DataHandler dh, State state, String resourceurl, String caption) { + public BiologicalSamplesComponent(DataHandler dh, State state, String resourceurl, + String caption) { this.datahandler = dh; this.resourceUrl = resourceurl; this.state = state; @@ -136,6 +147,9 @@ public void select(SelectionEvent event) { mainLayout.setResponsive(true); setResponsive(true); + exportSources.setIcon(FontAwesome.DOWNLOAD); + exportSamples.setIcon(FontAwesome.DOWNLOAD); + // this.setWidth(Page.getCurrent().getBrowserWindowWidth() * 0.8f, Unit.PIXELS); this.setCompositionRoot(mainLayout); } @@ -288,12 +302,10 @@ public Class getType() { @Override public String getValue(Item item, Object itemId, Object propertyId) { - String ncbi = - String - .format( - "http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Undef&name=%s&lvl=0&srchmode=1&keep=1&unlock' target='_blank'>%s", - item.getItemProperty("organism").getValue(), - item.getItemProperty("organismName").getValue()); + String ncbi = String.format( + "http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Undef&name=%s&lvl=0&srchmode=1&keep=1&unlock' target='_blank'>%s", + item.getItemProperty("organism").getValue(), + item.getItemProperty("organismName").getValue()); String link = String.format(" projects = - datahandler.getOpenBisClient().getOpenbisInfoService() - .listProjectsOnBehalfOfUser(datahandler.getOpenBisClient().getSessionToken(), user); + List projects = datahandler.getOpenBisClient().getOpenbisInfoService() + .listProjectsOnBehalfOfUser(datahandler.getOpenBisClient().getSessionToken(), user); int numberOfProjects = 0; for (Project project : projects) { if (project.getSpaceCode().contains("IVAC")) { @@ -577,13 +575,11 @@ private void initSessionAttributes() { * */ private void initConnection() { - this.openBisConnection = - new OpenBisClient(manager.getDataSourceUser(), manager.getDataSourcePassword(), - manager.getDataSourceUrl()); + this.openBisConnection = new OpenBisClient(manager.getDataSourceUser(), + manager.getDataSourcePassword(), manager.getDataSourceUrl()); this.openBisConnection.login(); - DBConfig mysqlConfig = - new DBConfig(manager.getMsqlHost(), manager.getMysqlPort(), manager.getMysqlDB(), - manager.getMysqlUser(), manager.getMysqlPass()); + DBConfig mysqlConfig = new DBConfig(manager.getMsqlHost(), manager.getMysqlPort(), + manager.getMysqlDB(), manager.getMysqlUser(), manager.getMysqlPass()); DBManager databaseManager = new DBManager(mysqlConfig); this.datahandler = new DataHandler(openBisConnection, databaseManager); diff --git a/QBiCMainPortlet/src/de/uni_tuebingen/qbic/qbicmainportlet/SearchEngineView.java b/QBiCMainPortlet/src/de/uni_tuebingen/qbic/qbicmainportlet/SearchEngineView.java index 4f10a71..8a00e63 100644 --- a/QBiCMainPortlet/src/de/uni_tuebingen/qbic/qbicmainportlet/SearchEngineView.java +++ b/QBiCMainPortlet/src/de/uni_tuebingen/qbic/qbicmainportlet/SearchEngineView.java @@ -1,6 +1,6 @@ /******************************************************************************* - * QBiC Project qNavigator enables users to manage their projects. Copyright (C) "2016” - * Christopher Mohr, David Wojnar, Andreas Friedrich + * QBiC Project qNavigator enables users to manage their projects. Copyright (C) "2016” Christopher + * Mohr, David Wojnar, Andreas Friedrich * * This program is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 of the @@ -23,16 +23,6 @@ import java.util.Map; import java.util.Set; -import logging.Log4j2Logger; -import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Experiment; -import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Project; -import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Sample; -import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SampleFetchOption; -import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SampleType; -import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria; -import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria.MatchClause; -import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria.MatchClauseAttribute; - import com.vaadin.data.Property; import com.vaadin.data.Property.ValueChangeEvent; import com.vaadin.data.validator.NullValidator; @@ -53,7 +43,17 @@ import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.themes.ValoTheme; +import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Experiment; +import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Project; +import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Sample; +import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SampleFetchOption; +import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SampleType; +import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria; +import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria.MatchClause; +import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria.MatchClauseAttribute; +import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExperimentFetchOption; import de.uni_tuebingen.qbic.main.LiferayAndVaadinUtils; +import logging.Log4j2Logger; @@ -200,7 +200,7 @@ public void valueChange(ValueChangeEvent event) { public void buttonClick(ClickEvent event) { String queryString = (String) searchfield.getValue().toString(); - // LOGGER.debug("the query was " + queryString); + LOGGER.debug("the query was " + queryString); if (searchfield.getValue() == null || searchfield.getValue().toString().equals("") || searchfield.getValue().toString().trim().length() == 0) { @@ -222,7 +222,7 @@ public void buttonClick(ClickEvent event) { State state = (State) UI.getCurrent().getSession().getAttribute("state"); ArrayList message = new ArrayList(); message.add("clicked"); - message.add("view"); + message.add("view" + queryString); message.add("searchresults"); state.notifyObservers(message); @@ -269,33 +269,46 @@ public void buttonClick(ClickEvent event) { } public List querySamples(String queryString) { - EnumSet fetchOptions = EnumSet.of(SampleFetchOption.PROPERTIES); - // SearchCriteria sc1 = new SearchCriteria(); - // sc1.addMatchClause(MatchClause.createAttributeMatch(MatchClauseAttribute.CODE, queryString)); + EnumSet fetchOptions = EnumSet.of(SampleFetchOption.PROPERTIES, + SampleFetchOption.BASIC, SampleFetchOption.CONTAINED, SampleFetchOption.DESCENDANTS, + SampleFetchOption.PARENTS, SampleFetchOption.CHILDREN, SampleFetchOption.ANCESTORS); SearchCriteria sc2 = new SearchCriteria(); sc2.addMatchClause(MatchClause.createAnyFieldMatch(queryString)); - // List samples1 = - // datahandler.getOpenBisClient().getOpenbisInfoService().searchForSamplesOnBehalfOfUser(datahandler.getOpenBisClient().getSessionToken(), - // sc1, fetchOptions,LiferayAndVaadinUtils.getUser().getScreenName()); - - List samples2 = - datahandler - .getOpenBisClient() - .getOpenbisInfoService() - .searchForSamplesOnBehalfOfUser(datahandler.getOpenBisClient().getSessionToken(), sc2, - fetchOptions, LiferayAndVaadinUtils.getUser().getScreenName()); - - // LOGGER.info("hits: " + samples1.size() + " " + samples2.size()); + // List samples2 = datahandler.getOpenBisClient().getOpenbisInfoService() + // .searchForSamplesOnBehalfOfUser(datahandler.getOpenBisClient().getSessionToken(), sc2, + // fetchOptions, LiferayAndVaadinUtils.getUser().getScreenName()); + List samples2 = datahandler.getOpenBisClient().getOpenbisInfoService() + .searchForSamples(datahandler.getOpenBisClient().getSessionToken(), sc2, fetchOptions); return samples2; } + /* + * public List queryDatasets(String queryString) { // EnumSet + * fetchOptions = EnumSet.of(DatasetF.PROPERTIES, // SampleFetchOption.BASIC, + * SampleFetchOption.CONTAINED, SampleFetchOption.DESCENDANTS, // SampleFetchOption.PARENTS, + * SampleFetchOption.CHILDREN, SampleFetchOption.ANCESTORS); + * + * SearchCriteria sc2 = new SearchCriteria(); + * sc2.addMatchClause(MatchClause.createAnyFieldMatch(queryString)); + * + * // List samples2 = datahandler.getOpenBisClient().getOpenbisInfoService() // + * .searchForSamplesOnBehalfOfUser(datahandler.getOpenBisClient().getSessionToken(), sc2, // + * fetchOptions, LiferayAndVaadinUtils.getUser().getScreenName()); + * List datasets = + * datahandler.getOpenBisClient().getOpenbisInfoService() + * .searchForDataSets(datahandler.getOpenBisClient().getSessionToken(), sc2); + * + * return datasets; } + */ + public List queryExperiments(String queryString) { - EnumSet fetchOptions = EnumSet.of(SampleFetchOption.PROPERTIES); + EnumSet fetchOptions = + EnumSet.of(ExperimentFetchOption.PROPERTIES, ExperimentFetchOption.BASIC); // SearchCriteria sc1 = new SearchCriteria(); // sc1.addMatchClause(MatchClause.createAttributeMatch(MatchClauseAttribute.CODE, queryString)); @@ -309,9 +322,8 @@ public List queryExperiments(String queryString) { // List samples2 = // datahandler.getOpenBisClient().getOpenbisInfoService().searchForSamplesOnBehalfOfUser(datahandler.getOpenBisClient().getSessionToken(), // sc2, fetchOptions,LiferayAndVaadinUtils.getUser().getScreenName()); - List exps = - datahandler.getOpenBisClient().getOpenbisInfoService() - .searchForExperiments(datahandler.getOpenBisClient().getSessionToken(), sc2); + List exps = datahandler.getOpenBisClient().getOpenbisInfoService() + .searchForExperiments(datahandler.getOpenBisClient().getSessionToken(), sc2); List expFilteredByUser = new ArrayList(); @@ -335,9 +347,7 @@ public List queryProjects(String queryString) { List result = new ArrayList(); List projects = - new ArrayList(datahandler - .getOpenBisClient() - .getOpenbisInfoService() + new ArrayList(datahandler.getOpenBisClient().getOpenbisInfoService() .listProjectsOnBehalfOfUser(datahandler.getOpenBisClient().getSessionToken(), LiferayAndVaadinUtils.getUser().getScreenName())); @@ -364,9 +374,7 @@ public List queryProjects(String queryString) { public Set listSpacesOnBehalfOfUser() { // first retrieve all projects belonging to the user List projects = - new ArrayList(datahandler - .getOpenBisClient() - .getOpenbisInfoService() + new ArrayList(datahandler.getOpenBisClient().getOpenbisInfoService() .listProjectsOnBehalfOfUser(datahandler.getOpenBisClient().getSessionToken(), LiferayAndVaadinUtils.getUser().getScreenName())); @@ -386,14 +394,12 @@ public Set listSpacesOnBehalfOfUser() { public List getSearchResults(String samplecode) { java.util.EnumSet fetchOptions = EnumSet.of(SampleFetchOption.PROPERTIES); SearchCriteria sc = new SearchCriteria(); - sc.addMatchClause(MatchClause.createAttributeMatch(MatchClauseAttribute.CODE, samplecode + "*")); - - List samples = - datahandler - .getOpenBisClient() - .getOpenbisInfoService() - .searchForSamplesOnBehalfOfUser(datahandler.getOpenBisClient().getSessionToken(), sc, - fetchOptions, LiferayAndVaadinUtils.getUser().getScreenName()); + sc.addMatchClause( + MatchClause.createAttributeMatch(MatchClauseAttribute.CODE, samplecode + "*")); + + List samples = datahandler.getOpenBisClient().getOpenbisInfoService() + .searchForSamplesOnBehalfOfUser(datahandler.getOpenBisClient().getSessionToken(), sc, + fetchOptions, LiferayAndVaadinUtils.getUser().getScreenName()); List ret = new ArrayList(samples.size()); for (Sample sample : samples) { ret.add(sample.getCode()); diff --git a/QBiCMainPortlet/src/de/uni_tuebingen/qbic/qbicmainportlet/SearchResultsView.java b/QBiCMainPortlet/src/de/uni_tuebingen/qbic/qbicmainportlet/SearchResultsView.java index 2148a71..46cf293 100644 --- a/QBiCMainPortlet/src/de/uni_tuebingen/qbic/qbicmainportlet/SearchResultsView.java +++ b/QBiCMainPortlet/src/de/uni_tuebingen/qbic/qbicmainportlet/SearchResultsView.java @@ -1,6 +1,6 @@ /******************************************************************************* - * QBiC Project qNavigator enables users to manage their projects. Copyright (C) "2016” - * Christopher Mohr, David Wojnar, Andreas Friedrich + * QBiC Project qNavigator enables users to manage their projects. Copyright (C) "2016” Christopher + * Mohr, David Wojnar, Andreas Friedrich * * This program is free software: you can redistribute it and/or modify it under the terms of the * GNU General Public License as published by the Free Software Foundation, either version 3 of the @@ -20,17 +20,8 @@ import java.util.Collection; import java.util.List; -import logging.Log4j2Logger; -import model.SearchResultsExperimentBean; -import model.SearchResultsProjectBean; -import model.SearchResultsSampleBean; - import org.tepi.filtertable.FilterTable; -import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Experiment; -import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Project; -import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Sample; - import com.vaadin.data.util.BeanItemContainer; import com.vaadin.event.ItemClickEvent; import com.vaadin.event.ItemClickEvent.ItemClickListener; @@ -47,6 +38,14 @@ import com.vaadin.ui.UI; import com.vaadin.ui.VerticalLayout; +import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Experiment; +import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Project; +import ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.Sample; +import logging.Log4j2Logger; +import model.SearchResultsExperimentBean; +import model.SearchResultsProjectBean; +import model.SearchResultsSampleBean; + public class SearchResultsView extends VerticalLayout implements View { /** @@ -159,9 +158,8 @@ public void setContainerDataSource(String caption) { projCollection.add(tmpProjectBean); } - projBeanContainer = - new BeanItemContainer(SearchResultsProjectBean.class, - projCollection); + projBeanContainer = new BeanItemContainer( + SearchResultsProjectBean.class, projCollection); // get the experiment search result data @@ -181,9 +179,8 @@ public void setContainerDataSource(String caption) { } - expBeanContainer = - new BeanItemContainer(SearchResultsExperimentBean.class, - expCollection); + expBeanContainer = new BeanItemContainer( + SearchResultsExperimentBean.class, expCollection); // get the sample search result data Collection sampleCollection = new ArrayList(); @@ -199,9 +196,8 @@ public void setContainerDataSource(String caption) { } - sampleBeanContainer = - new BeanItemContainer(SearchResultsSampleBean.class, - sampleCollection); + sampleBeanContainer = new BeanItemContainer( + SearchResultsSampleBean.class, sampleCollection); } @@ -291,10 +287,9 @@ public void itemClick(ItemClickEvent event) { String cellType = new String(event.getPropertyId().toString()); if (cellType.equals("projectID")) { - String cellContent = - new String(projBeanContainer - .getContainerProperty(event.getItemId(), event.getPropertyId()).getValue() - .toString()); + String cellContent = new String( + projBeanContainer.getContainerProperty(event.getItemId(), event.getPropertyId()) + .getValue().toString()); State state = (State) UI.getCurrent().getSession().getAttribute("state"); ArrayList message = new ArrayList(); @@ -335,14 +330,12 @@ public void itemClick(ItemClickEvent event) { expGrid.addItemClickListener(new ItemClickListener() { @Override public void itemClick(ItemClickEvent event) { - // System.out.println(event.getItemId() + " ::: " + event.getPropertyId()); String cellType = new String(event.getPropertyId().toString()); if (cellType.equals("experimentID")) { - String cellContent = - new String(expBeanContainer - .getContainerProperty(event.getItemId(), event.getPropertyId()).getValue() - .toString()); + String cellContent = new String( + expBeanContainer.getContainerProperty(event.getItemId(), event.getPropertyId()) + .getValue().toString()); State state = (State) UI.getCurrent().getSession().getAttribute("state"); @@ -385,10 +378,9 @@ public void itemClick(ItemClickEvent event) { String cellType = new String(event.getPropertyId().toString()); if (cellType.equals("sampleID")) { - String cellContent = - new String(sampleBeanContainer - .getContainerProperty(event.getItemId(), event.getPropertyId()).getValue() - .toString()); + String cellContent = new String( + sampleBeanContainer.getContainerProperty(event.getItemId(), event.getPropertyId()) + .getValue().toString()); State state = (State) UI.getCurrent().getSession().getAttribute("state"); ArrayList message = new ArrayList(); @@ -425,8 +417,8 @@ private void updateUI() { private void tableClickChangeTreeView() { table.setSelectable(true); table.setImmediate(true); - this.table.addValueChangeListener(new ViewTablesClickListener(table, - ProjectView.navigateToLabel)); + this.table + .addValueChangeListener(new ViewTablesClickListener(table, ProjectView.navigateToLabel)); } @@ -455,6 +447,7 @@ public void enter(ViewChangeEvent event) { int height = event.getNavigator().getUI().getPage().getBrowserWindowHeight(); int width = event.getNavigator().getUI().getPage().getBrowserWindowWidth(); buildLayout(height, width, event.getNavigator().getUI().getPage().getWebBrowser()); + updateUI(); } /** diff --git a/QBiCMainPortlet/src/helpers/Utils.java b/QBiCMainPortlet/src/helpers/Utils.java index 7cdea2d..36b1321 100644 --- a/QBiCMainPortlet/src/helpers/Utils.java +++ b/QBiCMainPortlet/src/helpers/Utils.java @@ -31,10 +31,6 @@ import java.util.List; import java.util.Map; -import logging.Log4j2Logger; -import logging.Logger; -import model.ProjectBean; - import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.PropsKeys; @@ -43,7 +39,6 @@ import com.liferay.portal.model.User; import com.liferay.portal.service.CompanyLocalServiceUtil; import com.liferay.portal.service.UserLocalServiceUtil; -import com.vaadin.data.Container; import com.vaadin.data.Item; import com.vaadin.data.Property; import com.vaadin.data.util.BeanItemContainer; @@ -54,7 +49,6 @@ import com.vaadin.shared.ui.label.ContentMode; import com.vaadin.ui.Component; import com.vaadin.ui.HorizontalLayout; -import com.vaadin.ui.Image; import com.vaadin.ui.Label; import com.vaadin.ui.Notification; import com.vaadin.ui.Panel; @@ -65,6 +59,9 @@ import de.uni_tuebingen.qbic.qbicmainportlet.CustomVisibilityComponent; import de.uni_tuebingen.qbic.qbicmainportlet.VisibilityChangeListener; +import logging.Log4j2Logger; +import logging.Logger; +import model.ProjectBean; public class Utils { private static Logger LOGGER = new Log4j2Logger(Utils.class); @@ -173,41 +170,26 @@ public InputStream getStream() { } } // remove slashes and get rid of leading underscore afterwards - }, String.format("%s_table_contents.tsv", id.replace("/", "_").substring(1))); + }, String.format("%s.tsv", id)); return resource; } - public static String containerToString(Container container) { - String header = ""; - Collection i = container.getItemIds(); - String rowString = ""; - - Collection propertyIDs = container.getContainerPropertyIds(); - - for (Object o : propertyIDs) { - header += o.toString() + "\t"; - } - - // for (int x = 1; x <= i.size(); x++) { - for (Object id : i) { - Item it = container.getItem(id); - - for (Object o : propertyIDs) { - // Could be extended to an exclusion list if we don't want to show further columns - if (o.toString() == "dl_link") { - continue; - } else if (o.toString() == "Status") { - Image image = (Image) it.getItemProperty(o).getValue(); - rowString += image.getCaption() + "\t"; - } else { - Property prop = it.getItemProperty(o); - rowString += prop.toString() + "\t"; - } - } - rowString += "\n"; - } - return header + "\n" + rowString; - } + /* + * public static String containerToString(Container container) { String header = ""; Collection + * i = container.getItemIds(); String rowString = ""; + * + * Collection propertyIDs = container.getContainerPropertyIds(); + * + * for (Object o : propertyIDs) { header += o.toString() + "\t"; } + * + * // for (int x = 1; x <= i.size(); x++) { for (Object id : i) { Item it = container.getItem(id); + * + * for (Object o : propertyIDs) { // Could be extended to an exclusion list if we don't want to + * show further columns if (o.toString() == "dl_link") { continue; } else if (o.toString() == + * "Status") { Image image = (Image) it.getItemProperty(o).getValue(); rowString += + * image.getCaption() + "\t"; } else { Property prop = it.getItemProperty(o); rowString += + * prop.toString() + "\t"; } } rowString += "\n"; } return header + "\n" + rowString; } + */ // TODO fix and test public static String containerToString(BeanItemContainer container) { @@ -229,6 +211,8 @@ public static String containerToString(BeanItemContainer container) { exklusionList.add("root"); exklusionList.add("children"); exklusionList.add("dssPath"); + exklusionList.add("experiments"); + Collection propertyIDs = container.getContainerPropertyIds(); @@ -236,7 +220,8 @@ public static String containerToString(BeanItemContainer container) { if (exklusionList.contains(o.toString())) { continue; } else { - header += o.toString() + "\t"; + header += + o.toString().replaceAll("project", "sub-project").replace("space", "project") + "\t"; } }