Revision 60864
Added by Michele Artini about 3 years ago
EnrichOpenairePlugin.java | ||
---|---|---|
19 | 19 |
import org.dom4j.Element; |
20 | 20 |
import org.dom4j.Node; |
21 | 21 |
import org.dom4j.io.SAXReader; |
22 |
import org.springframework.beans.factory.annotation.Autowired; |
|
22 | 23 |
import org.springframework.beans.factory.annotation.Value; |
23 | 24 |
|
24 | 25 |
import com.google.common.base.Splitter; |
26 |
import com.mongodb.MongoClient; |
|
27 |
import com.mongodb.client.MongoCollection; |
|
25 | 28 |
|
26 | 29 |
import eu.dnetlib.data.mdstore.plugins.objects.MdRecord; |
27 | 30 |
import eu.dnetlib.data.mdstore.plugins.objects.MyURL; |
... | ... | |
37 | 40 |
@Value("${plugin.enrich.openaire.datasources.blacklist}") |
38 | 41 |
private String datasourceBlackList; |
39 | 42 |
|
43 |
@Autowired |
|
44 |
private MongoClient mongoClient; |
|
45 |
|
|
40 | 46 |
private Map<String, Counter> counters = new HashMap<>(); |
41 | 47 |
|
42 | 48 |
@Override |
... | ... | |
45 | 51 |
} |
46 | 52 |
|
47 | 53 |
@Override |
54 |
protected MongoCollection<org.bson.Document> getCacheCollection() { |
|
55 |
return mongoClient.getDatabase("API_CACHES").getCollection("OPENAIRE_API_CACHE"); |
|
56 |
} |
|
57 |
|
|
58 |
@Override |
|
48 | 59 |
protected void reconfigure(final Map<String, String> params) { |
49 | 60 |
counters.clear(); |
50 | 61 |
counters.put("subjects", new Counter()); |
Also available in: Unified diff
API Cache