Project

General

Profile

« Previous | Next » 

Revision 56451

updated test and added test files

View differences:

modules/dnet-mapreduce-jobs/trunk/src/test/java/eu/dnetlib/data/mapreduce/hbase/bulktag/ResultTaggerTest.java
3 3
import java.io.IOException;
4 4
import java.util.HashSet;
5 5
import java.util.List;
6
import java.util.Map;
6 7
import java.util.Set;
7 8
import java.util.stream.Collectors;
8 9

  
10
import com.google.gson.Gson;
9 11
import com.googlecode.protobuf.format.JsonFormat;
10 12
import eu.dnetlib.data.bulktag.CommunityConfiguration;
11 13
import eu.dnetlib.data.bulktag.CommunityConfigurationFactory;
......
197 199
    }
198 200

  
199 201

  
202
//    @Test
203
//    public void testResultTaggerCriteria() throws IOException{
204
//        String json ="{\"p\":{ \"author\" : \"$['entity']['result']['metadata']['author'][*]['fullname']\"," +
205
//                "  \"title\" : \"$['entity']['result']['metadata']['title'][*]['value']\"," +
206
//                "  \"orcid\" : \"$['entity']['result']['metadata']['author'][*]['pid'][*][?(@['key']=='ORCID')]['value']\"," +
207
//                "  \"contributor\" : \"$['entity']['result']['metadata']['contributor'][*]['value']\"," +
208
//                "  \"description\" : \"$['entity']['result']['metadata']['description'][*]['value']\"}}";
209
//        ProtoMappingParamEncapsulator p = new Gson().fromJson(json,ProtoMappingParamEncapsulator.class);
210
//        Map<String,String> params=p.getP();
211
//        resultTagger.
212
//    }
200 213

  
201 214
    private OafProtos.Oaf getOaf(String oafjson) throws IOException {
202 215
        final String json = IOUtils.toString(getClass().getResourceAsStream(oafjson));
modules/dnet-mapreduce-jobs/trunk/src/test/java/eu/dnetlib/data/mapreduce/hbase/bulktag/ResultTaggerTest4.java
2 2

  
3 3
import com.google.common.reflect.TypeToken;
4 4
import com.google.gson.Gson;
5
import com.google.protobuf.InvalidProtocolBufferException;
5
import com.google.gson.GsonBuilder;
6 6
import com.googlecode.protobuf.format.JsonFormat;
7 7
import com.jayway.jsonpath.DocumentContext;
8 8
import com.jayway.jsonpath.JsonPath;
9 9
import eu.dnetlib.data.bulktag.CommunityConfiguration;
10 10
import eu.dnetlib.data.bulktag.CommunityConfigurationFactory;
11
import eu.dnetlib.data.bulktag.selectioncriteria.InterfaceAdapter;
12
import eu.dnetlib.data.bulktag.selectioncriteria.Selection;
11 13
import eu.dnetlib.data.proto.OafProtos;
12
import eu.dnetlib.data.proto.ResultProtos;
13 14
import junit.framework.Assert;
14 15
import org.apache.commons.io.IOUtils;
15 16
import org.apache.commons.lang3.StringUtils;
......
24 25
import org.mockito.junit.MockitoJUnitRunner;
25 26

  
26 27
import java.io.IOException;
28
import java.io.StringReader;
27 29
import java.lang.reflect.Type;
28 30
import java.util.*;
29
import java.util.stream.Collectors;
30 31

  
31 32
import static org.junit.Assert.assertEquals;
32 33
import static org.junit.Assert.assertFalse;
......
46 47
            "\"description\" : \"$['entity']['result']['metadata']['description'][*]['value']\"}";
47 48

  
48 49
    private CommunityConfiguration cc;
49
    private Map<String,String>  params;
50
//    private Map<String,String>  params;
51
//
52
//    private ProtoMappingParamEncapsulator p ;
50 53

  
51
    private Param p ;
54
    private static String jsonparams = "{ \"author\" : \"$['entity']['result']['metadata']['author'][*]['fullname']\"," +
55
            "  \"title\" : \"$['entity']['result']['metadata']['title'][*]['value']\"," +
56
            "  \"orcid\" : \"$['entity']['result']['metadata']['author'][*]['pid'][*][?(@['key']=='ORCID')]['value']\"," +
57
            "  \"contributor\" : \"$['entity']['result']['metadata']['contributor'][*]['value']\"," +
58
            "  \"description\" : \"$['entity']['result']['metadata']['description'][*]['value']\"}";;
52 59

  
60

  
61
    ProtoMap params;
62

  
53 63
    @Mock
54 64
    private Mapper.Context context;
55 65

  
......
57 67
    private Counter counter;
58 68

  
59 69
    private ResultTagger resultTagger = new ResultTagger();
70

  
60 71
    private byte[] body;
61 72

  
62
   // @Before
73
    @Before
63 74
    public void setUp() throws IOException, DocumentException {
64 75

  
65
//        params = new HashMap<>();
66
//        params.put("author","$['entity']['result']['metadata']['author'][*]['fullname']");
67
//        params.put("title","$['entity']['result']['metadata']['title'][*]['value']");
68
//        params.put("orcid","$['entity']['result']['metadata']['author'][*]['pid'][*][?(@['key']=='ORCID')]['value']");
69
//        params.put("contributor","$['entity']['result']['metadata']['contributor'][*]['value']");
70
//        params.put("description","$['entity']['result']['metadata']['description'][*]['value']");
76
        params= new Gson().fromJson(jsonparams,ProtoMap.class);
71 77
        xml = IOUtils.toString(getClass().getResourceAsStream("community_configuration_selcrit.xml"));
72 78

  
73 79
        when(context.getCounter(anyString(), anyString())).thenReturn(counter);
74
        p = new Gson().fromJson(context.getConfiguration().get("mapping.proto","{}"),Param.class);//loadMapping(settings);
75
        params = p.getP();
76
        cc = CommunityConfigurationFactory.newInstance(xml);
77
        assertEquals(6,cc.size());
78
        cc.getCommunityList().forEach(c -> assertTrue(StringUtils.isNoneBlank(c.getId())));
79
        assertEquals(1,cc.getCommunityForDatasource("openaire____::1cfdb2e14977f31a98e0118283401f32").size());
80
        assertEquals("dariah",cc.getCommunityForDatasource("openaire____::1cfdb2e14977f31a98e0118283401f32").get(0).getFst());
80
//        p = new Gson().fromJson(settings, ProtoMappingParamEncapsulator.class);//loadMapping(settings);
81
//        params = p.getP();
82
//        cc = CommunityConfigurationFactory.newInstance(xml);
83
//        assertEquals(6,cc.size());
84
//        cc.getCommunityList().forEach(c -> assertTrue(StringUtils.isNoneBlank(c.getId())));
85
//        assertEquals(1,cc.getCommunityForDatasource("openaire____::1cfdb2e14977f31a98e0118283401f32").size());
86
//        assertEquals("dariah",cc.getCommunityForDatasource("openaire____::1cfdb2e14977f31a98e0118283401f32").get(0).getFst());
87
        CommunityConfiguration fromXml = CommunityConfigurationFactory.newInstance(xml);
81 88

  
89
        System.out.println(fromXml.toJson());
90
        cc = CommunityConfigurationFactory.fromJson(fromXml.toJson());
82 91

  
92
        Assert.assertEquals(fromXml.toJson(),cc.toJson());
93
        Assert.assertTrue(cc.getCommunities().get("dariah").getDatasources().get(0).getSelectionConstraints().getCriteria().size() > 0);
83 94

  
95

  
84 96
    }
85 97

  
86 98
    @Test
......
122 134
    }
123 135

  
124 136
    @Test
125
    public void verifyBeforeTest(){
137
    public void verifyBeforeTest() throws IOException {
126 138
        System.out.println("Just verifying...");
127

  
139
        System.out.println(cc.toJson());
140
        getOaf("hal_datasource.json");
128 141
    }
129 142

  
130 143
    @Test
131 144
    public void readCorrectParamInfoTest() throws IOException {
132
        body  = Bytes.toBytes(IOUtils.toString(getClass().getResourceAsStream("oaf_datasource1.json")));
133
        Map<String, List<String>> paramMap = resultTagger.getParamMap(body, params);
145
        final OafProtos.Oaf.Builder oaf = OafProtos.Oaf.newBuilder();
146
        JsonFormat.merge(new StringReader(IOUtils.toString(getClass().getResourceAsStream("oaf_datasource1.json"))), oaf);
134 147

  
148
        Map<String, List<String>> paramMap = resultTagger.getParamMap(oaf.build(), params);
149

  
135 150
        Assert.assertEquals(5,paramMap.keySet().size());
136 151
        Assert.assertEquals(0,paramMap.get("contributor").size());
137 152
        Assert.assertEquals(5,paramMap.get("author").size());
......
144 159

  
145 160
    @Test
146 161
    public void resultTaggerTest() throws IOException {
147
        body  = Bytes.toBytes(IOUtils.toString(getClass().getResourceAsStream("oaf_datasource1.json")));
148
        Map<String, List<String>> paramMap = resultTagger.getParamMap(body, params);
149
        OafProtos.Oaf oaf = resultTagger.enrichContextCriteria(getOaf("oaf_datasource1.json"), cc, context, paramMap);
162
        body  = Bytes.toBytes(IOUtils.toString(getClass().getResourceAsStream("hal_datasource.json")));
163
        OafProtos.Oaf oaf = getOaf("hal_datasource.json");
164
        //Map<String, List<String>> paramMap = resultTagger.getParamMap(body, params);
165
        OafProtos.Oaf tagged_oaf = resultTagger.enrichContextCriteria(oaf, cc, context, params);
150 166

  
151
        System.out.println(oaf.toString());
167
        System.out.println(tagged_oaf.toString());
168
        Assert.assertTrue(tagged_oaf.getEntity().getResult().getMetadata().getContextList()
169
                .stream().anyMatch(c -> "dariah".equals(c.getId()) && c.getDataInfoList().stream().anyMatch(i -> "bulktagging".equals(i.getInferenceprovenance()))));
152 170

  
153 171

  
154 172
    }
......
168 186

  
169 187
    }
170 188

  
171
@Test
172
    public void testParam(){
173 189

  
174
        String json ="{\"p\":{ \"author\" : \"$['entity']['result']['metadata']['author'][*]['fullname']\"," +
175
                "  \"title\" : \"$['entity']['result']['metadata']['title'][*]['value']\"," +
176
                "  \"orcid\" : \"$['entity']['result']['metadata']['author'][*]['pid'][*][?(@['key']=='ORCID')]['value']\"," +
177
                "  \"contributor\" : \"$['entity']['result']['metadata']['contributor'][*]['value']\"," +
178
                "  \"description\" : \"$['entity']['result']['metadata']['description'][*]['value']\"}}";
179
        p = new Gson().fromJson(json,Param.class);
180
        params=p.getP();
181
    System.out.println(params.isEmpty());
182
    }
190

  
183 191
}
modules/dnet-mapreduce-jobs/trunk/src/test/resources/eu/dnetlib/data/mapreduce/hbase/bulktag/hal_datasource.json
1
{
2
  "kind": 1,
3
  "dataInfo": {
4
    "deletedbyinference": false,
5
    "provenanceaction": {
6
      "classid": "sysimport:crosswalk:repository",
7
      "classname": "sysimport:crosswalk:repository",
8
      "schemename": "dnet:provenanceActions",
9
      "schemeid": "dnet:provenanceActions"
10
    },
11
    "inferred": true,
12
    "inferenceprovenance": "dedup-similarity-result-levenstein",
13
    "invisible": false,
14
    "trust": "0.9"
15
  },
16
  "entity": {
17
    "dateoftransformation": "2019-02-12T17:54:14.647Z",
18
    "originalId": [
19
      "oai:HAL:hal-01855684v1"
20
    ],
21
    "oaiprovenance": {
22
      "originDescription": {
23
        "metadataNamespace": "http://www.openarchives.org/OAI/2.0/oai_dc/",
24
        "altered": true,
25
        "baseURL": "https://api.archives-ouvertes.fr/oai/hal",
26
        "datestamp": "2018-10-17",
27
        "harvestDate": "2019-02-08T08:57:19.94Z",
28
        "identifier": "oai:HAL:hal-01855684v1"
29
      }
30
    },
31
    "result": {
32
      "instance": [
33
        {
34
          "hostedby": {
35
            "value": "Hyper Article en Ligne - Sciences de l'Homme et de la Société",
36
            "key": "10|opendoar____::96da2f590cd7246bbde0051047b0d6f7"
37
          },
38
          "url": [
39
            "https://hal.archives-ouvertes.fr/hal-01855684",
40
            "https://hal.archives-ouvertes.fr/hal-01855684/document",
41
            "https://hal.archives-ouvertes.fr/hal-01855684/file/20180517_DESIR_Poster_Paris_final.pdf"
42
          ],
43
          "dateofacceptance": {
44
            "value": "2018-05-22"
45
          },
46
          "collectedfrom": {
47
            "value": "Hyper Article en Ligne - Sciences de l'Homme et de la Société",
48
            "key": "10|opendoar____::96da2f590cd7246bbde0051047b0d6f7"
49
          },
50
          "accessright": {
51
            "classid": "OPEN",
52
            "classname": "Open Access",
53
            "schemename": "dnet:access_modes",
54
            "schemeid": "dnet:access_modes"
55
          },
56
          "instancetype": {
57
            "classid": "0004",
58
            "classname": "Conference object",
59
            "schemename": "dnet:publication_resource",
60
            "schemeid": "dnet:publication_resource"
61
          }
62
        }
63
      ],
64
      "metadata": {
65
        "publisher": {
66
          "value": "HAL CCSD"
67
        },
68
        "fulltext": [
69
          {
70
            "value": "https://hal.archives-ouvertes.fr/hal-01855684/document"
71
          },
72
          {
73
            "value": "https://hal.archives-ouvertes.fr/hal-01855684/file/20180517_DESIR_Poster_Paris_final.pdf"
74
          }
75
        ],
76
        "context": [
77
          {
78
            "id": "dariah"
79
          }
80
        ],
81
        "embargoenddate": {
82
          "value": ""
83
        },
84
        "description": [
85
          {
86
            "value": "International audience; 'DARIAH Beyond Europe' is a series of International Workshops to be organised in 2018 and 2019; one at Stanford University, one at the Library of Congress, and one in Adelaide hosted by the Australian National Data Service, in the context of the DARIAH-DESIR project. The purpose of the workshops is to promote DARIAH tools and services, to initiate collaborations, and above all to exchange knowledge and experience in digital scholarship on an international level. Key topics include: sustainability of infrastructures, digital text analysis, geo-humanities, image collections and annotation, music and performing arts, collections as data, and web archives. The DESIR (DARIAH-ERIC Sustainability Refined) project sets out to strengthen the sustainability of DARIAH and firmly establish it as a long-term leader and partner within arts and humanities communities.)."
87
          }
88
        ],
89
        "language": {
90
          "classid": "eng",
91
          "classname": "English",
92
          "schemename": "dnet:languages",
93
          "schemeid": "dnet:languages"
94
        },
95
        "title": [
96
          {
97
            "qualifier": {
98
              "classid": "main title",
99
              "classname": "main title",
100
              "schemename": "dnet:dataCite_title",
101
              "schemeid": "dnet:dataCite_title"
102
            },
103
            "value": "DARIAH Beyond Europe: an international exchange of ideas"
104
          }
105
        ],
106
        "author": [
107
          {
108
            "fullname": "Chambers , Sally",
109
            "surname": "Chambers",
110
            "name": "Sally",
111
            "rank": 1
112
          },
113
          {
114
            "fullname": "Hacigüzeller , Piraye",
115
            "surname": "Hacigüzeller",
116
            "name": "Piraye",
117
            "rank": 2
118
          },
119
          {
120
            "fullname": "Daems , Joke",
121
            "surname": "Daems",
122
            "name": "Joke",
123
            "rank": 3
124
          },
125
          {
126
            "fullname": "Raciti , Marco",
127
            "surname": "Raciti",
128
            "name": "Marco",
129
            "rank": 4
130
          }
131
        ],
132
        "resulttype": {
133
          "classid": "publication",
134
          "classname": "publication",
135
          "schemename": "dnet:result_typologies",
136
          "schemeid": "dnet:result_typologies"
137
        },
138
        "source": [
139
          {
140
            "value": "DARIAH-EU Annual Event 2018"
141
          },
142
          {
143
            "value": "https://hal.archives-ouvertes.fr/hal-01855684"
144
          },
145
          {
146
            "value": "DARIAH-EU Annual Event 2018, May 2018, Paris, France"
147
          }
148
        ],
149
        "dateofacceptance": {
150
          "value": "2018-05-22"
151
        },
152
        "contributor": [
153
          {
154
            "value": "Ghent University [Belgium]\n (\nUGENT\n)\n"
155
          },
156
          {
157
            "value": "UGENT\n ; \nGhent University [Belgium]\n (\nUGENT\n)\n"
158
          },
159
          {
160
            "value": "Digital Research Infrastructure for the Arts and Humanities\n (\nDARIAH\n)\n"
161
          },
162
          {
163
            "value": "DESIR has received funding from the EU Horizon 2020 Research and Innovation Programme under Grant Agreement No. 731081."
164
          },
165
          {
166
            "value": "DARIAH-EU"
167
          },
168
          {
169
            "value": "DARIAH-EU"
170
          },
171
          {
172
            "value": "DARIAH-BE"
173
          },
174
          {
175
            "value": "\nEuropean Project : \n"
176
          },
177
          {
178
            "value": "\nEuropean Project : \n731081,H2020-EU.1.4.1.1. - Developing new world-class research infrastructures,731081,DESIR\n(\n2017\n)\n"
179
          }
180
        ],
181
        "subject": [
182
          {
183
            "qualifier": {
184
              "classid": "keyword",
185
              "classname": "keyword",
186
              "schemename": "dnet:subject_classification_typologies",
187
              "schemeid": "dnet:subject_classification_typologies"
188
            },
189
            "value": "Geo-humanities"
190
          },
191
          {
192
            "qualifier": {
193
              "classid": "keyword",
194
              "classname": "keyword",
195
              "schemename": "dnet:subject_classification_typologies",
196
              "schemeid": "dnet:subject_classification_typologies"
197
            },
198
            "value": "Collections as Data"
199
          },
200
          {
201
            "qualifier": {
202
              "classid": "keyword",
203
              "classname": "keyword",
204
              "schemename": "dnet:subject_classification_typologies",
205
              "schemeid": "dnet:subject_classification_typologies"
206
            },
207
            "value": "Digital humanities"
208
          },
209
          {
210
            "qualifier": {
211
              "classid": "keyword",
212
              "classname": "keyword",
213
              "schemename": "dnet:subject_classification_typologies",
214
              "schemeid": "dnet:subject_classification_typologies"
215
            },
216
            "value": "Research Infrastructures"
217
          },
218
          {
219
            "qualifier": {
220
              "classid": "keyword",
221
              "classname": "keyword",
222
              "schemename": "dnet:subject_classification_typologies",
223
              "schemeid": "dnet:subject_classification_typologies"
224
            },
225
            "value": "Digital text analysis"
226
          },
227
          {
228
            "qualifier": {
229
              "classid": "keyword",
230
              "classname": "keyword",
231
              "schemename": "dnet:subject_classification_typologies",
232
              "schemeid": "dnet:subject_classification_typologies"
233
            },
234
            "value": "[ SHS.HIST ] Humanities and Social Sciences/History"
235
          },
236
          {
237
            "qualifier": {
238
              "classid": "keyword",
239
              "classname": "keyword",
240
              "schemename": "dnet:subject_classification_typologies",
241
              "schemeid": "dnet:subject_classification_typologies"
242
            },
243
            "value": "[ SHS.INFO ] Humanities and Social Sciences/Library and information sciences"
244
          },
245
          {
246
            "qualifier": {
247
              "classid": "keyword",
248
              "classname": "keyword",
249
              "schemename": "dnet:subject_classification_typologies",
250
              "schemeid": "dnet:subject_classification_typologies"
251
            },
252
            "value": "[ SHS.LITT ] Humanities and Social Sciences/Literature"
253
          },
254
          {
255
            "qualifier": {
256
              "classid": "keyword",
257
              "classname": "keyword",
258
              "schemename": "dnet:subject_classification_typologies",
259
              "schemeid": "dnet:subject_classification_typologies"
260
            },
261
            "value": "[ SHS.LANGUE ] Humanities and Social Sciences/Linguistics"
262
          }
263
        ]
264
      }
265
    },
266
    "collectedfrom": [
267
      {
268
        "value": "Hyper Article en Ligne - Sciences de l'Homme et de la Société",
269
        "key": "10|opendoar____::96da2f590cd7246bbde0051047b0d6f7"
270
      }
271
    ],
272
    "dateofcollection": "2019-02-08T08:57:19.94Z",
273
    "type": 50,
274
    "id": "50|od_______177::15a2e668e52252009a99f87ccb368073"
275
  }
276
}
modules/dnet-mapreduce-jobs/trunk/src/test/resources/eu/dnetlib/data/mapreduce/hbase/bulktag/cc.json
1
{"communities":{"clarin":{"id":"clarin","subjects":[],"datasources":[{"openaireId":"re3data_____::a507cdacc5bbcc08761c92185dee5cab"}],"zenodoCommunities":[]},"ee":{"id":"ee","subjects":["SDG13 - Climate action","SDG8 - Decent work and economic\n\t\t\t\t\tgrowth","SDG15 - Life on land","SDG2 - Zero hunger","SDG17 - Partnerships for the\n\t\t\t\t\tgoals","SDG10 - Reduced inequalities","SDG5 - Gender equality","SDG12 - Responsible\n\t\t\t\t\tconsumption and production","SDG14 - Life below water","SDG6 - Clean water and\n\t\t\t\t\tsanitation","SDG11 - Sustainable cities and communities","SDG1 - No poverty","SDG3 -\n\t\t\t\t\tGood health and well being","SDG7 - Affordable and clean energy","SDG4 - Quality\n\t\t\t\t\teducation","SDG9 - Industry innovation and infrastructure","SDG16 - Peace justice\n\t\t\t\t\tand strong institutions"],"datasources":[],"zenodoCommunities":[]},
2
  "aginfra":{"id":"aginfra","subjects":["animal production and health","fisheries and aquaculture","food safety and human nutrition","information management","food technology","agri-food education and extension","natural resources and environment","food system","engineering technology and Research","agriculture","food safety risk assessment","food security","farming practices and systems","plant production and protection","agri-food economics and policy","food distribution","forestry"],"datasources":[{"openaireId":"opendoar____::1a551829d50f1400b0dab21fdd969c04"},{"openaireId":"opendoar____::49af6c4e558a7569d80eee2e035e2bd7"},{"openaireId":"opendoar____::0266e33d3f546cb5436a10798e657d97"},{"openaireId":"opendoar____::fd4c2dc64ccb8496e6f1f94c85f30d06"},{"openaireId":"opendoar____::41bfd20a38bb1b0bec75acf0845530a7"},{"openaireId":"opendoar____::87ae6fb631f7c8a627e8e28785d9992d"}],"zenodoCommunities":[{"zenodoCommunityId":"edenis"},{"zenodoCommunityId":"efsa-pilot"},{"zenodoCommunityId":"egene3"},{"zenodoCommunityId":"efsa-kj"},{"zenodoCommunityId":"euromixproject"},{"zenodoCommunityId":"discardless"},{"zenodoCommunityId":"sedinstcjfst"},{"zenodoCommunityId":"afinet-kc"},{"zenodoCommunityId":"2231-4784"},{"zenodoCommunityId":"2231-0606"},{"zenodoCommunityId":"solace"},{"zenodoCommunityId":"pa17"},{"zenodoCommunityId":"smartakis"},{"zenodoCommunityId":"sedinstcjae"},{"zenodoCommunityId":"phenology_camera"},{"zenodoCommunityId":"aginfra"},{"zenodoCommunityId":"erosa"},{"zenodoCommunityId":"bigdatagrapes"}]},"fam":{"id":"fam","subjects":["Stock Assessment","pelagic","Fish farming","EMFF","Fisheries","Fishermen","maximum sustainable yield","trawler","Fishing vessel","Fisherman","Fishing gear","RFMO","Fish Aggregating Device","Bycatch","Fishery","common fisheries policy","Fishing fleet","Aquaculture"],"datasources":[{"openaireId":"doajarticles::8cec81178926caaca531afbd8eb5d64c"},{"openaireId":"doajarticles::0f7a7f30b5400615cae1829f3e743982"},{"openaireId":"doajarticles::9740f7f5af3e506d2ad2c215cdccd51a"},{"openaireId":"doajarticles::9f3fbaae044fa33cb7069b72935a3254"},{"openaireId":"doajarticles::cb67f33eb9819f5c624ce0313957f6b3"},{"openaireId":"doajarticles::e21c97cbb7a209afc75703681c462906"},{"openaireId":"doajarticles::554cde3be9e5c4588b4c4f9f503120cb"},{"openaireId":"tubitakulakb::11e22f49e65b9fd11d5b144b93861a1b"},{"openaireId":"doajarticles::57c5d3837da943e93b28ec4db82ec7a5"},{"openaireId":"doajarticles::a186f5ddb8e8c7ecc992ef51cf3315b1"},{"openaireId":"doajarticles::e21c97cbb7a209afc75703681c462906"},{"openaireId":"doajarticles::dca64612dfe0963fffc119098a319957"},{"openaireId":"doajarticles::dd70e44479f0ade25aa106aef3e87a0a"}],"zenodoCommunities":[{"zenodoCommunityId":"discardless"},{"zenodoCommunityId":"farfish2020"},{"zenodoCommunityId":"facts"},{"zenodoCommunityId":"climefish"},{"zenodoCommunityId":"proeel"},{"zenodoCommunityId":"primefish"},{"zenodoCommunityId":"h2020_vicinaqua"},{"zenodoCommunityId":"meece"},{"zenodoCommunityId":"rlsadb"}]},"instruct":{"id":"instruct","subjects":[],"datasources":[],"zenodoCommunities":[{"zenodoCommunityId":"instruct"},{"zenodoCommunityId":"west-life"}]},"mes":{"id":"mes","subjects":["marine","ocean","fish","aqua","sea"],"datasources":[],"zenodoCommunities":[{"zenodoCommunityId":"adriplan"},{"zenodoCommunityId":"devotes-project"},{"zenodoCommunityId":"euro-basin"},{"zenodoCommunityId":"naclim"},{"zenodoCommunityId":"discardless"},{"zenodoCommunityId":"assisibf"},{"zenodoCommunityId":"meece"},{"zenodoCommunityId":"facts"},{"zenodoCommunityId":"proeel"},{"zenodoCommunityId":"aquatrace"},{"zenodoCommunityId":"myfish"},{"zenodoCommunityId":"atlas"},{"zenodoCommunityId":"blue-actionh2020"},{"zenodoCommunityId":"sponges"},{"zenodoCommunityId":"merces_project"},{"zenodoCommunityId":"bigdataocean"},{"zenodoCommunityId":"columbus"},{"zenodoCommunityId":"h2020-aquainvad-ed"},{"zenodoCommunityId":"aquarius"},{"zenodoCommunityId":"southern-ocean-observing-system"},{"zenodoCommunityId":"eawag"},{"zenodoCommunityId":"mossco"},{"zenodoCommunityId":"onc"},{"zenodoCommunityId":"oceanbiogeochemistry"},{"zenodoCommunityId":"oceanliteracy"},{"zenodoCommunityId":"openearth"},{"zenodoCommunityId":"ocean"},{"zenodoCommunityId":"calcifierraman"},{"zenodoCommunityId":"bermudabream"},{"zenodoCommunityId":"brcorp1"},{"zenodoCommunityId":"mce"},{"zenodoCommunityId":"biogeochem"},{"zenodoCommunityId":"ecc2014"},{"zenodoCommunityId":"fisheries"},{"zenodoCommunityId":"sedinstcjfas"},{"zenodoCommunityId":"narmada"},{"zenodoCommunityId":"umr-entropie"},{"zenodoCommunityId":"farfish2020"},{"zenodoCommunityId":"primefish"},{"zenodoCommunityId":"zf-ilcs"},{"zenodoCommunityId":"climefish"},{"zenodoCommunityId":"afrimed_eu"},{"zenodoCommunityId":"spi-ace"},{"zenodoCommunityId":"cice-consortium"},{"zenodoCommunityId":"nemo-ocean"},{"zenodoCommunityId":"mesopp-h2020"},{"zenodoCommunityId":"marxiv"}]},"ni":{"id":"ni","subjects":["brain mapping","brain imaging","electroencephalography","arterial spin labelling","brain fingerprinting","brain","neuroimaging","Multimodal Brain Image Analysis","fMRI","neuroinformatics","fetal brain","brain ultrasonic imaging","topographic brain mapping","diffusion tensor imaging","computerized knowledge assessment","connectome mapping","brain magnetic resonance imaging","brain abnormalities"],"datasources":[{"openaireId":"re3data_____::5b9bf9171d92df854cf3c520692e9122"},{"openaireId":"doajarticles::c7d3de67dc77af72f6747157441252ec"},{"openaireId":"re3data_____::8515794670370f49c1d176c399c714f5"},{"openaireId":"doajarticles::d640648c84b10d425f96f11c3de468f3"},{"openaireId":"doajarticles::0c0e74daa5d95504eade9c81ebbd5b8a"},{"openaireId":"rest________::fb1a3d4523c95e63496e3bc7ba36244b"}],"zenodoCommunities":[{"zenodoCommunityId":"neuroinformatics"},{"zenodoCommunityId":"hbp"},{"zenodoCommunityId":"from_neuroscience_to_machine_learning"},{"zenodoCommunityId":"ci2c"},{"zenodoCommunityId":"opensourcebrain"},{"zenodoCommunityId":"brainspeak"},{"zenodoCommunityId":"braincom"},{"zenodoCommunityId":"nextgenvis"},{"zenodoCommunityId":"meso-brain"},{"zenodoCommunityId":"neuroplasticity-workshop"},{"zenodoCommunityId":"bionics"},{"zenodoCommunityId":"brainmattrain-676408"},{"zenodoCommunityId":"repronim"},{"zenodoCommunityId":"affectiveneuro"},{"zenodoCommunityId":"con"},{"zenodoCommunityId":"lab_neurol_sperim_irfmn_irccs_milano_it"}]},
3
  "dariah":{"id":"dariah","subjects":[],"datasources":[{"openaireId":"opendoar____::0266e33d3f546cb5436a10798e657d97","sc":{"cl":{"criteria":[{"ce":{"constraint":[{"verb":"contains","field":"description","value":"DARIAH"}]}}]}}}],"zenodoCommunities":[{"zenodoCommunityId":"dimpo"}]},"rda":{"id":"rda","subjects":[],"datasources":[],"zenodoCommunities":[{"zenodoCommunityId":"rda"}]},"dh-ch":{"id":"dh-ch","subjects":["modern art","metadata","monuments","sites","field walking","frescoes","excavation","ontologies","mapping","cities","temples","lithics","roads","digital cultural heritage","interoperability","archaeological reports","churches","standards","archaeological stratigraphy","buidings","digital humanities","survey","archaeological sites","CIDOC CRM","decorations","classic art","stratigraphy","digital archaeology","walls","data science","chapels","paintings","archaeology","fair data","mosaics","data visualization","burials","medieval art","castles","statues","natural language processing","inscriptions","vaults","open data","contemporary art","3D","pottery","site","metadata schema","architectural","vessels"],"datasources":[{"openaireId":"re3data_____::9ebe127e5f3a0bf401875690f3bb6b81"},{"openaireId":"doajarticles::c6cd4b532e12868c1d760a8d7cda6815"},{"openaireId":"doajarticles::a6de4499bb87bf3c01add0a9e2c9ed0b"},{"openaireId":"doajarticles::6eb31d13b12bc06bbac06aef63cf33c9"},{"openaireId":"doajarticles::0da84e9dfdc8419576169e027baa8028"},{"openaireId":"re3data_____::84e123776089ce3c7a33db98d9cd15a8"},{"openaireId":"openaire____::c5502a43e76feab55dd00cf50f519125"},{"openaireId":"re3data_____::a48f09c562b247a9919acfe195549b47"},{"openaireId":"opendoar____::97275a23ca44226c9964043c8462be96"}],"zenodoCommunities":[{"zenodoCommunityId":"storm"},{"zenodoCommunityId":"crosscult"},{"zenodoCommunityId":"wholodance_eu"},{"zenodoCommunityId":"digcur2013"},{"zenodoCommunityId":"gravitate"},{"zenodoCommunityId":"dipp2014"},{"zenodoCommunityId":"digitalhumanities"},{"zenodoCommunityId":"dimpo"},{"zenodoCommunityId":"adho"},{"zenodoCommunityId":"chc"},{"zenodoCommunityId":"wahr"},{"zenodoCommunityId":"ibe"},{"zenodoCommunityId":"ariadne"},{"zenodoCommunityId":"parthenos-hub"},{"zenodoCommunityId":"parthenos-training"},{"zenodoCommunityId":"gandhara"},{"zenodoCommunityId":"cmsouthasia"},{"zenodoCommunityId":"nilgirihills"},{"zenodoCommunityId":"shamsa_mustecio"},{"zenodoCommunityId":"bodhgaya"}]}}}
modules/dnet-mapreduce-jobs/trunk/src/test/resources/eu/dnetlib/data/mapreduce/hbase/bulktag/community_configuration_selcrit.xml
173 173
        </datasources>
174 174
        <zenodocommunities/>
175 175
    </community>
176
   <!-- <community id="dariah">
177
        <subjects/>
178
        <datasources>
179
            <datasource>
180
                <openaireId>opendoar____::7e7757b1e12abcb736ab9a754ffb617a</openaireId>
181
                <selcriteria>{"criteria":[{"constraint":[{"verb":"contains","field":"contributor","value":"DARIAH"}]}]}</selcriteria>
182
            </datasource>
183
            <datasource>
184
                <openaireId>opendoar____::96da2f590cd7246bbde0051047b0d6f7</openaireId>
185
                <selcriteria>{"criteria":[{"constraint":[{"verb":"contains","field":"contributor","value":"DARIAH"}]}]}</selcriteria>
186
            </datasource>
187
        </datasources>
188
        <zenodocommunities>
189
            <zenodocommunity>
190
                <zenodoid>dimpo</zenodoid>
191
                <selcriteria/>
192
            </zenodocommunity>
193
        </zenodocommunities>
194
    </community>-->
176 195
    <community id="dariah">
177 196
        <oacommunity>oaa_dariah</oacommunity>
178 197
        <subjects/>
179 198
        <datasources>
180 199
            <datasource>
181 200
                <openaireId>openaire____::1cfdb2e14977f31a98e0118283401f32</openaireId>
182
                <selcriteria>{"criteria":[{"sc":[{"verb":"equals","field":"orcid","value":"0000-0002-6665-4934"},{"verb":"contains","field":"description",
183
                    "value":"DARIAH"}]},{"sc":[{"verb":"equals","field":"author","value":"A"},{"verb":"equals",  "field":"contributor",
184
                    "value":"C"}]},{"sc":[{"verb":"equals","field":"author","value":"A1"}]}         ]}
201
                <selcriteria> {"criteria":[{"constraint":[{"verb":"contains","field":"contributor","value":"DARIAH"}]}]}
185 202
                </selcriteria>
186 203
            </datasource>
204
            <datasource>
205
                <openaireId>opendoar____::96da2f590cd7246bbde0051047b0d6f7</openaireId>
206
                <selcriteria>{"criteria":[{"constraint":[{"verb":"contains","field":"description","value":"DARIAH"}]}]}</selcriteria>
207
            </datasource>
187 208
        </datasources>
188 209
        <zenodocommunities>
189 210
            <zenodocommunity>
modules/dnet-mapreduce-jobs/trunk/src/test/resources/eu/dnetlib/data/mapreduce/hbase/bulktag/oaf_datasource1.json
61 61
      }],
62 62
      "metadata": {
63 63
        "fulltext": [{"value": "https://neurovault.org/collections/1970/download"}],
64
        "description": [{"value": ""},{"value":"This work has been partially supported by DARIA-EU infrastructure"}],
64
        "description": [{"value": ""},{"value":"This work has been partially supported by DARIAH-EU infrastructure"}],
65 65
        "title": [{
66 66
          "qualifier": {
67 67
            "classid": "mainp title",

Also available in: Unified diff