Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
wow-such-code committed Apr 18, 2018
2 parents da6891a + 4120df6 commit a0261c1
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 441 deletions.
2 changes: 1 addition & 1 deletion QBiCMainPortlet/ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<dependency org="org.apache.logging.log4j" name="log4j-core" rev="2.2" />
<!--DocX4J -->
<dependency org="org.slf4j" name ="slf4j-api" rev="1.7.5" />
<dependency org="org.docx4j" name ="docx4j" rev="3.3.1" />
<dependency org="org.docx4j" name ="docx4j" rev="3.3.2" />
<!--upload -->
<dependency org="com.github.lookfirst" name="sardine" rev="5.5" />
<dependency org="commons-io" name="commons-io" rev="2.4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1006,8 +1006,9 @@ public VerticalLayout initProjectStatus() {
return projectStatus;
}

void resetGraph() {
void resetGraphs() {
graphSectionContent.removeAllComponents();
newGraphContent.removeAllComponents();
// VerticalLayout graphSection = (VerticalLayout) graphSectionContent.getParent();
// graphSection.getComponent(1).setVisible(true);
// graphSection.getComponent(1).setEnabled(true);
Expand Down Expand Up @@ -1217,7 +1218,7 @@ public void enter(ViewChangeEvent event) {
ProjectBean pbean = datahandler.getProject2(currentValue);
// if the new project bean is different than reset the graph.
if (currentBean != null && !pbean.getId().equals(currentBean.getId())) {
resetGraph();
resetGraphs();
patientViewTab.setSelectedTab(0);
}
this.currentBean = pbean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,9 @@ void updateContentTable() {
/**
*
*/
void resetGraph() {
void resetGraphs() {
graphSectionContent.removeAllComponents();
newGraphContent.removeAllComponents();
// VerticalLayout graphSection = (VerticalLayout) graphSectionContent.getParent();
// graphSection.getComponent(1).setVisible(true);
// graphSection.getComponent(1).setEnabled(true);
Expand Down Expand Up @@ -957,7 +958,7 @@ public void enter(ViewChangeEvent event) {
ProjectBean pbean = datahandler.getProject2(currentValue);
// if the new project bean is different than reset the graph.
if (currentBean != null && !pbean.getId().equals(currentBean.getId())) {
resetGraph();
resetGraphs();
projectview_tab.setSelectedTab(0);
}
this.currentBean = pbean;
Expand Down
6 changes: 0 additions & 6 deletions QBiCMainPortlet/src/helpers/SummaryFetcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@
import model.notes.Note;
import model.notes.Notes;

import org.docx4j.jaxb.Context;
import org.docx4j.model.datastorage.XPathEnhancerParser.main_return;
import org.docx4j.openpackaging.exceptions.Docx4JException;
import org.docx4j.openpackaging.exceptions.InvalidFormatException;
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
import org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart;
import org.docx4j.wml.Br;
import org.docx4j.wml.ObjectFactory;
import org.docx4j.wml.P;
import org.docx4j.wml.R;

import parser.XMLParser;
import properties.Property;
Expand Down Expand Up @@ -95,7 +91,6 @@ public class SummaryFetcher {
put("Q_MHC_LIGAND_EXTRACTION", "MHC Ligand Extraction");
};
};
private ObjectFactory factory;
private WordprocessingMLPackage wordMLPackage;
private Docx4jHelper docxHelper;
private Component summaryComponent;
Expand Down Expand Up @@ -262,7 +257,6 @@ private void addSummaryDownload(VerticalLayout res) {
}

private void initDocx4J() {
factory = Context.getWmlObjectFactory();
docxHelper = new Docx4jHelper();
try {
wordMLPackage = WordprocessingMLPackage.createPackage();
Expand Down
36 changes: 6 additions & 30 deletions QBiCMainPortlet/src/samplegraph/GraphPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ public GraphPage(Map<String, String> taxMap, Map<String, String> tissueMap) {
.collect(Collectors.toMap(Map.Entry::getValue, Map.Entry::getKey));

parser = new ProjectParser(reverseTaxMap, reverseTissueMap);

this.factorBox = new ComboBox("Experimental Factor");
factorBox.setVisible(false);

addComponent(factorBox);
}

private String buildImagePath() {
Expand All @@ -74,8 +69,9 @@ private String buildImagePath() {

public void loadProjectGraph(String projectIdentifier, List<Sample> samples,
List<DataSet> datasets) {
factorBox.removeAllItems();
this.factorBox = new ComboBox("Experimental Factor");
factorBox.setVisible(false);
addComponent(factorBox);

currentSamples = samples;
// openbis
Expand All @@ -87,6 +83,7 @@ public void loadProjectGraph(String projectIdentifier, List<Sample> samples,
} else {
// structure = parser.parseAll(currentSamples, datasets);
try {
// load here
structure = parser.parseSamplesBreadthFirst(currentSamples, datasets);
if (!structure.getFactorsToSamples().isEmpty()) {
factorBox.addItems(structure.getFactorsToSamples().keySet());
Expand Down Expand Up @@ -119,7 +116,7 @@ public void valueChange(ValueChangeEvent event) {
}

public void showDatasetsForSamples(String label, List<String> sampleCodes) {
Window subWindow = new Window(" " + label + " Dataset information");
Window subWindow = new Window(" " + label + " information");
subWindow.setWidth("680px");

VerticalLayout layout = new VerticalLayout();
Expand All @@ -135,7 +132,7 @@ public void showDatasetsForSamples(String label, List<String> sampleCodes) {
samplesWithoutData.add(s);
}

Table haveData = new Table("Samples with Data");
Table haveData = new Table("Samples/Entities with Data");
haveData.setStyleName(ValoTheme.TABLE_SMALL);
haveData.addContainerProperty("Sample", String.class, null);
haveData.addContainerProperty("Secondary Name", String.class, null);
Expand All @@ -159,7 +156,7 @@ public void showDatasetsForSamples(String label, List<String> sampleCodes) {
haveData.addItem(row.toArray(new Object[row.size()]), s);
}

Table noData = new Table("Samples without Data");
Table noData = new Table("Samples/Entities without Data");
noData.setStyleName(ValoTheme.TABLE_SMALL);
noData.addContainerProperty("Sample", String.class, null);
noData.addContainerProperty("Secondary Name", String.class, null);
Expand Down Expand Up @@ -207,25 +204,4 @@ public void buttonClick(ClickEvent event) {
ui.addWindow(subWindow);
}

//
// public void showSamples(List<String> nodeEntries) {
// sampleTable.setPageLength(Math.min(6, nodeEntries.size()));
// sampleTable.removeAllItems();
// sampleTable.addContainerProperty("Code", String.class, null);
// sampleTable.addContainerProperty("Secondary Name", String.class, null);
// int i = 0;
// for (Sample s : currentSamples) {
// i++;
// String code = s.getCode();
// String name = s.getProperties().get("Q_SECONDARY_NAME");
// if (nodeEntries.contains(code)) {
// List<Object> row = new ArrayList<Object>();
// row.add(code);
// row.add(name);
// sampleTable.addItem(row.toArray(new Object[row.size()]), i);
// }
// }
// sampleTable.setVisible(true);
// }

}
Loading

0 comments on commit a0261c1

Please sign in to comment.