diff --git a/.classpath b/.classpath index 4715af8..4e26a04 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,6 @@ - + @@ -31,5 +31,5 @@ - + diff --git a/pom.xml b/pom.xml index fca614c..f50c4d3 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ org.gcube.portlets.user join-vre war - 1.0.0-SNAPSHOT + 1.1.0-SNAPSHOT gCube Join VRE Portlet Display the available VRE to Join diff --git a/src/main/java/org/gcube/portlets/user/joinvre/client/ui/DisplayVRE.java b/src/main/java/org/gcube/portlets/user/joinvre/client/ui/DisplayVRE.java index 6847f25..e386980 100644 --- a/src/main/java/org/gcube/portlets/user/joinvre/client/ui/DisplayVRE.java +++ b/src/main/java/org/gcube/portlets/user/joinvre/client/ui/DisplayVRE.java @@ -2,12 +2,15 @@ package org.gcube.portlets.user.joinvre.client.ui; import java.util.List; +import org.gcube.portlets.user.gcubewidgets.client.elements.Div; +import org.gcube.portlets.user.gcubewidgets.client.elements.Span; import org.gcube.portlets.user.joinvre.client.JoinService; import org.gcube.portlets.user.joinvre.client.JoinServiceAsync; import org.gcube.portlets.user.joinvre.shared.VRE; import org.gcube.portlets.user.joinvre.shared.VRECategory; import com.google.gwt.core.client.GWT; +import com.google.gwt.dom.client.Element; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.uibinder.client.UiBinder; @@ -16,67 +19,86 @@ import com.google.gwt.user.client.Window; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.Composite; +import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.HTMLPanel; import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.Widget; +import com.google.gwt.query.client.GQuery; +import com.google.gwt.query.client.Function; +import com.google.gwt.query.client.Selector; +import com.google.gwt.query.client.Selectors; + +import static com.google.gwt.query.client.GQuery.*; +import static com.google.gwt.query.client.css.CSS.*; /** * @author Massimiliano Assante, ISTI-CNR - massimiliano.assante@isti.cnr.it * @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/ */ public class DisplayVRE extends Composite { - + interface DisplayVREUiBinder extends UiBinder {} - + private static DisplayVREUiBinder uiBinder = GWT.create(DisplayVREUiBinder.class); private final JoinServiceAsync joinService = GWT.create(JoinService.class); - + public static final String vreDefaultImage = GWT.getModuleBaseURL() + "../images/vre-default.png"; public static final String loadingImage = GWT.getModuleBaseURL() + "../images/vre-image-loader.gif"; public static LoadingPopUp loadingPopUp = new LoadingPopUp(false, true, loadingImage); - + public static final String REQUEST_ACCESS = "Request Access"; public static final String FREE_ACCESS = "Free Access"; - - + + + @UiField HTMLPanel mainPanel; @UiField Image vreImage; @UiField Label vreName; @UiField HTMLPanel vreCategories; + @UiField Div vreDesc; @UiField Button joinButton; - + @UiField Button closeButton; + public DisplayVRE(final VRE vre) { Widget widget = uiBinder.createAndBindUi(this); vreImage.setUrl(loadingImage); - - + closeButton.setText("Collapse"); + vreDesc.setHTML(vre.getDescription()); + if(vre.getImageURL().compareTo("")!=0){ vreImage.setUrl(vre.getImageURL()); }else{ vreImage.setUrl(vreDefaultImage); } - + final String name = vre.getName(); - String vreDescription = vre.getDescription(); - final InfoDialog infoDialog = new InfoDialog(name, vreDescription); - ClickHandler descriptionHandler = new ClickHandler(){ @Override public void onClick(ClickEvent event) { - infoDialog.show(); + if ($(mainPanel).css(WIDTH).compareTo("160px") == 0) + show(); + else + collapse(); + } }; - - vreImage.setTitle(vre.getName()); + closeButton.addClickHandler(new ClickHandler() { + @Override + public void onClick(ClickEvent event) { + collapse(); + } + }); + + vreImage.setTitle("Click to see details"); vreImage.addClickHandler(descriptionHandler); - + vreName.setTitle(name); vreName.setText(name); vreName.addClickHandler(descriptionHandler); - + List categories = vre.getCategories(); for(int i=0; i - - -
- -
-
- - - -
- -
+ xmlns:e="urn:import:org.gcube.portlets.user.gcubewidgets.client.elements"> + + + + + + + +
+
+ +
+
+ + + +
+
+ +
+ +
+ +
+
+ + +
\ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/user/joinvre/server/JoinServiceImpl.java b/src/main/java/org/gcube/portlets/user/joinvre/server/JoinServiceImpl.java index dfcbc22..219fb49 100644 --- a/src/main/java/org/gcube/portlets/user/joinvre/server/JoinServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/joinvre/server/JoinServiceImpl.java @@ -102,7 +102,34 @@ public class JoinServiceImpl extends RemoteServiceServlet implements JoinService } else { List devsecCategories = new ArrayList(); devsecCategories.add(new VRECategory(1, "Development")); - vres.add(new VRE(0, "devsec", "devsec VRE description", "", "", "/group/devsec", devsecCategories, 0,UserBelonging.NOT_BELONGING, false)); + vres.add(new VRE(0, "BiodiversityLab", "" + + "

BiodiversityLab

" + + "The BiodiversityLab is a VRE designed to provide a collection of applications that allow scholars to perform complete experiments about " + + "single individuals or groups of marine species. The VRE allows to:
  • inspect species maps;
  • produce a species distribution map by means of either an expert system (AquaMaps) or a machine learning model (e.g. Neural Networks);" + + "
  • analyse species observation trends;" + + "
  • inspect species occurrence data;" + + "
  • inspect species descriptions and characteristics;" + + "
  • perform analysis of climatic changes and of their effects on species distribution;" + + "
  • produce GIS maps for geo-spatial datasets;" + + "
  • discover Taxa names;" + + "
  • cluster occurrence data;" + + "
  • estimate similarities among habitats." + + "
" + + "", "", "", "/group/devsec", devsecCategories, 0,UserBelonging.NOT_BELONGING, false)); + vres.add(new VRE(0, "Scalable Data Mining", "" + + "

Scalable Data Mining

" + + "The Scalable Data Mining is a VRE designed to apply Data Mining techniques to biological data. The algorithms are executed in a distributed fashion on the e-Infrastructure nodes or on local multi-core machines. Scalability is thus meant as distributed data processing but even as services dynamically provided to the users. The system is scalable in the number of users and in the size of the data to process. Statistical data processing can be applied to perform Niche Modelling or Ecological Modelling experiments. Other applications can use general purpose techniques like Bayesian models. Time series of observations can be managed as well, in order to classify trends, catch anomaly patterns and perform simulations. The idea under the distributed computation for data mining techniques is to overcome common limitations that can happen when using statistical algorithms: " + + "single individuals or groups of marine species. The VRE allows to:
  • inspect species maps;
  • produce a species distribution map by means of either an expert system (AquaMaps) or a machine learning model (e.g. Neural Networks);" + + "
  • analyse species observation trends;" + + "
  • inspect species occurrence data;" + + "
  • inspect species descriptions and characteristics;" + + "
  • perform analysis of climatic changes and of their effects on species distribution;" + + "
  • produce GIS maps for geo-spatial datasets;" + + "
  • discover Taxa names;" + + "
  • cluster occurrence data;" + + "
  • estimate similarities among habitats." + + "
" + + "", "", "", "/group/devsec", devsecCategories, 0,UserBelonging.NOT_BELONGING, false)); List devVRECategories = new ArrayList(devsecCategories); devVRECategories.add(new VRECategory(2, "Sailing")); vres.add(new VRE(1, "devVRE", "devVRE VRE description", "", "", "/group/devVRE", devVRECategories, 1, UserBelonging.NOT_BELONGING, false)); diff --git a/src/main/resources/org/gcube/portlets/user/joinvre/JoinVRE.gwt.xml b/src/main/resources/org/gcube/portlets/user/joinvre/JoinVRE.gwt.xml index c018c12..58eef52 100644 --- a/src/main/resources/org/gcube/portlets/user/joinvre/JoinVRE.gwt.xml +++ b/src/main/resources/org/gcube/portlets/user/joinvre/JoinVRE.gwt.xml @@ -6,6 +6,7 @@ + diff --git a/src/main/webapp/JoinVRE.css b/src/main/webapp/JoinVRE.css index 34b6cc2..4a65069 100644 --- a/src/main/webapp/JoinVRE.css +++ b/src/main/webapp/JoinVRE.css @@ -9,6 +9,24 @@ margin-top: 0; } +.vreDesc { + padding: 0 3px; + font-size: 12px; +} +.frame-container { + display: inline-block; +} + +.frame-container-border { + background: #FFF; + border-radius: 6px !important; + -moz-border-radius: 6px !important; + -webkit-border-radius: 6px !important; + border: 1px solid #9b9b9b; + margin: 3px; +} + + .framed { width: 160px; padding: 10px;