129 lines
2.8 KiB
Java
129 lines
2.8 KiB
Java
package org.gcube.portlets.user.geoportaldataviewer.client.events;
|
|
|
|
import org.gcube.application.geoportalcommon.shared.GeoportalItemReferences;
|
|
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
|
|
*
|
|
* Jul 30, 2021
|
|
*/
|
|
public class ShowDetailsEvent extends GwtEvent<ShowDetailsEventHandler> {
|
|
public static Type<ShowDetailsEventHandler> TYPE = new Type<ShowDetailsEventHandler>();
|
|
private String layerObjectType;
|
|
private FeatureRow featureRow;
|
|
private String itemName;
|
|
private String profileID;
|
|
private String projectID;
|
|
|
|
/**
|
|
* Instantiates a new show details event.
|
|
*
|
|
* @param layerObjectType the geona item type
|
|
* @param geonaMongoID the geona mongo ID
|
|
* @param itemName the item name
|
|
* @param featureRow the feature row
|
|
*/
|
|
public ShowDetailsEvent(String layerObjectType, String profileID, String projectID, String itemName,
|
|
FeatureRow featureRow) {
|
|
this.layerObjectType = layerObjectType;
|
|
this.profileID = profileID;
|
|
this.projectID = projectID;
|
|
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(GeoportalItemReferences gir, String itemName, FeatureRow featureRow) {
|
|
this.layerObjectType = gir.getLayerObjectType();
|
|
this.profileID = gir.getProfileID();
|
|
this.projectID = gir.getProjectID();
|
|
this.itemName = itemName;
|
|
this.featureRow = featureRow;
|
|
}
|
|
|
|
public static Type<ShowDetailsEventHandler> getTYPE() {
|
|
return TYPE;
|
|
}
|
|
|
|
public String getLayerObjectType() {
|
|
return layerObjectType;
|
|
}
|
|
|
|
public String getProfileID() {
|
|
return profileID;
|
|
}
|
|
|
|
public String getProjectID() {
|
|
return projectID;
|
|
}
|
|
|
|
/**
|
|
* 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 feature row.
|
|
*
|
|
* @return the feature row
|
|
*/
|
|
public FeatureRow getFeatureRow() {
|
|
return featureRow;
|
|
}
|
|
|
|
/**
|
|
* 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 GeoportalItemReferences getGeonaItemRef() {
|
|
return new GeoportalItemReferences(projectID, profileID, layerObjectType);
|
|
}
|
|
|
|
} |