Working on Task #7001
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/speciesdiscovery@142471 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4e5b889342
commit
fb37829f2b
|
@ -33,8 +33,11 @@ public class GisLayerWindowInfoJobsSpecies extends Window{
|
|||
public void updateDescription(JobGisLayerModel jobModel) {
|
||||
|
||||
String description = "\nName: \n" + jobModel.getJobName() + "\n";
|
||||
|
||||
description += "\n\nStart Time: \n" + jobModel.getSubmitTime();
|
||||
if(jobModel.getLayerUUID()!=null)
|
||||
description += "\n\nLayer UUID\n" + jobModel.getLayerUUID();
|
||||
description += "\n\nOccurence Points (in total): \n" + jobModel.getTotalPoints();
|
||||
description += "\n\nOccurence Points (used to generate the layer):\n" + jobModel.getCompletedPoints();
|
||||
description += "\nStart Time: \n" + jobModel.getSubmitTime();
|
||||
description += "\n\nEnd Time: \n" + jobModel.getEndTime();
|
||||
|
||||
this.jobInfo.updateDescription(description);
|
||||
|
|
|
@ -342,7 +342,7 @@ public class ViewDetailsWindow extends Window {
|
|||
|
||||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
SearchController.eventBus.fireEvent(new CreateGisLayerJobEvent("Gis Layer by: "+lastSearchEvent.getSearchTerm(), "Gis Layer generated from SPD Portlet by gCube Framework", count));
|
||||
SearchController.eventBus.fireEvent(new CreateGisLayerJobEvent("Occurences Layer by search: "+lastSearchEvent.getSearchTerm(), "Gis Layer generated from SPD Portlet by gCube Framework", count));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1730,7 +1730,7 @@ public class TaxonomySearchServiceImpl extends RemoteServiceServlet implements T
|
|||
|
||||
if(statusResponse!=null){
|
||||
logger.info("statusResponse of gis layer job is not null..." + job.getId());
|
||||
JobGisLayerModel convertJob = GisLayerJobUtil.convertJob(job, statusResponse, gisLayerJobDao);
|
||||
JobGisLayerModel convertJob = GisLayerJobUtil.convertJob(job, statusResponse, gisLayerJobDao, taxonomyService);
|
||||
|
||||
if(convertJob!=null){
|
||||
logger.info("added list jobOccurrenceId: "+convertJob.getJobIdentifier() + " status "+convertJob.getDownloadState());
|
||||
|
|
|
@ -70,7 +70,7 @@ public class GisLayerJobUtil {
|
|||
* @param gisLayerJobP the gis layer job p
|
||||
* @return the job gis layer model
|
||||
*/
|
||||
public static JobGisLayerModel convertJob(GisLayerJob job, CompleteJobStatus statusResponse, GisLayerJobPersistence gisLayerJobP){
|
||||
public static JobGisLayerModel convertJob(GisLayerJob job, CompleteJobStatus statusResponse, GisLayerJobPersistence gisLayerJobP, SpeciesService taxonomyService){
|
||||
|
||||
//TODO SET END TIME
|
||||
JobGisLayerModel jobGisModel;
|
||||
|
@ -118,6 +118,9 @@ public class GisLayerJobUtil {
|
|||
if(statusResponse.getEndDate()!=null && job.getEndTime()==0){ //UPDATE end time first time only
|
||||
logger.trace("UPDATE end time first time only - " + downloadState);
|
||||
endTime = statusResponse.getEndDate().getTimeInMillis();
|
||||
String layerUUID = taxonomyService.getGisLayerResultLinkByJobId(job.getId());
|
||||
job.setLayerUUID(layerUUID);
|
||||
jobGisModel.setLayerUUID(layerUUID);
|
||||
job.setEndTime(endTime);
|
||||
changeEndTime = true;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ public class GisLayerJob extends DefaultJob{
|
|||
*/
|
||||
private static final long serialVersionUID = 2604265579184366453L;
|
||||
private long totalPoints;
|
||||
private String layerUUID;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
|
@ -58,6 +59,22 @@ public class GisLayerJob extends DefaultJob{
|
|||
return totalPoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the layerUUID
|
||||
*/
|
||||
public String getLayerUUID() {
|
||||
|
||||
return layerUUID;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param layerUUID the layerUUID to set
|
||||
*/
|
||||
public void setLayerUUID(String layerUUID) {
|
||||
|
||||
this.layerUUID = layerUUID;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param totalPoints the totalPoints to set
|
||||
|
@ -77,8 +94,6 @@ public class GisLayerJob extends DefaultJob{
|
|||
return internalId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
|
@ -88,6 +103,8 @@ public class GisLayerJob extends DefaultJob{
|
|||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("GisLayerJob [totalPoints=");
|
||||
builder.append(totalPoints);
|
||||
builder.append(", layerUUID=");
|
||||
builder.append(layerUUID);
|
||||
builder.append(", internalId=");
|
||||
builder.append(internalId);
|
||||
builder.append(", id=");
|
||||
|
@ -110,4 +127,5 @@ public class GisLayerJob extends DefaultJob{
|
|||
return builder.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ public class JobGisLayerModel implements Serializable, IsSerializable{
|
|||
private float percentage;
|
||||
private long totalPoints;
|
||||
private long completedPoints;
|
||||
private String layerUUID; //This is the result
|
||||
|
||||
/**
|
||||
* Instantiates a new job gis layer model.
|
||||
|
@ -327,6 +328,25 @@ public class JobGisLayerModel implements Serializable, IsSerializable{
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the layerUUID
|
||||
*/
|
||||
public String getLayerUUID() {
|
||||
|
||||
return layerUUID;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param layerUUID the layerUUID to set
|
||||
*/
|
||||
public void setLayerUUID(String layerUUID) {
|
||||
|
||||
this.layerUUID = layerUUID;
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
|
@ -356,6 +376,8 @@ public class JobGisLayerModel implements Serializable, IsSerializable{
|
|||
builder.append(totalPoints);
|
||||
builder.append(", completedPoints=");
|
||||
builder.append(completedPoints);
|
||||
builder.append(", layerUUID=");
|
||||
builder.append(layerUUID);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue