Project

General

Profile

« Previous | Next » 

Revision 61392

Added by Claudio Atzori 3 months ago

[maven-release-plugin] copy for tag dnet-openaireplus-workflows-7.1.16

View differences:

modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/deploy.info
1
{"type_source": "SVN", "goal": "package -U source:jar", "url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet45/modules/dnet-openaireplus-workflows/trunk/", "deploy_repository": "dnet45-snapshots", "version": "4", "mail": "sandro.labruzzo@isti.cnr.it,michele.artini@isti.cnr.it, claudio.atzori@isti.cnr.it, alessia.bardi@isti.cnr.it", "deploy_repository_url": "http://maven.research-infrastructures.eu/nexus/content/repositories/dnet45-snapshots", "name": "dnet-openaireplus-workflows"}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/java/eu/dnetlib/msro/openaireplus/utils/CleaningXsltFunctionTest.java
1
package eu.dnetlib.msro.openaireplus.utils;
2

  
3
import org.junit.Assert;
4
import org.junit.Test;
5

  
6
/**
7
 * Created by sandro on 11/28/16.
8
 */
9
public class CleaningXsltFunctionTest {
10

  
11
	@Test
12
	public void testCyrillic() {
13

  
14
		final String inputString = "Издательский Дом \"Медицина и Просв";
15
		final String cleanedString = CleaningXsltFunctions.clean(inputString);
16
		System.out.println(cleanedString);
17

  
18
		Assert.assertNotNull(cleanedString);
19

  
20
	}
21
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/java/eu/dnetlib/msro/openaireplus/workflows/index/OpenaireLayoutToRecordStylesheetTest.java
1
package eu.dnetlib.msro.openaireplus.workflows.index;
2

  
3
import com.fasterxml.jackson.databind.ObjectMapper;
4
import com.fasterxml.jackson.databind.ObjectWriter;
5
import com.google.common.collect.Maps;
6
import eu.dnetlib.functionality.index.model.document.IndexDocument;
7
import eu.dnetlib.functionality.index.solr.feed.InputDocumentFactory;
8
import eu.dnetlib.functionality.index.solr.feed.StreamingInputDocumentFactory;
9
import eu.dnetlib.miscutils.datetime.DateUtils;
10
import eu.dnetlib.miscutils.functional.xml.ApplyXslt;
11
import eu.dnetlib.miscutils.functional.xml.IndentXmlString;
12
import org.apache.commons.io.IOUtils;
13
import org.apache.solr.common.SolrInputDocument;
14
import org.dom4j.Document;
15
import org.dom4j.DocumentException;
16
import org.dom4j.Node;
17
import org.dom4j.io.SAXReader;
18
import org.junit.Test;
19
import org.springframework.core.io.ClassPathResource;
20

  
21
import javax.xml.stream.XMLStreamException;
22
import javax.xml.transform.Transformer;
23
import javax.xml.transform.TransformerException;
24
import javax.xml.transform.TransformerFactory;
25
import javax.xml.transform.stream.StreamResult;
26
import javax.xml.transform.stream.StreamSource;
27
import java.io.IOException;
28
import java.io.InputStream;
29
import java.io.StringReader;
30
import java.io.StringWriter;
31
import java.text.SimpleDateFormat;
32
import java.util.Map;
33

  
34
import static org.junit.Assert.assertFalse;
35
import static org.junit.Assert.assertNotNull;
36

  
37
public class OpenaireLayoutToRecordStylesheetTest {
38

  
39
	private static final String OPENAIRE_LAYOUT_TO_RECORD_STYLESHEET_XSL = "/eu/dnetlib/msro/openaireplus/workflows/index/openaireLayoutToRecordStylesheet.xsl";
40

  
41
	private static final String MDFORMAT_FIELDS_PROFILE = "/eu/dnetlib/test/profiles/MDFormatDSResources/MDFormatDSResourceType/2-8b9503d9-8a86-4330-93ef-7e0cd9bc87c2.xml";
42

  
43
	private static final String OAF_RECORD = "/eu/dnetlib/msro/openaireplus/workflows/index/oafRecord.xml";
44

  
45
	private final static String[] dateFormats = { "yyyy-MM-dd'T'hh:mm:ss", "yyyy-MM-dd", "dd-MM-yyyy", "dd/MM/yyyy", "yyyy" };
46

  
47
	@Test
48
	public void testConvertRecord() throws IOException, TransformerException, XMLStreamException, DocumentException {
49
		String xsl = prepareXslt("DMF");
50
		assertNotNull(xsl);
51
		assertFalse(xsl.isEmpty());
52

  
53
		System.out.println(xsl);
54

  
55
		ApplyXslt xslt = new ApplyXslt(xsl);
56

  
57
		String indexRecord = xslt.evaluate(readFromClasspath(OAF_RECORD));
58

  
59
		assertNotNull(indexRecord);
60
		assertFalse(indexRecord.isEmpty());
61

  
62
		System.out.println(IndentXmlString.apply(indexRecord));
63

  
64
		StreamingInputDocumentFactory factory = new StreamingInputDocumentFactory();
65

  
66
		SolrInputDocument doc = factory.parseDocument(DateUtils.now_ISO8601(), indexRecord, "dsId", "dnetResult");
67
		assertNotNull(doc);
68
		assertFalse(doc.isEmpty());
69

  
70
		System.out.println("SolrDocument");
71

  
72
		System.out.println(doc.values());
73

  
74
		System.out.println("SolrDocument fields");
75

  
76
		Map<String, Object> fields = Maps.newHashMap();
77

  
78
		doc.entrySet().stream()
79
				.forEach(e -> {
80
					Object value = e.getValue().getValueCount() == 1 ? e.getValue().getFirstValue() : e.getValue().getValues();
81
					fields.put(e.getKey(), value);
82
				});
83

  
84
		//new ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(fields);
85

  
86
		final ObjectWriter objectWriter = new ObjectMapper()
87
				.setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"))
88
				.writerWithDefaultPrettyPrinter();
89

  
90
		System.out.println(objectWriter.writeValueAsString(fields));
91
	}
92

  
93
	protected String prepareXslt(final String format) throws IOException, TransformerException, DocumentException {
94

  
95
		final Transformer layoutTransformer = TransformerFactory.newInstance().newTransformer(streamSource(OPENAIRE_LAYOUT_TO_RECORD_STYLESHEET_XSL));
96

  
97
		final StreamResult result = new StreamResult(new StringWriter());
98

  
99
		layoutTransformer.setParameter("format", format);
100

  
101
		final StreamSource fields = indexFieldsFromProfile(MDFORMAT_FIELDS_PROFILE);
102

  
103
		layoutTransformer.transform(fields , result);
104

  
105
		return result.getWriter().toString();
106
	}
107

  
108
	private StreamSource streamSource(final String s) throws IOException {
109
		return new StreamSource(new StringReader(readFromClasspath(s)));
110
	}
111

  
112
	private String readFromClasspath(final String s) throws IOException {
113
		ClassPathResource resource = new ClassPathResource(s);
114
		InputStream inputStream = resource.getInputStream();
115
		return IOUtils.toString(inputStream);
116
	}
117

  
118
	private StreamSource indexFieldsFromProfile(final String path) throws IOException, DocumentException {
119
		final Document doc = new SAXReader().read(new StringReader(readFromClasspath(path)));
120
		final Node layout = doc.selectSingleNode("//LAYOUT[@name='index']");
121
		return new StreamSource(new StringReader(layout.asXML()));
122
	}
123

  
124
}
125

  
126

  
127

  
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/java/eu/dnetlib/msro/openaireplus/workflows/nodes/hostedby/PatchHostedByTest.java
1
package eu.dnetlib.msro.openaireplus.workflows.nodes.hostedby;
2

  
3
import java.io.IOException;
4
import java.nio.charset.StandardCharsets;
5
import java.util.HashMap;
6

  
7
import com.google.common.collect.Maps;
8
import junit.framework.Assert;
9
import org.apache.commons.io.IOUtils;
10
import org.dom4j.Document;
11
import org.dom4j.DocumentException;
12
import org.dom4j.io.SAXReader;
13
import org.junit.Test;
14
import org.springframework.core.io.ClassPathResource;
15
import org.springframework.core.io.Resource;
16

  
17
public class PatchHostedByTest {
18
	private PatchHostedBy p = new PatchHostedBy(new HashMap<>(),"", new HostedByCounters());
19
	private Resource xmlInput = new ClassPathResource("/eu/dnetlib/msro/openaireplus/workflows/nodes/hostedby/input.xml");
20
	private Resource xmlInput2 = new ClassPathResource("/eu/dnetlib/msro/openaireplus/workflows/nodes/hostedby/input2.xml");
21
	private Resource xmlInput3 = new ClassPathResource("/eu/dnetlib/msro/openaireplus/workflows/nodes/hostedby/input3.xml");
22
	private Resource xmlInputFails = new ClassPathResource("/eu/dnetlib/msro/openaireplus/workflows/nodes/hostedby/inputFails.xml");
23

  
24

  
25
	private final SAXReader reader = new SAXReader();
26

  
27
	private final String xpath = "substring-after(//*[local-name()='supplementTo']/*[local-name()='source']/@id,'.')";
28

  
29
	@Test
30
	public void testEvaluate() throws DocumentException, IOException {
31
		final Document doc = reader.read(xmlInput.getInputStream());
32
		for (Object o : doc.selectNodes(this.xpath)) {
33
			Assert.assertEquals("journal10808", o);
34
		}
35
	}
36

  
37

  
38
	@Test
39
	public void testEvaluate3() throws Exception{
40
		HashMap<String, HostedByEntry> map = Maps.newHashMap();
41
		map.put("TIB.TEM", new HostedByEntry("123", "test repo"));
42
		PatchHostedBy phb = new PatchHostedBy(map,"//*[local-name() = 'setSpec']", new HostedByCounters());
43
		String res = phb.evaluate(IOUtils.toString(xmlInput3.getInputStream(), StandardCharsets.UTF_8));
44
		Assert.assertTrue(res.contains("123"));
45

  
46
	}
47

  
48
	@Test
49
	public void testInputFails() throws Exception{
50
		HashMap<String, HostedByEntry> map = Maps.newHashMap();
51
		map.put("0035-8711", new HostedByEntry("crossref::0035-8711", "Monthly Notices of the Royal Astronomical Society - RIGHT"));
52
		PatchHostedBy phb = new PatchHostedBy(map,"//*[local-name()='journal']/@issn", new HostedByCounters());
53
		String res = phb.evaluate(IOUtils.toString(xmlInputFails.getInputStream(), StandardCharsets.UTF_8));
54
	}
55

  
56
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/java/eu/dnetlib/msro/openaireplus/workflows/nodes/contexts/ContextUtilsTest.java
1
package eu.dnetlib.msro.openaireplus.workflows.nodes.contexts;
2

  
3
import java.io.StringReader;
4
import java.util.List;
5

  
6
import com.google.common.collect.Iterables;
7
import com.google.common.collect.Lists;
8
import org.apache.commons.logging.Log;
9
import org.apache.commons.logging.LogFactory;
10
import org.dom4j.Document;
11
import org.dom4j.DocumentException;
12
import org.dom4j.Element;
13
import org.dom4j.Node;
14
import org.dom4j.io.SAXReader;
15
import org.junit.Test;
16

  
17
import static org.junit.Assert.assertTrue;
18

  
19
/**
20
 * Created by claudio on 01/03/16.
21
 */
22
public class ContextUtilsTest {
23

  
24
	private static final Log log = LogFactory.getLog(ContextUtilsTest.class);
25
	private String params = "{param1:value1,param2:value2}";
26

  
27

  
28
	@Test
29
	public void testWrongInput() throws DocumentException {
30
		Iterable<String> it = Lists.newArrayList("<fundingtree><funder><id>irb_hr______::HRZZ</id><shortname>HRZZ</shortname><name>Croatian Science Foundation (CSF)</name><originalname>Hrvatska zaklada za znanost</originalname><jurisdiction>HR</jurisdiction></funder></fundingtree>");
31
		final ContextDesc context = ContextUtils.getContext(it, "HRZZ", "HRZZ", "funding", params, "all");
32
		System.out.println(context.asDomElement().asXML());
33
	}
34

  
35
	@Test
36
	public void testProfile() throws DocumentException {
37
		Iterable<String> it = Lists.newArrayList("<fundingtree><funder><id>irb_hr______::HRZZ</id><shortname>HRZZ</shortname><name>Croatian Science Foundation (CSF)</name><originalname>Hrvatska zaklada za znanost</originalname><jurisdiction>HR</jurisdiction></funder></fundingtree>");
38
		final ContextDesc contextDesc = ContextUtils.getContext(it, "HRZZ", "HRZZ", "funding", params, "all");
39
		final String profile = "<RESOURCE_PROFILE xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n"
40
				+ "    <HEADER>\n"
41
				+ "        <RESOURCE_IDENTIFIER value=\"1110d179-f7a8-481e-a1d9-51d14bec6b8d_Q29udGV4dERTUmVzb3VyY2VzL0NvbnRleHREU1Jlc291cmNlVHlwZQ==\"/>\n"
42
				+ "        <RESOURCE_TYPE value=\"ContextDSResourceType\"/>\n"
43
				+ "        <RESOURCE_KIND value=\"ContextDSResources\"/>\n"
44
				+ "        <RESOURCE_URI value=\"\"/>\n"
45
				+ "        <DATE_OF_CREATION value=\"2018-05-05T07:31:08+00:00\"/>\n"
46
				+ "    </HEADER>\n"
47
				+ "    <BODY>\n"
48
				+ "        <CONFIGURATION>\n"
49
				+ "            <context id=\"HRZZ\" label=\"HRZZ\" type=\"funding\">\n"
50
				+ "                 <param name=\"x\">valueX</param>\n"
51
				+ "                <category claim=\"true\" id=\"ARC::Special Research initiative (Direct stimulation of the visual cortex: a flexible strategy for restoring high-acuity pattern vision)\" label=\"Special Research initiative (Direct stimulation of the visual cortex: a flexible strategy for restoring high-acuity pattern vision)\">\n"
52
				+ "                    <param name=\"name\">Special Research initiative (Direct stimulation of the visual cortex: a flexible strategy for restoring high-acuity pattern vision)</param>\n"
53
				+ "                    <param name=\"openaireId\">arc_________::ARC::Special Research initiative (Direct stimulation of the visual cortex: a flexible strategy for restoring high-acuity pattern vision)</param>\n"
54
				+ "                    <param name=\"class\">arc:fundingStream</param>\n"
55
				+ "                </category>"
56
				+ "            </context>\n"
57
				+ "        </CONFIGURATION>\n"
58
				+ "        <STATUS/>\n"
59
				+ "        <SECURITY_PARAMETERS/>\n"
60
				+ "    </BODY>\n"
61
				+ "</RESOURCE_PROFILE>";
62
		final SAXReader reader = new SAXReader();
63
		final Document doc = reader.read(new StringReader(profile));
64
		final String profId = doc.valueOf("//HEADER/RESOURCE_IDENTIFIER/@value");
65
		final Element ctxElem = (Element) doc.selectSingleNode("//CONFIGURATION/context[@id='" + contextDesc.getId() + "' and @type='" + contextDesc.getType() + "']");
66
		updateContextParams(ctxElem, contextDesc);
67

  
68
		for (ContextPart cat : contextDesc.getCategories().values()) {
69
			final Node catElem = ctxElem.selectSingleNode("./category[@id='" + cat.getId() + "']");
70
			if (catElem != null) {
71
				catElem.detach();
72
			}
73
			ctxElem.add(cat.asDomElement("category"));
74
		}
75
		log.info("registering profile context " + contextDesc.getId());
76
		System.out.println(doc.asXML());
77
	}
78

  
79
	private void updateContextParams(final Element ctxElement, ContextDesc desc) {
80
		//removing old PARAMs
81
		List<Node> oldParams = ctxElement.selectNodes("param");
82
		for (Node n : oldParams) {
83
			n.detach();
84
		}
85
		//adding new params
86
		for (Element param : desc.getParamsAsElements()) {
87
			ctxElement.add(param);
88
		}
89
	}
90

  
91
	@Test
92
	public void testContextFactory() throws DocumentException {
93

  
94
		Iterable<String> it = Lists.newArrayList(
95
				"\t\t<fundings>\n"
96
						+ "\t\t\t<fundingtree>\n"
97
						+ "\t\t\t\t<funder>\n"
98
						+ "\t\t\t\t\t<id>arc_________::ARC</id>\n"
99
						+ "\t\t\t\t\t<shortname>ARC</shortname>\n"
100
						+ "\t\t\t\t\t<name>Australian Research Council (ARC)</name>\n"
101
						+ "\t\t\t\t\t<jurisdiction>AU</jurisdiction>\n"
102
						+ "\t\t\t\t</funder>\n"
103
						+ "\t\t\t</fundingtree>\n"
104
						+ "\t\t</fundings>");
105

  
106
		final ContextDesc context = ContextUtils.getContext(it, "ARC", "Australian Research Council (ARC)", "funding", params, "hidden");
107

  
108
		final Iterable<String> iter = Iterables.transform(context.getDbEntries().entrySet(), ContextUtils.getContextRowTransformer());
109

  
110
		final SAXReader r = new SAXReader();
111

  
112
		for (String f : iter) {
113

  
114
			final Document fd = r.read(new StringReader(f));
115

  
116
			assertTrue(fd != null);
117
			assertTrue("AU".equals(fd.valueOf("//FIELD[@name='jurisdiction']")));
118
			assertTrue("arc_________::ARC".equals(fd.valueOf("//FIELD[@name='funder']")));
119
		}
120
		System.out.println(context.asDomElement().asXML());
121
	}
122

  
123
	@Test
124
	public void testEmptyFunding() throws DocumentException {
125

  
126
		Iterable<String> it = Lists.newArrayList(
127
				"\t\t<fundings>\n"
128
						+ "\t\t\t<fundingtree/>\n"
129
						+ "\t\t</fundings>");
130

  
131
		final ContextDesc context = ContextUtils.getContext(it, "HRZZ", "HRZZ", "funding", params, "hidden");
132

  
133
		final Iterable<String> iter = Iterables.transform(context.getDbEntries().entrySet(), ContextUtils.getContextRowTransformer());
134

  
135
		final SAXReader r = new SAXReader();
136

  
137
		for (String f : iter) {
138
			System.out.println(f);
139

  
140
			/*final Document fd = r.read(new StringReader(f));
141

  
142
			assertTrue(fd != null);
143
			assertTrue("AU".equals(fd.valueOf("//FIELD[@name='jurisdiction']")));
144
			assertTrue("arc_________::ARC".equals(fd.valueOf("//FIELD[@name='funder']")));
145
			*/
146
		}
147
	}
148

  
149
	@Test
150
	public void testCountry() throws DocumentException {
151

  
152
		Iterable<String> it = Lists.newArrayList(
153
				"\t\t<fundings>\n"
154
						+ "\t\t\t<fundingtree>\n"
155
						+ "\t\t\t\t<funder>\n"
156
						+ "\t\t\t\t\t<id>arc_________::ARC</id>\n"
157
						+ "\t\t\t\t\t<shortname>ARC</shortname>\n"
158
						+ "\t\t\t\t\t<name>Australian Research Council (ARC)</name>\n"
159
						+ "\t\t\t\t\t<jurisdiction>AU</jurisdiction>\n"
160
						+ "\t\t\t\t</funder>\n"
161
						+ "\t\t\t</fundingtree>\n"
162
						+ "\t\t</fundings>");
163

  
164
		final ContextDesc context = ContextUtils.getContext(it, "ARC", "ARC", "funding", params, "hidden");
165

  
166
		final Iterable<String> iter = Iterables.transform(context.getDbEntries().entrySet(), ContextUtils.getContextRowTransformer());
167

  
168
		final SAXReader r = new SAXReader();
169

  
170
		for (String f : iter) {
171
			System.out.println(f);
172

  
173
			final Document fd = r.read(new StringReader(f));
174

  
175
			assertTrue(fd != null);
176
			assertTrue("AU".equals(fd.valueOf("//FIELD[@name='jurisdiction']")));
177
			assertTrue("arc_________::ARC".equals(fd.valueOf("//FIELD[@name='funder']")));
178
		}
179
	}
180

  
181
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/java/eu/dnetlib/msro/openaireplus/workflows/nodes/contexts/FETTest.java
1
package eu.dnetlib.msro.openaireplus.workflows.nodes.contexts;
2

  
3
import java.io.IOException;
4
import java.util.Arrays;
5
import java.util.Iterator;
6

  
7
import com.google.common.base.Function;
8
import com.google.common.collect.Lists;
9
import org.apache.commons.io.IOUtils;
10
import org.junit.Assert;
11
import org.junit.Before;
12
import org.junit.Test;
13
import org.springframework.core.io.Resource;
14
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
15

  
16
public class FETTest {
17

  
18
	private static final String PATTERN = "classpath*:/eu/dnetlib/msro/openaireplus/workflows/nodes/contexts/fetprojects/*.xml";
19
	//class under test
20
	private BuildH2020FETTaxonomy fetBuilder;
21
	private Iterator<String> iterator;
22

  
23
	//String outputCheck = "<category id=\"fet-h2020::open\" label=\"FET OPEN\" claim=\"false\"><concept id=\"fet-h2020::open::1\" label=\"FET-Open research projects\" claim=\"false\"><param name=\"CALL_ID\">H2020-FETOPEN-2014-2015-RIA</param><concept id=\"fet-h2020::open::1::713140\" label=\"Custom architecturally defined 3D stem cell derived functional human neural networks for transformative progress in neuroscience and medicine\" claim=\"true\"><param name=\"CD_PROJ_ID\">713140</param><param name=\"CD_CALL_ID\">FETOPEN-RIA-2014-2015</param><param name=\"CD_PROJECT_NUMBER\">713140</param><param name=\"CD_ACRONYM\">MESO_BRAIN</param><param name=\"CD_FRAMEWORK\">H2020</param></concept><concept id=\"fet-h2020::open::1::665148\" label=\"Quantum Controlled Ultrafast Multimode Entanglement and Measurement\" claim=\"true\"><param name=\"CD_PROJ_ID\">665148</param><param name=\"CD_CALL_ID\">FETOPEN-RIA-2014-2015</param><param name=\"CD_PROJECT_NUMBER\">665148</param><param name=\"CD_ACRONYM\">QCUMbER</param><param name=\"CD_FRAMEWORK\">H2020</param></concept><concept id=\"fet-h2020::open::1::665233\" label=\"Super-resolution visualisation and manipulation of metaphase chromosomes\" claim=\"true\"><param name=\"CD_PROJ_ID\">665233</param><param name=\"CD_CALL_ID\">FETOPEN-RIA-2014-2015</param><param name=\"CD_PROJECT_NUMBER\">665233</param><param name=\"CD_ACRONYM\">CHROMAVISION</param><param name=\"CD_FRAMEWORK\">H2020</param></concept></concept><concept id=\"fet-h2020::open::2\" label=\"FET Exchange Coordination and Support Activities 2015\" claim=\"false\"><param name=\"CALL_ID\">H2020-FETOPEN-2015-CSA</param><concept id=\"fet-h2020::open::2::713171\" label=\"SENSE - a roadmap for the ideal low light level sensor development\" claim=\"true\"><param name=\"CD_PROJ_ID\">713171</param><param name=\"CD_CALL_ID\">FETOPEN-CSA-FETEXCHANGE-2015</param><param name=\"CD_PROJECT_NUMBER\">713171</param><param name=\"CD_ACRONYM\">SENSE</param><param name=\"CD_FRAMEWORK\">H2020</param></concept></concept><concept id=\"fet-h2020::open::3\" label=\"FET Innovation Launchpad\" claim=\"false\"><param name=\"CALL_ID\">H2020-FETOPEN-4-2016-2017</param><concept id=\"fet-h2020::open::3::754514\" label=\"Resource AuctiOning Engine for the Mobile Digital MArket\" claim=\"true\"><param name=\"CD_PROJ_ID\">754514</param><param name=\"CD_CALL_ID\">FETOPEN-04-2016-2017</param><param name=\"CD_PROJECT_NUMBER\">754514</param><param name=\"CD_ACRONYM\">ROMA</param><param name=\"CD_FRAMEWORK\">H2020</param></concept><concept id=\"fet-h2020::open::3::754515\" label=\"Hello\" claim=\"true\"><param name=\"CD_PROJ_ID\">754515</param><param name=\"CD_CALL_ID\">FETOPEN-04-2016-2017</param><param name=\"CD_PROJECT_NUMBER\">754515</param><param name=\"CD_ACRONYM\">HHH</param><param name=\"CD_FRAMEWORK\">H2020</param></concept></concept><concept id=\"fet-h2020::open::4\" label=\"Coordination and Support Activities\" claim=\"false\"><param name=\"CALL_ID\">H2020-FETOPEN-2014-CSA</param><concept id=\"fet-h2020::open::4::665564\" label=\"Coordinating European Research on Molecular Communications\" claim=\"true\"><param name=\"CD_PROJ_ID\">665564</param><param name=\"CD_CALL_ID\">FETOPEN-2-2014</param><param name=\"CD_PROJECT_NUMBER\">665564</param><param name=\"CD_ACRONYM\">CIRCLE</param><param name=\"CD_FRAMEWORK\">H2020</param></concept><concept id=\"fet-h2020::open::4::665134\" label=\"Ensuring the success of the next FET Conference and exhibition at a key period for FET\" claim=\"true\"><param name=\"CD_PROJ_ID\">665134</param><param name=\"CD_CALL_ID\">FETOPEN-2-2014</param><param name=\"CD_PROJECT_NUMBER\">665134</param><param name=\"CD_ACRONYM\">FET-Event</param><param name=\"CD_FRAMEWORK\">H2020</param></concept><concept id=\"fet-h2020::open::4::665083\" label=\"Tracing impacts of the FET programme\" claim=\"true\"><param name=\"CD_PROJ_ID\">665083</param><param name=\"CD_CALL_ID\">FETOPEN-2-2014</param><param name=\"CD_PROJECT_NUMBER\">665083</param><param name=\"CD_ACRONYM\">FET_TRACES</param><param name=\"CD_FRAMEWORK\">H2020</param></concept><concept id=\"fet-h2020::open::4::665136\" label=\"Observing Emergence\" claim=\"true\"><param name=\"CD_PROJ_ID\">665136</param><param name=\"CD_CALL_ID\">FETOPEN-2-2014</param><param name=\"CD_PROJECT_NUMBER\">665136</param><param name=\"CD_ACRONYM\">OBSERVE</param><param name=\"CD_FRAMEWORK\">H2020</param></concept></concept></category>";
24

  
25
	@Before
26
	public void setup() throws Exception {
27
		final PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
28
		iterator = Lists.transform(Arrays.asList(resolver.getResources(PATTERN)), new Function<Resource, String>() {
29
			@Override
30
			public String apply(final Resource resource) {
31
				try {
32
					return IOUtils.toString(resource.getInputStream());
33
				} catch (IOException e) {
34
					return null;
35
				}
36
			}
37
		}).iterator();
38
		fetBuilder = new BuildH2020FETTaxonomy();
39
	}
40

  
41
	@Test
42
	public void parseFirstNFET() throws Exception {
43
		fetBuilder.setIterator(iterator);
44
		fetBuilder.parseFETProject(10);
45
		String fetContext = fetBuilder.getTaxonomy();
46
		Assert.assertNotNull(fetContext);
47
		Assert.assertNotSame("", fetContext);
48
		System.out.println(fetContext);
49
		//Assert.assertTrue(fetContext.contains(outputCheck));
50
	}
51

  
52
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/java/eu/dnetlib/msro/openaireplus/workflows/nodes/claims/ApplyClaimRelsJobNodeTest.java
1
package eu.dnetlib.msro.openaireplus.workflows.nodes.claims;
2

  
3
import com.google.protobuf.InvalidProtocolBufferException;
4
import eu.dnetlib.data.proto.OafProtos.Oaf;
5
import eu.dnetlib.msro.rmi.MSROException;
6
import org.junit.Test;
7
import org.postgresql.util.Base64;
8

  
9
/**
10
 * Created by Alessia Bardi on 26/06/2017.
11
 *
12
 * @author Alessia Bardi
13
 */
14
public class ApplyClaimRelsJobNodeTest {
15

  
16
	private ApplyClaimRelsJobNode applyClaims = new ApplyClaimRelsJobNode();
17

  
18
	@Test
19
	public void testGetValue() throws MSROException, InvalidProtocolBufferException {
20

  
21
		String sourceId = "40|corda_______::9f752db0b5ec9ca23673ca7f4cb0808e";
22
		String semantics = "resultProject_outcome_produces";
23
		String targetId = "50|userclaim___::6a8f649d968e734a6733c23a351c1859";
24
		System.out.println(getValue(sourceId, semantics, targetId));
25
	}
26

  
27
	@Test(expected = MSROException.class)
28
	public void testGetValueErrSem() throws MSROException, InvalidProtocolBufferException {
29

  
30
		String sourceId = "40|corda_______::9f752db0b5ec9ca23673ca7f4cb0808e";
31
		String semantics = "produces";
32
		String targetId = "50|userclaim___::6a8f649d968e734a6733c23a351c1859";
33
		getValue(sourceId, semantics, targetId);
34
	}
35

  
36
	private String getValue(final String rowKey, final String semantics, final String targetId) throws MSROException, InvalidProtocolBufferException {
37
		long time = System.currentTimeMillis();
38
		//final String sourceId, final String semantics, final String targetId, final long timestamp
39
		String res = applyClaims.getValue(rowKey, semantics, targetId, time);
40
		Oaf.Builder builder = Oaf.newBuilder().mergeFrom(Base64.decode(res));
41
		return builder.build().toString();
42
	}
43
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/java/eu/dnetlib/msro/openaireplus/workflows/nodes/claims/ApplyClaimUpdatesJobNodeTest.java
1
package eu.dnetlib.msro.openaireplus.workflows.nodes.claims;
2

  
3
import com.google.protobuf.InvalidProtocolBufferException;
4
import eu.dnetlib.data.proto.OafProtos.Oaf;
5
import eu.dnetlib.msro.rmi.MSROException;
6
import org.junit.Test;
7
import org.postgresql.util.Base64;
8

  
9
/**
10
 * Created by Alessia Bardi on 26/06/2017.
11
 *
12
 * @author Alessia Bardi
13
 */
14
public class ApplyClaimUpdatesJobNodeTest {
15

  
16
	private ApplyClaimUpdatesJobNode applyClaims = new ApplyClaimUpdatesJobNode();
17

  
18
	@Test
19
	public void testGetValueEGI() throws MSROException, InvalidProtocolBufferException {
20
		String context = "egi";
21
		String rowkey = "50|userclaim___::6a8f649d968e734a6733c23a351c1859";
22
		System.out.println(getValue(context, rowkey));
23
	}
24

  
25
	@Test
26
	public void testGetValueEGILongId() throws MSROException, InvalidProtocolBufferException {
27
		String context = "egi::classification::natsc::earths::other";
28
		String rowkey = "50|userclaim___::6a8f649d968e734a6733c23a351c1859";
29
		System.out.println(getValue(context, rowkey));
30
	}
31

  
32
	private String getValue(final String context, final String rowkey) throws MSROException, InvalidProtocolBufferException {
33
		long time = System.currentTimeMillis();
34
		//final String sourceId, final String semantics, final String targetId, final long timestamp
35
		String res = applyClaims.getValue(rowkey, context, time);
36
		Oaf.Builder builder = Oaf.newBuilder().mergeFrom(Base64.decode(res));
37
		return builder.build().toString();
38
	}
39
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/java/eu/dnetlib/msro/openaireplus/workflows/nodes/dhp/message/DnetMessageManagerTest.java
1
package eu.dnetlib.msro.openaireplus.workflows.nodes.dhp.message;
2

  
3
import static org.junit.Assert.assertEquals;
4
import static org.junit.Assert.assertTrue;
5

  
6
import eu.dnetlib.dhp.message.MessageType;
7
import org.junit.Before;
8
import org.junit.Test;
9

  
10
import eu.dnetlib.dhp.message.Message;
11
import eu.dnetlib.msro.rmi.MSROException;
12

  
13
public class DnetMessageManagerTest {
14

  
15
	private DnetMessageManager manager;
16

  
17
	private static final int MAX_N_MESSAGES = 10;
18

  
19
	@Before
20
	public void setUp() throws Exception {
21
		manager = new DnetMessageManager();
22
		manager.setMaxNumberOfMessages(MAX_N_MESSAGES);
23
	}
24

  
25
	@Test
26
	public void testRegisterMessage_multi_wfs() throws MSROException {
27
		for (long i = 0; i < MAX_N_MESSAGES; i++) {
28
			manager.registerMessage(new Message(MessageType.ONGOING, "wf-" + i));
29
			assertTrue(manager.getOngoingMessages().size() <= MAX_N_MESSAGES);
30
		}
31

  
32
		for (long i = MAX_N_MESSAGES; i < 200; i++) {
33
			manager.registerMessage(new Message(MessageType.ONGOING, "wf-" + i));
34
			assertEquals(MAX_N_MESSAGES, manager.getOngoingMessages().size());
35
		}
36
	}
37

  
38
	@Test
39
	public void testRegisterMessage_single_wf() throws MSROException {
40
		for (long i = 0; i < 100; i++) {
41
			manager.registerMessage(new Message(MessageType.ONGOING, "wf-xxxx"));
42
			assertEquals(1, manager.getOngoingMessages().size());
43
		}
44
	}
45

  
46
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/java/eu/dnetlib/msro/openaireplus/workflows/nodes/vre/VREPostJobNodeTest.java
1
package eu.dnetlib.msro.openaireplus.workflows.nodes.vre;
2

  
3
import org.junit.Assert;
4
import org.junit.Test;
5

  
6
/**
7
 * Created by Alessia Bardi on 2019-06-20.
8
 *
9
 * @author Alessia Bardi
10
 */
11
public class VREPostJobNodeTest {
12

  
13
	private String textWithNewLine = "Hello\\n World\\n!";
14
	private String expected = "Hello\n World\n!";
15

  
16
	@Test
17
	public void testNewLine(){
18
		String cleaned = textWithNewLine.replace("\\n", "\n");
19
		Assert.assertEquals(expected, cleaned);
20

  
21
	}
22

  
23

  
24
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/java/eu/dnetlib/utils/ontologies/OntologyLoaderTest.java
1
package eu.dnetlib.utils.ontologies;
2

  
3
import com.google.gson.Gson;
4
import org.apache.commons.lang3.StringUtils;
5
import org.junit.Assert;
6
import org.junit.Test;
7

  
8
import java.io.IOException;
9
import java.io.InputStream;
10

  
11
import static org.junit.Assert.*;
12

  
13
/**
14
 * Created by claudio on 12/12/2016.
15
 */
16
public class OntologyLoaderTest {
17

  
18
    private String basePath = "/eu/dnetlib/test/profiles/OntologyDSResources/OntologyDSResourceType/";
19

  
20
    @Test
21
    public void testLoadOntologyFromCp() {
22

  
23
        final InputStream i = getClass().getResourceAsStream(basePath + "result_result_relations.xml");
24

  
25
        Ontology o = OntologyLoader.loadOntologyFromCp(i);
26
        checkOntology(o);
27

  
28
        String supplement = o.inverseOf("isSupplementedBy");
29
        assertEquals(supplement, "isSupplementTo");
30

  
31
        String part = o.inverseOf("isPartOf");
32
        assertEquals(part, "hasPart");
33
    }
34

  
35
    @Test
36
    public void testLoadOntologiesFromCp() throws IOException {
37

  
38
        OntologyLoader.loadOntologiesFromCp().values().forEach(o -> checkOntology(o));
39
    }
40

  
41
    @Test
42
    public void testLoadOntologiesSerialization() throws IOException {
43

  
44
        final Ontologies o = OntologyLoader.loadOntologiesFromCp();
45
        assertNotNull(o);
46

  
47
        final String json = o.toJson(true);
48

  
49
        assertFalse(StringUtils.isBlank(json));
50
        assertFalse("{}".equals(json.trim()));
51

  
52
        //System.out.println(json);
53

  
54
        assertTrue(StringUtils.isNoneBlank(json));
55

  
56
        final Ontologies o1 = new Gson().fromJson(json, Ontologies.class);
57

  
58
        assertNotNull(o1);
59

  
60
        o1.entrySet().forEach(e -> checkOntology(e.getValue()));
61
    }
62

  
63
    private void checkOntology(Ontology o) {
64
        Assert.assertNotNull(o);
65
        Assert.assertTrue(StringUtils.isNotBlank(o.getCode()));
66
        Assert.assertTrue(StringUtils.isNotBlank(o.getDescription()));
67
        Assert.assertNotNull(o.getTerms().values());
68

  
69
        o.getTerms().values().forEach(it -> {
70
            Assert.assertTrue(StringUtils.isNotBlank(it.getCode()));
71
            Assert.assertTrue(StringUtils.isNotBlank(it.getEncoding()));
72
            Assert.assertTrue(StringUtils.isNotBlank(it.getEnglishName()));
73
            Assert.assertTrue(StringUtils.isNotBlank(it.getNativeName()));
74
            Assert.assertTrue(StringUtils.isNotBlank(it.getInverseCode()));
75
            Assert.assertNotNull(o.getTerms().get(it.getInverseCode()));
76
        });
77
    }
78
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/resources/eu/dnetlib/msro/openaireplus/api/objects/test_zenodo_software.json
1
{
2
  "authors":[
3
	"Alouges, Fran\u00e7ois",
4
	"Di Fratta, Giovanni"
5
  ],
6
  "collectedFromId":"opendoar____::2659",
7
  "description":"This is a software",
8
  "hostedById":"opendoar____::2659",
9
  "licenseCode":"OPEN",
10
  "originalId":"oai:zenodo.org:12345",
11
  "pids":[
12
	{
13
	  "type":"oai",
14
	  "value":"oai:zenodo.org:12345"
15
	},
16
	{
17
	  "type":"doi",
18
	  "value":"10.5281/zenodo.12345"
19
	}
20
  ],
21
  "publisher":"Zenodo",
22
  "resourceType":"0029",
23
  "title":"Parking 3-sphere swimmer. I. Energy minimizing strokes",
24
  "type":"software",
25
  "url":"https://zenodo.org/record/12345",
26
  "contexts": [
27
	"mes"
28
  ]
29
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/resources/eu/dnetlib/msro/openaireplus/api/objects/test_record_wrong_openaireId.json
1
{
2
  "openaireId":"dedup_wf_001::ab42e811",
3
  "originalId": "ORIG_ID_TEST",
4
  "type": "publication",
5
  "title": "TEST TITLE",
6
  "authors": [
7
	"Michele Artini",
8
	"Claudio Atzori",
9
	"Alessia Bardi"
10
  ],
11
  "publisher": "Test publisher",
12
  "description": "DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION",
13
  "language": "ita",
14
  "pids": [
15
	{
16
	  "type": "doi",
17
	  "value": "10.000/xyz-123"
18
	},
19
	{
20
	  "type": "oai",
21
	  "value": "oai:1234"
22
	}
23
  ],
24
  "licenseCode": "EMBARGO",
25
  "embargoEndDate": "2018-02-02",
26
  "resourceType": "0001",
27
  "url": "http://test.it/xyz",
28
  "collectedFromId": "opendoar____::2659",
29
  "hostedById": "opendoar____::2659",
30
  "linksToProjects": [
31
	"info:eu-repo/grantAgreement/EC/FP7/283595/EU//OpenAIREplus",
32
	"info:eu-repo/grantAgreement/EC/FP7/244909/EU/Making Capabilities Work/WorkAble"
33
  ],
34
  "contexts": [
35
	"egi::classification::natsc::math::pure",
36
	"egi::classification::natsc::math::stats"
37
  ]
38
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/resources/eu/dnetlib/msro/openaireplus/api/objects/test_record_openaireId.json
1
{
2
  "openaireId":"dedup_wf_001::ab42e8116f4ae3c4021fb7c643a8167a",
3
  "originalId": "ORIG_ID_TEST",
4
  "type": "publication",
5
  "title": "TEST TITLE",
6
  "authors": [
7
	"Michele Artini",
8
	"Claudio Atzori",
9
	"Alessia Bardi"
10
  ],
11
  "publisher": "Test publisher",
12
  "description": "DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION",
13
  "language": "ita",
14
  "pids": [
15
	{
16
	  "type": "doi",
17
	  "value": "10.000/xyz-123"
18
	},
19
	{
20
	  "type": "oai",
21
	  "value": "oai:1234"
22
	}
23
  ],
24
  "licenseCode": "EMBARGO",
25
  "embargoEndDate": "2018-02-02",
26
  "resourceType": "0001",
27
  "url": "http://test.it/xyz",
28
  "collectedFromId": "opendoar____::2659",
29
  "hostedById": "opendoar____::2659",
30
  "linksToProjects": [
31
	"info:eu-repo/grantAgreement/EC/FP7/283595/EU//OpenAIREplus",
32
	"info:eu-repo/grantAgreement/EC/FP7/244909/EU/Making Capabilities Work/WorkAble"
33
  ],
34
  "contexts": [
35
	"egi::classification::natsc::math::pure",
36
	"egi::classification::natsc::math::stats"
37
  ]
38
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/resources/eu/dnetlib/msro/openaireplus/api/objects/test_record.json
1
{
2
  "originalId": "ORIG_ID_12345",
3
  "title": "TEST TITLE",
4
  "authors": [
5
	"Michele Artini",
6
	"Claudio Atzori",
7
	"Alessia Bardi"
8
  ],
9
  "publisher": "Test publisher",
10
  "description": "DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION",
11
  "language": "ita",
12
  "pids": [
13
	{
14
	  "type": "doi",
15
	  "value": "10.000/xyz-123"
16
	},
17
	{
18
	  "type": "oai",
19
	  "value": "oai:1234"
20
	}
21
  ],
22
  "licenseCode": "OPEN",
23
  "resourceType": "0001",
24
  "url": "http://test.it/xyz",
25
  "collectedFromId": "opendoar____::2659",
26
  "hostedById": "opendoar____::2367",
27
  "linksToProjects": [
28
	"info:eu-repo/grantAgreement/EC/FP7/283595/EU//OpenAIREplus",
29
	"info:eu-repo/grantAgreement/EC/FP7/244909/EU/Making Capabilities Work/WorkAble"
30
  ],
31
  "contexts": [
32
	"egi::classification::natsc::math::pure",
33
	"egi::classification::natsc::math::stats"
34
  ]
35
}
36

  
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/resources/eu/dnetlib/msro/openaireplus/api/objects/test_zenodo.json
1
{
2
  "authors":[
3
	"Alouges, Fran\u00e7ois",
4
	"Di Fratta, Giovanni"
5
  ],
6
  "collectedFromId":"opendoar____::2659",
7
  "description":"The paper is about the parking 3-sphere swimmer ($\\text{sPr}_3$). This is a low-Reynolds number model swimmer composed of three balls of equal radii. The three balls can move along three horizontal axes (supported in the same plane) that mutually meet at the center of $\\text{sPr}_3$ with angles of $120^{\u2218}$ . The governing dynamical system is introduced and the implications of its geometric symmetries revealed. It is then shown that, in the first order range of small strokes, optimal periodic strokes are ellipses embedded in 3d space, i.e. closed curves of the form $t\ud835\udfc4 [0,2\u03c0] \u21a6 (\\cos t)u + (\\sin t)v$ for suitable orthogonal vectors $u$ and $v$ of $\u211d^3$. A simple analytic expression for the vectors $u$ and $v$ is derived. The results of the paper are used in a second article where the real physical dynamics of $\\text{sPr}_3$ is analyzed in the asymptotic range of very long arms. ; Comment: 17 pages, 4 figures",
8
  "hostedById":"opendoar____::2659",
9
  "licenseCode":"OPEN",
10
  "originalId":"oai:zenodo.org:996201",
11
  "pids":[
12
	{
13
	  "type":"oai",
14
	  "value":"oai:zenodo.org:996201"
15
	},
16
	{
17
	  "type":"doi",
18
	  "value":"10.5281/zenodo.996201"
19
	}
20
  ],
21
  "publisher":"Zenodo",
22
  "resourceType":"0020",
23
  "title":"Parking 3-sphere swimmer. I. Energy minimizing strokes",
24
  "type":"publication",
25
  "url":"https://zenodo.org/record/996201"
26
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/resources/eu/dnetlib/msro/openaireplus/api/objects/test_record_ariadne.json
1
{
2
  "openaireId":"od_______278::d5b39693ac6c2197e8cf48008a982950",
3
  "originalId": "oai:rudar.ruc.dk:1800/24690",
4
  "type": "publication",
5
  "title": "Autofiktion",
6
  "authors": [
7
	"Sloan, Patrick Alexander Raaby",
8
	"Strange, Gustav Valdemar",
9
	"Freund-Jensen, Sofie",
10
	"Canvin, Emilie Meistrup",
11
	"Faaborg, Ida Selvejer",
12
	"Kruse, Mikkel"
13
  ],
14
  "publisher": "",
15
  "description": "The following paper is a project on the autofictional book Færdig med Eddy Bellegueule by Édouard Louis (2015). The main focus is to ascertain how the novel is an expression of the author’s effort to connect social life and literature, and what part autofiction as a genre plays in this process. A textual analysis will describe the narrator’s position, and the aesthetic grip of the novel. Furthermore, we will analyze the central themes in Louis’ novel with theories by sociologist Pierre Bourdieu, gender theorist Judith Butler and postcolonial theorist Gayatri Spivak. This includes symbolic violence, gender roles, language and suppression. With use of classic literary theory and the more recent and specific theory on autofiction, the paper concludes, that Færdig med Eddy Bellegueule is based on non-fictional events, but presents these events through a fictionalization that raise the story into a literary work of art. The genre autofiction encircles a current tendency to blend non-fictional events and characters into literature, and Færdig med Eddy Bellegueule writes itself perfectly into this twilight zone between fact and fiction.",
16
  "language": "eng",
17
  "pids": [],
18
  "licenseCode": "OPEN",
19
  "resourceType": "0006",
20
  "url": "http://rudar.ruc.dk/handle/1800/24690",
21
  "collectedFromId": "opendoar____::278",
22
  "hostedById": "opendoar____::278",
23
  "linksToProjects": [],
24
  "contexts": []
25
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/resources/eu/dnetlib/msro/openaireplus/api/objects/submit_test_record.sh
1
#!/bin/bash
2

  
3
curl -H "Content-Type: application/json" --data @test_record.json "http://localhost:8280/app/mvc/api/publications/feedObject"
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/resources/eu/dnetlib/msro/openaireplus/api/objects/test_record_complete.json
1
{
2
  "originalId": "ORIG_ID_TEST",
3
  "type": "publication",
4
  "title": "TEST TITLE",
5
  "authors": [
6
	"Michele Artini",
7
	"Claudio Atzori",
8
	"Alessia Bardi"
9
  ],
10
  "publisher": "Test publisher",
11
  "description": "DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION",
12
  "language": "ita",
13
  "pids": [
14
	{
15
	  "type": "doi",
16
	  "value": "10.000/xyz-123"
17
	},
18
	{
19
	  "type": "oai",
20
	  "value": "oai:1234"
21
	}
22
  ],
23
  "licenseCode": "EMBARGO",
24
  "embargoEndDate": "2018-02-02",
25
  "resourceType": "0001",
26
  "url": "http://test.it/xyz",
27
  "collectedFromId": "opendoar____::2659",
28
  "hostedById": "opendoar____::2659",
29
  "linksToProjects": [
30
	"info:eu-repo/grantAgreement/EC/FP7/283595/EU//OpenAIREplus",
31
	"info:eu-repo/grantAgreement/EC/FP7/244909/EU/Making Capabilities Work/WorkAble"
32
  ],
33
  "contexts": [
34
	"egi::classification::natsc::math::pure",
35
	"egi::classification::natsc::math::stats"
36
  ]
37
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/resources/eu/dnetlib/msro/openaireplus/api/objects/test_record_with_greek_chars.json
1
{
2
  "originalId": "ORIG_ID_12345",
3
  "title": "TEST TITLE WITH Greek Characters",
4
  "authors": [
5
	"αβγδεζηθικλμ νξοπρσςτυφχψω",
6
	"ΑΒΓΔΕΖΗΘΙΚΛ ΜΝΞΟΠΡΣΤΥΦΧΨΩ"
7
  ],
8
  "publisher": "âââââââ",
9
  "description": "Αν περιμένατε να βρίσκεται εδώ μια σελίδα και δεν υπάρχει, η σελίδα μπορεί να μην εμφανίζεται λόγω καθυστέρησης στην ανανέωση της βάσης δεδομένων, ή μπορεί να έχει διαγραφεί. (Δείτε την γρήγορη διαγραφή σελίδων για πιθανούς λόγους). Μπορείτε να δοκιμάστε την λειτουργία εκκαθάρισης, και να ελέγξετε το αρχείο διαγραφών.",
10
  "language": "ell",
11
  "pids": [
12
	{
13
	  "type": "doi",
14
	  "value": "10.000/xyz-123-gr"
15
	}
16
  ],
17
  "licenseCode": "EMBARGO",
18
  "embargoEndDate": "2018-02-02",
19
  "resourceType": "0001",
20
  "url": "http://test.it/xyz",
21
  "collectedFromId": "opendoar____::2659",
22
  "hostedById": "opendoar____::2367",
23
  "linksToProjects": [
24
	"info:eu-repo/grantAgreement/EC/FP7/123456/EU//Test"
25
  ],
26
  "contexts": [
27
	"egi::classification::natsc::math::stats"
28
  ]
29
}
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/resources/eu/dnetlib/msro/openaireplus/workflows/index/oafRecord.xml
1
<record rank="null">
2
	<result>
3
		<header>
4
			<objIdentifier>lareferencia::29c95f5ef62c8bad9db1f4a6fdfd0a3a</objIdentifier>
5
			<dateOfCollection>2018-03-09T15:22:59.538Z</dateOfCollection>
6
			<dateOfTransformation>2018-09-19T09:51:37.481Z</dateOfTransformation>
7
			<counters></counters>
8
		</header>
9
		<metadata>
10
			<entity schemaLocation="http://namespace.openaire.eu/oaf https://www.openaire.eu/schema/1.0/oaf-1.0.xsd">
11
				<result>
12
					<source>Organizações &amp; Sociedade v.20 n.67 2013</source>
13
					<source>reponame:Escola de Administração da Universidade Federal da Bahia</source>
14
					<source>instname:UFBA</source>
15
					<format>text/html</format>
16
					<creator rank="1" name="Mônica Aguiar Mac-Allister Da" surname="Silva">Silva,Mônica de Aguiar Mac-Allister da</creator>
17
					<creator rank="2" name="José Célio Silveira" surname="Andrade">Andrade,José Célio Silveira</creator>
18
					<title classid="main title" classname="main title" schemeid="dnet:dataCite_title" schemename="dnet:dataCite_title">Editorial</title>
19
					<dateofacceptance>2013-12-01</dateofacceptance>
20
					<journal issn="" eissn="" lissn="" ep="" iss="" sp="" vol="" />
21
					<publisher>Escola de Administração da Universidade Federal da Bahia</publisher>
22
					<resulttype classid="publication" classname="publication" schemeid="dnet:result_typologies" schemename="dnet:result_typologies" />
23
					<language classid="por" classname="Portuguese" schemeid="dnet:languages" schemename="dnet:languages" />
24
					<country classid="" classname="" schemeid="" schemename="" />
25
					<subject classid="" classname="" schemeid="" schemename="" />
26
					<relevantdate classid="" classname="" schemeid="" schemename="" />
27
					<description />
28
					<embargoenddate />
29
					<fulltext />
30
					<contributor />
31
					<resourcetype classid="" classname="" schemeid="" schemename="" />
32
					<coverage />
33
					<storagedate />
34
					<device />
35
					<size />
36
					<version />
37
					<lastmetadataupdate />
38
					<metadataversionnumber />
39
					<documentationUrl />
40
					<codeRepositoryUrl />
41
					<programmingLanguage classid="" classname="" schemeid="" schemename="" />
42
					<contactperson />
43
					<contactgroup />
44
					<tool />
45
					<originalId>oai:periodicos.ibict.br.OrganizacoesESociedade:oai:scielo:S1984-92302013000400001</originalId>
46
					<collectedfrom name="LA Referencia" id="openaire____::dc6e224a8d74ce03bf301152d6e33e97" />
47
					<pid classid="" classname="" schemeid="" schemename="" />
48
					<bestaccessright classid="OPEN" classname="Open Access" schemeid="dnet:access_modes" schemename="dnet:access_modes" />
49
					<datainfo>
50
						<inferred>false</inferred>
51
						<deletedbyinference>false</deletedbyinference>
52
						<trust>0.9</trust>
53
						<inferenceprovenance />
54
						<provenanceaction classid="sysimport:crosswalk:repository" classname="sysimport:crosswalk:repository" schemeid="dnet:provenanceActions" schemename="dnet:provenanceActions" />
55
					</datainfo>
56
					<rels></rels>
57
					<children>
58
						<instance id="openaire____::dc6e224a8d74ce03bf301152d6e33e97">
59
							<collectedfrom name="LA Referencia" id="openaire____::dc6e224a8d74ce03bf301152d6e33e97" />
60
							<instancetype classid="0001" classname="Article" schemeid="dnet:publication_resource" schemename="dnet:publication_resource" />
61
							<dateofacceptance>2013-12-01</dateofacceptance>
62
							<accessright classid="OPEN" classname="Open Access" schemeid="dnet:access_modes" schemename="dnet:access_modes" />
63
							<hostedby name="LA Referencia" id="openaire____::dc6e224a8d74ce03bf301152d6e33e97" />
64
							<webresource>
65
								<url>http://www.scielo.br/scielo.php?script=sci_arttext&amp;pid=S1984-92302013000400001</url>
66
							</webresource>
67
						</instance>
68
					</children>
69
				</result>
70
			</entity>
71
		</metadata>
72
	</result>
73
</record>
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/resources/eu/dnetlib/msro/openaireplus/workflows/index/fields.xml
1
<LAYOUT name="index">
2
	<FIELDS>
3
		<FIELD indexable="false" name="oafentity" result="true" stat="false" tokenizable="true" xpath="//*[local-name() = 'entity']"/>
4
		<FIELD indexable="true" name="oaftype" result="false" stat="false" tokenizable="false" value="local-name(//*[local-name()='entity']/*)"/>
5
		<FIELD indexable="true" name="objIdentifier" result="false" stat="false" tokenizable="false" xpath="//header/dri:objIdentifier"/>
6

  
7
		<!-- DATASOURCE FIELDS -->
8
		<FIELD indexable="true" name="datasourceofficialname" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='datasource']/officialname"/>
9
		<FIELD indexable="true" name="datasourceenglishname" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='datasource']/englishname"/>
10
		<FIELD indexable="true" name="datasourcewebsiteurl" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='datasource']/websiteurl"/>
11
		<FIELD indexable="true" name="datasourcelogourl" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='datasource']/logourl"/>
12
		<FIELD indexable="true" name="datasourcecontactemail" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='datasource']/contactemail"/>
13
		<FIELD indexable="true" name="datasourceoddescription" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='datasource']/oddescription"/>
14
		<FIELD indexable="true" name="datasourceodnumberofitems" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='datasource']/odnumberofitems"/>
15
		<FIELD indexable="true" name="datasourceodnumberofitemsdate" result="false" stat="false" type="date" value="//*[local-name()='entity']/*[local-name()='datasource']/odnumberofitemsdate"/>
16
		<FIELD indexable="true" name="datasourceodsubjects" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='datasource']/odsubjects"/>
17
		<FIELD indexable="true" name="datasourceodlanguages" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='datasource']/odlanguages"/>
18
		<FIELD indexable="true" name="datasourceodcontenttypes" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='datasource']/odcontenttypes"/>
19
		<FIELD indexable="true" name="datasourcetypeid" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='datasource']/datasourcetype/@classid"/>
20
		<FIELD indexable="true" name="datasourcetypename" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='datasource']/datasourcetype/@classname"/>
21
		<FIELD indexable="true" name="datasourcetypeuiid" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='datasource']/datasourcetypeui/@classid"/>
22
		<FIELD indexable="true" name="datasourcetypeuiname" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='datasource']/datasourcetypeui/@classname"/>
23
		<FIELD indexable="true" name="datasourcecompatibilityid" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='datasource']/openairecompatibility/@classid"/>
24
		<FIELD indexable="true" name="datasourcecompatibilityname" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='datasource']/openairecompatibility/@classname"/>
25

  
26
		<!-- ORGANIZATION FIELDS -->
27
		<FIELD indexable="true" name="organizationlegalshortname" result="false" stat="false" type="ngramtext" value="//*[local-name()='entity']/*[local-name()='organization']/legalshortname"/>
28
		<FIELD indexable="true" name="organizationlegalname" result="false" stat="false" type="ngramtext" value="//*[local-name()='entity']/*[local-name()='organization']/legalname"/>
29
		<FIELD indexable="true" name="organizationwebsiteurl" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='organization']/websiteurl"/>
30
		<FIELD indexable="true" name="organizationlogourl" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='organization']/logourl"/>
31
		<FIELD indexable="true" name="organizationeclegalbody" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='organization']/eclegalbody"/>
32
		<FIELD indexable="true" name="organizationeclegalperson" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='organization']/eclegalperson"/>
33
		<FIELD indexable="true" name="organizationecnonprofit" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='organization']/ecnonprofit"/>
34
		<FIELD indexable="true" name="organizationecresearchorganization" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='organization']/ecresearchorganization"/>
35
		<FIELD indexable="true" name="organizationecinternationalorganizationeurinterests" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='organization']/ecinternationalorganizationeurinterests"/>
36
		<FIELD indexable="true" name="organizationecinternationalorganization" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='organization']/ecinternationalorganization"/>
37
		<FIELD indexable="true" name="organizationecenterprise" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='organization']/ecenterprise"/>
38
		<FIELD indexable="true" name="organizationecsmevalidated" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='organization']/ecsmevalidated"/>
39
		<FIELD indexable="true" name="organizationecnutscode" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='organization']/ecnutscode"/>
40
		<FIELD indexable="true" name="organizationcollectedfrom" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='organization']/collectedfrom"/>
41
		<FIELD indexable="true" name="organizationcountryid" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='organization']/country/@classid"/>
42
		<FIELD indexable="true" name="organizationcountryname" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='organization']/country/@classname"/>
43

  
44
		<!-- PERSON FIELDS -->
45
		<FIELD indexable="true" name="personfirstname" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='person']/firstname"/>
46
		<FIELD indexable="true" name="personsecondnames" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='person']/secondnames"/>
47
		<FIELD indexable="true" name="personfullname" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='person']/fullname"/>
48
		<FIELD indexable="true" name="personfax" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='person']/fax"/>
49
		<FIELD indexable="true" name="personemail" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='person']/email"/>
50
		<FIELD indexable="true" name="personphone" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='person']/phone"/>
51
		<FIELD indexable="true" name="personcollectedfrom" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='person']/collectedfrom"/>
52
		<FIELD indexable="true" name="personcountryid" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='person']/nationality/@classid"/>
53
		<FIELD indexable="true" name="personcountryname" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='person']/nationality/@classname"/>
54

  
55
		<!-- PROJECT FIELDS -->
56
		<FIELD indexable="true" name="projectwebsiteurl" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='project']/websiteurl"/>
57
		<FIELD indexable="true" name="projectcode" result="false" stat="false" type="ngramtext" value="//*[local-name()='entity']/*[local-name()='project']/code"/>
58
		<FIELD indexable="true" name="projectacronym" result="false" stat="false" type="ngramtext" value="//*[local-name()='entity']/*[local-name()='project']/acronym"/>
59
		<FIELD indexable="true" name="projecttitle" result="false" stat="false" type="ngramtext" value="//*[local-name()='entity']/*[local-name()='project']/title"/>
60
		<FIELD indexable="true" name="projectstartdate" result="false" stat="false" type="date" value="//*[local-name()='entity']/*[local-name()='project']/startdate"/>
61
		<FIELD indexable="true" name="projectstartyear" result="false" stat="false" tokenizable="false" value="dnet:extractYear(//*[local-name()='entity']/*[local-name()='project']/startdate)"/>
62
		<FIELD indexable="true" name="projectenddate" result="false" stat="false" type="date" value="//*[local-name()='entity']/*[local-name()='project']/enddate"/>
63
		<FIELD indexable="true" name="projectendyear" result="false" stat="false" tokenizable="false" value="dnet:extractYear(//*[local-name()='entity']/*[local-name()='project']/enddate)"/>
64
		<FIELD indexable="true" name="projectcallidentifier" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='project']/callidentifier"/>
65
		<FIELD indexable="true" name="projectkeywords" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='project']/keywords"/>
66
		<FIELD indexable="true" name="projectduration" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='project']/duration"/>
67
		<FIELD indexable="true" name="projectecsc39" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='project']/ecsc39"/>
68
		<FIELD indexable="true" name="projectcollectedfrom" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='project']/collectedfrom"/>
69
		<FIELD indexable="true" name="projectcontracttypeid" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='project']/contracttype/@classid"/>
70
		<FIELD indexable="true" name="projectcontracttypename" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='project']/contracttype/@classname"/>
71
		<FIELD indexable="true" name="fundinglevel0_id" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='project']/fundingtree//funding_level_0/id"/>
72
		<FIELD indexable="true" name="fundinglevel0_name" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='project']/fundingtree//funding_level_0/name"/>
73
		<FIELD indexable="true" name="fundinglevel0_description" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='project']/fundingtree//funding_level_0/description"/>
74
		<FIELD indexable="true" name="fundinglevel1_id" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='project']/fundingtree//funding_level_1/id"/>
75
		<FIELD indexable="true" name="fundinglevel1_name" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='project']/fundingtree//funding_level_1/name"/>
76
		<FIELD indexable="true" name="fundinglevel1_description" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='project']/fundingtree//funding_level_1/description"/>
77
		<FIELD indexable="true" name="fundinglevel2_id" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='project']/fundingtree//funding_level_2/id"/>
78
		<FIELD indexable="true" name="fundinglevel2_name" result="false" stat="false" tokenizable="false" value="//*[local-name()='entity']/*[local-name()='project']/fundingtree//funding_level_2/name"/>
79
		<FIELD indexable="true" name="fundinglevel2_description" result="false" stat="false" value="//*[local-name()='entity']/*[local-name()='project']/fundingtree//funding_level_2/description"/>
80

  
81
		<!-- RESULT FIELDS -->
82
		<FIELD indexable="true" name="resulttitle" result="false" stat="false" xpath="//*[local-name()='entity']/*[local-name()='result']/title"/>
83
		<FIELD indexable="true" name="resulttitleclass" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/title/@classname"/>
