Added NetCDF support and WorkspaceExplorerPaginated
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@158339 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a96e288843
commit
0da8ce43f8
|
@ -1,6 +1,6 @@
|
||||||
<ReleaseNotes>
|
<ReleaseNotes>
|
||||||
<Changeset component="org.gcube.portlets-user.data-miner-manager.1-6-0"
|
<Changeset component="org.gcube.portlets-user.data-miner-manager.1-6-0"
|
||||||
date="2016-08-01">
|
date="2016-11-09">
|
||||||
<Change>Updated to support pagination in Workspace Explorer [ticket #9114]</Change>
|
<Change>Updated to support pagination in Workspace Explorer [ticket #9114]</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.portlets-user.data-miner-manager.1-5-0"
|
<Changeset component="org.gcube.portlets-user.data-miner-manager.1-5-0"
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -275,7 +275,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.widgets</groupId>
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
<artifactId>workspace-explorer</artifactId>
|
<artifactId>workspace-explorer</artifactId>
|
||||||
<version>[1.4.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
<version>[1.6.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||||
<!-- <version>1.6.0-SNAPSHOT</version> -->
|
<!-- <version>1.6.0-SNAPSHOT</version> -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,13 @@ package org.gcube.portlets.user.dataminermanager.client.computations;
|
||||||
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValueFile;
|
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationValueFile;
|
||||||
|
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent;
|
||||||
|
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent.SelectVariableEventHandler;
|
||||||
|
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.widgets.NetCDFPreviewDialog;
|
||||||
|
|
||||||
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
||||||
|
import com.sencha.gxt.core.client.dom.XDOM;
|
||||||
import com.sencha.gxt.core.client.util.Margins;
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||||
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
||||||
|
@ -58,9 +63,47 @@ public class ComputationValueFilePanel extends SimpleContainer {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
TextButton netcdfButton = new TextButton("");
|
||||||
|
netcdfButton.setIcon(DataMinerManager.resources.netcdf());
|
||||||
|
netcdfButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
showNetCDFFile();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
lc.add(downloadBtn, new VerticalLayoutData(-1, -1, new Margins(0)));
|
lc.add(downloadBtn, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
|
if (computationValueFile.isNetcdf()) {
|
||||||
|
lc.add(netcdfButton, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
|
}
|
||||||
add(lc);
|
add(lc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void showNetCDFFile() {
|
||||||
|
if (computationValueFile != null && computationValueFile.getValue() != null && !computationValueFile.getValue().isEmpty()
|
||||||
|
&& computationValueFile.isNetcdf()) {
|
||||||
|
GWT.log("NetcdfBasicWidgetsManager");
|
||||||
|
|
||||||
|
// Example
|
||||||
|
SelectVariableEventHandler handler = new SelectVariableEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResponse(SelectVariableEvent event) {
|
||||||
|
GWT.log("SelectVariable Response: " + event);
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
NetCDFPreviewDialog netcdfDialog = new NetCDFPreviewDialog(computationValueFile.getValue());
|
||||||
|
netcdfDialog.addSelectVariableEventHandler(handler);
|
||||||
|
netcdfDialog.setZIndex(XDOM.getTopZIndex());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,8 +59,8 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
||||||
|
|
||||||
private Item selectedItem;
|
private Item selectedItem;
|
||||||
private MultipleDNDUpload dnd;
|
private MultipleDNDUpload dnd;
|
||||||
// private WorkspaceResourcesExplorerPanel ;
|
|
||||||
private WorkspaceResourcesExplorerPanelPaginated wsResourcesExplorerPanel;
|
private WorkspaceResourcesExplorerPanelPaginated wsResourcesExplorerPanel;
|
||||||
|
// private WorkspaceResourcesExplorerPanel wsResourcesExplorerPanel;
|
||||||
private TextButton btnShow;
|
private TextButton btnShow;
|
||||||
private TextButton btnDownload;
|
private TextButton btnDownload;
|
||||||
private TextButton btnDelete;
|
private TextButton btnDelete;
|
||||||
|
@ -432,7 +432,8 @@ public class ComputationsExecutedPanel extends FramedPanel {
|
||||||
private void refreshWSResourceExplorerPanel() {
|
private void refreshWSResourceExplorerPanel() {
|
||||||
if (wsResourcesExplorerPanel != null) {
|
if (wsResourcesExplorerPanel != null) {
|
||||||
try {
|
try {
|
||||||
wsResourcesExplorerPanel.hardRefresh();
|
// wsResourcesExplorerPanel.hardRefresh();
|
||||||
|
wsResourcesExplorerPanel.refreshRootFolderView();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.error("Error retrieving data: " + e.getLocalizedMessage());
|
Log.error("Error retrieving data: " + e.getLocalizedMessage());
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ public class InputDataSetsPanel extends FramedPanel {
|
||||||
private Item selectedItem;
|
private Item selectedItem;
|
||||||
private MultipleDNDUpload dnd;
|
private MultipleDNDUpload dnd;
|
||||||
private WorkspaceResourcesExplorerPanelPaginated wsResourcesExplorerPanel;
|
private WorkspaceResourcesExplorerPanelPaginated wsResourcesExplorerPanel;
|
||||||
|
//private WorkspaceResourcesExplorerPanel wsResourcesExplorerPanel;
|
||||||
private TextButton btnDownload;
|
private TextButton btnDownload;
|
||||||
private TextButton btnDelete;
|
private TextButton btnDelete;
|
||||||
private TextButton btnRefresh;
|
private TextButton btnRefresh;
|
||||||
|
@ -364,9 +365,9 @@ public class InputDataSetsPanel extends FramedPanel {
|
||||||
|
|
||||||
private void refreshWSResourceExplorerPanel() {
|
private void refreshWSResourceExplorerPanel() {
|
||||||
if (wsResourcesExplorerPanel != null) {
|
if (wsResourcesExplorerPanel != null) {
|
||||||
// wsResourcesExplorerPanel.refreshRootFolderView();
|
|
||||||
try {
|
try {
|
||||||
wsResourcesExplorerPanel.hardRefresh();
|
//wsResourcesExplorerPanel.hardRefresh();
|
||||||
|
wsResourcesExplorerPanel.refreshRootFolderView();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.error("Error retrieving data: " + e.getLocalizedMessage());
|
Log.error("Error retrieving data: " + e.getLocalizedMessage());
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,9 @@ public class OutputDataSetsPanel extends FramedPanel {
|
||||||
|
|
||||||
private Item selectedItem;
|
private Item selectedItem;
|
||||||
private MultipleDNDUpload dnd;
|
private MultipleDNDUpload dnd;
|
||||||
|
|
||||||
private WorkspaceResourcesExplorerPanelPaginated wsResourcesExplorerPanel;
|
private WorkspaceResourcesExplorerPanelPaginated wsResourcesExplorerPanel;
|
||||||
|
// private WorkspaceResourcesExplorerPanel wsResourcesExplorerPanel;
|
||||||
private TextButton btnDownload;
|
private TextButton btnDownload;
|
||||||
private TextButton btnDelete;
|
private TextButton btnDelete;
|
||||||
private TextButton btnRefresh;
|
private TextButton btnRefresh;
|
||||||
|
@ -361,9 +363,10 @@ public class OutputDataSetsPanel extends FramedPanel {
|
||||||
|
|
||||||
private void refreshWSResourceExplorerPanel() {
|
private void refreshWSResourceExplorerPanel() {
|
||||||
if (wsResourcesExplorerPanel != null) {
|
if (wsResourcesExplorerPanel != null) {
|
||||||
// wsResourcesExplorerPanel.refreshRootFolderView();
|
|
||||||
try {
|
try {
|
||||||
wsResourcesExplorerPanel.hardRefresh();
|
wsResourcesExplorerPanel.refreshRootFolderView();
|
||||||
|
|
||||||
|
// wsResourcesExplorerPanel.hardRefresh();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.error("Error retrieving data: " + e.getLocalizedMessage());
|
Log.error("Error retrieving data: " + e.getLocalizedMessage());
|
||||||
|
|
||||||
|
|
|
@ -70,10 +70,10 @@ public class OperatorsPanel extends FramedPanel {
|
||||||
private View view = null;
|
private View view = null;
|
||||||
private String currentClassificationName = Constants.UserClassificationName;
|
private String currentClassificationName = Constants.UserClassificationName;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param handler operators panel handler
|
* @param handler
|
||||||
|
* operators panel handler
|
||||||
*/
|
*/
|
||||||
public OperatorsPanel(OperatorsPanelHandler handler) {
|
public OperatorsPanel(OperatorsPanelHandler handler) {
|
||||||
super();
|
super();
|
||||||
|
@ -92,85 +92,78 @@ public class OperatorsPanel extends FramedPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void bind() {
|
private void bind() {
|
||||||
EventBusProvider.INSTANCE
|
EventBusProvider.INSTANCE.addHandler(OperatorsClassificationEvent.TYPE,
|
||||||
.addHandler(
|
new OperatorsClassificationEvent.OperatorsClassificationEventHandler() {
|
||||||
OperatorsClassificationEvent.TYPE,
|
|
||||||
new OperatorsClassificationEvent.OperatorsClassificationEventHandler() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onOperatorsClassification(
|
public void onOperatorsClassification(OperatorsClassificationEvent event) {
|
||||||
OperatorsClassificationEvent event) {
|
Log.debug("OperatorsPanel catch OperatorsClassificationEvent: " + event);
|
||||||
Log.debug("OperatorsPanel catch OperatorsClassificationEvent: "
|
manageOperatorsClassificationEvent(event);
|
||||||
+ event);
|
}
|
||||||
manageOperatorsClassificationEvent(event);
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void manageOperatorsClassificationEvent(
|
private void manageOperatorsClassificationEvent(OperatorsClassificationEvent event) {
|
||||||
OperatorsClassificationEvent event) {
|
try {
|
||||||
if (event.getOperatorsClassificationRequestType().compareTo(
|
|
||||||
OperatorsClassificationRequestType.ByName) == 0) {
|
|
||||||
if (currentClassificationName.compareTo(event
|
|
||||||
.getClassificationName()) == 0) {
|
|
||||||
waitMessage(false);
|
|
||||||
if (event.getOperatorsClassification() != null) {
|
|
||||||
operatorsClassification = event
|
|
||||||
.getOperatorsClassification();
|
|
||||||
operators.clear();
|
|
||||||
operators.addAll(event.getOperatorsClassification()
|
|
||||||
.getOperators());
|
|
||||||
String operatorId = event.getOperatorId();
|
|
||||||
|
|
||||||
Log.debug("ShowCategoriesList");
|
if (event.getOperatorsClassificationRequestType()
|
||||||
List<OperatorCategoryPanel> categoryPanels = mapCategoriesPanels
|
.compareTo(OperatorsClassificationRequestType.ByName) == 0) {
|
||||||
.get(currentClassificationName);
|
if (currentClassificationName.compareTo(event.getClassificationName()) == 0) {
|
||||||
if (categoryPanels == null) {
|
waitMessage(false);
|
||||||
categoryPanels = new ArrayList<OperatorCategoryPanel>();
|
if (event.getOperatorsClassification() != null) {
|
||||||
if (operatorsClassification != null) {
|
operatorsClassification = event.getOperatorsClassification();
|
||||||
for (OperatorCategory cat : operatorsClassification
|
operators.clear();
|
||||||
.getOperatorCategories()) {
|
operators.addAll(event.getOperatorsClassification().getOperators());
|
||||||
categoryPanels.add(new OperatorCategoryPanel(
|
String operatorId = event.getOperatorId();
|
||||||
handler, cat));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mapCategoriesPanels.put(currentClassificationName,
|
|
||||||
categoryPanels);
|
|
||||||
}
|
|
||||||
|
|
||||||
v.clear();
|
Log.debug("ShowCategoriesList");
|
||||||
for (OperatorCategoryPanel panel : categoryPanels){
|
List<OperatorCategoryPanel> categoryPanels = mapCategoriesPanels.get(currentClassificationName);
|
||||||
v.add(panel);
|
if (categoryPanels == null) {
|
||||||
|
categoryPanels = new ArrayList<OperatorCategoryPanel>();
|
||||||
}
|
if (operatorsClassification != null) {
|
||||||
view = View.CATEGORIES;
|
for (OperatorCategory cat : operatorsClassification.getOperatorCategories()) {
|
||||||
if(operatorId!=null&&!operatorId.isEmpty()){
|
categoryPanels.add(new OperatorCategoryPanel(handler, cat));
|
||||||
OperatorCategory operatorCategoryDefault=null;
|
}
|
||||||
Operator operatorDefault=null;
|
|
||||||
for(Operator op:operators){
|
|
||||||
if(op.getId().compareTo(operatorId)==0){
|
|
||||||
operatorDefault=op;
|
|
||||||
operatorCategoryDefault=op.getCategory();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
mapCategoriesPanels.put(currentClassificationName, categoryPanels);
|
||||||
}
|
}
|
||||||
if(operatorCategoryDefault!=null){
|
|
||||||
for (OperatorCategoryPanel opCategoryPanel : categoryPanels){
|
v.clear();
|
||||||
if(opCategoryPanel.getCategory().compareTo(operatorCategoryDefault)==0){
|
for (OperatorCategoryPanel panel : categoryPanels) {
|
||||||
opCategoryPanel.setOperatorDefault(operatorDefault);
|
v.add(panel);
|
||||||
|
|
||||||
|
}
|
||||||
|
view = View.CATEGORIES;
|
||||||
|
if (operatorId != null && !operatorId.isEmpty()) {
|
||||||
|
OperatorCategory operatorCategoryDefault = null;
|
||||||
|
Operator operatorDefault = null;
|
||||||
|
for (Operator op : operators) {
|
||||||
|
if (op.getId().compareTo(operatorId) == 0) {
|
||||||
|
operatorDefault = op;
|
||||||
|
operatorCategoryDefault = op.getCategory();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
if (operatorCategoryDefault != null) {
|
||||||
|
for (OperatorCategoryPanel opCategoryPanel : categoryPanels) {
|
||||||
|
if (opCategoryPanel.getCategory().compareTo(operatorCategoryDefault) == 0) {
|
||||||
}
|
opCategoryPanel.setOperatorDefault(operatorDefault);
|
||||||
|
break;
|
||||||
forceLayout();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
forceLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (Throwable e) {
|
||||||
|
Log.error("Error in OperatorsPanel: " + e.getLocalizedMessage(), e);
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -189,8 +182,7 @@ public class OperatorsPanel extends FramedPanel {
|
||||||
OperatorsClassificationRequestEvent operatorsClassificationRequestEvent = new OperatorsClassificationRequestEvent(
|
OperatorsClassificationRequestEvent operatorsClassificationRequestEvent = new OperatorsClassificationRequestEvent(
|
||||||
currentClassificationName, true);
|
currentClassificationName, true);
|
||||||
Log.debug("OperatorsPanel fire: " + operatorsClassificationRequestEvent);
|
Log.debug("OperatorsPanel fire: " + operatorsClassificationRequestEvent);
|
||||||
EventBusProvider.INSTANCE
|
EventBusProvider.INSTANCE.fireEvent(operatorsClassificationRequestEvent);
|
||||||
.fireEvent(operatorsClassificationRequestEvent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -202,8 +194,7 @@ public class OperatorsPanel extends FramedPanel {
|
||||||
final StoreFilterField<String> filterField = new StoreFilterField<String>() {
|
final StoreFilterField<String> filterField = new StoreFilterField<String>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean doSelect(Store<String> store, String parent,
|
protected boolean doSelect(Store<String> store, String parent, String item, String filter) {
|
||||||
String item, String filter) {
|
|
||||||
Log.debug("StoreFilterField: " + item + " " + filter);
|
Log.debug("StoreFilterField: " + item + " " + filter);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -228,18 +219,16 @@ public class OperatorsPanel extends FramedPanel {
|
||||||
filterField.setWidth(100);
|
filterField.setWidth(100);
|
||||||
|
|
||||||
TextButton showAllOperatorsButton = new TextButton();
|
TextButton showAllOperatorsButton = new TextButton();
|
||||||
showAllOperatorsButton.setIcon(DataMinerManager.resources
|
showAllOperatorsButton.setIcon(DataMinerManager.resources.sortAscending());
|
||||||
.sortAscending());
|
showAllOperatorsButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
showAllOperatorsButton
|
|
||||||
.addSelectHandler(new SelectEvent.SelectHandler() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
filterField.clear();
|
filterField.clear();
|
||||||
showAllOperatorsList();
|
showAllOperatorsList();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
showAllOperatorsButton.setToolTip(SHOW_ALL_OPERATORS_TOOLTIP);
|
showAllOperatorsButton.setToolTip(SHOW_ALL_OPERATORS_TOOLTIP);
|
||||||
|
|
||||||
TextButton showCategoriesButton = new TextButton();
|
TextButton showCategoriesButton = new TextButton();
|
||||||
|
@ -256,18 +245,15 @@ public class OperatorsPanel extends FramedPanel {
|
||||||
|
|
||||||
showCategoriesButton.setToolTip(SHOW_CATEGORIES_TOOLTIP);
|
showCategoriesButton.setToolTip(SHOW_CATEGORIES_TOOLTIP);
|
||||||
|
|
||||||
final TextButton btnMenuPerspective = new TextButton(
|
final TextButton btnMenuPerspective = new TextButton(currentClassificationName);
|
||||||
currentClassificationName);
|
btnMenuPerspective.setIcon(DataMinerManager.resources.userPerspective());
|
||||||
btnMenuPerspective
|
|
||||||
.setIcon(DataMinerManager.resources.userPerspective());
|
|
||||||
|
|
||||||
Menu menuPerspective = new Menu();
|
Menu menuPerspective = new Menu();
|
||||||
|
|
||||||
for (final String perspectiveName : Constants.ClassificationNames) {
|
for (final String perspectiveName : Constants.ClassificationNames) {
|
||||||
final ImageResource img = perspectiveName
|
final ImageResource img = perspectiveName.equals(Constants.UserClassificationName)
|
||||||
.equals(Constants.UserClassificationName) ? DataMinerManager.resources
|
? DataMinerManager.resources.userPerspective()
|
||||||
.userPerspective() : DataMinerManager.resources
|
: DataMinerManager.resources.computationPerspective();
|
||||||
.computationPerspective();
|
|
||||||
MenuItem perspectiveItem = new MenuItem(perspectiveName);
|
MenuItem perspectiveItem = new MenuItem(perspectiveName);
|
||||||
perspectiveItem.addSelectionHandler(new SelectionHandler<Item>() {
|
perspectiveItem.addSelectionHandler(new SelectionHandler<Item>() {
|
||||||
|
|
||||||
|
@ -307,16 +293,14 @@ public class OperatorsPanel extends FramedPanel {
|
||||||
List<String> ids = new ArrayList<String>();
|
List<String> ids = new ArrayList<String>();
|
||||||
for (Operator op : operators)
|
for (Operator op : operators)
|
||||||
// check for filtering and prevent duplicates
|
// check for filtering and prevent duplicates
|
||||||
if (op.getName().toLowerCase().contains(searchText.toLowerCase())
|
if (op.getName().toLowerCase().contains(searchText.toLowerCase()) && !ids.contains(op.getId())) {
|
||||||
&& !ids.contains(op.getId())) {
|
|
||||||
filteredOperators.add(op);
|
filteredOperators.add(op);
|
||||||
ids.add(op.getId());
|
ids.add(op.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
v.clear();
|
v.clear();
|
||||||
|
|
||||||
HTML html = new HTML("Filtered results <span class='counter'>("
|
HTML html = new HTML("Filtered results <span class='counter'>(" + filteredOperators.size() + " item"
|
||||||
+ filteredOperators.size() + " item"
|
|
||||||
+ (filteredOperators.size() == 1 ? "" : "s") + " found)</span>");
|
+ (filteredOperators.size() == 1 ? "" : "s") + " found)</span>");
|
||||||
html.addStyleName("filterResultText");
|
html.addStyleName("filterResultText");
|
||||||
v.add(html);
|
v.add(html);
|
||||||
|
@ -333,19 +317,15 @@ public class OperatorsPanel extends FramedPanel {
|
||||||
try {
|
try {
|
||||||
if (force || view != View.CATEGORIES) {
|
if (force || view != View.CATEGORIES) {
|
||||||
Log.debug("ShowCategoriesList");
|
Log.debug("ShowCategoriesList");
|
||||||
List<OperatorCategoryPanel> categoryPanels = mapCategoriesPanels
|
List<OperatorCategoryPanel> categoryPanels = mapCategoriesPanels.get(currentClassificationName);
|
||||||
.get(currentClassificationName);
|
|
||||||
if (categoryPanels == null) {
|
if (categoryPanels == null) {
|
||||||
categoryPanels = new ArrayList<OperatorCategoryPanel>();
|
categoryPanels = new ArrayList<OperatorCategoryPanel>();
|
||||||
if (operatorsClassification != null) {
|
if (operatorsClassification != null) {
|
||||||
for (OperatorCategory cat : operatorsClassification
|
for (OperatorCategory cat : operatorsClassification.getOperatorCategories()) {
|
||||||
.getOperatorCategories()) {
|
categoryPanels.add(new OperatorCategoryPanel(handler, cat));
|
||||||
categoryPanels.add(new OperatorCategoryPanel(
|
|
||||||
handler, cat));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mapCategoriesPanels.put(currentClassificationName,
|
mapCategoriesPanels.put(currentClassificationName, categoryPanels);
|
||||||
categoryPanels);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
v.clear();
|
v.clear();
|
||||||
|
@ -364,8 +344,7 @@ public class OperatorsPanel extends FramedPanel {
|
||||||
if (view != View.ALL) {
|
if (view != View.ALL) {
|
||||||
v.clear();
|
v.clear();
|
||||||
|
|
||||||
HTML html = new HTML("All Operators <span class='counter'>("
|
HTML html = new HTML("All Operators <span class='counter'>(" + operators.size() + " item"
|
||||||
+ operators.size() + " item"
|
|
||||||
+ (operators.size() == 1 ? "" : "s") + " found)</span>");
|
+ (operators.size() == 1 ? "" : "s") + " found)</span>");
|
||||||
html.addStyleName("filterResultText");
|
html.addStyleName("filterResultText");
|
||||||
v.add(html);
|
v.add(html);
|
||||||
|
|
|
@ -3,8 +3,13 @@ package org.gcube.portlets.user.dataminermanager.client.widgets;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
import org.gcube.portlets.user.dataminermanager.shared.data.computations.ComputationId;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.data.output.FileResource;
|
import org.gcube.portlets.user.dataminermanager.shared.data.output.FileResource;
|
||||||
|
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent;
|
||||||
|
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.event.SelectVariableEvent.SelectVariableEventHandler;
|
||||||
|
import org.gcube.portlets.widgets.netcdfbasicwidgets.client.widgets.NetCDFPreviewDialog;
|
||||||
|
|
||||||
|
import com.google.gwt.core.shared.GWT;
|
||||||
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
||||||
|
import com.sencha.gxt.core.client.dom.XDOM;
|
||||||
import com.sencha.gxt.core.client.util.Margins;
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||||
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
||||||
|
@ -59,8 +64,43 @@ public class FileViewer extends SimpleContainer {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
TextButton netcdfButton = new TextButton("");
|
||||||
|
netcdfButton.setIcon(DataMinerManager.resources.netcdf());
|
||||||
|
netcdfButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
showNetCDFFile();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
lc.add(downloadBtn, new VerticalLayoutData(-1, -1, new Margins(0)));
|
lc.add(downloadBtn, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
|
if (fileResource.isNetcdf()) {
|
||||||
|
lc.add(netcdfButton, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
|
}
|
||||||
add(lc);
|
add(lc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showNetCDFFile() {
|
||||||
|
if (fileResource != null && fileResource.getUrl() != null && !fileResource.getUrl().isEmpty()
|
||||||
|
&& fileResource.isNetcdf()) {
|
||||||
|
GWT.log("NetcdfBasicWidgetsManager");
|
||||||
|
|
||||||
|
// Example
|
||||||
|
SelectVariableEventHandler handler = new SelectVariableEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResponse(SelectVariableEvent event) {
|
||||||
|
GWT.log("SelectVariable Response: " + event);
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
NetCDFPreviewDialog netcdfDialog = new NetCDFPreviewDialog(fileResource.getUrl());
|
||||||
|
netcdfDialog.addSelectVariableEventHandler(handler);
|
||||||
|
netcdfDialog.setZIndex(XDOM.getTopZIndex());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,9 @@
|
||||||
<!-- <inherits name='com.google.gwt.user.theme.clean.Clean' /> -->
|
<!-- <inherits name='com.google.gwt.user.theme.clean.Clean' /> -->
|
||||||
<inherits name='com.sencha.gxt.ui.GXT' />
|
<inherits name='com.sencha.gxt.ui.GXT' />
|
||||||
<!-- <inherits name="com.extjs.gxt.ui.GXT" /> -->
|
<!-- <inherits name="com.extjs.gxt.ui.GXT" /> -->
|
||||||
|
|
||||||
<!-- <inherits name="com.google.gwt.logging.Logging" /> -->
|
<!--
|
||||||
|
<inherits name="com.google.gwt.logging.Logging" /> -->
|
||||||
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
||||||
|
|
||||||
<!-- Debug CSS style
|
<!-- Debug CSS style
|
||||||
|
@ -36,18 +37,19 @@
|
||||||
|
|
||||||
<entry-point
|
<entry-point
|
||||||
class='org.gcube.portlets.user.dataminermanager.client.DataMinerManager' />
|
class='org.gcube.portlets.user.dataminermanager.client.DataMinerManager' />
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
|
<set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
|
||||||
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
|
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
|
||||||
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
|
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
|
||||||
/> -->
|
/> -->
|
||||||
|
|
||||||
|
|
||||||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||||
<set-property name="log_DivLogger" value="DISABLED" />
|
<set-property name="log_DivLogger" value="DISABLED" />
|
||||||
<set-property name="log_GWTLogger" value="DISABLED" />
|
<set-property name="log_GWTLogger" value="DISABLED" />
|
||||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
<set-property name="log_SystemLogger" value="DISABLED" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<source path='client' />
|
<source path='client' />
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -34,6 +34,12 @@ import org.gcube.portlets.user.dataminermanager.shared.parameters.WKTParameter;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class WPS2DM {
|
public class WPS2DM {
|
||||||
private final static String SEPARATOR = "|";
|
private final static String SEPARATOR = "|";
|
||||||
|
|
||||||
|
@ -81,7 +87,7 @@ public class WPS2DM {
|
||||||
* @param maxOcc
|
* @param maxOcc
|
||||||
* max occurences
|
* max occurences
|
||||||
* @param rangeOccs
|
* @param rangeOccs
|
||||||
* range occurences
|
* range occurrences
|
||||||
* @param defaultValue
|
* @param defaultValue
|
||||||
* default value
|
* default value
|
||||||
* @param id
|
* @param id
|
||||||
|
@ -292,6 +298,7 @@ public class WPS2DM {
|
||||||
} else {
|
} else {
|
||||||
if (title.contains("[a http link to a file")) {
|
if (title.contains("[a http link to a file")) {
|
||||||
if (title.contains("[NETCDF]")) {
|
if (title.contains("[NETCDF]")) {
|
||||||
|
title.replaceFirst("[NETCDF]", "");
|
||||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, true);
|
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, true);
|
||||||
} else {
|
} else {
|
||||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
|
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
|
||||||
|
@ -316,6 +323,7 @@ public class WPS2DM {
|
||||||
supportedMimeTypes);
|
supportedMimeTypes);
|
||||||
} else {
|
} else {
|
||||||
if (title.contains("[NETCDF]")) {
|
if (title.contains("[NETCDF]")) {
|
||||||
|
title.replaceFirst("[NETCDF]", "");
|
||||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, true);
|
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, true);
|
||||||
} else {
|
} else {
|
||||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
|
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
|
||||||
|
@ -323,18 +331,19 @@ public class WPS2DM {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (title.contains("[NETCDF]")) {
|
if (title.contains("[NETCDF]")) {
|
||||||
|
title.replaceFirst("[NETCDF]", "");
|
||||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, true);
|
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, true);
|
||||||
} else {
|
} else {
|
||||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes,false);
|
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes,false);
|
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
converted = new FileParameter(id, title, mimeType, supportedMimeTypes,false);
|
converted = new FileParameter(id, title, mimeType, supportedMimeTypes, false);
|
||||||
}
|
}
|
||||||
return converted;
|
return converted;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,14 +22,12 @@ import org.slf4j.LoggerFactory;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ComputationValueBuilder {
|
public class ComputationValueBuilder {
|
||||||
private static Logger logger = LoggerFactory
|
private static Logger logger = LoggerFactory.getLogger(ComputationValueBuilder.class);
|
||||||
.getLogger(ComputationValueBuilder.class);
|
|
||||||
|
|
||||||
private ArrayList<ComputationItemPropertiesValue> valueParameters;
|
private ArrayList<ComputationItemPropertiesValue> valueParameters;
|
||||||
private LinkedHashMap<String, ComputationValue> computationsValueParameters;
|
private LinkedHashMap<String, ComputationValue> computationsValueParameters;
|
||||||
|
|
||||||
public ComputationValueBuilder(
|
public ComputationValueBuilder(ArrayList<ComputationItemPropertiesValue> valueParameters) {
|
||||||
ArrayList<ComputationItemPropertiesValue> valueParameters) {
|
|
||||||
this.valueParameters = valueParameters;
|
this.valueParameters = valueParameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,21 +40,17 @@ public class ComputationValueBuilder {
|
||||||
if (valueParameters != null && !valueParameters.isEmpty()) {
|
if (valueParameters != null && !valueParameters.isEmpty()) {
|
||||||
for (ComputationItemPropertiesValue valueParameter : valueParameters) {
|
for (ComputationItemPropertiesValue valueParameter : valueParameters) {
|
||||||
String value = valueParameter.getValue();
|
String value = valueParameter.getValue();
|
||||||
if (value != null && !value.isEmpty()
|
if (value != null && !value.isEmpty() && value.startsWith("http")) {
|
||||||
&& value.startsWith("http")) {
|
|
||||||
if (value.contains("|")) {
|
if (value.contains("|")) {
|
||||||
ComputationValue valueFileList = createComputationValueFileList(value);
|
ComputationValue valueFileList = createComputationValueFileList(value);
|
||||||
computationsValueParameters.put(
|
computationsValueParameters.put(valueParameter.getKey(), valueFileList);
|
||||||
valueParameter.getKey(), valueFileList);
|
|
||||||
} else {
|
} else {
|
||||||
ComputationValue computationValue = retrieveFileName(value);
|
ComputationValue computationValue = retrieveFileName(value);
|
||||||
computationsValueParameters.put(
|
computationsValueParameters.put(valueParameter.getKey(), computationValue);
|
||||||
valueParameter.getKey(), computationValue);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ComputationValue valueString = new ComputationValue(value);
|
ComputationValue valueString = new ComputationValue(value);
|
||||||
computationsValueParameters.put(valueParameter.getKey(),
|
computationsValueParameters.put(valueParameter.getKey(), valueString);
|
||||||
valueString);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,8 +72,7 @@ public class ComputationValueBuilder {
|
||||||
}
|
}
|
||||||
computationValue = retrieveFileName(value);
|
computationValue = retrieveFileName(value);
|
||||||
fileList.add(computationValue);
|
fileList.add(computationValue);
|
||||||
ComputationValueFileList computationValueFileList = new ComputationValueFileList(
|
ComputationValueFileList computationValueFileList = new ComputationValueFileList(fileList, "|");
|
||||||
fileList, "|");
|
|
||||||
return computationValueFileList;
|
return computationValueFileList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -96,7 +89,7 @@ public class ComputationValueBuilder {
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Retrieve File Name: " + e.getLocalizedMessage());
|
logger.error("Retrieve File Name: " + e.getLocalizedMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return new ComputationValueFile(value, null, null);
|
return new ComputationValueFile(value, null, null, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,11 +137,14 @@ public class ComputationValueBuilder {
|
||||||
mimeType = conn.getContentType();
|
mimeType = conn.getContentType();
|
||||||
if ((mimeType != null && mimeType.compareToIgnoreCase("image/png") == 0)
|
if ((mimeType != null && mimeType.compareToIgnoreCase("image/png") == 0)
|
||||||
|| fileName != null && fileName.endsWith(".png")) {
|
|| fileName != null && fileName.endsWith(".png")) {
|
||||||
computationValue = new ComputationValueImage(value, fileName,
|
computationValue = new ComputationValueImage(value, fileName, mimeType);
|
||||||
mimeType);
|
|
||||||
} else {
|
} else {
|
||||||
computationValue = new ComputationValueFile(value, fileName,
|
if ((mimeType != null && mimeType.compareToIgnoreCase("application/x-netcdf") == 0)
|
||||||
mimeType);
|
|| fileName != null && fileName.endsWith(".nc")) {
|
||||||
|
computationValue = new ComputationValueFile(value, fileName, mimeType, true);
|
||||||
|
} else {
|
||||||
|
computationValue = new ComputationValueFile(value, fileName, mimeType, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return computationValue;
|
return computationValue;
|
||||||
|
|
|
@ -11,15 +11,17 @@ public class ComputationValueFile extends ComputationValue {
|
||||||
|
|
||||||
private String fileName;
|
private String fileName;
|
||||||
private String mimeType;
|
private String mimeType;
|
||||||
|
private boolean netcdf;
|
||||||
|
|
||||||
public ComputationValueFile() {
|
public ComputationValueFile() {
|
||||||
super(ComputationValueType.File);
|
super(ComputationValueType.File);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ComputationValueFile(String url, String fileName, String mimeType) {
|
public ComputationValueFile(String url, String fileName, String mimeType, boolean netcdf) {
|
||||||
super(ComputationValueType.File, url);
|
super(ComputationValueType.File, url);
|
||||||
this.fileName = fileName;
|
this.fileName = fileName;
|
||||||
this.mimeType = mimeType;
|
this.mimeType = mimeType;
|
||||||
|
this.netcdf = netcdf;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFileName() {
|
public String getFileName() {
|
||||||
|
@ -38,12 +40,17 @@ public class ComputationValueFile extends ComputationValue {
|
||||||
this.mimeType = mimeType;
|
this.mimeType = mimeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public boolean isNetcdf() {
|
||||||
public String toString() {
|
return netcdf;
|
||||||
return "ComputationValueFile [fileName=" + fileName + ", mimeType="
|
|
||||||
+ mimeType + ", type=" + type + ", value=" + value + "]";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setNetcdf(boolean netcdf) {
|
||||||
|
this.netcdf = netcdf;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ComputationValueFile [fileName=" + fileName + ", mimeType=" + mimeType + ", netcdf=" + netcdf + "]";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ public class FileResource extends Resource {
|
||||||
|
|
||||||
private String url;
|
private String url;
|
||||||
private String mimeType;
|
private String mimeType;
|
||||||
|
private boolean netcdf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -39,11 +40,15 @@ public class FileResource extends Resource {
|
||||||
* url
|
* url
|
||||||
* @param mimeType
|
* @param mimeType
|
||||||
* mime type
|
* mime type
|
||||||
|
* @param netcdf
|
||||||
|
* netcdf
|
||||||
*/
|
*/
|
||||||
public FileResource(String resourceId, String name, String description, String url, String mimeType) {
|
public FileResource(String resourceId, String name, String description, String url, String mimeType,
|
||||||
|
boolean netcdf) {
|
||||||
super(resourceId, name, description, ResourceType.FILE);
|
super(resourceId, name, description, ResourceType.FILE);
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.mimeType = mimeType;
|
this.mimeType = mimeType;
|
||||||
|
this.netcdf = netcdf;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -76,11 +81,31 @@ public class FileResource extends Resource {
|
||||||
this.mimeType = mimeType;
|
this.mimeType = mimeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return true if is NetCDF file
|
||||||
|
*/
|
||||||
|
public boolean isNetcdf() {
|
||||||
|
return netcdf;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param netcdf
|
||||||
|
* true if is NetCDF file
|
||||||
|
*/
|
||||||
|
public void setNetcdf(boolean netcdf) {
|
||||||
|
this.netcdf = netcdf;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "FileResource [url=" + url + ", mimeType=" + mimeType + ", getResourceId()=" + getResourceId()
|
return "FileResource [url=" + url + ", mimeType=" + mimeType + ", netcdf=" + netcdf + ", getResourceId()="
|
||||||
+ ", getName()=" + getName() + ", getDescription()=" + getDescription() + ", getResourceType()="
|
+ getResourceId() + ", getName()=" + getName() + ", getDescription()=" + getDescription()
|
||||||
+ getResourceType() + "]";
|
+ ", getResourceType()=" + getResourceType() + ", isTabular()=" + isTabular() + ", isObject()="
|
||||||
|
+ isObject() + ", isFile()=" + isFile() + ", isMap()=" + isMap() + ", isImages()=" + isImages()
|
||||||
|
+ ", isError()=" + isError() + ", toString()=" + super.toString() + ", getClass()=" + getClass()
|
||||||
|
+ ", hashCode()=" + hashCode() + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class FileParameter extends Parameter {
|
||||||
public FileParameter() {
|
public FileParameter() {
|
||||||
super();
|
super();
|
||||||
this.typology = ParameterType.FILE;
|
this.typology = ParameterType.FILE;
|
||||||
netcdf=false;
|
netcdf = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,13 +37,15 @@ public class FileParameter extends Parameter {
|
||||||
* default mime type
|
* default mime type
|
||||||
* @param supportedMimeTypes
|
* @param supportedMimeTypes
|
||||||
* supported mime types
|
* supported mime types
|
||||||
|
* @param netcdf
|
||||||
|
* is netcdf file
|
||||||
*/
|
*/
|
||||||
public FileParameter(String name, String description, String defaultMimeType,
|
public FileParameter(String name, String description, String defaultMimeType, ArrayList<String> supportedMimeTypes,
|
||||||
ArrayList<String> supportedMimeTypes, boolean netcdf) {
|
boolean netcdf) {
|
||||||
super(name, ParameterType.FILE, description);
|
super(name, ParameterType.FILE, description);
|
||||||
this.defaultMimeType = defaultMimeType;
|
this.defaultMimeType = defaultMimeType;
|
||||||
this.supportedMimeTypes = supportedMimeTypes;
|
this.supportedMimeTypes = supportedMimeTypes;
|
||||||
this.netcdf=netcdf;
|
this.netcdf = netcdf;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDefaultMimeType() {
|
public String getDefaultMimeType() {
|
||||||
|
@ -62,7 +64,6 @@ public class FileParameter extends Parameter {
|
||||||
this.supportedMimeTypes = supportedMimeTypes;
|
this.supportedMimeTypes = supportedMimeTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean isNetcdf() {
|
public boolean isNetcdf() {
|
||||||
return netcdf;
|
return netcdf;
|
||||||
}
|
}
|
||||||
|
@ -78,5 +79,4 @@ public class FileParameter extends Parameter {
|
||||||
+ ", value=" + value + "]";
|
+ ", value=" + value + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
<inherits name='com.sencha.gxt.ui.GXT' />
|
<inherits name='com.sencha.gxt.ui.GXT' />
|
||||||
<!-- <inherits name="com.extjs.gxt.ui.GXT" /> -->
|
<!-- <inherits name="com.extjs.gxt.ui.GXT" /> -->
|
||||||
|
|
||||||
<!-- <inherits name="com.google.gwt.logging.Logging" /> -->
|
<!--
|
||||||
|
<inherits name="com.google.gwt.logging.Logging" /> -->
|
||||||
|
|
||||||
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
||||||
|
|
||||||
<!-- Debug CSS style
|
<!-- Debug CSS style
|
||||||
|
@ -37,19 +39,18 @@
|
||||||
<entry-point
|
<entry-point
|
||||||
class='org.gcube.portlets.user.dataminermanager.client.DataMinerManager' />
|
class='org.gcube.portlets.user.dataminermanager.client.DataMinerManager' />
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
|
<set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
|
||||||
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
|
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
|
||||||
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
|
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
|
||||||
/> -->
|
/> -->
|
||||||
|
|
||||||
|
|
||||||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||||
<set-property name="log_DivLogger" value="DISABLED" />
|
<set-property name="log_DivLogger" value="DISABLED" />
|
||||||
<set-property name="log_GWTLogger" value="DISABLED" />
|
<set-property name="log_GWTLogger" value="DISABLED" />
|
||||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
<set-property name="log_SystemLogger" value="DISABLED" />
|
||||||
|
|
||||||
|
|
||||||
<source path='client' />
|
<source path='client' />
|
||||||
<source path='shared' />
|
<source path='shared' />
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue