Release gCube 4.3
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@144104 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c5d0bda36c
commit
c1a7add41b
src/main/java/org/gcube/portlets/user/statisticalalgorithmsimporter
client/tools/input
server
shared/input
|
@ -296,11 +296,13 @@ public class InterpreterInfoPanel extends ContentPanel {
|
|||
|
||||
}
|
||||
|
||||
FieldLabel interpreterPackagesLabel = new FieldLabel(null, "Packages");
|
||||
|
||||
|
||||
ToolBar toolBar = new ToolBar();
|
||||
toolBar.add(btnAdd, new BoxLayoutData(new Margins(0)));
|
||||
|
||||
FieldLabel interpreterPackagesLabel = new FieldLabel(toolBar, "Packages");
|
||||
|
||||
VerticalLayoutContainer vlc = new VerticalLayoutContainer();
|
||||
vlc.setAdjustForScroll(false);
|
||||
vlc.setScrollMode(ScrollMode.NONE);
|
||||
|
@ -311,7 +313,7 @@ public class InterpreterInfoPanel extends ContentPanel {
|
|||
vlc.add(interpreterPackagesLabel, new VerticalLayoutData(1, -1,
|
||||
new Margins(0)));
|
||||
|
||||
vlc.add(toolBar, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
//vlc.add(toolBar, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
vlc.add(gridInterpreterPackageInfo, new VerticalLayoutData(1, 1,
|
||||
new Margins(0)));
|
||||
|
||||
|
|
|
@ -63,6 +63,7 @@ public class ProjectInfoPanel extends ContentPanel {
|
|||
private EventBus eventBus;
|
||||
private TextField algorithmName;
|
||||
private TextField algorithmDescription;
|
||||
private TextField algorithmCategory;
|
||||
private ListStore<RequestedVRE> storeRequestedVRE;
|
||||
private Grid<RequestedVRE> gridRequestedVRE;
|
||||
private GridRowEditing<RequestedVRE> gridRequestedVREEditing;
|
||||
|
@ -94,6 +95,7 @@ public class ProjectInfoPanel extends ContentPanel {
|
|||
|
||||
private void create(Project project) {
|
||||
|
||||
//
|
||||
algorithmName = new TextField();
|
||||
algorithmName.setAllowBlank(false);
|
||||
algorithmName.addValidator(new RegExValidator("^[a-zA-Z0-9_]*$",
|
||||
|
@ -111,6 +113,7 @@ public class ProjectInfoPanel extends ContentPanel {
|
|||
FieldLabel nameLabel = new FieldLabel(algorithmName, "Name");
|
||||
nameLabel.setLabelWidth(LABAEL_WIDTH);
|
||||
|
||||
//
|
||||
algorithmDescription = new TextField();
|
||||
algorithmDescription.setAllowBlank(false);
|
||||
algorithmDescription.setEmptyText("Enter description...");
|
||||
|
@ -120,6 +123,15 @@ public class ProjectInfoPanel extends ContentPanel {
|
|||
"Description");
|
||||
descriptionLabel.setLabelWidth(LABAEL_WIDTH);
|
||||
|
||||
//
|
||||
algorithmCategory = new TextField();
|
||||
algorithmCategory.setAllowBlank(false);
|
||||
algorithmCategory.setEmptyText("Enter description...");
|
||||
algorithmCategory.addValidator(new RegExValidator("^[^\"]*$",
|
||||
"Attention character \" is not allowed"));
|
||||
FieldLabel categoryLabel = new FieldLabel(algorithmCategory, "Category");
|
||||
categoryLabel.setLabelWidth(LABAEL_WIDTH);
|
||||
|
||||
// Grid
|
||||
RequestedVREProperties props = GWT.create(RequestedVREProperties.class);
|
||||
|
||||
|
@ -152,6 +164,13 @@ public class ProjectInfoPanel extends ContentPanel {
|
|||
.getProjectInfo().getAlgorithmDescription());
|
||||
}
|
||||
|
||||
if (project.getInputData().getProjectInfo()
|
||||
.getAlgorithmCategory() != null) {
|
||||
algorithmCategory.setValue(project.getInputData()
|
||||
.getProjectInfo().getAlgorithmCategory());
|
||||
}
|
||||
|
||||
|
||||
if (project.getInputData().getProjectInfo().getListRequestedVRE() != null) {
|
||||
storeRequestedVRE.addAll(project.getInputData()
|
||||
.getProjectInfo().getListRequestedVRE());
|
||||
|
@ -305,21 +324,24 @@ public class ProjectInfoPanel extends ContentPanel {
|
|||
});
|
||||
|
||||
// /
|
||||
FieldLabel requestedVRELabel = new FieldLabel(null, "Requested VREs");
|
||||
requestedVRELabel.setLabelWidth(LABAEL_WIDTH);
|
||||
|
||||
|
||||
ToolBar toolBar = new ToolBar();
|
||||
toolBar.add(btnAdd, new BoxLayoutData(new Margins(0)));
|
||||
|
||||
FieldLabel requestedVRELabel = new FieldLabel(toolBar, "Requested VREs");
|
||||
requestedVRELabel.setLabelWidth(LABAEL_WIDTH);
|
||||
|
||||
VerticalLayoutContainer vlc = new VerticalLayoutContainer();
|
||||
vlc.setAdjustForScroll(false);
|
||||
vlc.setScrollMode(ScrollMode.NONE);
|
||||
|
||||
vlc.add(nameLabel, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
vlc.add(descriptionLabel, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
vlc.add(categoryLabel, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
vlc.add(requestedVRELabel,
|
||||
new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
vlc.add(toolBar, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
//vlc.add(toolBar, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
vlc.add(gridRequestedVRE, new VerticalLayoutData(1, 1, new Margins(0)));
|
||||
|
||||
add(vlc, new MarginData(new Margins(0)));
|
||||
|
@ -343,6 +365,12 @@ public class ProjectInfoPanel extends ContentPanel {
|
|||
} else {
|
||||
algorithmDescription.clear();
|
||||
}
|
||||
if (project.getInputData().getProjectInfo().getAlgorithmCategory() != null) {
|
||||
algorithmCategory.setValue(project.getInputData()
|
||||
.getProjectInfo().getAlgorithmCategory());
|
||||
} else {
|
||||
algorithmCategory.clear();
|
||||
}
|
||||
|
||||
if (project.getInputData().getProjectInfo().getListRequestedVRE() != null) {
|
||||
storeRequestedVRE.clear();
|
||||
|
@ -361,6 +389,7 @@ public class ProjectInfoPanel extends ContentPanel {
|
|||
} else {
|
||||
algorithmName.clear();
|
||||
algorithmDescription.clear();
|
||||
algorithmCategory.clear();
|
||||
storeRequestedVRE.clear();
|
||||
storeRequestedVRE.commitChanges();
|
||||
seq = 0;
|
||||
|
@ -393,9 +422,10 @@ public class ProjectInfoPanel extends ContentPanel {
|
|||
public ProjectInfo getProjectInfo() {
|
||||
String name = algorithmName.getCurrentValue();
|
||||
String description = algorithmDescription.getCurrentValue();
|
||||
String category = algorithmCategory.getCurrentValue();
|
||||
ArrayList<RequestedVRE> listRequestedVRE = new ArrayList<>(
|
||||
gridRequestedVRE.getStore().getAll());
|
||||
return new ProjectInfo(name, description, listRequestedVRE);
|
||||
return new ProjectInfo(name, description, category, listRequestedVRE);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,19 +114,32 @@ public class WPS4RParser {
|
|||
if (project.getInputData() == null) {
|
||||
ProjectInfo projectInfo = new ProjectInfo(
|
||||
wpsAlgorithmInfo.getAlgorithmName(),
|
||||
wpsAlgorithmInfo.getDescription(), null);
|
||||
wpsAlgorithmInfo.getDescription(), null, null);
|
||||
InputData inputData = new InputData(projectInfo, null, null,
|
||||
wpsAlgorithmInfo.getInputOutputVariables());
|
||||
project.setInputData(inputData);
|
||||
} else {
|
||||
InputData inputData = project.getInputData();
|
||||
ProjectInfo projectInfo = new ProjectInfo(
|
||||
wpsAlgorithmInfo.getAlgorithmName(),
|
||||
wpsAlgorithmInfo.getDescription(), null);
|
||||
inputData.setProjectInfo(projectInfo);
|
||||
inputData.setListInputOutputVariables(wpsAlgorithmInfo
|
||||
.getInputOutputVariables());
|
||||
inputData.setListGlobalVariables(null);
|
||||
if (project.getInputData().getProjectInfo() == null) {
|
||||
InputData inputData = project.getInputData();
|
||||
ProjectInfo projectInfo = new ProjectInfo(
|
||||
wpsAlgorithmInfo.getAlgorithmName(),
|
||||
wpsAlgorithmInfo.getDescription(), null, null);
|
||||
inputData.setProjectInfo(projectInfo);
|
||||
inputData.setListInputOutputVariables(wpsAlgorithmInfo
|
||||
.getInputOutputVariables());
|
||||
} else {
|
||||
InputData inputData = project.getInputData();
|
||||
ProjectInfo projectInfo = new ProjectInfo(
|
||||
wpsAlgorithmInfo.getAlgorithmName(),
|
||||
wpsAlgorithmInfo.getDescription(), project
|
||||
.getInputData().getProjectInfo()
|
||||
.getAlgorithmCategory(), project
|
||||
.getInputData().getProjectInfo()
|
||||
.getListRequestedVRE());
|
||||
inputData.setProjectInfo(projectInfo);
|
||||
inputData.setListInputOutputVariables(wpsAlgorithmInfo
|
||||
.getInputOutputVariables());
|
||||
}
|
||||
}
|
||||
return project;
|
||||
|
||||
|
|
|
@ -72,6 +72,4 @@ public class WPSAlgorithmInfo implements Serializable {
|
|||
+ ", inputOutputVariables=" + inputOutputVariables + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -81,6 +81,14 @@ public class InfoGenerator {
|
|||
} else {
|
||||
infos.add("Algorithm Description: ");
|
||||
}
|
||||
if (project.getInputData().getProjectInfo().getAlgorithmCategory() != null) {
|
||||
infos.add("Algorithm Category: "
|
||||
+ project.getInputData().getProjectInfo()
|
||||
.getAlgorithmCategory());
|
||||
} else {
|
||||
infos.add("Algorithm Category: ");
|
||||
}
|
||||
|
||||
infos.add("");
|
||||
|
||||
if (project.getInputData().getProjectInfo()
|
||||
|
|
|
@ -14,6 +14,7 @@ public class ProjectInfo implements Serializable {
|
|||
private static final long serialVersionUID = 7304965177776383842L;
|
||||
private String algorithmName;
|
||||
private String algorithmDescription;
|
||||
private String algorithmCategory;
|
||||
private ArrayList<RequestedVRE> listRequestedVRE;
|
||||
|
||||
public ProjectInfo() {
|
||||
|
@ -21,10 +22,11 @@ public class ProjectInfo implements Serializable {
|
|||
}
|
||||
|
||||
public ProjectInfo(String algorithmName, String algorithmDescription,
|
||||
ArrayList<RequestedVRE> listRequestedVRE) {
|
||||
String algorithmCategory, ArrayList<RequestedVRE> listRequestedVRE) {
|
||||
super();
|
||||
this.algorithmName = algorithmName;
|
||||
this.algorithmDescription = algorithmDescription;
|
||||
this.algorithmCategory = algorithmCategory;
|
||||
this.listRequestedVRE = listRequestedVRE;
|
||||
}
|
||||
|
||||
|
@ -52,6 +54,14 @@ public class ProjectInfo implements Serializable {
|
|||
this.algorithmDescription = algorithmDescription;
|
||||
}
|
||||
|
||||
public String getAlgorithmCategory() {
|
||||
return algorithmCategory;
|
||||
}
|
||||
|
||||
public void setAlgorithmCategory(String algorithmCategory) {
|
||||
this.algorithmCategory = algorithmCategory;
|
||||
}
|
||||
|
||||
public ArrayList<RequestedVRE> getListRequestedVRE() {
|
||||
return listRequestedVRE;
|
||||
}
|
||||
|
@ -64,9 +74,8 @@ public class ProjectInfo implements Serializable {
|
|||
public String toString() {
|
||||
return "ProjectInfo [algorithmName=" + algorithmName
|
||||
+ ", algorithmDescription=" + algorithmDescription
|
||||
+ ", algorithmCategory=" + algorithmCategory
|
||||
+ ", listRequestedVRE=" + listRequestedVRE + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue