You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
geoportal-data-viewer-app/src/main/java/org/gcube/portlets/user/geoportaldataviewer/client/events/ShowDetailsEvent.java

134 lines
2.6 KiB
Java

package org.gcube.portlets.user.geoportaldataviewer.client.events;
import org.gcube.portlets.user.geoportaldataviewer.shared.GeoNaItemRef;
import org.gcube.portlets.user.geoportaldataviewer.shared.gis.wfs.FeatureRow;
import com.google.gwt.event.shared.GwtEvent;
/**
* The Class ShowDetailsEvent.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
* Nov 13, 2020
*/
public class ShowDetailsEvent extends GwtEvent<ShowDetailsEventHandler> {
public static Type<ShowDetailsEventHandler> TYPE = new Type<ShowDetailsEventHandler>();
private String geonaItemType;
private FeatureRow featureRow;
private Long geonaID;
private String itemName;
/**
* Instantiates a new show details event.
*
* @param geonaItemType the geona item type
* @param geonaID the geona ID
* @param itemName the item name
* @param featureRow the feature row
*/
public ShowDetailsEvent(String geonaItemType, Long geonaID, String itemName, FeatureRow featureRow) {
this.geonaItemType = geonaItemType;
this.geonaID = geonaID;
this.itemName = itemName;
this.featureRow = featureRow;
}
/**
* Instantiates a new show details event.
*
* @param gir the gir
* @param itemName the item name
* @param featureRow the feature row
*/
public ShowDetailsEvent(GeoNaItemRef gir, String itemName, FeatureRow featureRow) {
this.geonaItemType = gir.getItemType();
this.geonaID = gir.getItemId();
this.itemName = itemName;
this.featureRow = featureRow;
}
/**
* Gets the associated type.
*
* @return the associated type
*/
@Override
public Type<ShowDetailsEventHandler> getAssociatedType() {
return TYPE;
}
/**
* Dispatch.
*
* @param handler the handler
*/
@Override
protected void dispatch(ShowDetailsEventHandler handler) {
handler.onShowDetails(this);
}
/**
* Gets the geona item type.
*
* @return the geona item type
*/
public String getGeonaItemType() {
return geonaItemType;
}
/**
* Gets the feature row.
*
* @return the feature row
*/
public FeatureRow getFeatureRow() {
return featureRow;
}
/**
* Gets the geona ID.
*
* @return the geona ID
*/
public Long getGeonaID() {
return geonaID;
}
/**
* Gets the item name.
*
* @return the item name
*/
public String getItemName() {
return itemName;
}
/**
* Sets the item name.
*
* @param itemName the new item name
*/
public void setItemName(String itemName) {
this.itemName = itemName;
}
/**
* Gets the geona item ref.
*
* @return the geona item ref
*/
public GeoNaItemRef getGeonaItemRef() {
return new GeoNaItemRef(geonaID, geonaItemType);
}
}