84
		<FIELD indexable="true" name="resultsubject" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/subject"/>
85
		<FIELD indexable="true" name="resultsubjectclass" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/subject/@classname"/>
86
		<FIELD indexable="true" name="resultdate" result="false" stat="false" type="date" value="//*[local-name()='entity']/*[local-name()='result']/relevantdate"/>
87
		<FIELD indexable="true" name="resultdateclass" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/relevantdate/@classname"/>
88
		<FIELD indexable="true" name="resultstoragedate" result="false" stat="false" type="date" value="//*[local-name()='entity']/*[local-name()='result']/storagedate"/>
89
		<FIELD indexable="true" name="resultembargoenddate" result="false" stat="false" type="date" value="//*[local-name()='entity']/*[local-name()='result']/embargoenddate"/>
90
		<FIELD indexable="true" name="resultembargoendyear" result="false" stat="false" tokenizable="false" value="dnet:extractYear(//*[local-name()='entity']/*[local-name()='result']/embargoenddate)"/>
91
		<FIELD indexable="true" name="resulttypeid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/resulttype/@classid"/>
92
		<FIELD indexable="true" name="resulttypename" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/resulttype/@classname"/>
93
		<FIELD indexable="true" name="resultlanguageid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/language/@classid"/>
94
		<FIELD indexable="true" name="resultlanguagename" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/language/@classname"/>
95
		<FIELD indexable="true" name="resultpublisher" result="false" stat="false" xpath="//*[local-name()='entity']/*[local-name()='result']/*[local-name()='publisher']"/>
96
		<FIELD indexable="true" name="resultdescription" result="false" stat="false" xpath="//*[local-name()='entity']/*[local-name()='result']/*[local-name()='description']"/>
97
		<FIELD indexable="true" name="resultrights" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/children/instance/licence/@classname"/>
98
		<FIELD indexable="true" name="resultrightsid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/children/instance/licence/@classid"/>
99
		<FIELD indexable="true" name="resultbestlicense" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/bestlicense/@classname"/>
100
		<FIELD indexable="true" name="resultbestlicenseid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/bestlicense/@classid"/>
101
		<FIELD indexable="true" name="resultidentifier" result="false" stat="false" xpath="//*[local-name()='entity']/*[local-name()='result']/children/instance/webresource/*[local-name()='identifier']"/>
102
		<FIELD indexable="true" name="resultdateofacceptance" result="false" stat="false" type="date" value="//*[local-name()='entity']/*[local-name()='result']/dateofacceptance"/>
103
		<FIELD indexable="true" name="resultacceptanceyear" result="false" stat="false" tokenizable="false" value="dnet:extractYear(//*[local-name()='entity']/*[local-name()='result']/dateofacceptance)"/>
104
		<FIELD indexable="true" name="resulthostingdatasourceid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/children/instance/*[local-name()='hostedby']/@id"/>
105
		<FIELD indexable="true" name="resulthostingdatasourcename" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/children/instance/*[local-name()='hostedby']/@name"/>
106
		<FIELD indexable="true" name="resultcollectedfromdatasourceid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/*[local-name()='collectedfrom']/@id"/>
107
		<FIELD indexable="true" name="resultcollectedfromdatasourcename" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/*[local-name()='collectedfrom']/@name"/>
108
		<FIELD indexable="true" name="instancetypename" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/children/instance/*[local-name()='instancetype']/@classname"/>
109
		<FIELD indexable="true" name="instancetypenameid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/children/instance/*[local-name()='instancetype']/@classid"/>
110
		<FIELD indexable="true" name="resultdupid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*//children/result/@objidentifier"/>
111
		<FIELD indexable="true" name="externalrefsite" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*//children/externalreference/sitename"/>
112
		<FIELD indexable="true" name="externalreflabel" result="false" stat="false" tokenizable="true" xpath="//*[local-name()='entity']/*//children/externalreference/label"/>
113
		<FIELD indexable="true" name="externalrefclass" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*//children/externalreference/qualifier/@classid"/>
114
		<FIELD indexable="true" name="externalrefid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*//children/externalreference/refidentifier"/>
115

  
116

  
117
		<!--  REL FIELDS -->
118
		<FIELD indexable="true" name="relpersonid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*//rel/to[@type='person']"/>
119
		<FIELD indexable="true" name="relperson" result="false" stat="false" xpath="//*[local-name()='entity']/*//rel[./to/@type='person']/fullname"/>
120
		<FIELD indexable="true" name="relprojectid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*//rel/to[@type='project']"/>
121
		<FIELD indexable="true" name="relprojectcode" result="false" stat="false" xpath="//*[local-name()='entity']/*//rel[to/@type='project']/code"/>
122
		<FIELD indexable="true" name="relprojectname" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*//rel[./to/@type='project']/acronym"/>
123
		<FIELD indexable="true" name="relprojecttitle" result="false" stat="false" xpath="//*[local-name()='entity']/*//rel[./to/@type='project']/title"/>
124
		<FIELD indexable="true" name="relcontracttypeid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*//rel[./to/@type='project']/contracttype/@classid"/>
125
		<FIELD indexable="true" name="relcontracttypename" result="false" stat="false" xpath="//*[local-name()='entity']/*//rel[./to/@type='project']/contracttype/@classname"/>
126
		<FIELD indexable="true" name="relorganizationcountryid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*//rel[./to/@type='organization']/country/@classid"/>
127
		<FIELD indexable="true" name="relorganizationcountryname" result="false" stat="false" xpath="//*[local-name()='entity']/*//rel[./to/@type='organization']/country/@classname"/>
128
		<FIELD indexable="true" name="relorganizationid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*//rel/to[@type='organization']"/>
129
		<FIELD indexable="true" name="relorganizationname" result="false" stat="false" xpath="//*[local-name()='entity']/*//rel[./to/@type='organization']/legalname"/>
130
		<FIELD indexable="true" name="relorganizationshortname" result="false" stat="false" xpath="//*[local-name()='entity']/*//rel[./to/@type='organization']/legalshortname"/>
131
		<FIELD indexable="true" name="relresultid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*//rel/to[@type='result']"/>
132
		<FIELD indexable="true" name="relfundinglevel0_id" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//rel/funding/funding_level_0"/>
133
		<FIELD indexable="true" name="relfundinglevel1_id" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//rel/funding/funding_level_1"/>
134
		<FIELD indexable="true" name="relfundinglevel2_id" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//rel/funding/funding_level_2"/>
135
		<FIELD indexable="true" name="relinferred" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//rel/@inferred"/>
136
		<FIELD indexable="true" name="reltrust" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//rel/@trust"/>
137
		<FIELD indexable="true" name="relinferenceprovenance" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//rel/@inferenceprovenance"/>
138
		<FIELD indexable="true" name="relprovenanceactionclassid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//rel/@provenanceaction"/>
139

  
140
		<!-- COMMON FIELDS -->
141
		<FIELD indexable="true" name="dateofcollection" result="false" stat="false" type="date" value="//header/*[local-name()='dateOfCollection']"/>
142
		<FIELD indexable="true" name="collectedfromdatasourceid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//*[local-name()='collectedfrom']/@id"/>
143
		<FIELD indexable="true" name="collectedfromdatasourcename" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//*[local-name()='collectedfrom']/@name"/>
144
		<FIELD indexable="true" name="pid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//pid"/>
145
		<FIELD indexable="true" name="pidclassid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//pid/@classid"/>
146
		<FIELD indexable="true" name="pidclassname" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//pid/@classname"/>
147
		<FIELD indexable="true" name="h1" result="false" stat="false" stored="false" tokenizable="false" value="dnet:randomInt(100)"/>
148
		<FIELD indexable="true" name="h2" result="false" stat="false" stored="false" tokenizable="false" value="dnet:randomInt(100)"/>
149
		<FIELD indexable="true" name="inferred" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//datainfo/inferred"/>
150
		<FIELD indexable="true" name="deletedbyinference" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//datainfo/deletedbyinference"/>
151
		<FIELD indexable="true" name="trust" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//datainfo/trust"/>
152
		<FIELD indexable="true" name="inferenceprovenance" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//datainfo/inferenceprovenance"/>
153
		<FIELD indexable="true" name="provenanceactionclassid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']//datainfo/provenanceaction/@classid"/>
154
		<FIELD indexable="true" name="contextid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/context/@id"/>
155
		<FIELD indexable="true" name="contexttype" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/context/@type"/>
156
		<FIELD indexable="true" name="contextname" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/context/@label"/>
157
		<FIELD indexable="true" name="categoryid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/context/category/@id"/>
158
		<FIELD indexable="true" name="categoryname" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/context/category/@label"/>
159
		<FIELD indexable="true" name="conceptid" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/context/category//concept/@id"/>
160
		<FIELD indexable="true" name="conceptname" result="false" stat="false" tokenizable="false" xpath="//*[local-name()='entity']/*[local-name()='result']/context/category//concept/@label"/>
161

  
162
		<!-- COUNTER FIELDS -->
163
		<FIELD name="counter_dedup" xpath="/record/result/*[local-name()='header']/*[local-name()='counters']/counter_dedup/@value" type="int" indexable="true" header="true" stored="true"/>
164
		<FIELD name="counter_authorship" xpath="/record/result/*[local-name()='header']/*[local-name()='counters']/counter_authorship/@value" type="int" indexable="true" header="true" stored="true"/>
