fixed dates for jobs

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/speciesdiscovery@79312 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2013-07-17 16:34:57 +00:00
parent bb0044ca79
commit b605cff75c
7 changed files with 35 additions and 20 deletions

30
pom.xml
View File

@ -51,6 +51,21 @@
<version>[3.0.0-SNAPSHOT, 4.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<!-- This dependency is needed and is need on TOP to use GWT UI BInder
without old Xerces version of gCore complaining -->
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.9.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.googlecode.gwtquery</groupId>
<artifactId>gwtquery</artifactId>
<version>1.3.3</version>
<scope>provided</scope>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.gcube.core</groupId> -->
@ -77,9 +92,9 @@
<groupId>org.gcube.data.spd</groupId>
<artifactId>spd-model</artifactId>
<version>1.0.0-SNAPSHOT</version>
<!-- <version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
<!-- <version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version> -->
<!-- UNCOMMENT THIS FOR RELEASE -->
<!-- <scope>provided</scope> -->
<scope>provided</scope>
</dependency>
<dependency>
@ -171,15 +186,6 @@
<!-- <scope>provided</scope> -->
</dependency>
<!-- This dependency is needed and is need on TOP to use GWT UI BInder
without old Xerces version of gCore complaining -->
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.9.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
@ -281,7 +287,7 @@
<version>1.6.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>

View File

@ -238,6 +238,8 @@ public class OccurrenceGridJob extends ContentPanel{
baseModelData.set(JobOccurrencesModel.FILEFORMAT, jobModel.getFileFormat());
baseModelData.set(JobOccurrencesModel.CSVTYPE, jobModel.getCsvType());
baseModelData.set(JobOccurrencesModel.STARTTIME, jobModel.getStartTime());
baseModelData.set(JobOccurrencesModel.ELAPSEDTIME, jobModel.getElapsedTime());
baseModelData.set(JobOccurrencesModel.COMPLETEDENTRY, jobModel.getNodeCompleted());
@ -291,6 +293,7 @@ public class OccurrenceGridJob extends ContentPanel{
job.set(JobOccurrencesModel.STATUS, jobModel.getDownloadState().toString());
job.set(JobOccurrencesModel.ENDTIME, jobModel.getEndTime());
job.set(JobOccurrencesModel.ELAPSEDTIME, jobModel.getElapsedTime());
job.set(JobOccurrencesModel.STARTTIME, jobModel.getStartTime());
updateJobInfo(jobModel);

View File

@ -236,6 +236,7 @@ public class TaxonomyGridJob extends ContentPanel{
baseModelData.set(JobTaxonomyModel.SUBMITTIME, jobModel.getSubmitTime());
baseModelData.set(JobTaxonomyModel.ENDTIME, jobModel.getEndTime());
baseModelData.set(JobTaxonomyModel.STARTTIME, jobModel.getStartTime());
baseModelData.set(JobTaxonomyModel.ELAPSEDTIME, jobModel.getElapsedTime());
baseModelData.set(JobTaxonomyModel.DATASOURCE, jobModel.getDataSource());
@ -296,7 +297,7 @@ public class TaxonomyGridJob extends ContentPanel{
job.set(JobTaxonomyModel.STATUS, jobModel.getDownloadState().toString());
job.set(JobTaxonomyModel.ENDTIME, jobModel.getEndTime());
job.set(JobTaxonomyModel.ELAPSEDTIME, jobModel.getElapsedTime());
job.set(JobTaxonomyModel.STARTTIME, jobModel.getStartTime());
job.set(jobModel.getIdentifier(), jobModel); //Store jobModel
updateJobInfo(jobModel);

View File

@ -393,19 +393,19 @@ public class OccurrenceJobUtil {
}
long startTimeInMillis = Calendar.getInstance().getTimeInMillis();
long submitTimeInMillis = Calendar.getInstance().getTimeInMillis();
try {
//STORE INTO DAO
OccurrencesJob occurrenceJob = new OccurrencesJob(serviceJobId, jobModel.getJobName(), jobModel.getDescription(), jobModel.getScientificName(), dataSources, DownloadState.PENDING.toString(), "", startTimeInMillis, 0, jobModel.getFileFormat().toString(),csvTypeString, jobModel.isByDataSource(), convertListKeyIntoStoreXMLString(keys), expectedOccurrence);
OccurrencesJob occurrenceJob = new OccurrencesJob(serviceJobId, jobModel.getJobName(), jobModel.getDescription(), jobModel.getScientificName(), dataSources, DownloadState.PENDING.toString(), "", submitTimeInMillis, 0, 0, jobModel.getFileFormat().toString(),csvTypeString, jobModel.isByDataSource(), convertListKeyIntoStoreXMLString(keys), expectedOccurrence);
//for debug
// System.out.println("INTO createOccurrenceJobOnServiceByKeys " + occurrenceJob);
occurrencesJobDao.insert(occurrenceJob);
Date start = DateUtil.millisecondsToDate(startTimeInMillis);
Date start = DateUtil.millisecondsToDate(submitTimeInMillis);
jobModel.setSubmitTime(start);
//FILL MODEL WITH OTHER DATA

View File

@ -120,6 +120,10 @@ public class TaxonomyJobUtil {
//SET START TIME
long startTime = job.getStartTime();
// System.out.println("statusResponse.getStartDate(): "+statusResponse.getStartDate());
// System.out.println("startTime: "+startTime);
if(statusResponse.getStartDate()!=null && startTime==0){ //UPDATE start time first time only
Date start = DateUtil.millisecondsToDate(statusResponse.getStartDate().getTimeInMillis());
// jobSpeciesModel.setStartTime(DateUtil.dateToDateFormatString(start));

View File

@ -84,9 +84,10 @@ public class OccurrencesJob implements Serializable {
* @param resultRowKeys
* @param expectedOccurrence
*/
public OccurrencesJob(String jobId, String jobName, String jobDescription, String scientificName, List<DataSource> dataSources, String state, String storage, long submitTime, long endTime, String fileFormat, String csvType, boolean isByDataSource, String resultRowKeys, int expectedOccurrence) {
public OccurrencesJob(String jobId, String jobName, String jobDescription, String scientificName, List<DataSource> dataSources, String state, String storage, long submitTime, long startTime, long endTime, String fileFormat, String csvType, boolean isByDataSource, String resultRowKeys, int expectedOccurrence) {
this.id = jobId;
this.name = jobName;
this.startTime = startTime;
this.submitTime = submitTime;
this.endTime = endTime;
this.state = state;

View File

@ -170,9 +170,9 @@ public class TaxonomyJob implements Serializable {
return startTime;
}
public void setStartTime(long startTime) {
this.startTime = startTime;
}
// public void setStartTime(long startTime) {
// this.startTime = startTime;
// }
@Override
public String toString() {