Luca Frosini 2018-05-21 12:06:27 +00:00
parent 5a84a04fbd
commit 302d29a607
3 changed files with 13 additions and 14 deletions

View File

@ -17,7 +17,6 @@ import org.gcube.common.homelibrary.jcr.repository.JCRRepository;
import org.gcube.common.homelibrary.jcr.workspace.JCRWorkspace;
import org.gcube.common.homelibrary.jcr.workspace.JCRWorkspaceItem;
import org.gcube.dataharvest.datamodel.HarvestedData;
import org.gcube.dataharvest.harvester.BasicHarvester;
import org.gcube.dataharvest.utils.DateUtils;
import org.gcube.dataharvest.utils.Utils;
import org.slf4j.Logger;

View File

@ -29,8 +29,6 @@ public class ResourceCatalogueHarvester extends SoBigDataHarvester {
private int societalDebatesCounter = 0;
private int wellBeingAndEconomyCounter = 0;
protected List<String> contexts;
protected String solrBaseUrl;
public ResourceCatalogueHarvester(Date start, Date end) throws ParseException {
@ -38,16 +36,7 @@ public class ResourceCatalogueHarvester extends SoBigDataHarvester {
}
protected String getSolrBaseUrl() {
return null;
}
public List<String> getContexts() {
return contexts;
}
public void setContexts(List<String> contexts) {
this.contexts = contexts;
return "https://ckan-solr-d4s.d4science.org/solr/sobigdata";
}
@Override
@ -158,7 +147,7 @@ public class ResourceCatalogueHarvester extends SoBigDataHarvester {
private String executeQuery(String fqSubString) throws Exception {
String query = "https://ckan-solr-d4s.d4science.org/solr/sobigdata/select?";
String query = getSolrBaseUrl() + "select?";
String q = UrlEncoderUtil.encodeQuery("metadata_created:[" + DateUtils.dateToStringWithTZ(startDate) + " TO "
+ DateUtils.dateToStringWithTZ(endDate) + "]");

View File

@ -2,13 +2,24 @@ package org.gcube.dataharvest.harvester.sobigdata;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import org.gcube.dataharvest.harvester.BasicHarvester;
public abstract class SoBigDataHarvester extends BasicHarvester {
protected List<String> contexts;
public SoBigDataHarvester(Date start, Date end) throws ParseException {
super(start, end);
}
public List<String> getContexts() {
return contexts;
}
public void setContexts(List<String> contexts) {
this.contexts = contexts;
}
}