165
		<FIELD name="counter_participation" xpath="/record/result/*[local-name()='header']/*[local-name()='counters']/counter_participation/@value" type="int" indexable="true" header="true" stored="true"/>
166
		<FIELD name="counter_outcome" xpath="/record/result/*[local-name()='header']/*[local-name()='counters']/counter_outcome/@value" type="int" indexable="true" header="true" stored="true"/>
167
		<FIELD name="counter_contactperson" xpath="/record/result/*[local-name()='header']/*[local-name()='counters']/counter_contactperson/@value" type="int" indexable="true" header="true" stored="true"/>
168
		<FIELD name="counter_provision" xpath="/record/result/*[local-name()='header']/*[local-name()='counters']/counter_provision/@value" type="int" indexable="true" header="true" stored="true"/>
169
		<FIELD name="counter_similarity" xpath="/record/result/*[local-name()='header']/*[local-name()='counters']/counter_similarity/@value" type="int" indexable="true" header="true" stored="true"/>
170
		<FIELD name="counter_publicationdataset" xpath="/record/result/*[local-name()='header']/*[local-name()='counters']/counter_publicationdataset/@value" type="int" indexable="true" header="true" stored="true"/>
171
	</FIELDS>
172
</LAYOUT>
modules/dnet-openaireplus-workflows/tags/dnet-openaireplus-workflows-7.1.16/src/test/resources/eu/dnetlib/msro/openaireplus/workflows/nodes/hostedby/input2.xml
1
<doi_record owner="10.1080" timestamp="2017-02-14 08:25:07">
2
    <crossref>
3
        <journal>
4
            <journal_metadata language="en">
5
                <full_title>Expert Review of Proteomics</full_title>
6
                <abbrev_title>Expert Review of Proteomics</abbrev_title>
7
                <issn media_type="print">1478-9450</issn>
8
                <issn media_type="electronic">1744-8387</issn>
9
            </journal_metadata>
10
            <journal_issue>
11
                <publication_date media_type="online">
12
                    <month>11</month>
13
                    <day>11</day>
14
                    <year>2016</year>
15
                </publication_date>
16
                <publication_date media_type="print">
17
                    <month>12</month>
18
                    <year>2016</year>
19
                </publication_date>
20
                <journal_volume>
21
                    <volume>13</volume>
22
                </journal_volume>
23
                <issue>12</issue>
24
            </journal_issue>
25
            <journal_article publication_type="full_text">
26
                <titles>
27
                    <title>Urinary biomarkers for renal tract malformations</title>
28
                </titles>
29
                <contributors>
30
                    <person_name contributor_role="author" sequence="first">
31
                        <given_name>Pedro</given_name>
32
                        <surname>Magalhães</surname>
33
                    </person_name>
34
                    <person_name contributor_role="author" sequence="additional">
35
                        <given_name>Joost P.</given_name>
36
                        <surname>Schanstra</surname>
37
                    </person_name>
38
                    <person_name contributor_role="author" sequence="additional">
39
                        <given_name>Emma</given_name>
40
                        <surname>Carrick</surname>
41
                    </person_name>
42
                    <person_name contributor_role="author" sequence="additional">
43
                        <given_name>Harald</given_name>
44
                        <surname>Mischak</surname>
45
                    </person_name>
46
                    <person_name contributor_role="author" sequence="additional">
47
                        <given_name>Petra</given_name>
48
                        <surname>Zürbig</surname>
49
                    </person_name>
50
                </contributors>
51
                <publication_date media_type="online">
52
                    <month>11</month>
53
                    <day>15</day>
54
                    <year>2016</year>
55
                </publication_date>
56
                <publication_date media_type="print">
57
                    <month>12</month>
58
                    <year>2016</year>
59
                </publication_date>
60
                <pages>
61
                    <first_page>1121</first_page>
62
                    <last_page>1129</last_page>
63
                </pages>
64
                <publisher_item>
65
                    <item_number item_number_type="sequence-number">7</item_number>
66
                    <identifier id_type="doi">10.1080/14789450.2016.1254555</identifier>
67
                </publisher_item>
68
                <crossmark>
69
                    <crossmark_version>1</crossmark_version>
70
                    <crossmark_policy>10.1080/tandf_crossmark_01</crossmark_policy>
71
                    <crossmark_domains>
72
                        <crossmark_domain>
73
                            <domain>www.tandfonline.com</domain>
74
                        </crossmark_domain>
75
                    </crossmark_domains>
76
                    <crossmark_domain_exclusive>true</crossmark_domain_exclusive>
77
                    <custom_metadata>
78
                        <assertion label="Peer Review Statement" name="peerreview_statement" order="1">The publishing and review policy for this title is described in its Aims &amp; Scope.</assertion>
79
                        <assertion href="http://www.tandfonline.com/action/journalInformation?show=aimsScope&amp;journalCode=ieru20" label="Aim &amp; Scope" name="aims_and_scope_url" order="2">http://www.tandfonline.com/action/journalInformation?show=aimsScope&amp;journalCode=ieru20</assertion>
80
                        <program name="fundref">
81
                            <assertion name="fundgroup">
82
                                <assertion name="funder_name">
83
                                    Horizon 2020
84
                                    <assertion name="funder_identifier" provider="crossref">http://dx.doi.org/10.13039/100010661</assertion>
85
                                </assertion>
86
                                <assertion name="award_number">642937-RENALTRACT</assertion>
87
                            </assertion>
88
                            <assertion name="fundgroup">
89
                                <assertion name="funder_name">
90
                                    Seventh Framework Programme
91
                                    <assertion name="funder_identifier">http://dx.doi.org/10.13039/501100004963</assertion>
92
                                </assertion>
93
                                <assertion name="award_number">305608-EURenOmics</assertion>
94
                                <assertion name="award_number">608332-iMODECKD</assertion>
95
                            </assertion>
96
                        </program>
97
                    </custom_metadata>
98
                </crossmark>
99
                <doi_data>
100
                    <doi>10.1080/14789450.2016.1254555</doi>
101
                    <resource>https://www.tandfonline.com/doi/full/10.1080/14789450.2016.1254555</resource>
102
                    <collection property="crawler-based">
103
                        <item crawler="iParadigms">
104
                            <resource>http://www.tandfonline.com/doi/pdf/10.1080/14789450.2016.1254555</resource>
105
                        </item>
106
                    </collection>
107
                </doi_data>
108
                <citation_list>
109
                    <citation key="CIT0001">
110
                        <doi>10.1034/j.1399-3046.2003.00029.x</doi>
111
                    </citation>
112
                    <citation key="CIT0002">
113
                        <doi>10.2215/CJN.03310412</doi>
114
                    </citation>
115
                    <citation key="CIT0003">
116
                        <doi>10.1074/mcp.E800010-MCP200</doi>
117
                    </citation>
118
                    <citation key="CIT0004">
119
                        <doi>10.1126/scitranslmed.3001249</doi>
120
                    </citation>
121
                    <citation key="CIT0005">
122
                        <doi>10.1586/14789450.2014.872564</doi>
123
                    </citation>
124
                    <citation key="CIT0006">
125
                        <doi>10.1111/j.1523-1755.2004.00352.x</doi>
126
                    </citation>
127
                    <citation key="CIT0007">
128
                        <doi>10.1002/pmic.200401012</doi>
129
                    </citation>
130
                    <citation key="CIT0008">
131
                        <doi>10.1002/prca.200780082</doi>
132
                    </citation>
133
                    <citation key="CIT0009">
134
                        <doi>10.1053/j.ackd.2010.09.004</doi>
135
                    </citation>
136
                    <citation key="CIT0010">
137
                        <doi>10.1074/mcp.R800001-MCP200</doi>
138
                    </citation>
139
                    <citation key="CIT0011">
140
                        <doi>10.1016/j.kint.2015.10.010</doi>
141
                    </citation>
142
                    <citation key="CIT0012">
143
                        <doi>10.1111/j.1523-1755.2004.00659.x</doi>
144
                    </citation>
145
                    <citation key="CIT0013">
146
                        <doi>10.1002/pmic.200600230</doi>
147
                    </citation>
148
                    <citation key="CIT0014">
149
                        <doi>10.1038/nrneph.2014.247</doi>
150
                    </citation>
151
                    <citation key="CIT0015">
152
                        <doi>10.1681/ASN.2006090956</doi>
153
                    </citation>
154
                    <citation key="CIT0016">
155
                        <doi>10.1042/CS20050006</doi>
156
                    </citation>
157
                    <citation key="CIT0017">
158
                        <doi>10.1038/nrc2902</doi>
159
                    </citation>
160
                    <citation key="CIT0018">
161
                        <doi>10.1586/14789450.4.3.421</doi>
162
                    </citation>
163
                    <citation key="CIT0019">
164
                        <doi>10.1093/ndt/gfv091</doi>
165
                    </citation>
166
                    <citation key="CIT0020">
167
                        <doi>10.1002/prca.201400113</doi>
168
                    </citation>
169
                    <citation key="CIT0021">
170
                        <doi>10.1681/ASN.2014050423</doi>
171
                    </citation>
172
                    <citation key="CIT0022">
173
                        <doi>10.1021/pr070529w</doi>
174
                    </citation>
175
                    <citation key="CIT0023">
176
                        <doi>10.1016/j.bbapap.2013.06.016</doi>
177
                    </citation>
178
                    <citation key="CIT0024">
179
                        <doi>10.1074/mcp.M110.001917</doi>
180
                    </citation>
181
                    <citation key="CIT0025">
182
                        <doi>10.1093/eurheartj/ehs185</doi>
183
                    </citation>
184
                    <citation key="CIT0026">
185
                        <doi>10.1074/mcp.M700394-MCP200</doi>
186
                    </citation>
187
                    <citation key="CIT0027">
188
                        <doi>10.4161/cbt.8.12.8634</doi>
189
                    </citation>
190
                    <citation key="CIT0028">
191
                        <doi>10.1016/j.molonc.2014.03.006</doi>
192
                    </citation>
193
                    <citation key="CIT0029">
194
                        <doi>10.1038/msb.2008.61</doi>
195
                    </citation>
196
                    <citation key="CIT0030">
197
                        <doi>10.1586/14737159.2015.1093937</doi>
198
                    </citation>
199
                    <citation key="CIT0031">
200
                        <doi>10.1002/pmic.201100436</doi>
201
                    </citation>
202
                    <citation key="CIT0032">
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff