2013-03-04 14:38:25 +01:00
|
|
|
/**
|
2017-02-10 15:18:57 +01:00
|
|
|
*
|
2013-03-04 14:38:25 +01:00
|
|
|
*/
|
|
|
|
package org.gcube.portlets.user.speciesdiscovery.client.event;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.DataSource;
|
2017-02-10 15:18:57 +01:00
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.JobGisLayerModel;
|
2013-03-04 14:38:25 +01:00
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.JobOccurrencesModel;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.JobTaxonomyModel;
|
|
|
|
import org.gcube.portlets.user.speciesdiscovery.shared.SearchResultType;
|
|
|
|
|
|
|
|
import com.google.gwt.event.shared.GwtEvent;
|
|
|
|
|
|
|
|
/**
|
2017-02-10 15:18:57 +01:00
|
|
|
*
|
2013-03-04 14:38:25 +01:00
|
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public class SaveJobEvent extends GwtEvent<SaveJobEventHandler> {
|
2017-02-10 15:18:57 +01:00
|
|
|
|
2013-03-04 14:38:25 +01:00
|
|
|
public static final GwtEvent.Type<SaveJobEventHandler> TYPE = new Type<SaveJobEventHandler>();
|
|
|
|
private String jobIdentifier;
|
|
|
|
private String scientificName;
|
|
|
|
private String rank;
|
|
|
|
private SearchResultType itemType;
|
|
|
|
private List<DataSource> listDataSources;
|
|
|
|
private JobTaxonomyModel jobTaxonomyModel;
|
|
|
|
private JobOccurrencesModel jobOccurrenceModel;
|
2017-02-10 15:18:57 +01:00
|
|
|
private String layerTitle;
|
|
|
|
private JobGisLayerModel jobGisLayer;
|
2013-03-04 14:38:25 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public Type<SaveJobEventHandler> getAssociatedType() {
|
|
|
|
return TYPE;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void dispatch(SaveJobEventHandler handler) {
|
2017-02-10 15:18:57 +01:00
|
|
|
handler.onSaveJob(this);
|
2013-03-04 14:38:25 +01:00
|
|
|
}
|
2017-02-10 15:18:57 +01:00
|
|
|
|
2013-03-04 14:38:25 +01:00
|
|
|
|
|
|
|
/**
|
2017-02-10 15:18:57 +01:00
|
|
|
*
|
2013-03-04 14:38:25 +01:00
|
|
|
* @param jobIdentifier
|
|
|
|
* @param scientificName
|
|
|
|
* @param listDataSource
|
|
|
|
* @param rank
|
|
|
|
* @param type
|
|
|
|
* @param jobTaxonomyModel
|
|
|
|
*/
|
|
|
|
public SaveJobEvent(String jobIdentifier, String scientificName, List<DataSource> dataSourceList, String rank, SearchResultType type, JobTaxonomyModel jobTaxonomyModel) {
|
|
|
|
this.jobIdentifier = jobIdentifier;
|
|
|
|
this.scientificName = scientificName;
|
|
|
|
this.listDataSources = dataSourceList;
|
|
|
|
this.rank = rank;
|
|
|
|
this.itemType = type;
|
|
|
|
this.jobTaxonomyModel = jobTaxonomyModel;
|
2017-02-10 15:18:57 +01:00
|
|
|
|
2013-03-04 14:38:25 +01:00
|
|
|
}
|
2017-02-10 15:18:57 +01:00
|
|
|
|
2013-03-04 14:38:25 +01:00
|
|
|
/**
|
2017-02-10 15:18:57 +01:00
|
|
|
*
|
2013-03-04 14:38:25 +01:00
|
|
|
* @param jobIdentifier
|
|
|
|
* @param scientificName
|
|
|
|
* @param dataSourceList
|
|
|
|
* @param type
|
|
|
|
* @param jobOccurrenceModel
|
|
|
|
*/
|
|
|
|
public SaveJobEvent(String jobIdentifier, String scientificName, List<DataSource> dataSourceList, SearchResultType type, JobOccurrencesModel jobOccurrenceModel) {
|
|
|
|
this.jobIdentifier = jobIdentifier;
|
|
|
|
this.scientificName = scientificName;
|
|
|
|
this.listDataSources = dataSourceList;
|
|
|
|
this.itemType = type;
|
|
|
|
this.jobOccurrenceModel = jobOccurrenceModel;
|
|
|
|
}
|
2017-02-10 15:18:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param jobIdentifier
|
|
|
|
* @param scientificName
|
|
|
|
* @param dataSourceList
|
|
|
|
* @param type
|
|
|
|
* @param jobOccurrenceModel
|
|
|
|
*/
|
|
|
|
public SaveJobEvent(String jobIdentifier, String layerTitle, SearchResultType type, JobGisLayerModel jobGisLayer) {
|
|
|
|
this.jobIdentifier = jobIdentifier;
|
|
|
|
this.itemType = type;
|
|
|
|
this.layerTitle = layerTitle;
|
|
|
|
this.itemType = type;
|
|
|
|
this.jobGisLayer = jobGisLayer;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-03-04 14:38:25 +01:00
|
|
|
|
|
|
|
public String getJobIdentifier() {
|
|
|
|
return jobIdentifier;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setJobIdentifier(String jobIdentifier) {
|
|
|
|
this.jobIdentifier = jobIdentifier;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getScientificName() {
|
|
|
|
return scientificName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getRank() {
|
|
|
|
return rank;
|
|
|
|
}
|
|
|
|
|
|
|
|
public SearchResultType getItemType() {
|
|
|
|
return itemType;
|
|
|
|
}
|
2017-02-10 15:18:57 +01:00
|
|
|
|
2013-03-04 14:38:25 +01:00
|
|
|
public JobTaxonomyModel getJobTaxonomyModel() {
|
|
|
|
return jobTaxonomyModel;
|
|
|
|
}
|
|
|
|
|
|
|
|
public JobOccurrencesModel getJobOccurrenceModel() {
|
|
|
|
return jobOccurrenceModel;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setJobTaxonomyModel(JobTaxonomyModel jobTaxonomyModel) {
|
|
|
|
this.jobTaxonomyModel = jobTaxonomyModel;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setJobOccurrenceModel(JobOccurrencesModel jobOccurrenceModel) {
|
|
|
|
this.jobOccurrenceModel = jobOccurrenceModel;
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<DataSource> getListDataSources() {
|
|
|
|
return listDataSources;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setListDataSources(List<DataSource> listDataSources) {
|
|
|
|
this.listDataSources = listDataSources;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|