Bug fix on converter class for aggregation method
This commit is contained in:
parent
2b8c5e5147
commit
daabd711dd
3
pom.xml
3
pom.xml
|
@ -93,13 +93,12 @@
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!--
|
||||
|
||||
<dependency>
|
||||
<groupId>eu.dnetlib</groupId>
|
||||
<artifactId>uoa-utils</artifactId>
|
||||
<version>[2.0.0-SNAPSHOT, 3.0.0)</version>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
<dependency>
|
||||
<groupId>eu.dnetlib</groupId>
|
||||
|
|
|
@ -3,7 +3,6 @@ package eu.dnetlib.repo.manager.service.controllers;
|
|||
import eu.dnetlib.api.functionality.ValidatorServiceException;
|
||||
import eu.dnetlib.domain.functionality.validator.StoredJob;
|
||||
import eu.dnetlib.repo.manager.service.utils.OaiTools;
|
||||
import eu.dnetlib.repo.manager.shared.ValidationServiceException;
|
||||
import gr.uoa.di.driver.util.ServiceLocator;
|
||||
import eu.dnetlib.domain.functionality.validator.JobForValidation;
|
||||
import eu.dnetlib.domain.functionality.validator.RuleSet;
|
||||
|
@ -17,7 +16,6 @@ import org.json.JSONException;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import sun.rmi.runtime.Log;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.Resource;
|
||||
|
|
|
@ -304,12 +304,15 @@ public class Converter {
|
|||
|
||||
public static List<AggregationDetails> getAggregationHistoryFromJson(JSONObject repositoryObject) throws JSONException {
|
||||
|
||||
if( repositoryObject.get("aggregationHistory").toString().equals("[]") ||
|
||||
/* if( repositoryObject.get("aggregationHistory").toString().equals("[]") ||
|
||||
repositoryObject.get("aggregationHistory")!= null)
|
||||
return null;
|
||||
return null;*/
|
||||
if(repositoryObject.get("aggregationHistory").toString().equals("null"))
|
||||
return null;
|
||||
|
||||
|
||||
JSONArray rs = new JSONArray(repositoryObject.get("aggregationHistory").toString());
|
||||
|
||||
List<AggregationDetails> aggregationDetailsList = new ArrayList<>();
|
||||
for(int i=0;i<rs.length();i++)
|
||||
aggregationDetailsList.add(jsonToAggregationDetails(rs.getJSONObject(i)));
|
||||
|
@ -319,6 +322,7 @@ public class Converter {
|
|||
private static AggregationDetails jsonToAggregationDetails(JSONObject aggregationObject) throws JSONException {
|
||||
|
||||
AggregationDetails aggregationDetails = new AggregationDetails();
|
||||
|
||||
aggregationDetails.setAggregationStage(aggregationObject.get("aggregationStage").toString());
|
||||
//aggregationDetails.setCollectionMode(aggregationObject.get("collectionMode").toString());
|
||||
aggregationDetails.setDate(convertStringToDate(aggregationObject.get("date").toString()));
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-commons.xml"/>
|
||||
<import resource="classpath*:/gr/uoa/di/driver/app/springContext-registrator.xml"/>
|
||||
<import resource="classpath*:/eu/dnetlib/repos/springContext-repos-dms-cached.xml"/>-->
|
||||
|
||||
<context:property-placeholder location="classpath*:/eu/**/application.properties" />
|
||||
<tx:annotation-driven transaction-manager="txManager"/>
|
||||
|
||||
|
@ -79,4 +80,4 @@
|
|||
<property name="dataSource" ref="repomanager.dataSource"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
</beans>
|
Loading…
Reference in New Issue