Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/deploy.info
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/deploy.info	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/deploy.info	(nonexistent)
@@ -1 +0,0 @@
-{"type_source": "SVN", "goal": "package -U -T 4C source:jar", "url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet40/modules/dnet-openaireplus-mapping-utils/trunk/", "deploy_repository": "dnet4-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/dnet4-snapshots", "name": "dnet-openaireplus-mapping-utils"}
\ No newline at end of file
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/resources/eu/dnetlib/data/transform/simpleRecord.xml
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/resources/eu/dnetlib/data/transform/simpleRecord.xml	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/resources/eu/dnetlib/data/transform/simpleRecord.xml	(nonexistent)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<record>
-  <metadata>
-    <a>A text value</a>
-    <b attr="attribute value"/>
-  </metadata>
-</record>
\ No newline at end of file
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/resources/eu/dnetlib/data/transform/record.xml
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/resources/eu/dnetlib/data/transform/record.xml	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/resources/eu/dnetlib/data/transform/record.xml	(nonexistent)
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<record xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:prov="http://www.openarchives.org/OAI/2.0/provenance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dri="http://www.driver-repository.eu/namespace/dri" xmlns:dr="http://www.driver-repository.eu/namespace/dr" xmlns:oaf="http://namespace.openaire.eu/oaf">
-  <header xmlns="http://namespace.openaire.eu/">
-    <dri:objIdentifier>od______1064::fe947e59cf7db2f039b4c8cc25693fb0</dri:objIdentifier>
-    <dri:recordIdentifier>95168db1-d57e-4b99-855b-993cf91d1283_TURTdG9yZURTUmVzb3VyY2VzL01EU3RvcmVEU1Jlc291cmNlVHlwZQ==::oai:ora.ouls.ox.ac.uk:uuid:5d8f6cbb-1283-4957-8c55-48a4024bed76</dri:recordIdentifier>
-    <dri:dateOfCollection/>
-    <dri:mdFormat/>
-    <dri:mdFormatInterpretation/>
-    <dri:repositoryId>2a02b271-0756-453c-b2f0-8c472a8806a5_UmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=</dri:repositoryId>
-    <dr:objectIdentifier/>
-    <dr:dateOfCollection>2013-05-10T16:04:02Z</dr:dateOfCollection>
-    <oaf:datasourceprefix>od______1064</oaf:datasourceprefix>
-  </header>
-  <metadata xmlns="http://namespace.openaire.eu/">
-    <dc:creator>Uphoff, S</dc:creator>
-    <dc:creator>Holden, SJ</dc:creator>
-    <dc:dateAccepted>2011-01-01</dc:dateAccepted>
-    <dc:description>The analysis of structure and dynamics of biomolecules is important for understanding their function. Toward this aim, we introduce a method called 'switchable FRET', which combines single-molecule fluorescence resonance energy transfer (FRET) with reversible photoswitching of fluorophores. Typically, single-molecule FRET is measured within a single donor-acceptor pair and reports on only one distance. Although multipair FRET approaches that monitor multiple distances have been developed, they are technically challenging and difficult to extend, mainly because of their reliance on spectrally distinct acceptors. In contrast, switchable FRET sequentially probes FRET between a single donor and spectrally identical photoswitchable acceptors, dramatically reducing the experimental and analytical complexity and enabling direct monitoring of multiple distances. Our experiments on DNA molecules, a protein-DNA complex and dynamic Holliday junctions demonstrate the potential of switchable FRET for studying dynamic, multicomponent biomolecules.          </dc:description>
-    <dc:identifier>http://pub.uni-bielefeld.de/publication/2303387</dc:identifier>
-    <dc:language>eng</dc:language>
-    <dc:title>Monitoring multiple distances within a single molecule using switchable FRET.</dc:title>
-    <dc:source>Symplectic Elements at Oxford</dc:source>
-    <dc:source>PubMed (http://www.ncbi.nlm.nih.gov/pubmed/)</dc:source>
-    <dc:source>Web of Science (Lite) (http://apps.webofknowledge.com/summary.do)</dc:source>
-    <dc:subject>Biotinylation</dc:subject>
-    <dc:subject>Computer Simulation</dc:subject>
-    <dr:CobjCategory>0001</dr:CobjCategory>
-    <dr:CobjIdentifier>urn:uuid:5d8f6cbb-1283-4957-8c55-48a4024bed76</dr:CobjIdentifier>
-    <dr:CobjIdentifier>pii:nmeth.1502</dr:CobjIdentifier>
-    <dr:CobjIdentifier>local:71163</dr:CobjIdentifier>
-    <dr:CobjIdentifier>eissn:1548-7105</dr:CobjIdentifier>
-    <dr:CobjIdentifier>doi:10.1038/nmeth.1502</dr:CobjIdentifier>
-    <dr:CobjIdentifier>issn:1548-7091</dr:CobjIdentifier>
-    <oaf:accessrights>EMBARGO</oaf:accessrights>
-    <oaf:collectedDatasourceid>issn____::12345678</oaf:collectedDatasourceid>
-	<oaf:hostedBy name="DOAJ" id="doaj____::1234"/>
-    <oaf:collectedFrom name="My favourite journal" id="issn____::12345678"/>
-    <oaf:fulltext>http://xyz</oaf:fulltext>
-    <oaf:journal issn="12345678" eissn="e1234567" lissn="l1234567">My favourite journal</oaf:journal>
-    <oaf:journal issn="12345678" eissn="e1234567">My second favourite journal</oaf:journal>  
-    <oaf:identifier identifierType="doi">10.1038/nmeth.1502</oaf:identifier>
-    <oaf:reference identifier="IPR004915" query="http://www.ebi.ac.uk/europepmc/webservices/rest/PMC/PMC155133/databaseLinks/INTERPRO/1/json" source="INTERPRO" title="Nonstructural protein NS-S, bunyaviral" type="dataset">http://www.ebi.ac.uk/interpro/entry/IPR004915</oaf:reference>
-	<oaf:reference identifier="IPRXXXXXX" query="http://www.ebi.ac.uk/europepmc/webservices/rest/PMC/PMCYYYYYY/databaseLinks/INTERPRO/2/json" source="INTERPRO" title="Nonstructural protein XY-S, bunyaviral" type="dataset">http://www.ebi.ac.uk/interpro/entry/TTTTTTTTT</oaf:reference>  
-  </metadata>
-</record>
\ No newline at end of file
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/pace/distance/DetectorTest.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/pace/distance/DetectorTest.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/pace/distance/DetectorTest.java	(nonexistent)
@@ -1,168 +0,0 @@
-package eu.dnetlib.pace.distance;
-
-import static org.junit.Assert.assertTrue;
-
-import java.util.List;
-
-import org.junit.Test;
-
-import com.google.common.collect.Lists;
-
-import eu.dnetlib.pace.AbstractProtoPaceTest;
-import eu.dnetlib.pace.config.Config;
-import eu.dnetlib.pace.model.document.MapDocument;
-
-public class DetectorTest extends AbstractProtoPaceTest {
-
-	@Test
-	public void testDistanceResultSimple() {
-		Config config = getResultSimpleConf();
-
-		MapDocument resA = result(config, "A", "Recent results from CDF", null);
-		MapDocument resB = result(config, "B", "Recent results from CDF", null);
-
-		double d = new PaceDocumentDistance().between(resA, resB, config);
-		System.out.println(String.format(" d ---> %s", d));
-
-		assertTrue(d == 1.0);
-	}
-
-	@Test
-	public void testDistanceResultSimpleMissingDates() {
-		Config config = getResultSimpleConf2();
-
-		MapDocument resA = result(config, "A", "Recent results from BES", null);
-		MapDocument resB = result(config, "A", "Recent results from CES", null);
-
-		double d = new PaceDocumentDistance().between(resA, resB, config);
-		System.out.println(String.format(" d ---> %s", d));
-
-		assertTrue(d > 0.97);
-	}
-
-	@Test
-	public void testDistanceResultInvalidDate() {
-		Config config = getResultConf();
-
-		MapDocument resA = result(config, "A", "title title title 6BESR", "2013-01-05");
-		MapDocument resB = result(config, "B", "title title title 6BESR", "qwerty");
-
-		double d = new PaceDocumentDistance().between(resA, resB, config);
-		System.out.println(String.format(" d ---> %s", d));
-
-		assertTrue(d == 1.0);
-	}
-
-	@Test
-	public void testDistanceResultMissingOneDate() {
-		Config config = getResultConf();
-
-		MapDocument resA = result(config, "A", "title title title 6BESR", null);
-		MapDocument resB = result(config, "B", "title title title 6CLER", "2012-02");
-
-		double d = new PaceDocumentDistance().between(resA, resB, config);
-		System.out.println(String.format(" d ---> %s", d));
-
-		assertTrue((d > 0.9) && (d < 1.0));
-	}
-
-	@Test
-	public void testDistanceResult() {
-		Config config = getResultConf();
-
-		MapDocument resA = result(config, "A", "title title title BES", "");
-		MapDocument resB = result(config, "B", "title title title CLEO", null);
-
-		double d = new PaceDocumentDistance().between(resA, resB, config);
-		System.out.println(String.format(" d ---> %s", d));
-
-		// assertTrue(d > 0.9 && d < 1.0);
-	}
-
-	@Test
-	public void testDistanceResultMissingTwoDate() {
-		Config config = getResultConf();
-
-		MapDocument resA = result(config, "A", "title title title 6BESR", null);
-		MapDocument resB = result(config, "B", "title title title 6CLER", null);
-
-		double d = new PaceDocumentDistance().between(resA, resB, config);
-
-		System.out.println(String.format(" d ---> %s", d));
-
-		assertTrue((d > 0.9) && (d < 1.0));
-	}
-
-	@Test
-	public void testDistanceOrganizationIgnoreMissing() {
-
-		Config config = getOrganizationSimpleConf();
-
-		MapDocument orgA = organization(config, "A", "CONSIGLIO NAZIONALE DELLE RICERCHE", null);
-		MapDocument orgB = organization(config, "B", "CONSIGLIO NAZIONALE DELLE RICERCHE", "CNR");
-
-		double d = new PaceDocumentDistance().between(orgA, orgB, config);
-		System.out.println(String.format(" d ---> %s", d));
-
-		assertTrue(d == 1.0);
-	}
-
-	@Test
-	public void testDistanceResultCase1() {
-
-		Config config = getResultConf();
-
-		MapDocument resA = result(config, "A", "Search for the Standard Model Higgs boson", "2003");
-		MapDocument resB = result(config, "B", "Search the Standard Model Higgs Boson", "2003");
-
-		double d = new PaceDocumentDistance().between(resA, resB, config);
-		System.out.println(String.format(" d ---> %s", d));
-
-		assertTrue((d > 0.9) && (d < 1.0));
-	}
-
-	@Test
-	public void testDistanceResultWithAuthorsCase1() {
-
-		Config config = getResultWithAuthorsConf(0.5, 0.5);
-
-		List<String> authors = Lists.newArrayList("P. Manghi", "A. Bardi", "M. Artini");
-		MapDocument resA = result(config, "A", "Search for the Standard Model Higgs boson", "2003", authors);
-		MapDocument resB = result(config, "B", "Search the Standard Model Higgs Boson", "2003", authors);
-
-		double d = new PaceDocumentDistance().between(resA, resB, config);
-		System.out.println(String.format(" d ---> %s", d));
-
-		assertTrue((d > 0.9) && (d < 1.0));
-	}
-
-	@Test
-	public void testDistanceResultWithAuthorsCase2() {
-
-		Config config = getResultWithAuthorsConf(0.5, 0.5);
-
-		MapDocument resA = result(config, "A", "Search the Standard Model Higgs boson", "2003", Lists.newArrayList("P. Manghi", "A. Bardi", "M. Artini"));
-		MapDocument resB = result(config, "B", "Search the Standard Model Higgs Boson", "2003", Lists.newArrayList("P. Manghi", "C. Atzori", "A. Bardi"));
-
-		double d = new PaceDocumentDistance().between(resA, resB, config);
-		System.out.println(String.format(" d ---> %s", d));
-
-		// assertTrue((d > 0.8) && (d < 0.9));
-	}
-
-	@Test
-	public void testDistanceResultWithAuthorsCase3() {
-
-		Config config = getResultWithAuthorsConf(0.5, 0.5);
-
-		MapDocument resA =
-				result(config, "A", "Search the Standard Model Higgs boson", "2003", Lists.newArrayList("A. Bardi", "Paolo Manghi", "Michele Artini"));
-		MapDocument resB = result(config, "B", "Search the Standard Model Higgs Boson", "2003", Lists.newArrayList("P. Manghi", "A. Bardi"));
-
-		double d = new PaceDocumentDistance().between(resA, resB, config);
-		System.out.println(String.format(" d ---> %s", d));
-
-		assertTrue((d > 0.8) && (d < 0.9));
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/pace/clustering/BlacklistAwareClusteringCombinerTest.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/pace/clustering/BlacklistAwareClusteringCombinerTest.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/pace/clustering/BlacklistAwareClusteringCombinerTest.java	(nonexistent)
@@ -1,33 +0,0 @@
-package eu.dnetlib.pace.clustering;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import eu.dnetlib.pace.AbstractProtoPaceTest;
-import eu.dnetlib.pace.config.Config;
-import eu.dnetlib.pace.config.DynConf;
-import eu.dnetlib.pace.config.Type;
-import eu.dnetlib.pace.model.FieldList;
-import eu.dnetlib.pace.model.FieldListImpl;
-import eu.dnetlib.pace.model.FieldValueImpl;
-import eu.dnetlib.pace.model.document.MapDocument;
-
-public class BlacklistAwareClusteringCombinerTest extends AbstractProtoPaceTest {
-
-	private Config config;
-
-	@Before
-	public void setUp() {
-		config = DynConf.load(cfg);
-	}
-
-	@Test
-	public void testCombine() {
-		MapDocument result = result(config, "A", "Dipping in Cygnus X-2 in a multi-wavelength campaign due to absorption of extended ADC emission", "2013");
-		FieldList fl = new FieldListImpl();
-		fl.add(new FieldValueImpl(Type.String, "desc", "hello world description pipeline"));
-		result.getFieldMap().put("desc", fl);
-		result.getFieldMap().get("title").add(new FieldValueImpl(Type.String, "title", "lorem ipsum cabalie qwerty"));
-		System.out.println(BlacklistAwareClusteringCombiner.filterAndCombine(result, config, config.blacklists()));
-	}
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/pace/clustering/ClusteringCombinerTest.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/pace/clustering/ClusteringCombinerTest.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/pace/clustering/ClusteringCombinerTest.java	(nonexistent)
@@ -1,35 +0,0 @@
-package eu.dnetlib.pace.clustering;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import eu.dnetlib.pace.AbstractProtoPaceTest;
-import eu.dnetlib.pace.config.Config;
-import eu.dnetlib.pace.config.DynConf;
-import eu.dnetlib.pace.config.Type;
-import eu.dnetlib.pace.model.FieldList;
-import eu.dnetlib.pace.model.FieldListImpl;
-import eu.dnetlib.pace.model.FieldValueImpl;
-import eu.dnetlib.pace.model.document.MapDocument;
-
-public class ClusteringCombinerTest extends AbstractProtoPaceTest {
-
-	private Config config;
-
-	@Before
-	public void setUp() {
-		config = DynConf.load(cfg);
-	}
-
-	@Test
-	public void testCombine() {
-		String title = "Dipping in Cygnus X-2 in a multi-wavelength campaign due to absorption of extended ADC emission";
-		MapDocument result = result(config, "A", title, "2013");
-		FieldList fl = new FieldListImpl();
-		fl.add(new FieldValueImpl(Type.String, "desc", "lorem ipsum cabalie qwerty"));
-		result.getFieldMap().put("desc", fl);
-		System.out.println(title);
-		System.out.println(ClusteringCombiner.combine(result, config));
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/pace/AbstractProtoPaceTest.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/pace/AbstractProtoPaceTest.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/pace/AbstractProtoPaceTest.java	(nonexistent)
@@ -1,117 +0,0 @@
-package eu.dnetlib.pace;
-
-import java.util.List;
-
-import eu.dnetlib.data.proto.FieldTypeProtos.Qualifier;
-import eu.dnetlib.data.proto.FieldTypeProtos.StringField;
-import eu.dnetlib.data.proto.FieldTypeProtos.StructuredProperty;
-import eu.dnetlib.data.proto.OrganizationProtos.Organization;
-import eu.dnetlib.data.proto.PersonProtos.Person;
-import eu.dnetlib.data.proto.ResultProtos.Result;
-import eu.dnetlib.pace.config.Config;
-import eu.dnetlib.pace.config.DynConf;
-import eu.dnetlib.pace.config.Type;
-import eu.dnetlib.pace.model.Field;
-import eu.dnetlib.pace.model.FieldValueImpl;
-import eu.dnetlib.pace.model.ProtoDocumentBuilder;
-import eu.dnetlib.pace.model.document.MapDocument;
-
-public abstract class AbstractProtoPaceTest {
-
-	protected static String cfg = "pace.conf { " + "clustering { " + "acronyms     { fields = [title, desc], params = { max = 1, minLen = 2, maxLen = 4} }, "
-			+ "ngrampairs   { fields = [title], params = { max = 1, ngramLen = 3} }, " + "suffixprefix { fields = [title], params = { max = 1, len = 3 } } "
-			+ "}, " + "conditions { " + "yearMatch { fields = [dateofacceptance] }, " + "titleVersionMatch { fields = [title] } }," + "model { "
-			+ "title/value { algo = JaroWinkler, type = String, weight = 1.0, ignoreMissing = false }, "
-			+ "dateofacceptance/value { algo = Null, type = String, weight = 0.0, ignoreMissing = true } }, " + "blacklists = [title]" + "}";
-
-	protected Config getOrganizationSimpleConf() {
-		Config config =
-				DynConf.load("pace.conf { " + "conditions { }," + "model { "
-						+ "legalname/value { algo = JaroWinkler, type = String, weight = 0.6, ignoreMissing = false }, "
-						+ "legalshortname/value { algo = JaroWinkler, type = String, weight = 0.4, ignoreMissing = true } }" + "}");
-		return config;
-	}
-
-	protected Config getResultConf() {
-		return DynConf.load("pace.conf { " + "conditions { " + "yearMatch { fields = [dateofacceptance] }, " + "titleVersionMatch { fields = [title] } },"
-				+ "model { " + "title/value { algo = JaroWinkler, type = String, weight = 1.0, ignoreMissing = false }, "
-				+ "dateofacceptance/value { algo = Null, type = String, weight = 0.0, ignoreMissing = true } } " + "}");
-	}
-
-	protected Config getResultWithAuthorsConf(final double wTitle, final double wAuthors) {
-		return DynConf.load("pace.conf { " + "conditions { " + "yearMatch { fields = [dateofacceptance] }, " + "titleVersionMatch { fields = [title] } },"
-				+ "model { " + "title/value { algo = JaroWinkler, type = String, weight = " + String.valueOf(wTitle) + ", ignoreMissing = false }, "
-				+ "dateofacceptance/value { algo = Null, type = String, weight = 0.0, ignoreMissing = true }, "
-				+ "author/metadata/secondnames/value { algo = SortedLevel2JaroWinkler, type = List, weight = " + String.valueOf(wAuthors)
-				+ ", ignoreMissing = true } } " + "}");
-	}
-
-	protected Config getResultSimpleConf() {
-		return DynConf.load("pace.conf { " + "conditions { }," + "model { "
-				+ "title/value { algo = JaroWinkler, type = String, weight = 1.0, ignoreMissing = false } } " + "}");
-	}
-
-	protected Config getResultSimpleConf2() {
-		return DynConf.load("pace.conf { " + "model { " + "title/value { algo = JaroWinkler, type = String, weight = 1.0, ignoreMissing = false } } " + "}");
-	}
-
-	protected MapDocument result(final Config config, final String id, final String title, final String date) {
-		return result(config, id, title, date, null);
-	}
-
-	protected MapDocument result(final Config config, final String id, final String title, final String date, final List<String> authors) {
-		Result.Metadata.Builder builder = Result.Metadata.newBuilder();
-		if (title != null) {
-			builder.addTitle(getStruct(title, getQualifier("main", "dnet:titles")));
-		}
-		if (date != null) {
-			builder.setDateofacceptance(sf(date));
-		}
-		if ((authors != null) && !authors.isEmpty()) {
-			for (String author : authors) {
-
-				eu.dnetlib.pace.model.Person p = new eu.dnetlib.pace.model.Person(author, false);
-				Person.Builder pBuilder = Person.newBuilder();
-
-				if (p.isAccurate()) {
-					pBuilder.getMetadataBuilder().setFirstname(sf(p.getNormalisedFirstName()));
-					pBuilder.getMetadataBuilder().addSecondnames(sf(p.getNormalisedSurname()));
-				}
-
-				pBuilder.getMetadataBuilder().setFullname(sf(p.getNormalisedFullname()));
-				builder.addAuthor(pBuilder);
-			}
-		}
-
-		return ProtoDocumentBuilder.newInstance(id, builder.build(), config.fields());
-	}
-
-	protected MapDocument organization(final Config config, final String id, final String legalName, final String legalShortName) {
-		Organization.Metadata.Builder builder = Organization.Metadata.newBuilder();
-		if (legalName != null) {
-			builder.setLegalname(sf(legalName));
-		}
-		if (legalShortName != null) {
-			builder.setLegalshortname(sf(legalShortName));
-		}
-
-		return ProtoDocumentBuilder.newInstance(id, builder.build(), config.fields());
-	}
-
-	protected Field title(final String s) {
-		return new FieldValueImpl(Type.String, "title", s);
-	}
-
-	protected static StringField.Builder sf(final String s) {
-		return StringField.newBuilder().setValue(s);
-	}
-
-	protected static Qualifier.Builder getQualifier(final String classname, final String schemename) {
-		return Qualifier.newBuilder().setClassid(classname).setClassname(classname).setSchemeid(schemename).setSchemename(schemename);
-	}
-
-	protected static StructuredProperty.Builder getStruct(final String value, final Qualifier.Builder qualifier) {
-		return StructuredProperty.newBuilder().setValue(value).setQualifier(qualifier);
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/data/mapreduce/util/OafDecoderTest.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/data/mapreduce/util/OafDecoderTest.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/data/mapreduce/util/OafDecoderTest.java	(nonexistent)
@@ -1,16 +0,0 @@
-package eu.dnetlib.data.mapreduce.util;
-
-import org.junit.Test;
-
-import eu.dnetlib.data.proto.KindProtos.Kind;
-
-public class OafDecoderTest {
-
-	@Test
-	public void test() {
-
-		OafDecoder decoder = OafTest.embed(OafTest.getResult("50|id_1"), Kind.entity);
-
-		System.out.println(decoder.asXml());
-	}
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/data/mapreduce/util/OafRelDecoderTest.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/data/mapreduce/util/OafRelDecoderTest.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/test/java/eu/dnetlib/data/mapreduce/util/OafRelDecoderTest.java	(nonexistent)
@@ -1,49 +0,0 @@
-package eu.dnetlib.data.mapreduce.util;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import com.google.protobuf.Descriptors.FieldDescriptor;
-
-import eu.dnetlib.data.proto.OafProtos.OafRel;
-import eu.dnetlib.data.proto.PersonResultProtos.PersonResult.Authorship;
-import eu.dnetlib.data.proto.RelTypeProtos.RelType;
-import eu.dnetlib.data.proto.RelTypeProtos.SubRelType;
-
-public class OafRelDecoderTest {
-
-	private OafRel oafRel;
-
-	@Before
-	public void setUp() {
-		oafRel = OafTest.getPersonResult("ID_1", "ID_2", "1", "isAuthor");
-	}
-
-	@Test
-	public void testSetClass() {
-
-		OafRelDecoder d1 = OafRelDecoder.decode(oafRel);
-
-		assertNotNull(d1);
-		assertEquals("isAuthor", d1.getRelClass());
-
-		OafRelDecoder d2 = OafRelDecoder.decode(d1.setClassId("hasAuthor").build());
-
-		assertEquals("hasAuthor", d2.getRelClass());
-		assertEquals("hasAuthor", d2.getRelMetadata().getSemantics().getClassid());
-		assertEquals("hasAuthor", d2.getRelMetadata().getSemantics().getClassname());
-
-		FieldDescriptor fd = Authorship.getDescriptor().findFieldByName("ranking");
-		assertEquals(d1.getSubRel().getField(fd), d2.getSubRel().getField(fd));
-	}
-
-	@Test
-	public void testGetCF() {
-		assertEquals("personResult_authorship_isAuthorOf", OafRelDecoder.getCF(RelType.personResult, SubRelType.authorship, Authorship.RelName.isAuthorOf));
-		assertEquals("personResult_authorship_isAuthorOf", OafRelDecoder.getCF(RelType.personResult, SubRelType.authorship, "isAuthorOf"));
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/datacite2updateActions.xslt
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/datacite2updateActions.xslt	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/datacite2updateActions.xslt	(nonexistent)
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:dnet="eu.dnetlib.actionmanager.actions.infopackage.DataciteInfoPackageToHbaseXsltFunctions"
-    xmlns:oaf="http://namespace.openaire.eu/oaf"
-    xmlns:dri="http://www.driver-repository.eu/namespace/dri"
-   	xmlns:date="eu.dnetlib.miscutils.datetime.DateUtils"
-    xmlns:dr="http://www.driver-repository.eu/namespace/dr" xmlns:exslt="http://exslt.org/common"
-    extension-element-prefixes="exslt" exclude-result-prefixes="xsl dnet exslt oaf dr dri date">
-
-    <xsl:output omit-xml-declaration="yes" indent="yes"/>
-
-    <xsl:param name="trust" select="string('0.9')"/>
-    <xsl:param name="provenance" select="string('UNKNOWN')"/>
-    <xsl:param name="namespaceprefix" select="string('datacite')"/>
-
-    <xsl:template match="/*">
-        <xsl:variable name="metadata" select="exslt:node-set(/*[local-name()='record']/*[local-name()='metadata']/*[local-name()='resource'])"/>
-        <xsl:variable name="rightNSPrefix">
-            <xsl:choose>
-                <xsl:when test="not($namespaceprefix)">
-                    <xsl:value-of select="//oaf:datasourceprefix"/>
-                </xsl:when>
-                <xsl:otherwise>
-                    <xsl:value-of select="$namespaceprefix"/>
-                </xsl:otherwise>
-            </xsl:choose>
-        </xsl:variable>
-
-        <xsl:choose>
-            <xsl:when test="count($metadata) =  0">
-                <ACTIONS/>
-            </xsl:when>
-            <xsl:otherwise>
-                <xsl:variable name="originalId" select="//*[local-name() = 'identifier' and ./@identifierType='DOI']"/>
-                <xsl:variable name="resultId" select="dnet:oafSimpleId('result', //dri:objIdentifier)"/>
-
-                <xsl:variable name="creators" select="//*[local-name() = 'creator']"/>
-                <xsl:variable name="titles" select="//*[local-name() = 'title']"/>
-                <xsl:variable name="subjects" select="//*[local-name() = 'subject']"/>
-                <xsl:variable name="publisher" select="//*[local-name() = 'publisher']"/>
-                <xsl:variable name="descriptions" select="//*[local-name() = 'description']"/>
-                <xsl:variable name="dates" select="//*[local-name() = 'date']"/>
-                <xsl:variable name="resourceType" select="//*[local-name() = 'resourceType']"/>
-                <xsl:variable name="formats" select="//*[local-name() = 'format']"/>
-                <xsl:variable name="sizes" select="//*[local-name() = 'size']"/>
-                <xsl:variable name="rights" select="//*[local-name() = 'rights']"/>
-                <xsl:variable name="version" select="//*[local-name() = 'version']"/>
-                <xsl:variable name="instanceURI"
-                    select="concat('http://dx.doi.org','/',//*[local-name() = 'resource']/*[local-name() = 'identifier'])"/>
-                <xsl:variable name="hostedbyid"
-                    select="dnet:oafSplitId('datasource', //oaf:hostedBy/@id)"/>
-                <xsl:variable name="hostedbyname" select="//oaf:hostedBy/@name"/>
-                <xsl:variable name="collectedfromid"
-                    select="dnet:oafSplitId('datasource', //oaf:collectedFrom/@id)"/>
-                <xsl:variable name="collectedfromname" select="//oaf:collectedFrom/@name"/>
-                <xsl:variable name="dateOfCollection" select="//dr:dateOfCollection"/>
-                <xsl:variable name="language" select="//*[local-name() = 'language']"/>
-
-                <ACTIONS>
-                    <ACTION targetKey="{$resultId}" targetColumnFamily="result" targetColumn="{concat('update_', date:now())}">
-                        <xsl:value-of
-                            select="dnet:oafDataCiteResultFromInfoPackage($resultId, $metadata, $titles, 
-                            $subjects, $publisher, $descriptions, $dates, $resourceType, 
-                            $formats, $sizes, $language, $rights, $version, $provenance, $trust, $hostedbyid, $hostedbyname,
-                            $collectedfromid, $collectedfromname, $originalId, $instanceURI, $dateOfCollection)"
-                        />
-                    </ACTION>
-                </ACTIONS>
-            </xsl:otherwise>
-        </xsl:choose>
-    </xsl:template>
-</xsl:stylesheet>
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/datacite2insertActions.xslt
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/datacite2insertActions.xslt	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/datacite2insertActions.xslt	(nonexistent)
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:dnet="eu.dnetlib.actionmanager.actions.infopackage.DataciteInfoPackageToHbaseXsltFunctions"
-    xmlns:oaf="http://namespace.openaire.eu/oaf"
-    xmlns:dri="http://www.driver-repository.eu/namespace/dri"
-    xmlns:dr="http://www.driver-repository.eu/namespace/dr" xmlns:exslt="http://exslt.org/common"
-    extension-element-prefixes="exslt" exclude-result-prefixes="xsl dnet exslt oaf dr dri">
-
-    <xsl:output omit-xml-declaration="yes" indent="yes"/>
-
-    <xsl:param name="trust" select="string('0.9')"/>
-    <xsl:param name="provenance" select="string('UNKNOWN')"/>
-    <xsl:param name="namespaceprefix" select="string('datacite')"/>
-
-    <xsl:template match="/*">
-        <xsl:variable name="metadata" select="exslt:node-set(/*[local-name()='record']/*[local-name()='metadata']/*[local-name()='resource'])"/>
-        <xsl:variable name="rightNSPrefix">
-            <xsl:choose>
-                <xsl:when test="not($namespaceprefix)">
-                    <xsl:value-of select="//oaf:datasourceprefix"/>
-                </xsl:when>
-                <xsl:otherwise>
-                    <xsl:value-of select="$namespaceprefix"/>
-                </xsl:otherwise>
-            </xsl:choose>
-        </xsl:variable>
-
-        <xsl:choose>
-            <xsl:when test="count($metadata) =  0">
-                <ACTIONS/>
-            </xsl:when>
-            <xsl:otherwise>
-                <xsl:variable name="originalId" select="/record/metadata/*[local-name() = 'identifier' and ./@identifierType='DOI']"/>
-                <xsl:variable name="resultId" select="dnet:oafSimpleId('result', //dri:objIdentifier)"/>
-
-                <xsl:variable name="creators" select="//*[local-name() = 'creator']"/>
-                <xsl:variable name="titles" select="//*[local-name() = 'title']"/>
-                <xsl:variable name="subjects" select="//*[local-name() = 'subject']"/>
-                <xsl:variable name="publisher" select="//*[local-name() = 'publisher']"/>
-                <xsl:variable name="descriptions" select="//*[local-name() = 'description']"/>
-                <xsl:variable name="dates" select="//*[local-name() = 'date']"/>
-                <xsl:variable name="resourceType" select="//*[local-name() = 'resourceType']"/>
-                <xsl:variable name="formats" select="//*[local-name() = 'format']"/>
-                <xsl:variable name="sizes" select="//*[local-name() = 'size']"/>
-                <xsl:variable name="rights" select="//*[local-name() = 'rights']"/>
-                <xsl:variable name="version" select="//*[local-name() = 'version']"/>
-                <xsl:variable name="instanceURI" select="concat('http://dx.doi.org', '/', //*[local-name() = 'resource']/*[local-name() = 'identifier'])"/>
-                <xsl:variable name="hostedbyid" select="dnet:oafSplitId('datasource', //oaf:hostedBy/@id)"/>
-                <xsl:variable name="hostedbyname" select="//oaf:hostedBy/@name"/>
-                <xsl:variable name="collectedfromid" select="dnet:oafSplitId('datasource', //oaf:collectedFrom/@id)"/>
-                <xsl:variable name="collectedfromname" select="//oaf:collectedFrom/@name"/>
-                <xsl:variable name="dateOfCollection" select="//dr:dateOfCollection"/>
-                <xsl:variable name="language" select="//*[local-name() = 'language']"/>
-
-                <ACTIONS>
-                    <ACTION targetKey="{$resultId}" targetColumnFamily="result"
-                        targetColumn="body">
-                        <xsl:value-of
-                            select="dnet:oafDataCiteResultFromInfoPackage($resultId, $metadata, $titles, 
-                            $subjects, $publisher, $descriptions, $dates, $resourceType, 
-                            $formats, $sizes, $language, $rights, $version, $provenance, $trust, $hostedbyid, $hostedbyname,
-                            $collectedfromid, $collectedfromname, $originalId, $instanceURI, $dateOfCollection)"
-                        />
-                    </ACTION>
-
-                    <xsl:for-each select="//*[local-name() = 'creator']">
-                        <xsl:variable name="personIdTemp">
-                            <xsl:choose>
-                                <xsl:when test="string-length(./*[local-name() = 'nameIdentifier']) &gt; 0">
-                                    <xsl:value-of
-                                        select="translate(normalize-space(./*[local-name() = 'nameIdentifier']),' .,','___')"
-                                    />
-                                </xsl:when>
-                                <xsl:otherwise>
-                                    <xsl:value-of
-                                        select="translate(normalize-space(./*[local-name() = 'creatorName']),' .,','___')"
-                                    />
-                                </xsl:otherwise>
-                            </xsl:choose>
-
-                        </xsl:variable>
-                        
-                        <xsl:variable name="personId" select="dnet:oafId('person', $namespaceprefix, concat($originalId, '::', normalize-space($personIdTemp)))"/>
-                        
-                        <xsl:variable name="originalPersonId" select="./*[local-name() = 'nameIdentifier']"/>
-                        <xsl:if test="string-length($personId) &gt; 0">
-                            <ACTION targetKey="{$personId}" targetColumnFamily="person" targetColumn="body">                                
-                                <xsl:value-of
-                                    select="dnet:oafDataCitePersonFromInfoPackage($personId, normalize-space(./*[local-name() = 'creatorName']), $provenance, $trust, $collectedfromid, $collectedfromname,$originalPersonId, $dateOfCollection)"
-                                />
-                            </ACTION>
-                            <ACTION targetKey="{$personId}" targetColumnFamily="personResult_authorship_isAuthorOf"
-                                targetColumn="{$resultId}">
-                                <xsl:value-of
-                                    select="dnet:oafDataCitePersonResultFromInfoPackage($personId, $resultId, position(), 'isAuthorOf', $provenance, $trust)"
-                                />
-                            </ACTION>
-                            <ACTION targetKey="{$resultId}" targetColumnFamily="personResult_authorship_hasAuthor"
-                                targetColumn="{$personId}">
-                                <xsl:value-of
-                                    select="dnet:oafDataCitePersonResultFromInfoPackage($resultId, $personId, position(), 'hasAuthor', $provenance, $trust)"
-                                />
-                            </ACTION>
-                        </xsl:if>
-                    </xsl:for-each>
-                </ACTIONS>
-            </xsl:otherwise>
-        </xsl:choose>
-    </xsl:template>
-</xsl:stylesheet>
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/rels2actions.xslt
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/rels2actions.xslt	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/rels2actions.xslt	(nonexistent)
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
-	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:dr="http://www.driver-repository.eu/namespace/dr" xmlns:dri="http://www.driver-repository.eu/namespace/dri"
-	xmlns:oaa="http://namespace.openaire.eu/oaa" xmlns:oaf="http://namespace.openaire.eu/oaf"
-	xmlns:dnet="eu.dnetlib.actionmanager.actions.infopackage.DMFInfoPackageToHbaseXsltFunctions"
-	xmlns:exslt="http://exslt.org/common" xmlns:action="http://namespace.openaire.eu/action" 
-	extension-element-prefixes="exslt"
-	exclude-result-prefixes="xsl dc dr dri oaa oaf dnet exslt">
-
-	<xsl:output omit-xml-declaration="yes" indent="yes" />
-
-	<xsl:param name="trust" select="string('0.9')" />
-	<xsl:param name="provenance" select="string('UNKNOWN')" />
-	<xsl:param name="namespaceprefix" select="string('unknown_____')" />
-
-	<xsl:template match="/*">
-
-		<xsl:choose>
-			<xsl:when test="count(//RELATION) = 0">
-				<ACTIONS />
-			</xsl:when>
-			<xsl:otherwise>
-				<ACTIONS>
-					<xsl:for-each select="//RELATION">
-						<xsl:choose>
-							<xsl:when test="./@type = 'resultProject'">
-								<xsl:variable name="resultId" select="./@source" />
-								<xsl:variable name="projectId">
-									<xsl:choose>
-										<xsl:when test="starts-with(@target, '40|')">
-											<xsl:value-of select="./@target" />
-										</xsl:when>
-										<xsl:otherwise>
-											<xsl:value-of select="dnet:oafSplitId('project', normalize-space(@target))"/>
-										</xsl:otherwise>
-									</xsl:choose>
-								</xsl:variable>
-								
-								<ACTION targetKey="{$resultId}" targetColumnFamily="resultProject_outcome_isProducedBy" targetColumn="{$projectId}">
-									<xsl:value-of select="dnet:oafResultProjectFromInfoPackage($resultId, $projectId, 'isProducedBy', $provenance, $trust)" />
-								</ACTION>
-								<ACTION targetKey="{$projectId}" targetColumnFamily="resultProject_outcome_produces" targetColumn="{$resultId}">
-									<xsl:value-of select="dnet:oafResultProjectFromInfoPackage($projectId, $resultId, 'produces', $provenance, $trust)" />
-								</ACTION>
-							</xsl:when>
-							
-							<!-- TODO: check this block, it caused problems:
-									Cannot convert argument/return type in call to method 'eu.dnetlib.actionmanager.actions.infopackage.DMFInfoPackageToHbaseXsltFunctions.oafPersonResultFromInfoPackage(node-set, node-set, result-tree, reference, reference)'
-									FATAL ERROR:  'Could not compile stylesheet'
-							
-							<xsl:when test="./@type = 'personResult'">
-								<xsl:variable name="personId" select="./@source" />
-								<xsl:variable name="resultId" select="./@target" />
-								
-								<xsl:variable name="pos">
-									<xsl:choose>
-										<xsl:when test="@position"><xsl:value-of select="@position"/></xsl:when>
-										<xsl:otherwise>1000</xsl:otherwise>
-									</xsl:choose>
-								</xsl:variable>
-
-								<ACTION targetKey="{$personId}" targetColumnFamily="personResult" targetColumn="{$resultId}">
-									<xsl:value-of select="dnet:oafPersonResultFromInfoPackage($personId, $resultId, $pos, $provenance, $trust)" />
-								</ACTION>
-								<ACTION targetKey="{$resultId}" targetColumnFamily="personResult" targetColumn="{$personId}">
-									<xsl:value-of select="dnet:oafPersonResultFromInfoPackage($resultId, $personId, $pos, $provenance, $trust)" />
-								</ACTION>
-							</xsl:when>
-							-->
-						</xsl:choose>
-					</xsl:for-each>
-				</ACTIONS>
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-
-</xsl:stylesheet>
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/dmf2updateActions.xslt
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/dmf2updateActions.xslt	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/dmf2updateActions.xslt	(nonexistent)
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
-	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:dr="http://www.driver-repository.eu/namespace/dr" xmlns:dri="http://www.driver-repository.eu/namespace/dri"
-	xmlns:oaa="http://namespace.openaire.eu/oaa" xmlns:oaf="http://namespace.openaire.eu/oaf"
-	xmlns:dnet="eu.dnetlib.actionmanager.actions.infopackage.DMFInfoPackageToHbaseXsltFunctions"
-	xmlns:date="eu.dnetlib.miscutils.datetime.DateUtils"
-	xmlns:exslt="http://exslt.org/common" xmlns:action="http://namespace.openaire.eu/action" 
-	extension-element-prefixes="exslt"
-	exclude-result-prefixes="xsl dc dr dri oaa oaf dnet exslt date">
-
-	<xsl:output omit-xml-declaration="yes" indent="yes" />
-
-	<xsl:param name="trust" select="string('0.9')" />
-	<xsl:param name="provenance" select="string('UNKNOWN')" />
-	<xsl:param name="namespaceprefix" select="string('unknown_____')" />
-
-	<xsl:template match="/*">
-	
-		<xsl:variable name="dateofcollection" select="//dr:dateOfCollection"/>
-
-		<xsl:variable name="metadata" select="exslt:node-set(//*[local-name()='metadata']/*)" />
-		<xsl:variable name="collectedDatasourceid">
-			<xsl:choose>
-				<xsl:when test="string-length(//oaf:collectedDatasourceid) &gt; 0">
-					<xsl:value-of select="//oaf:collectedDatasourceid" />
-				</xsl:when>
-				<xsl:otherwise>
-					<xsl:value-of select="UNKNOWN" />
-				</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-
-		<xsl:choose>
-			<xsl:when test="count($metadata) = 0">
-				<ACTIONS />
-			</xsl:when>
-			<xsl:otherwise>
-			
-				<xsl:variable name="objidentifier" select="/record/*[local-name() = 'header']/*[local-name() = 'objIdentifier']" />
-
-				<xsl:variable name="resultId" select="dnet:oafSimpleId('result', $objidentifier)" />
-				
-				<xsl:variable name="hostedbyid" select="dnet:oafSplitId('datasource', //oaf:hostedBy/@id)" />
-				<xsl:variable name="hostedbyname" select="//oaf:hostedBy/@name" />
-				
-				<xsl:variable name="collectedfromid" select="dnet:oafSplitId('datasource', //oaf:collectedFrom/@id)" />
-				<xsl:variable name="collectedfromname" select="//oaf:collectedFrom/@name" />		
-				
-<!-- 				<xsl:variable name="country" select="substring(//dr:repositoryCountry,  1, 200)" /> -->
-<!-- 				<xsl:variable name="accessmode" select="substring(//oaf:accessrights,   1, 200)" /> -->
-				
-				<xsl:variable name="result" select="dnet:oafResultFromInfoPackage($resultId, $provenance, $trust, $hostedbyid, $hostedbyname, $collectedfromid, $collectedfromname, $objidentifier, $dateofcollection, $metadata)" />
-
-				<ACTIONS> 
-					<ACTION targetKey="{$resultId}" targetColumnFamily="result" targetColumn="{concat('update_', date:now())}">
-						<xsl:value-of select="$result" />
-					</ACTION>
-				</ACTIONS>
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-
-</xsl:stylesheet>
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/dmf2insertActions.xslt
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/dmf2insertActions.xslt	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/actionmanager/xslt/dmf2insertActions.xslt	(nonexistent)
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
-	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:dr="http://www.driver-repository.eu/namespace/dr" xmlns:dri="http://www.driver-repository.eu/namespace/dri"
-	xmlns:oaa="http://namespace.openaire.eu/oaa" xmlns:oaf="http://namespace.openaire.eu/oaf"
-	xmlns:dnet="eu.dnetlib.actionmanager.actions.infopackage.DMFInfoPackageToHbaseXsltFunctions"
-	xmlns:exslt="http://exslt.org/common" xmlns:action="http://namespace.openaire.eu/action" 
-	extension-element-prefixes="exslt"
-	exclude-result-prefixes="xsl dc dr dri oaa oaf dnet exslt">
-
-	<xsl:output omit-xml-declaration="yes" indent="yes" />
-
-	<xsl:param name="trust" select="string('0.9')" />
-	<xsl:param name="provenance" select="string('UNKNOWN')" />
-	<xsl:param name="namespaceprefix" select="string('unknown_____')" />
-
-	<xsl:template match="/*">
-	
-		<xsl:variable name="dateofcollection" select="//dr:dateOfCollection"/>
-
-		<xsl:variable name="metadata" select="exslt:node-set(//*[local-name()='metadata']/*)" />
-		<xsl:variable name="collectedDatasourceid">
-			<xsl:choose>
-				<xsl:when test="string-length(//oaf:collectedDatasourceid) &gt; 0">
-					<xsl:value-of select="//oaf:collectedDatasourceid" />
-				</xsl:when>
-				<xsl:otherwise>
-					<xsl:value-of select="UNKNOWN" />
-				</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-
-
-		<xsl:choose>
-			<xsl:when test="count($metadata) = 0">
-				<ACTIONS />
-			</xsl:when>
-			<xsl:otherwise>
-			
-				<xsl:variable name="objidentifier" select="/record/*[local-name() = 'header']/*[local-name() = 'objIdentifier']" />
-
-				<xsl:variable name="resultId" select="dnet:oafSimpleId('result', $objidentifier)" />
-				
-				<xsl:variable name="hostedbyid" select="dnet:oafSplitId('datasource', //oaf:hostedBy/@id)" />
-				<xsl:variable name="hostedbyname" select="//oaf:hostedBy/@name" />
-				
-				<xsl:variable name="collectedfromid" select="dnet:oafSplitId('datasource', //oaf:collectedFrom/@id)" />
-				<xsl:variable name="collectedfromname" select="//oaf:collectedFrom/@name" />		
-				
-<!-- 				<xsl:variable name="country" select="substring(//dr:repositoryCountry,  1, 200)" /> -->
-<!-- 				<xsl:variable name="accessmode" select="substring(//oaf:accessrights,   1, 200)" /> -->
-				
-				<xsl:variable name="result" select="dnet:oafResultFromInfoPackage($resultId, $provenance, $trust, $hostedbyid, $hostedbyname, $collectedfromid, $collectedfromname, $objidentifier, $dateofcollection, $metadata)" />
-
-				<ACTIONS> 
-					<ACTION targetKey="{$resultId}" targetColumnFamily="result" targetColumn="body">
-						<xsl:value-of select="$result" />
-					</ACTION>
-
-<!-- 					<xsl:variable name="instance" select="dnet:oafInstanceFromInfoPackage($resultId, $hostedbyid, $hostedbyname, $provenance, $trust, $metadata)" /> -->
-
-<!-- 					<ACTION targetKey="{$resultId}" targetColumnFamily="instance" targetColumn="{$resultId}"> -->
-<!-- 						<xsl:value-of select="$instance" /> -->
-<!-- 					</ACTION> -->
-
-					<xsl:for-each select="//*[local-name()='projectid']">
-
-						<xsl:variable name="projectId" select="dnet:oafSplitId('project', normalize-space(.))"/>
-
-						<xsl:variable name="resultproject" select="dnet:oafResultProjectFromInfoPackage($resultId, $projectId, 'isProducedBy', $provenance, $trust)" />
-						<xsl:variable name="projectresult" select="dnet:oafResultProjectFromInfoPackage($projectId, $resultId, 'produces', $provenance, $trust)" />
-
-						<xsl:if test="string-length($projectId) &gt; 0">
-							<ACTION targetKey="{$resultId}" targetColumnFamily="resultProject_outcome_isProducedBy" targetColumn="{$projectId}">
-								<xsl:value-of select="$resultproject" />
-							</ACTION>
-							<ACTION targetKey="{$projectId}" targetColumnFamily="resultProject_outcome_produces" targetColumn="{$resultId}">
-								<xsl:value-of select="$projectresult" />
-							</ACTION>
-						</xsl:if>
-					</xsl:for-each>
-
-					<xsl:for-each select="//dc:creator">
-					
-						<xsl:variable name="personId" select="dnet:oafId('person', $namespaceprefix, concat($objidentifier, '::', .))" />
-						
-						<xsl:variable name="person" select="dnet:oafPersonFromInfoPackage($personId, ., $provenance, $trust, $collectedfromid, $collectedfromname, $objidentifier, $dateofcollection)" />
-						<xsl:variable name="personresult" select="dnet:oafPersonResultFromInfoPackage($personId, $resultId, position(), 'isAuthorOf', $provenance, $trust)" />
-						<xsl:variable name="resultperson" select="dnet:oafPersonResultFromInfoPackage($resultId, $personId, position(), 'hasAuthor', $provenance, $trust)" />
-						<xsl:if test="string-length($personId) &gt; 0">
-							<ACTION targetKey="{$personId}" targetColumnFamily="person" targetColumn="body">
-								<xsl:value-of select="$person" />
-							</ACTION>
-							<ACTION targetKey="{$personId}" targetColumnFamily="personResult_authorship_isAuthorOf" targetColumn="{$resultId}">
-								<xsl:value-of select="$personresult" />
-							</ACTION>
-							<ACTION targetKey="{$resultId}" targetColumnFamily="personResult_authorship_hasAuthor" targetColumn="{$personId}">
-								<xsl:value-of select="$resultperson" />
-							</ACTION>
-						</xsl:if>
-					</xsl:for-each>
-					
-				</ACTIONS>
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-
-</xsl:stylesheet>
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/data/transform/claim_2_hbase.xsl
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/data/transform/claim_2_hbase.xsl	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/data/transform/claim_2_hbase.xsl	(nonexistent)
@@ -1,150 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
-	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:dr="http://www.driver-repository.eu/namespace/dr" xmlns:dri="http://www.driver-repository.eu/namespace/dri" 
-	xmlns:oaa="http://namespace.openaire.eu/oaa" xmlns:oaf="http://namespace.openaire.eu/oaf"
-	xmlns:dnet="eu.dnetlib.data.transform.xml.DNetClaimToHbaseXsltFunctions"
-    xmlns:exslt="http://exslt.org/common" extension-element-prefixes="exslt" 
-    exclude-result-prefixes="xsl dc dr dri oaa oaf dnet exslt">
-    
-    <xsl:output omit-xml-declaration="yes" indent="yes"/>
-    
-    <xsl:param name="mergeIdForHomonyms" select="true()" />
-    <xsl:param name="writeCoAuthors" select="false()" />
-    
-	<xsl:template match="/*">
-	
-		<xsl:variable name="dateofcollection" select="//dr:dateOfCollection"/>
-		
-		<xsl:variable name="metadata" select="exslt:node-set(//*[local-name()='metadata']/*)" />
-		<xsl:variable name="namespaceprefix">
-			<xsl:choose>
-			
-				<!-- TODO check namespaceprefix length is 12 -->
-				<xsl:when test="string-length(//oaf:datasourceprefix) &gt; 0">
-					<xsl:value-of select="//oaf:datasourceprefix" />
-				</xsl:when>
-				<xsl:otherwise>
-					<xsl:value-of select="unknown_" />
-				</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-	
-		<xsl:choose>
-<!-- 			<xsl:when test="count($metadata) = 0 or string-length($namespaceprefix) = 0"> -->
-			<xsl:when test="count($metadata) = 0">
-				<ROWS/>
-			</xsl:when>
-			<xsl:otherwise>
-			
-				<xsl:variable name="objIdentifier" select="//dri:objIdentifier" />
-				<xsl:variable name="resultId" select="dnet:oafSimpleId('result', //dri:objIdentifier)" />
-				
-				<xsl:if test="string-length($resultId) &gt; 0">
-				
-					<xsl:variable name="collectedfromid" select="dnet:oafSplitId('datasource', //oaf:collectedFrom/@id)" />
-					<xsl:variable name="collectedfromname" select="//oaf:collectedFrom/@name" />
-				
-					<xsl:variable name="hostedbyid" select="dnet:oafSplitId('datasource', //oaf:hostedBy/@id)" />
-					<xsl:variable name="hostedbyname" select="//oaf:hostedBy/@name" />
-					
-					<xsl:variable name="originalidTest" select="/record/*[local-name() = 'header']/*[local-name() = 'recordIdentifier']" />
-					<xsl:variable name="originalid">
-						<xsl:choose>
-							<xsl:when test="contains($originalidTest, '::')">
-								<xsl:value-of select="substring-after($originalidTest, '::')" />
-							</xsl:when>
-							<xsl:otherwise>
-								<xsl:value-of select="$originalidTest" />
-							</xsl:otherwise>
-						</xsl:choose>
-					</xsl:variable>
-				
-					<xsl:variable name="result" select="dnet:oafResultFromClaim($resultId, $hostedbyid, $hostedbyname, $collectedfromid, $collectedfromname, $originalid, $dateofcollection, $metadata)"/>
-					
-					<ROWS>
-						<ROW key="{$resultId}" columnFamily="result">
-							<QUALIFIER name="body" type="base64"><xsl:value-of select="$result" /></QUALIFIER>
-						</ROW>
-						
-						<xsl:for-each select="//*[local-name()='projectid']">
-	
-							<xsl:variable name="projectId" select="dnet:oafSplitId('project', normalize-space(.))"/>
-							
-							<xsl:variable name="resultproject" select="dnet:oafResultProjectFromClaim($resultId, $projectId)"/>
-							<xsl:variable name="projectresult" select="dnet:oafResultProjectFromClaim($projectId, $resultId)"/>
-	
-							<xsl:if test="string-length($projectId) &gt; 0">
-								<ROW key="{$resultId}" columnFamily="resultProject">
-									<QUALIFIER name="{$projectId}" type="base64"><xsl:value-of select="$resultproject"/></QUALIFIER>
-								</ROW>
-								<ROW key="{$projectId}" columnFamily="resultProject">
-									<QUALIFIER name="{$resultId}" type="base64"><xsl:value-of select="$projectresult"/></QUALIFIER>
-								</ROW>
-							</xsl:if>							
-						</xsl:for-each>
-					
-						<xsl:for-each select="//dc:creator">
-							
-							<xsl:variable name="personIdPart">
-								<xsl:call-template name="personIdTmpl">
-									<xsl:with-param name="objIdentifier" select="$objIdentifier" />
-								</xsl:call-template>
-							</xsl:variable>
-							<xsl:variable name="position" select="position()" />
-							
-							<xsl:variable name="personId" select="dnet:oafId('person', $namespaceprefix, normalize-space($personIdPart))" /> 
-							<xsl:variable name="person" select="dnet:oafPersonFromClaim($personId, $collectedfromid, $collectedfromname, $originalid, $dateofcollection, .)" />
-							<xsl:variable name="personresult" select="dnet:oafPersonResultFromClaim($personId, $resultId, $position)" />
-							<xsl:variable name="resultperson" select="dnet:oafPersonResultFromClaim($resultId, $personId, $position)" />
-	
-							<xsl:if test="string-length($personId) &gt; 0">
-								<ROW key="{$personId}" columnFamily="person">
-									<QUALIFIER name="body" type="base64"><xsl:value-of select="$person" /></QUALIFIER>
-								</ROW>
-								<ROW key="{$personId}" columnFamily="personResult">
-									<QUALIFIER name="{$resultId}" type="base64"><xsl:value-of select="$personresult" /></QUALIFIER>
-								</ROW>
-								<ROW key="{$resultId}" columnFamily="personResult">
-									<QUALIFIER name="{$personId}" type="base64"><xsl:value-of select="$resultperson" /></QUALIFIER>
-								</ROW>
-							</xsl:if>
-							
-							<!-- COAUTHORS -->
-							<xsl:if test="$writeCoAuthors = true()">
-								<xsl:for-each select="../dc:creator">
-									<xsl:if test="$position != position()">
-										<xsl:variable name="coauthorIdPart">
-											<xsl:call-template name="personIdTmpl">
-												<xsl:with-param name="objIdentifier" select="$objIdentifier" />
-											</xsl:call-template>
-										</xsl:variable>
-										<xsl:variable name="coauthorId" select="dnet:oafId('person', $namespaceprefix, normalize-space($coauthorIdPart))" /> 
-										<xsl:variable name="personperson" select="dnet:oafPersonPersonFromClaim($personId, $coauthorId)" />
-										<ROW key="{$personId}" columnFamily="personPerson">
-											<QUALIFIER name="{$coauthorId}" type="base64"><xsl:value-of select="$personperson" /></QUALIFIER>
-										</ROW>
-									</xsl:if>
-								</xsl:for-each>
-							</xsl:if>
-							<!-- / COAUTHORS -->
-						</xsl:for-each>
-					</ROWS>
-				</xsl:if>
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-	
-	<xsl:template name="personIdTmpl">
-		<xsl:param name="objIdentifier" />
-		<xsl:choose>
-			<xsl:when test="$mergeIdForHomonyms = false()">
-				<xsl:value-of select="concat($objIdentifier, '::', normalize-space(.))" />
-			</xsl:when>				
-			<xsl:otherwise>
-				<xsl:value-of select="normalize-space(.)" />
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-
-</xsl:stylesheet>
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/data/transform/dmf_2_hbase.xsl
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/data/transform/dmf_2_hbase.xsl	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/data/transform/dmf_2_hbase.xsl	(nonexistent)
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
-	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:dr="http://www.driver-repository.eu/namespace/dr" xmlns:dri="http://www.driver-repository.eu/namespace/dri" 
-	xmlns:oaa="http://namespace.openaire.eu/oaa" xmlns:oaf="http://namespace.openaire.eu/oaf"
-	xmlns:dnet="eu.dnetlib.data.transform.xml.DNetMdStoreToHbaseXsltFunctions"
-    xmlns:exslt="http://exslt.org/common" extension-element-prefixes="exslt" 
-    exclude-result-prefixes="xsl dc dr dri oaa oaf dnet exslt">
-    
-    <xsl:output omit-xml-declaration="yes" indent="yes"/>
-    
-    <xsl:param name="mergeIdForHomonyms" select="true()" />
-    <xsl:param name="writeCoAuthors" select="false()" />
-    
-	<xsl:template match="/*">
-	
-		<xsl:variable name="dateofcollection" select="//dr:dateOfCollection"/>
-		
-		<xsl:variable name="metadata" select="exslt:node-set(//*[local-name()='metadata']/*)" />
-		<xsl:variable name="namespaceprefix">
-			<xsl:choose>
-			
-				<!-- TODO check namespaceprefix length is 12 -->
-				<xsl:when test="string-length(//oaf:datasourceprefix) &gt; 0">
-					<xsl:value-of select="//oaf:datasourceprefix" />
-				</xsl:when>
-				<xsl:otherwise>
-					<xsl:value-of select="unknown_" />
-				</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-	
-		<xsl:choose>
-<!-- 			<xsl:when test="count($metadata) = 0 or string-length($namespaceprefix) = 0"> -->
-			<xsl:when test="count($metadata) = 0">
-				<ROWS/>
-			</xsl:when>
-			<xsl:otherwise>
-			
-				<xsl:variable name="objIdentifier" select="//dri:objIdentifier" />
-				<xsl:variable name="resultId" select="dnet:oafSimpleId('result', //dri:objIdentifier)" />
-				
-				<xsl:if test="string-length($resultId) &gt; 0">
-				
-					<xsl:variable name="collectedfromid" select="dnet:oafSplitId('datasource', //oaf:collectedFrom/@id)" />
-					<xsl:variable name="collectedfromname" select="//oaf:collectedFrom/@name" />
-				
-					<xsl:variable name="hostedbyid" select="dnet:oafSplitId('datasource', //oaf:hostedBy/@id)" />
-					<xsl:variable name="hostedbyname" select="//oaf:hostedBy/@name" />
-					
-					<xsl:variable name="originalidTest" select="/record/*[local-name() = 'header']/*[local-name() = 'recordIdentifier']" />
-					<xsl:variable name="originalid">
-						<xsl:choose>
-							<xsl:when test="contains($originalidTest, '::')">
-								<xsl:value-of select="substring-after($originalidTest, '::')" />
-							</xsl:when>
-							<xsl:otherwise>
-								<xsl:value-of select="$originalidTest" />
-							</xsl:otherwise>
-						</xsl:choose>
-					</xsl:variable>
-				
-					<xsl:variable name="result" select="dnet:oafResultFromMDStore($resultId, $hostedbyid, $hostedbyname, $collectedfromid, $collectedfromname, $originalid, $dateofcollection, $metadata)"/>
-					
-					<ROWS>
-						<ROW key="{$resultId}" columnFamily="result">
-							<QUALIFIER name="body" type="base64"><xsl:value-of select="$result" /></QUALIFIER>
-						</ROW>
-						
-						<xsl:for-each select="//*[local-name()='projectid']">
-	
-							<xsl:variable name="projectId" select="dnet:oafSplitId('project', normalize-space(.))"/>
-							
-							<xsl:if test="string-length($projectId) &gt; 0">
-
-								<xsl:variable name="resultproject" select="dnet:oafResultProject_Outcome_FromMDStore($resultId, $projectId, 'isProducedBy')"/>
-								<xsl:variable name="projectresult" select="dnet:oafResultProject_Outcome_FromMDStore($projectId, $resultId, 'produces')"/>
-
-								<ROW key="{$resultId}" columnFamily="resultProject_outcome_isProducedBy">
-									<QUALIFIER name="{$projectId}" type="base64"><xsl:value-of select="$resultproject"/></QUALIFIER>
-								</ROW>
-								<ROW key="{$projectId}" columnFamily="resultProject_outcome_produces">
-									<QUALIFIER name="{$resultId}" type="base64"><xsl:value-of select="$projectresult"/></QUALIFIER>
-								</ROW>
-							</xsl:if>							
-						</xsl:for-each>
-					
-						<xsl:for-each select="//*[local-name()='creator']">
-							
-							<xsl:if test="string-length(normalize-space(.)) &gt; 0">
-							
-								<xsl:variable name="personIdPart">
-									<xsl:call-template name="personIdTmpl">
-										<xsl:with-param name="objIdentifier" select="$objIdentifier" />
-									</xsl:call-template>
-								</xsl:variable>
-								<xsl:variable name="position" select="position()" />
-								
-								<xsl:variable name="personId" select="dnet:oafId('person', $namespaceprefix, normalize-space($personIdPart))" /> 
-								<xsl:variable name="person" select="dnet:oafPersonFromMDStore($personId, $collectedfromid, $collectedfromname, $originalid, $dateofcollection, .)" />
-								<xsl:variable name="personresult" select="dnet:oafPersonResult_Authorship_FromMDStore($personId, $resultId, $position, 'isAuthorOf')" />
-								<xsl:variable name="resultperson" select="dnet:oafPersonResult_Authorship_FromMDStore($resultId, $personId, $position, 'hasAuthor')" />
-		
-								<xsl:if test="string-length($personId) &gt; 0">
-									<ROW key="{$personId}" columnFamily="person">
-										<QUALIFIER name="body" type="base64"><xsl:value-of select="$person" /></QUALIFIER>
-									</ROW>
-									<ROW key="{$personId}" columnFamily="personResult_authorship_isAuthorOf">
-										<QUALIFIER name="{$resultId}" type="base64"><xsl:value-of select="$personresult" /></QUALIFIER>
-									</ROW>
-									<ROW key="{$resultId}" columnFamily="personResult_authorship_hasAuthor">
-										<QUALIFIER name="{$personId}" type="base64"><xsl:value-of select="$resultperson" /></QUALIFIER>
-									</ROW>
-								</xsl:if>
-								
-								<!-- COAUTHORS -->
-								<xsl:if test="$writeCoAuthors = true()">
-									<xsl:for-each select="../dc:creator">
-										<xsl:if test="$position != position()">
-											<xsl:variable name="coauthorIdPart">
-												<xsl:call-template name="personIdTmpl">
-													<xsl:with-param name="objIdentifier" select="$objIdentifier" />
-												</xsl:call-template>
-											</xsl:variable>
-											<xsl:variable name="coauthorId" select="dnet:oafId('person', $namespaceprefix, normalize-space($coauthorIdPart))" /> 
-											<xsl:variable name="personperson" select="dnet:oafPersonPerson_CoAuthorship_FromDMF($personId, $coauthorId, 'isCoAuthorOf')" />
-											<ROW key="{$personId}" columnFamily="personPerson_coAuthorship_isCoAuthorOf">
-												<QUALIFIER name="{$coauthorId}" type="base64"><xsl:value-of select="$personperson" /></QUALIFIER>
-											</ROW>
-										</xsl:if>
-									</xsl:for-each>
-								</xsl:if>
-								<!-- / COAUTHORS -->
-							</xsl:if>
-						</xsl:for-each>
-					</ROWS>
-				</xsl:if>
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-	
-	<xsl:template name="personIdTmpl">
-		<xsl:param name="objIdentifier" />
-		<xsl:choose>
-			<xsl:when test="$mergeIdForHomonyms = false()">
-				<xsl:value-of select="concat($objIdentifier, '::', normalize-space(.))" />
-			</xsl:when>				
-			<xsl:otherwise>
-				<xsl:value-of select="normalize-space(.)" />
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-
-</xsl:stylesheet>
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/data/transform/simple.xsl
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/data/transform/simple.xsl	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/data/transform/simple.xsl	(nonexistent)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
-	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
-	xmlns:dnet="eu.dnetlib.data.transform.xml.AbstractDNetOafXsltFunctions"
-	exclude-result-prefixes="xsl dnet">
-	
-    <xsl:output omit-xml-declaration="yes" indent="yes"/>
-	<xsl:template match="/*">
-		<xsl:variable name="metadata" select="//*[local-name()='metadata']/*" />
-		<ROWS>
-			<xsl:value-of select="dnet:testParse($metadata)"/>
-		</ROWS>
-	</xsl:template>
-</xsl:stylesheet>
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/data/transform/datacite_2_hbase.xsl
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/data/transform/datacite_2_hbase.xsl	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/resources/eu/dnetlib/data/transform/datacite_2_hbase.xsl	(nonexistent)
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
-	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/"
-	xmlns:dr="http://www.driver-repository.eu/namespace/dr" xmlns:dri="http://www.driver-repository.eu/namespace/dri"
-	xmlns:oaa="http://namespace.openaire.eu/oaa" xmlns:oaf="http://namespace.openaire.eu/oaf"
-	xmlns:dnet="eu.dnetlib.data.transform.xml.DNetMdStoreDataCiteToHbaseXsltFunctions"
-	xmlns:exslt="http://exslt.org/common" extension-element-prefixes="exslt"
-	exclude-result-prefixes="xsl dc dr dri oaa oaf dnet exslt">
-
-	<xsl:output omit-xml-declaration="yes" indent="yes" />
-	<xsl:template match="/*">
-		<xsl:variable name="dateofcollection" select="//dri:dateOfCollection" />
-		<xsl:variable name="metadata"
-			select="exslt:node-set(//*[local-name()='metadata']/*)" />
-		<xsl:variable name="namespaceprefix">
-			<xsl:choose>
-				<!-- TODO check namespaceprefix length is 12 -->
-				<xsl:when test="string-length(//oaf:datasourceprefix) &gt; 0">
-					<xsl:value-of select="//oaf:datasourceprefix" />
-				</xsl:when>
-				<xsl:otherwise>
-					<xsl:value-of select="unknown_____" />
-				</xsl:otherwise>
-			</xsl:choose>
-		</xsl:variable>
-
-		<xsl:choose>
-			<xsl:when
-				test="count($metadata) = 0 or normalize-space(//oaf:skipRecord)= 'true'">
-				<ROWS />
-			</xsl:when>
-			<xsl:otherwise>
-
-				<xsl:variable name="resultId"
-					select="dnet:oafSimpleId('result', //dri:objIdentifier)" />
-
-				<xsl:if test="string-length($resultId) &gt; 0">
-					<xsl:variable name="originalid"
-						select="concat('',  //*[local-name() = 'resource']/*[local-name()='identifier'])" />
-					<xsl:variable name="creators" select="//*[local-name() = 'creator']" />
-					<xsl:variable name="titles" select="//*[local-name() = 'title']" />
-					<xsl:variable name="subjects" select="//*[local-name() = 'subject']" />
-					<xsl:variable name="publisher" select="//*[local-name() = 'publisher']" />
-					<xsl:variable name="descriptions" select="//*[local-name() = 'description']" />
-					<xsl:variable name="dates" select="//*[local-name() = 'date']" />
-					<xsl:variable name="resourceType"
-						select="//*[local-name() = 'resourceType']" />
-					<xsl:variable name="formats" select="//*[local-name() = 'format']" />
-					<xsl:variable name="sizes" select="//*[local-name() = 'size']" />
-					<xsl:variable name="rights" select="//*[local-name() = 'rights']" />
-					<xsl:variable name="version" select="//*[local-name() = 'version']" />
-					<xsl:variable name="languages" select="//*[local-name() = 'language']" />
-
-					<xsl:variable name="instanceURI">
-						<xsl:choose>
-							<xsl:when
-								test="string-length( //*[local-name() = 'resource']/*[local-name()='identifier' and ./@identifierType='DOI']) &gt; 0">
-								<xsl:value-of
-									select="concat('http://dx.doi.org','/', //*[local-name() = 'resource']/*[local-name()='identifier' and ./@identifierType='DOI']/text())" />
-							</xsl:when>
-							<xsl:otherwise>
-								<xsl:value-of
-									select="concat('', //*[local-name() = 'resource']/*[local-name()='identifier' and ./@identifierType='URL'])" />
-							</xsl:otherwise>
-						</xsl:choose>
-					</xsl:variable>
-
-					<xsl:variable name="hostedbyid"
-						select="dnet:oafSplitId('datasource', //oaf:hostedBy/@id)" />
-					<xsl:variable name="hostedbyname" select="concat('', //oaf:hostedBy/@name)" />
-					<xsl:variable name="collectedfromid"
-						select="dnet:oafSplitId('datasource', //oaf:collectedFrom/@id)" />
-					<xsl:variable name="collectedfromname"
-						select="concat('', //oaf:collectedFrom/@name)" />
-					<xsl:variable name="dateOfCollection"
-						select="concat('', //dri:dateOfCollection)" />
-
-					<xsl:variable name="result"
-						select="dnet:oafResult_FromDatacite($resultId, $metadata, $titles, 
-                        $subjects, $publisher, $descriptions, $dates, $resourceType, 
-                        $formats, $sizes, $languages, $rights, $version, $hostedbyid, $hostedbyname,
-                        $collectedfromid, $collectedfromname, $originalid, $instanceURI, $dateOfCollection)" />
-
-					<ROWS>
-						<ROW key="{$resultId}" columnFamily="result">
-							<QUALIFIER name="body" type="base64">
-								<xsl:value-of select="$result" />
-							</QUALIFIER>
-						</ROW>
-						<xsl:for-each select="//*[local-name() = 'creator']">
-							<xsl:variable name="personIdTemp">
-								<xsl:choose>
-									<xsl:when
-										test="string-length(./*[local-name() = 'nameIdentifier']) &gt; 0">
-										<xsl:value-of
-											select="translate(normalize-space(./*[local-name() = 'nameIdentifier']),' .,','___')" />
-									</xsl:when>
-									<xsl:otherwise>
-										<xsl:value-of
-											select="translate(normalize-space(./*[local-name() = 'creatorName']),' .,','___')" />
-									</xsl:otherwise>
-								</xsl:choose>
-							</xsl:variable>
-							<xsl:variable name="personId"
-								select="dnet:oafId('person', $namespaceprefix, normalize-space($personIdTemp))" />
-
-							<xsl:variable name="originalPersonId"
-								select="./*[local-name() = 'nameIdentifier']" />
-							<xsl:variable name="position" select="position()" />
-							<xsl:if test="string-length($personId) &gt; 0">
-								<xsl:variable name="person"
-									select="dnet:oafPerson_FromDatacite($personId,$collectedfromid, $collectedfromname,$originalPersonId, $dateOfCollection ,normalize-space(./*[local-name() = 'creatorName']))" />
-
-								<xsl:variable name="personresult"
-									select="dnet:oafPersonResult_Authorship_FromDatacite($personId, $resultId, $position, 'isAuthorOf')" />
-								<xsl:variable name="resultperson"
-									select="dnet:oafPersonResult_Authorship_FromDatacite($resultId, $personId, $position, 'hasAuthor')" />
-								<ROW key="{$personId}" columnFamily="person">
-									<QUALIFIER name="body" type="base64">
-										<xsl:value-of select="$person" />
-									</QUALIFIER>
-								</ROW>
-								<ROW key="{$personId}" columnFamily="personResult">
-									<QUALIFIER name="{$resultId}" type="base64">
-										<xsl:value-of select="$personresult" />
-									</QUALIFIER>
-								</ROW>
-								<ROW key="{$resultId}" columnFamily="personResult">
-									<QUALIFIER name="{$personId}" type="base64">
-										<xsl:value-of select="$resultperson" />
-									</QUALIFIER>
-								</ROW>
-							</xsl:if>
-						</xsl:for-each>
-
-						<xsl:for-each select="//*[local-name()='projectid']">
-
-							<xsl:variable name="projectId"
-								select="dnet:oafSplitId('project', normalize-space(.))" />
-
-							<xsl:variable name="resultproject"
-								select="dnet:oafResultProject_Outcome_FromDatacite($resultId, $projectId, 'isProducedBy')" />
-							<xsl:variable name="projectresult"
-								select="dnet:oafResultProject_Outcome_FromDatacite($projectId, $resultId, 'produces')" />
-
-							<xsl:if test="string-length($projectId) &gt; 0">
-								<ROW key="{$resultId}" columnFamily="resultProject">
-									<QUALIFIER name="{$projectId}" type="base64">
-										<xsl:value-of select="$resultproject" />
-									</QUALIFIER>
-								</ROW>
-								<ROW key="{$projectId}" columnFamily="resultProject">
-									<QUALIFIER name="{$resultId}" type="base64">
-										<xsl:value-of select="$projectresult" />
-									</QUALIFIER>
-								</ROW>
-							</xsl:if>
-						</xsl:for-each>
-
-						<xsl:for-each select="//oaf:relatedId">
-							<xsl:variable name="relatedId" select="dnet:oafSimpleId('result', .)" />
-							<ROW key="{$resultId}" columnFamily="resultResult">
-								<QUALIFIER name="{$relatedId}" type="base64">
-									<xsl:value-of
-										select="dnet:oafResultResult_PublicationDataset_FromDatacite($resultId, $relatedId, 'isRelatedTo')" />
-								</QUALIFIER>
-							</ROW>
-							<ROW key="{$relatedId}" columnFamily="resultResult">
-								<QUALIFIER name="{$resultId}" type="base64">
-									<xsl:value-of
-										select="dnet:oafResultResult_PublicationDataset_FromDatacite($relatedId, $resultId, 'isRelatedTo')" />
-								</QUALIFIER>
-							</ROW>
-						</xsl:for-each>
-					</ROWS>
-				</xsl:if>
-			</xsl:otherwise>
-		</xsl:choose>
-	</xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/pace/model/ProtoDocumentBuilder.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/pace/model/ProtoDocumentBuilder.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/pace/model/ProtoDocumentBuilder.java	(nonexistent)
@@ -1,122 +0,0 @@
-package eu.dnetlib.pace.model;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.lang.StringUtils;
-
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.google.protobuf.Descriptors.FieldDescriptor;
-import com.google.protobuf.GeneratedMessage;
-
-import eu.dnetlib.pace.model.document.DocumentBuilder;
-import eu.dnetlib.pace.model.document.MapDocument;
-
-/**
- * The Class ProtoDocumentBuilder.
- */
-public class ProtoDocumentBuilder extends DocumentBuilder {
-
-	/**
-	 * New instance.
-	 * 
-	 * @param id
-	 *            the id
-	 * @param metadata
-	 *            the metadata
-	 * @param fields
-	 *            the fields
-	 * @return the map document
-	 */
-	public static MapDocument newInstance(final String id, final GeneratedMessage metadata, final List<FieldDef> fields) {
-		return newInstance(id, new ProtoDocumentBuilder().generateFieldMap(metadata, fields));
-	}
-
-	/**
-	 * Generate field map.
-	 * 
-	 * @param metadata
-	 *            the metadata
-	 * @param fields
-	 *            the fields
-	 * @return the map
-	 */
-	private Map<String, FieldList> generateFieldMap(final GeneratedMessage metadata, final List<FieldDef> fields) {
-		Map<String, FieldList> fieldMap = Maps.newHashMap();
-
-		for (FieldDef fd : fields) {
-			fieldMap.put(fd.getName(), processPath(fd, metadata, Arrays.asList(fd.getPath().split(FieldDef.PATH_SEPARATOR))));
-		}
-
-		return fieldMap;
-	}
-
-	/**
-	 * Process path.
-	 * 
-	 * @param fd
-	 *            the fd
-	 * @param message
-	 *            the message
-	 * @param list
-	 *            the list
-	 * @return the field list
-	 */
-	public FieldList processPath(final FieldDef fd, final GeneratedMessage message, final List<String> list) {
-
-		final FieldList response = new FieldListImpl(fd.getName());
-
-		if (list.isEmpty()) throw new RuntimeException("ProtoBuf navigation path is empty");
-
-		FieldDescriptor desc = message.getDescriptorForType().findFieldByName(list.get(0));
-		if (desc != null) {
-			if (desc.isRepeated()) {
-				int count = message.getRepeatedFieldCount(desc);
-				for (int i = 0; i < count; i++) {
-					Object field = message.getRepeatedField(desc, i);
-					response.addAll(generateFields(fd, field, list));
-				}
-			} else {
-				Object field = message.getField(desc);
-				response.addAll(generateFields(fd, field, list));
-			}
-		} else throw new RuntimeException("Invalid protobuf path (field not found): " + StringUtils.join(list, ">"));
-
-		return response;
-	}
-
-	/**
-	 * Generate fields.
-	 * 
-	 * @param fd
-	 *            the fd
-	 * @param field
-	 *            the field
-	 * @param list
-	 *            the list
-	 * @return the list
-	 */
-	private List<Field> generateFields(final FieldDef fd, final Object field, final List<String> list) {
-		if (field instanceof GeneratedMessage) {
-			if (list.size() > 1) return processPath(fd, (GeneratedMessage) field, list.subList(1, list.size()));
-			else throw new RuntimeException("No primitive type found");
-		} else {
-			if (list.size() == 1) {
-				switch (fd.getType()) {
-				case Int:
-				case String:
-					return Lists.newArrayList(new FieldValueImpl(fd.getType(), fd.getName(), field));
-				case List:
-					FieldListImpl fl = new FieldListImpl(fd.getName());
-					fl.add(new FieldValueImpl(fd.getType(), fd.getName(), field));
-					return fl;
-				default:
-					throw new IllegalArgumentException("invalid type: " + fd.getType().toString());
-				}
-			} else throw new RuntimeException("Found a primitive type before the path end");
-		}
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/actionmanager/actions/infopackage/DMFInfoPackageToHbaseXsltFunctions.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/actionmanager/actions/infopackage/DMFInfoPackageToHbaseXsltFunctions.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/actionmanager/actions/infopackage/DMFInfoPackageToHbaseXsltFunctions.java	(nonexistent)
@@ -1,65 +0,0 @@
-package eu.dnetlib.actionmanager.actions.infopackage;
-
-import org.w3c.dom.NodeList;
-
-import eu.dnetlib.data.transform.xml.DmfToHbaseXsltFunctions;
-
-public class DMFInfoPackageToHbaseXsltFunctions extends DmfToHbaseXsltFunctions {
-
-	// dnet:oafInstanceFromMDStore($resultId, $hostedby, //dc:identifier, "userclaim:doi", "0.9")
-	// public static String oafInstanceFromInfoPackage(
-	// final String resultId,
-	// final String hostedbyId,
-	// final String hostedbyName,
-	// final String provenance,
-	// final String trust,
-	// final NodeList nodelist) {
-	// return oafInstanceFromDMF(resultId, hostedbyId, hostedbyName, provenance, trust, nodelist);
-	// }
-
-	// dnet:oafPersonFromInfoPackage($personId, ., "userclaim:doi", "0.9")
-	public static String oafPersonFromInfoPackage(final String personId,
-			final String fullname,
-			final String provenance,
-			final String trust,
-			final String collectedFromId,
-			final String collectedFromName,
-			final String originalId,
-			final String dateOfCollection) {
-		return oafPerson_FromDMF(personId, fullname, provenance, trust, collectedFromId, collectedFromName, originalId, dateOfCollection);
-	}
-
-	public static String oafResultFromInfoPackage(final String resultId,
-			final String provenance,
-			final String trust,
-			final String hostedbyId,
-			final String hostedbyName,
-			final String collectedFromId,
-			final String collectedFromName,
-			final String originalId,
-			final String dateOfCollection,
-			final NodeList nodelist) {
-		return oafResult_FromDMF(resultId, provenance, trust, hostedbyId, hostedbyName, collectedFromId, collectedFromName, originalId, dateOfCollection,
-				nodelist);
-	}
-
-	// dnet:oafPersonResultFromInfoPackage($resultId, $oafPerson, position(), "userclaim:doi", "0.9")
-	public static String oafPersonResultFromInfoPackage(final String personId,
-			final String resultId,
-			final int rank,
-			final String relClass,
-			final String provenance,
-			final String trust) {
-		return oafPersonResult_Authorship_FromDMF(personId, resultId, rank, relClass, provenance, trust);
-	}
-
-	// dnet:oafResultProjectFromInfoPackage($resultId, $projectId, "userclaim:doi", "0.9")
-	public static String oafResultProjectFromInfoPackage(final String sourceId,
-			final String targetId,
-			final String relClass,
-			final String provenance,
-			final String trust) {
-		return oafResultProject_Outcome_FromDMF(sourceId, targetId, relClass, provenance, trust);
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/actionmanager/actions/infopackage/DataciteInfoPackageToHbaseXsltFunctions.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/actionmanager/actions/infopackage/DataciteInfoPackageToHbaseXsltFunctions.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/actionmanager/actions/infopackage/DataciteInfoPackageToHbaseXsltFunctions.java	(nonexistent)
@@ -1,59 +0,0 @@
-package eu.dnetlib.actionmanager.actions.infopackage;
-
-import org.w3c.dom.NodeList;
-
-import eu.dnetlib.data.transform.xml.DataciteToHbaseXsltFunctions;
-
-public class DataciteInfoPackageToHbaseXsltFunctions extends DataciteToHbaseXsltFunctions {
-
-	public static String oafDataCiteResultFromInfoPackage(final String resultId,
-			final NodeList metadata,
-			final NodeList titles,
-			final NodeList subjects,
-			final NodeList publisher,
-			final NodeList descriptions,
-			final NodeList dates,
-			final NodeList resourceTypes,
-			final NodeList formats,
-			final NodeList sizes,
-			final NodeList languages,
-			final NodeList rights,
-			final NodeList version,
-			final String provenance,
-			final String trust,
-			final String hostedbyId,
-			final String hostedbyName,
-			final String collectedfromId,
-			final String collectedfromName,
-			final String originalId,
-			final String instanceUri,
-			final String dateOfCollection) {
-
-		return oafResult_FromDatacite(resultId, metadata, titles, subjects, publisher, descriptions, dates, resourceTypes, formats, sizes, languages, rights,
-				version, provenance, trust, hostedbyId, hostedbyName, collectedfromId, collectedfromName, originalId, instanceUri, dateOfCollection);
-
-	}
-
-	public static String oafDataCitePersonFromInfoPackage(final String personId,
-			final String fullname,
-			final String provenanceAction,
-			final String trust,
-			final String collectedfromId,
-			final String collectedfromName,
-			final String originalId,
-			final String dateOfCollection) {
-
-		return oafPerson_FromDatacite(personId, fullname, provenanceAction, trust, collectedfromId, collectedfromName, originalId, dateOfCollection);
-
-	}
-
-	public static String oafDataCitePersonResultFromInfoPackage(final String personId,
-			final String resultId,
-			final int rank,
-			final String relClass,
-			final String provenanceAction,
-			final String trust) {
-		return oafPersonResult_Authorship_FromDatacite(personId, resultId, rank, relClass, provenanceAction, trust);
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafRelDecoder.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafRelDecoder.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafRelDecoder.java	(nonexistent)
@@ -1,153 +0,0 @@
-package eu.dnetlib.data.mapreduce.util;
-
-import com.google.protobuf.Descriptors.FieldDescriptor;
-import com.google.protobuf.GeneratedMessage;
-import com.google.protobuf.Message.Builder;
-import com.google.protobuf.MessageOrBuilder;
-import com.google.protobuf.ProtocolMessageEnum;
-
-import eu.dnetlib.data.proto.OafProtos.OafEntity;
-import eu.dnetlib.data.proto.OafProtos.OafRel;
-import eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata;
-import eu.dnetlib.data.proto.RelTypeProtos.RelType;
-import eu.dnetlib.data.proto.RelTypeProtos.SubRelType;
-import eu.dnetlib.data.proto.TypeProtos.Type;
-
-public class OafRelDecoder {
-
-	private static final String _ = "_";
-
-	private final OafRel oafRel;
-
-	public static OafRelDecoder decode(OafRel oafRel) {
-		return new OafRelDecoder(oafRel);
-	}
-
-	private OafRelDecoder(OafRel oafRel) {
-		this.oafRel = oafRel;
-	}
-
-	public RelType getRelType() {
-		return oafRel.getRelType();
-	}
-
-	public String relTypeName() {
-		return getRelType().toString();
-	}
-
-	public SubRelType getSubRelType() {
-		return oafRel.getSubRelType();
-	}
-
-	public String relSubTypeName() {
-		return getSubRelType().toString();
-	}
-
-	public String getCF() {
-		return OafRelDecoder.getCF(getRelType(), getSubRelType(), getRelClass());
-	}
-
-	public static String getCF(RelType relType, SubRelType subRelType, ProtocolMessageEnum relClass) {
-		return OafRelDecoder.getCF(relType, subRelType, relClass.getValueDescriptor().getName());
-	}
-
-	public static String getCF(RelType relType, SubRelType subRelType, String relClass) {
-		return relType + _ + subRelType + _ + relClass;
-	}
-
-	public String getRelClass() {
-		return oafRel.getRelClass();
-	}
-
-	public RelDescriptor getRelDescriptor() {
-		return new RelDescriptor(getCF());
-	}
-
-	public GeneratedMessage getRel() {
-
-		FieldDescriptor fd = oafRel.getDescriptorForType().findFieldByName(relTypeName());
-		return (GeneratedMessage) oafRel.getField(fd);
-	}
-
-	public GeneratedMessage getSubRel() {
-		GeneratedMessage rel = getRel();
-		FieldDescriptor fd = rel.getDescriptorForType().findFieldByName(relSubTypeName());
-		return (GeneratedMessage) rel.getField(fd);
-	}
-
-	public RelMetadata getRelMetadata() {
-		GeneratedMessage rel = getSubRel();
-		FieldDescriptor fd = rel.getDescriptorForType().findFieldByName("relMetadata");
-		return fd != null ? (RelMetadata) rel.getField(fd) : null;
-	}
-
-	public OafRel.Builder setClassId(final String classid) {
-		RelMetadata.Builder relMetadataBuilder = RelMetadata.newBuilder(getRelMetadata());
-		relMetadataBuilder.getSemanticsBuilder().setClassid(classid).setClassname(classid);
-
-		OafRel.Builder builder = OafRel.newBuilder(oafRel);
-
-		FieldDescriptor fdRel = fd(oafRel, relTypeName());
-		Builder relBuilder = builder.newBuilderForField(fdRel);
-
-		FieldDescriptor fdSubRel = fd(relBuilder, relSubTypeName());
-		Builder subRelBuilder = relBuilder.newBuilderForField(fdSubRel).mergeFrom(getSubRel());
-
-		subRelBuilder.setField(fd(getSubRel(), "relMetadata"), relMetadataBuilder.build());
-
-		relBuilder.setField(fdSubRel, subRelBuilder.build());
-		builder.setField(fdRel, relBuilder.build());
-
-		return builder.setRelClass(classid);
-	}
-
-	public Type getTargetType(Type sourceType) {
-		switch (getRelType()) {
-		case datasourceOrganization:
-			return sourceType.equals(Type.datasource) ? Type.organization : Type.datasource;
-		case organizationOrganization:
-			return Type.organization;
-		case personPerson:
-			return Type.person;
-		case personResult:
-			return sourceType.equals(Type.person) ? Type.result : Type.person;
-		case projectOrganization:
-			return sourceType.equals(Type.project) ? Type.organization : Type.project;
-		case projectPerson:
-			return sourceType.equals(Type.project) ? Type.person : Type.project;
-		case resultOrganization:
-			return sourceType.equals(Type.result) ? Type.organization : Type.result;
-		case resultProject:
-			return sourceType.equals(Type.result) ? Type.project : Type.result;
-		case resultResult:
-			return Type.result;
-		default:
-			throw new IllegalArgumentException("Unknown relationship type: " + relTypeName());
-		}
-	}
-
-	protected FieldDescriptor fd(MessageOrBuilder mb, final int fieldNumber) {
-		return mb.getDescriptorForType().findFieldByNumber(fieldNumber);
-	}
-
-	protected FieldDescriptor fd(MessageOrBuilder mb, final String fieldName) {
-		return mb.getDescriptorForType().findFieldByName(fieldName);
-	}
-
-	public String getCachedTargedId() {
-
-		if (!oafRel.hasCachedTarget()) { return null; }
-
-		final OafEntity entity = oafRel.getCachedTarget();
-		return OafEntityDecoder.decode(entity).getId();
-	}
-
-	public String getRelSourceId() {
-		return oafRel.getSource();
-	}
-
-	public String getRelTargetId() {
-		return oafRel.getTarget();
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/RelDescriptor.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/RelDescriptor.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/RelDescriptor.java	(nonexistent)
@@ -1,61 +0,0 @@
-package eu.dnetlib.data.mapreduce.util;
-
-import eu.dnetlib.data.proto.RelTypeProtos.RelType;
-import eu.dnetlib.data.proto.RelTypeProtos.SubRelType;
-
-public class RelDescriptor {
-
-	private final String it;
-
-	private final RelType relType;
-
-	private final SubRelType subRelType;
-
-	public RelDescriptor(String value) {
-		super();
-		this.it = value;
-
-		String[] s = value.split("_");
-
-		this.relType = RelType.valueOf(s[0]);
-		this.subRelType = SubRelType.valueOf(s[1]);
-	}
-
-	public SubRelType getSubRelType() {
-		return subRelType;
-	}
-
-	public RelType getRelType() {
-		return relType;
-	}
-
-	public String getIt() {
-		return it;
-	}
-
-	@Override
-	public String toString() {
-		return getIt();
-	}
-
-	@Override
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + ((it == null) ? 0 : it.hashCode());
-		return result;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (this == obj) return true;
-		if (obj == null) return false;
-		if (getClass() != obj.getClass()) return false;
-		RelDescriptor other = (RelDescriptor) obj;
-		if (it == null) {
-			if (other.it != null) return false;
-		} else if (!it.equals(other.it)) return false;
-		return true;
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafTest.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafTest.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafTest.java	(nonexistent)
@@ -1,453 +0,0 @@
-package eu.dnetlib.data.mapreduce.util;
-
-import com.google.protobuf.GeneratedMessage;
-import com.google.protobuf.InvalidProtocolBufferException;
-
-import eu.dnetlib.data.proto.DatasourceOrganizationProtos.DatasourceOrganization;
-import eu.dnetlib.data.proto.DatasourceOrganizationProtos.DatasourceOrganization.Provision;
-import eu.dnetlib.data.proto.DatasourceProtos.Datasource;
-import eu.dnetlib.data.proto.FieldTypeProtos.DataInfo;
-import eu.dnetlib.data.proto.FieldTypeProtos.ExtraInfo;
-import eu.dnetlib.data.proto.FieldTypeProtos.KeyValue;
-import eu.dnetlib.data.proto.FieldTypeProtos.Qualifier;
-import eu.dnetlib.data.proto.FieldTypeProtos.StringField;
-import eu.dnetlib.data.proto.FieldTypeProtos.StructuredProperty;
-import eu.dnetlib.data.proto.FieldTypeProtos.StructuredProperty.Builder;
-import eu.dnetlib.data.proto.KindProtos.Kind;
-import eu.dnetlib.data.proto.OafProtos.Oaf;
-import eu.dnetlib.data.proto.OafProtos.OafEntity;
-import eu.dnetlib.data.proto.OafProtos.OafRel;
-import eu.dnetlib.data.proto.OrganizationProtos.Organization;
-import eu.dnetlib.data.proto.PersonProtos.Person;
-import eu.dnetlib.data.proto.PersonResultProtos.PersonResult;
-import eu.dnetlib.data.proto.PersonResultProtos.PersonResult.Authorship;
-import eu.dnetlib.data.proto.ProjectOrganizationProtos.ProjectOrganization;
-import eu.dnetlib.data.proto.ProjectOrganizationProtos.ProjectOrganization.Participation;
-import eu.dnetlib.data.proto.ProjectPersonProtos.ProjectPerson;
-import eu.dnetlib.data.proto.ProjectPersonProtos.ProjectPerson.ContactPerson;
-import eu.dnetlib.data.proto.ProjectProtos.Project;
-import eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata;
-import eu.dnetlib.data.proto.RelTypeProtos.RelType;
-import eu.dnetlib.data.proto.RelTypeProtos.SubRelType;
-import eu.dnetlib.data.proto.ResultProjectProtos.ResultProject;
-import eu.dnetlib.data.proto.ResultProjectProtos.ResultProject.Outcome;
-import eu.dnetlib.data.proto.ResultProtos.Result;
-import eu.dnetlib.data.proto.ResultProtos.Result.Context;
-import eu.dnetlib.data.proto.ResultProtos.Result.Instance;
-import eu.dnetlib.data.proto.ResultResultProtos.ResultResult;
-import eu.dnetlib.data.proto.ResultResultProtos.ResultResult.Similarity;
-import eu.dnetlib.data.proto.TypeProtos.Type;
-
-public class OafTest {
-
-	public static final String CITATION_JSON =
-			"[{ \"citation\": \"bibtext\", \"typology\": \"external\", \"targetType\": \"publication\", \"link\": \"doi.org/xyz\",  \"linkType\": \"DOI\" },\r\n { \"citation\": \"very long citation string\", \"typology\": \"internal\", \"targetType\": \"publication\", \"link\": \"openaire::md5(something)\", \"linkType\": \"openaire\" }]";
-
-	public static final String STATISTICS_JSON =
-			"[{ \"citationsPerYear\": \"many\", \"anotherCoolStatistic\": \"WoW\", \"nestedStat\": { \"firstNestedStat\" : \"value 1\", \"secondNestedStat\" : \"value 2\"}, \"listingStat\" : [ \"one\", \"two\" ] }]";
-
-	public static StructuredProperty.Builder getStructuredproperty(final String value, final String classname, final String schemename) {
-		return getStructuredproperty(value, classname, schemename, null);
-	}
-
-	public static StructuredProperty.Builder getStructuredproperty(final String value, final String classname, final String schemename, final DataInfo dataInfo) {
-		Builder sp = StructuredProperty.newBuilder().setValue(value).setQualifier(getQualifier(classname, schemename));
-		if (dataInfo != null) {
-			sp.setDataInfo(dataInfo);
-		}
-		return sp;
-	}
-
-	public static Qualifier.Builder getQualifier(final String classname, final String schemename) {
-		return Qualifier.newBuilder().setClassid(classname).setClassname(classname).setSchemeid(schemename).setSchemename(schemename);
-	}
-
-	public static KeyValue getKV(final String id, final String name) {
-		return KeyValue.newBuilder().setKey(id).setValue(name).build();
-	}
-
-	public static OafEntity getDatasource(final String datasourceId) {
-		return OafEntity
-				.newBuilder()
-				.setType(Type.datasource)
-				.setId(datasourceId)
-				.setDatasource(
-						Datasource.newBuilder().setMetadata(
-								Datasource.Metadata.newBuilder().setOfficialname(sf("officialname")).setEnglishname(sf("englishname"))
-										.setWebsiteurl(sf("websiteurl")).setContactemail(sf("contactemail")).addAccessinfopackage(sf("accessinforpackage"))
-										.setNamespaceprefix(sf("namespaceprofix")).setDescription(sf("description")).setOdnumberofitems(sf("numberofitems"))
-										.setOdnumberofitemsdate(sf("numberofitems date"))
-										// .addOdsubjects("subjects")
-										.setOdpolicies(sf("policies")).addOdlanguages(sf("languages")).addOdcontenttypes(sf("contenttypes"))
-										.setDatasourcetype(getQualifier("type class", "type scheme")))).build();
-	}
-
-	public static OafEntity getResult(final String id) {
-		return OafEntity
-				.newBuilder()
-				.setType(Type.result)
-				.setId(id)
-				.setResult(
-						Result.newBuilder()
-								.setMetadata(
-										Result.Metadata
-												.newBuilder()
-												.addTitle(
-														getStructuredproperty(
-																"Analysis of cell viability in intervertebral disc: Effect of endplate permeability on cell population",
-																"main title", "dnet:result_titles", getDataInfo()))
-												.addSubject(getStructuredproperty("Biophysics", "subject", "dnet:result_sujects"))
-												.setDateofacceptance(sf("2010-01-01")).addSource(sf("sourceA")).addSource(sf("sourceB"))
-												.addContext(Context.newBuilder().setId("egi::virtual::970"))
-												.addContext(Context.newBuilder().setId("egi::classification::natsc::math::applied"))
-												.addContext(Context.newBuilder().setId("egi::classification::natsc::math"))
-												.addContext(Context.newBuilder().setId("egi::classification::natsc"))
-												.addContext(Context.newBuilder().setId("egi::classification")).addContext(Context.newBuilder().setId("egi"))
-												.addDescription(sf("Responsible for making and maintaining the extracellular matrix ..."))
-												.setPublisher(sf("ELSEVIER SCI LTD")).setResulttype(getQualifier("publication", "dnet:result_types"))
-												.setLanguage(getQualifier("eng", "dnet:languages"))).addInstance(getInstance("10|od__10", "Uk pubmed"))
-								.addInstance(getInstance("10|od__10", "arxiv")))
-				.addCollectedfrom(getKV("opendoar____::1064", "Oxford University Research Archive"))
-				.addPid(getStructuredproperty("doi:74293", "doi", "dnet:pids")).setDateofcollection("").build();
-	}
-
-	public static DataInfo getDataInfo() {
-		return getDataInfo("0.4");
-	}
-
-	public static DataInfo getDataInfo(final String trust) {
-		return DataInfo.newBuilder().setDeletedbyinference(false).setTrust("0.4").setInferenceprovenance("algo").setProvenanceaction(getQualifier("xx", "yy"))
-				.build();
-	}
-
-	public static Instance.Builder getInstance(final String hostedbyId, final String hostedbyName) {
-		return Instance.newBuilder().setHostedby(getKV(hostedbyId, hostedbyName)).setLicence(getQualifier("OpenAccess", "dnet:result_rights"))
-				.setInstancetype(getQualifier("publication", "dnet:result_type")).addUrl("webresource url");
-
-	}
-
-	public static OafRel getDedupRel(final String source, final String target, final RelType relType, final String relClass) {
-		return OafRel.newBuilder().setSource(source).setTarget(target).setRelType(relType).setSubRelType(SubRelType.dedup).setRelClass(relClass)
-				.setChild(false).setCachedTarget(getResult(target)).build();
-	}
-
-	public static OafRel getPersonResult(final String source, final String target, final String ranking, final String relClass) {
-		return OafRel
-				.newBuilder()
-				.setSource(source)
-				.setTarget(target)
-				.setRelType(RelType.personResult)
-				.setSubRelType(SubRelType.authorship)
-				.setRelClass(relClass)
-				.setChild(false)
-				.setPersonResult(
-						PersonResult.newBuilder().setAuthorship(
-								Authorship.newBuilder().setRanking(ranking).setRelMetadata(relMetadata(relClass, "dnet:personResult_relations"))))
-				.setCachedTarget(getPerson()).build();
-	}
-
-	public static OafEntity getPerson() {
-		return OafEntity
-				.newBuilder()
-				.setType(Type.person)
-				.setId("WOS:000277866500014_A._Shirazi-Adl")
-				.setPerson(
-						Person.newBuilder().setMetadata(
-								Person.Metadata.newBuilder().addSecondnames(sf("Shirazi-Adl")).setFullname(sf("A. Shirazi-Adl"))
-										.setEmail(sf("name.surname@gmail.com")).setPhone(sf("12345")).setNationality(getQualifier("EN", "dnet:countries"))))
-				.build();
-	}
-
-	public static OafRel getProjectOrganization(final String source, final String target, final String relClass) throws InvalidProtocolBufferException {
-		OafRel.Builder oafRel =
-				OafRel.newBuilder()
-						.setSource(source)
-						.setTarget(target)
-						.setRelType(RelType.projectOrganization)
-						.setSubRelType(SubRelType.participation)
-						.setRelClass(relClass)
-						.setChild(false)
-						.setProjectOrganization(
-								ProjectOrganization.newBuilder().setParticipation(
-										Participation.newBuilder().setParticipantnumber("" + 1)
-												.setRelMetadata(relMetadata(relClass, "dnet:project_organization_relations"))));
-		switch (Participation.RelName.valueOf(relClass)) {
-		case hasParticipant:
-			oafRel.setCachedTarget(getProjectFP7(target));
-			break;
-		case isParticipant:
-			oafRel.setCachedTarget(getOrganization(target));
-			break;
-		default:
-			break;
-		}
-		return oafRel.build();
-	}
-
-	public static OafRel getDatasourceOrganization(final String source, final String target, final String relClass) throws InvalidProtocolBufferException {
-		OafRel.Builder oafRel =
-				OafRel.newBuilder()
-						.setSource(source)
-						.setTarget(target)
-						.setRelType(RelType.datasourceOrganization)
-						.setSubRelType(SubRelType.provision)
-						.setRelClass(relClass)
-						.setChild(false)
-						.setDatasourceOrganization(
-								DatasourceOrganization.newBuilder().setProvision(
-										Provision.newBuilder().setRelMetadata(relMetadata(relClass, "dnet:datasource_organization_relations"))));
-		switch (Provision.RelName.valueOf(relClass)) {
-		case isProvidedBy:
-			oafRel.setCachedTarget(getOrganization(target));
-			break;
-		case provides:
-			oafRel.setCachedTarget(getDatasource(target));
-			break;
-		default:
-			break;
-		}
-		return oafRel.build();
-	}
-
-	public static OafRel getProjectPerson(final String sourceId, final String targetId, final String relClass) {
-		return OafRel
-				.newBuilder()
-				.setSource(sourceId)
-				.setTarget(targetId)
-				.setRelType(RelType.projectPerson)
-				.setSubRelType(SubRelType.contactPerson)
-				.setRelClass(relClass)
-				.setChild(true)
-				.setProjectPerson(
-						ProjectPerson.newBuilder().setContactPerson(
-								ContactPerson.newBuilder().setRelMetadata(relMetadata(relClass, "dnet:project_result_relations"))))
-				.setCachedTarget(getPerson()).build();
-	}
-
-	public static OafRel getSimilarityRel(final String sourceId, final String targetId, final OafEntity result, final String relClass) {
-		return OafRel
-				.newBuilder()
-				.setSource(sourceId)
-				.setTarget(targetId)
-				.setRelType(RelType.resultResult)
-				.setSubRelType(SubRelType.similarity)
-				.setRelClass(relClass)
-				.setChild(false)
-				.setResultResult(
-						ResultResult.newBuilder().setSimilarity(
-								Similarity.newBuilder().setRelMetadata(relMetadata(relClass, "dnet:resultResult_relations")).setSimilarity(.4f)
-										.setType(Similarity.Type.STANDARD))).build();
-	}
-
-	public static RelMetadata.Builder relMetadata(final String classname, final String schemename) {
-		return RelMetadata.newBuilder().setSemantics(getQualifier(classname, schemename));
-	}
-
-	public static OafEntity getOrganization(final String orgId) {
-		return OafEntity
-				.newBuilder()
-				.setType(Type.organization)
-				.setId(orgId)
-				.addCollectedfrom(getKV("opendoar_1234", "UK pubmed"))
-				.setOrganization(
-						Organization.newBuilder().setMetadata(
-								Organization.Metadata.newBuilder().setLegalname(sf("CENTRE D'APPUI A LA RECHERCHE ET A LA FORMATION GIE"))
-										.setLegalshortname(sf("CAREF")).setWebsiteurl(sf("www.caref-mali.org"))
-										.setCountry(getQualifier("ML", "dnet:countries")))).build();
-	}
-
-	public static OafRel getResultProject(final String from, final String to, final OafEntity project, final String relClass)
-			throws InvalidProtocolBufferException {
-		return OafRel
-				.newBuilder()
-				.setSource(from)
-				.setTarget(to)
-				.setRelType(RelType.resultProject)
-				.setSubRelType(SubRelType.outcome)
-				.setRelClass(relClass)
-				.setChild(false)
-				.setResultProject(
-						ResultProject.newBuilder().setOutcome(Outcome.newBuilder().setRelMetadata(relMetadata(relClass, "dnet:result_project_relations"))))
-				.setCachedTarget(project).build();
-	}
-
-	public static OafEntity getProjectFP7(final String projectId) throws InvalidProtocolBufferException {
-		return OafEntity
-				.newBuilder()
-				.setType(Type.project)
-				.setId(projectId)
-				.addCollectedfrom(getKV("opendoar_1234", "UK pubmed"))
-				.setProject(
-						Project.newBuilder()
-								.setMetadata(
-										Project.Metadata
-												.newBuilder()
-												.setAcronym(sf("5CYRQOL"))
-												.setTitle(sf("Cypriot Researchers Contribute to our Quality of Life"))
-												.setStartdate(sf("2007-05-01"))
-												.setEnddate(sf("2007-10-31"))
-												.setEcsc39(sf("false"))
-												.setContracttype(getQualifier("CSA", "ec:FP7contractTypes"))
-												.addFundingtree(
-														sf("{\"funding_level_2\":{\"class\":\"ec:program\", \"id\":\"corda_______::FP7::SP3::PEOPLE\", \"description\":\"Marie-Curie Actions\", \"name\":\"PEOPLE\", \"parent\":{\"funding_level_1\":{\"class\":\"ec:specificprogram\", \"id\":\"corda_______::FP7::SP3\", \"description\":\"SP3-People\", \"name\":\"SP3\", \"parent\":{\"funding_level_0\":{\"class\":\"ec:frameworkprogram\", \"id\":\"corda_______::FP7\", \"description\":\"SEVENTH FRAMEWORK PROGRAMME\", \"name\":\"FP7\", \"parent\":{}}}}}}}"))))
-				.build();
-	}
-
-	public static OafEntity getProjectWT() throws InvalidProtocolBufferException {
-		return OafEntity
-				.newBuilder()
-				.setType(Type.project)
-				.setId("project|wt::087536")
-				.addCollectedfrom(getKV("wellcomeTrust", "wellcome trust"))
-				.setProject(
-						Project.newBuilder()
-								.setMetadata(
-										Project.Metadata
-												.newBuilder()
-												.setAcronym(sf("UNKNOWN"))
-												.setTitle(sf("Research Institute for Infectious Diseases of Poverty (IIDP)."))
-												.setStartdate(sf("2007-05-01"))
-												.setEnddate(sf("2007-10-31"))
-												.setEcsc39(sf("false"))
-												.setContracttype(getQualifier("UNKNOWN", "wt:contractTypes"))
-												.addFundingtree(
-														sf("{\"funding_level_1\":{\"class\":\"wt:fundingStream\", \"id\":\"welcometrust::Immunology and Infectious Disease\", \"description\":\"Immunology and Infectious Disease\", \"name\":\"Immunology and Infectious Disease\", \"parent\":{\"funding_level_0\":{\"class\":\"wt:fundingStream\", \"id\":\"wt::WT\", \"description\":\"Wellcome Trust\", \"name\":\"WT\", \"parent\":{}}}}}"))
-												.addFundingtree(
-														sf("{\"funding_level_1\":{\"class\":\"wt:fundingStream\", \"id\":\"welcometrust::Voices of the Sick Poor: the Patients' Experience of Medical Negligence under the New Poor Law.\", \"description\":\"Voices of the Sick Poor: the Patients' Experience of Medical Negligence under the New Poor Law.\", \"name\":\"Voices of the Sick Poor: the Patients' Experience of Medical Negligence under the New Poor Law.\", \"parent\":{\"funding_level_0\":{\"class\":\"wt:fundingStream\", \"id\":\"wt::WT\", \"description\":\"Wellcome Trust\", \"name\":\"WT\", \"parent\":{}}}}}"))))
-				.build();
-	}
-
-	public static ExtraInfo extraInfo(final String value) {
-		ExtraInfo.Builder e =
-				ExtraInfo.newBuilder().setName("test").setProvenance("inference algo 1.0").setTrust("0.55").setTypology("typology").setValue(value);
-		return e.build();
-	}
-
-	// public static DocumentClasses documentClasses() {
-	// DocumentClasses.Builder builder = DocumentClasses.newBuilder();
-	// for (int i = 0; i < RandomUtils.nextInt(N_DOCUMENT_CLASSES) + 1; i++) {
-	// builder.addArXivClasses(getDocumentClass()).addDdcClasses(getDocumentClass()).addWosClasses(getDocumentClass())
-	// .addMeshEuroPMCClasses(getDocumentClass());
-	// }
-	// return builder.build();
-	// }
-	//
-	// private static DocumentClass getDocumentClass() {
-	// DocumentClass.Builder builder = DocumentClass.newBuilder();
-	// for (int i = 0; i < RandomUtils.nextInt(N_DOCUMENT_CLASS_LABELS) + 1; i++) {
-	// builder.addClassLabels("test_class_" + i);
-	// }
-	// return builder.setConfidenceLevel(0.5F).build();
-	// }
-	//
-	// public static DocumentStatistics documentStatistics() {
-	// return
-	// DocumentStatistics.newBuilder().setCitationsFromAllPapers(basicCitationStatistics()).setCitationsFromPublishedPapers(basicCitationStatistics())
-	// .build();
-	// }
-	//
-	// private static BasicCitationStatistics basicCitationStatistics() {
-	// BasicCitationStatistics.Builder builder = BasicCitationStatistics.newBuilder();
-	// for (int i = 0; i < N_CITATION_STATS; i++) {
-	// builder.addNumberOfCitationsPerYear(statisticsKeyValue());
-	// builder.setNumberOfCitations(RandomUtils.nextInt(5) + 1);
-	// }
-	// return builder.build();
-	// }
-	//
-	// private static StatisticsKeyValue statisticsKeyValue() {
-	// return StatisticsKeyValue.newBuilder().setKey((RandomUtils.nextInt(30) + 1980) + "").setValue(RandomUtils.nextInt(5) + 1).build();
-	// }
-	//
-	// public static AuthorStatistics authorStatistics() {
-	// AuthorStatistics.Builder builder = AuthorStatistics.newBuilder();
-	// builder.setCore(commonCoreStatistics());
-	// for (int i = 0; i < N_COAUTHORS; i++) {
-	// builder.addCoAuthors(coAuthor());
-	// }
-	// return builder.build();
-	// }
-	//
-	// private static CoAuthor coAuthor() {
-	// CoAuthor.Builder builder = CoAuthor.newBuilder();
-	// builder.setId("30|od______2345::" + Hashing.md5(RandomStringUtils.random(10)));
-	// builder.setCoauthoredPapersCount(RandomUtils.nextInt(5) + 1);
-	// return builder.build();
-	// }
-	//
-	// public static CommonCoreStatistics commonCoreStatistics() {
-	// CommonCoreStatistics.Builder builder = CommonCoreStatistics.newBuilder();
-	//
-	// builder.setAllPapers(coreStatistics());
-	// builder.setPublishedPapers(coreStatistics());
-	//
-	// return builder.build();
-	// }
-	//
-	// private static CoreStatistics coreStatistics() {
-	// CoreStatistics.Builder builder = CoreStatistics.newBuilder();
-	//
-	// builder.setNumberOfPapers(RandomUtils.nextInt(10));
-	// builder.setCitationsFromAllPapers(extendedStatistics());
-	// builder.setCitationsFromPublishedPapers(extendedStatistics());
-	//
-	// return builder.build();
-	// }
-	//
-	// private static ExtendedStatistics extendedStatistics() {
-	// ExtendedStatistics.Builder builder = ExtendedStatistics.newBuilder();
-	//
-	// builder.setBasic(basicCitationStatistics());
-	// builder.setAverageNumberOfCitationsPerPaper(RandomUtils.nextFloat());
-	// for (int i = 0; i < N_CITATION_STATS; i++) {
-	// builder.addNumberOfPapersCitedAtLeastXTimes(statisticsKeyValue());
-	// }
-	//
-	// return builder.build();
-	// }
-
-	public static StringField sf(final String s) {
-		return sf(s, null);
-	}
-
-	public static StringField sf(final String s, final DataInfo dataInfo) {
-		StringField.Builder sf = StringField.newBuilder().setValue(s);
-		if (dataInfo != null) {
-			sf.setDataInfo(dataInfo);
-		}
-		return sf.build();
-	}
-
-	public static OafDecoder embed(final GeneratedMessage msg,
-			final Kind kind,
-			final boolean deletedByInference,
-			final boolean inferred,
-			final String provenance,
-			final String action) {
-
-		Oaf.Builder oaf =
-				Oaf.newBuilder()
-						.setKind(kind)
-						.setTimestamp(System.currentTimeMillis())
-						.setDataInfo(
-								DataInfo.newBuilder().setDeletedbyinference(deletedByInference).setInferred(inferred).setTrust("0.5")
-										.setInferenceprovenance(provenance).setProvenanceaction(getQualifier(action, action)));
-		switch (kind) {
-		case entity:
-			oaf.setEntity((OafEntity) msg);
-			break;
-		case relation:
-			oaf.setRel((OafRel) msg);
-			break;
-		default:
-			break;
-		}
-
-		return OafDecoder.decode(oaf.build());
-	}
-
-	public static OafDecoder embed(final GeneratedMessage msg, final Kind kind) {
-		return embed(msg, kind, false, false, "inference_provenance", "provenance_action");
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafEntityDecoder.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafEntityDecoder.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafEntityDecoder.java	(nonexistent)
@@ -1,52 +0,0 @@
-package eu.dnetlib.data.mapreduce.util;
-
-import com.google.protobuf.Descriptors.FieldDescriptor;
-import com.google.protobuf.GeneratedMessage;
-
-import eu.dnetlib.data.proto.OafProtos.OafEntity;
-import eu.dnetlib.data.proto.TypeProtos.Type;
-
-public class OafEntityDecoder {
-
-	private final OafEntity oafEntity;
-
-	public static OafEntityDecoder decode(OafEntity oafEntity) {
-		return new OafEntityDecoder(oafEntity);
-	}
-
-	private OafEntityDecoder(OafEntity oafEntity) {
-		this.oafEntity = oafEntity;
-	}
-
-	public Type getType() {
-		return oafEntity.getType();
-	}
-
-	public String getId() {
-		return oafEntity.getId();
-	}
-
-	public GeneratedMessage getOafEntity() {
-		return oafEntity;
-	}
-
-	public GeneratedMessage getEntity() {
-		FieldDescriptor fd = oafEntity.getDescriptorForType().findFieldByName(typeName());
-		return (GeneratedMessage) oafEntity.getField(fd);
-	}
-
-	public String typeName() {
-		return oafEntity.getType().toString();
-	}
-
-	public GeneratedMessage getMetadata() {
-		GeneratedMessage entity = getEntity();
-		FieldDescriptor fd = entity.getDescriptorForType().findFieldByName("metadata");
-		GeneratedMessage field = (GeneratedMessage) entity.getField(fd);
-		return field;
-	}
-
-	public String getDateOfCollection() {
-		return oafEntity.getDateofcollection();
-	}
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafDecoder.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafDecoder.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafDecoder.java	(nonexistent)
@@ -1,185 +0,0 @@
-package eu.dnetlib.data.mapreduce.util;
-
-import java.util.List;
-import java.util.Map.Entry;
-
-import com.google.protobuf.Descriptors.EnumValueDescriptor;
-import com.google.protobuf.Descriptors.FieldDescriptor;
-import com.google.protobuf.GeneratedMessage;
-import com.google.protobuf.InvalidProtocolBufferException;
-import com.google.protobuf.Message;
-
-import eu.dnetlib.data.proto.KindProtos.Kind;
-import eu.dnetlib.data.proto.OafProtos.Oaf;
-import eu.dnetlib.data.proto.OafProtos.OafEntity;
-import eu.dnetlib.data.proto.OafProtos.OafRel;
-import eu.dnetlib.data.proto.RelTypeProtos.RelType;
-
-/**
- * Helper class, to be used as accessor helper over the Oaf structure.
- * 
- * @author claudio
- * 
- */
-public class OafDecoder {
-
-	/**
-	 * Oaf object
-	 */
-	private Oaf oaf;
-
-	/**
-	 * Cached sub decoder
-	 */
-	private OafEntityDecoder entityDecoder = null;
-
-	/**
-	 * Cached sub decoder
-	 */
-	private OafRelDecoder relDecoder = null;
-
-	public static OafDecoder decode(final Oaf oaf) {
-		return new OafDecoder(oaf);
-	}
-
-	public static OafDecoder decode(final byte[] oaf) {
-		return new OafDecoder(oaf);
-	}
-
-	protected OafDecoder(final byte[] value) {
-		try {
-			this.oaf = Oaf.parseFrom(value);
-		} catch (InvalidProtocolBufferException e) {
-			throw new RuntimeException("unable to deserialize proto: " + new String(value));
-		}
-	}
-
-	private OafDecoder(final Oaf oaf) {
-		this.oaf = oaf;
-	}
-
-	public Kind getKind() {
-		return oaf.getKind();
-	}
-
-	public Oaf getOaf() {
-		return oaf;
-	}
-
-	// / Entity
-
-	public GeneratedMessage getMetadata() {
-		return decodeEntity().getMetadata();
-	}
-
-	public GeneratedMessage getOafEntity() {
-		return decodeEntity().getEntity();
-	}
-
-	public String getEntityId() {
-		return decodeEntity().getId();
-	}
-
-	public OafEntity getEntity() {
-		return oaf.getEntity();
-	}
-
-	public OafEntityDecoder decodeEntity() {
-		if (entityDecoder == null) {
-			entityDecoder = OafEntityDecoder.decode(getEntity());
-		}
-		return entityDecoder;
-	}
-
-	// / Rel
-
-	public OafRel getOafRel() {
-		return oaf.getRel();
-	}
-
-	public GeneratedMessage getRel() {
-		return decodeRel().getRel();
-	}
-
-	public RelType relType() {
-		return decodeRel().getRelType();
-	}
-
-	public String relTypeName() {
-		return relType().toString();
-	}
-
-	public String relSourceId() {
-		return decodeRel().getRelSourceId();
-	}
-
-	public String relTargetId() {
-		return decodeRel().getRelTargetId();
-	}
-
-	public String getCF() {
-		switch (getKind()) {
-		case entity:
-			return getEntity().getType().toString();
-		case relation:
-			return decodeRel().getCF();
-		default:
-			throw new IllegalArgumentException("Invalid Kind: " + getKind());
-		}
-	}
-
-	public RelDescriptor getRelDescriptor() {
-		if (!getKind().equals(Kind.relation)) return null;
-		return decodeRel().getRelDescriptor();
-	}
-
-	private OafRelDecoder decodeRel() {
-		if (relDecoder == null) {
-			relDecoder = OafRelDecoder.decode(getOafRel());
-		}
-		return relDecoder;
-	}
-
-	public byte[] toByteArray() {
-		return oaf.toByteArray();
-	}
-
-	public String asXml() {
-		StringBuilder sb = new StringBuilder("<oaf>");
-
-		for (Entry<FieldDescriptor, Object> e : oaf.getAllFields().entrySet()) {
-			asXml(sb, e.getKey(), e.getValue());
-		}
-		sb.append("</oaf>");
-		return sb.toString();
-	}
-
-	@SuppressWarnings("unchecked")
-	private void asXml(StringBuilder sb, FieldDescriptor fd, Object value) {
-
-		if (fd.isRepeated() && value instanceof List<?>) {
-			for (Object o : ((List<Object>) value)) {
-				asXml(sb, fd, o);
-			}
-		} else if (fd.getType().equals(FieldDescriptor.Type.MESSAGE)) {
-			sb.append("<" + fd.getName() + ">");
-			for (Entry<FieldDescriptor, Object> e : ((Message) value).getAllFields().entrySet()) {
-				asXml(sb, e.getKey(), e.getValue());
-			}
-			sb.append("</" + fd.getName() + ">");
-		} else if (fd.getType().equals(FieldDescriptor.Type.ENUM)) {
-			sb.append("<" + fd.getName() + ">");
-			sb.append(((EnumValueDescriptor) value).getName());
-			sb.append("</" + fd.getName() + ">");
-		} else {
-			sb.append("<" + fd.getName() + ">");
-			sb.append(escapeXml(value.toString()));
-			sb.append("</" + fd.getName() + ">");
-		}
-	}
-
-	private static String escapeXml(final String value) {
-		return value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafRowKeyDecoder.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafRowKeyDecoder.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/mapreduce/util/OafRowKeyDecoder.java	(nonexistent)
@@ -1,66 +0,0 @@
-package eu.dnetlib.data.mapreduce.util;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.io.Text;
-
-import eu.dnetlib.data.proto.TypeProtos.Type;
-
-public class OafRowKeyDecoder {
-
-	/**
-	 * logger.
-	 */
-	private static final Log log = LogFactory.getLog(OafRowKeyDecoder.class); // NOPMD by marko on 11/24/08 5:02 PM
-
-	private static final String SEPARATOR = "|";
-
-	public final static String ID_REGEX = "^[0-9][0-9]\\|.{12}::[a-zA-Z0-9]{32}$";
-
-	private String key;
-
-	private Type type = null;
-
-	private String id = null;
-
-	public static OafRowKeyDecoder decode(final byte[] key) throws IllegalArgumentException {
-		return new OafRowKeyDecoder(new String(key));
-	}
-
-	public static OafRowKeyDecoder decode(final String key) throws IllegalArgumentException {
-		return new OafRowKeyDecoder(key);
-	}
-
-	private OafRowKeyDecoder(final String key) throws IllegalArgumentException {
-		this.key = key;
-
-		if (!key.matches(ID_REGEX)) {
-			String msg = "invalid key: '" + key + "'";
-			log.error(msg);
-			throw new IllegalArgumentException(msg);
-		}
-
-		int tag = Integer.parseInt(StringUtils.substringBefore(key, SEPARATOR));
-		this.type = Type.valueOf(tag);
-		this.id = StringUtils.substringAfter(key, SEPARATOR);
-
-		// System.out.println(OafRowTypeDecoder.class.getName() +" decoded key: " + split);
-	}
-
-	public String getKey() {
-		return key;
-	}
-
-	public Text getKeyAsText() {
-		return new Text(key);
-	}
-
-	public Type getType() {
-		return type;
-	}
-
-	public String getId() {
-		return id;
-	}
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DmfToHbaseXsltFunctions.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DmfToHbaseXsltFunctions.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DmfToHbaseXsltFunctions.java	(nonexistent)
@@ -1,295 +0,0 @@
-package eu.dnetlib.data.transform.xml;
-
-import java.util.List;
-import java.util.Map;
-
-import org.w3c.dom.NodeList;
-
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.protobuf.Descriptors.Descriptor;
-
-import eu.dnetlib.data.mapreduce.util.OafRowKeyDecoder;
-import eu.dnetlib.data.proto.FieldTypeProtos.StructuredProperty;
-import eu.dnetlib.data.proto.OafProtos.Oaf;
-import eu.dnetlib.data.proto.OafProtos.OafEntity;
-import eu.dnetlib.data.proto.OafProtos.OafRel;
-import eu.dnetlib.data.proto.PersonPersonProtos.PersonPerson;
-import eu.dnetlib.data.proto.PersonPersonProtos.PersonPerson.CoAuthorship;
-import eu.dnetlib.data.proto.PersonProtos.Person;
-import eu.dnetlib.data.proto.PersonResultProtos.PersonResult;
-import eu.dnetlib.data.proto.PersonResultProtos.PersonResult.Authorship;
-import eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata;
-import eu.dnetlib.data.proto.RelTypeProtos.RelType;
-import eu.dnetlib.data.proto.RelTypeProtos.SubRelType;
-import eu.dnetlib.data.proto.ResultProjectProtos.ResultProject;
-import eu.dnetlib.data.proto.ResultProjectProtos.ResultProject.Outcome;
-import eu.dnetlib.data.proto.ResultProtos.Result;
-import eu.dnetlib.data.proto.ResultProtos.Result.Context;
-import eu.dnetlib.data.proto.ResultProtos.Result.ExternalReference;
-import eu.dnetlib.data.proto.ResultProtos.Result.Instance;
-import eu.dnetlib.data.proto.ResultProtos.Result.Journal;
-import eu.dnetlib.data.proto.TypeProtos.Type;
-
-public class DmfToHbaseXsltFunctions extends AbstractDNetOafXsltFunctions {
-
-	// dnet:oafPersonResultFromDMF($resultId, $oafPerson, position(), "sysimport:crosswalk:repository", "0.9")
-	public static String oafPersonResult_Authorship_FromDMF(final String source,
-			final String target,
-			final int rank,
-			final String relClass,
-			final String provenanceAction,
-			final String trust) {
-		try {
-			final String eSource = OafRowKeyDecoder.decode(source).getKey();
-			final String eTarget = OafRowKeyDecoder.decode(target).getKey();
-
-			Authorship.Builder auth = Authorship.newBuilder().setRanking("" + rank)
-					.setRelMetadata(RelMetadata.newBuilder().setSemantics(getSimpleQualifier(relClass, "dnet:personroles")));
-
-			OafRel.Builder rel = getRel(eSource, eTarget, RelType.personResult, SubRelType.authorship, relClass, false).setPersonResult(
-					PersonResult.newBuilder().setAuthorship(auth));
-
-			return base64(getOaf(rel, getDataInfo(provenanceAction, trust, false, false)).toByteArray());
-		} catch (Throwable e) {
-			System.err.println("source: " + source);
-			System.err.println("target: " + target);
-			System.err.println("provenanceAction: " + provenanceAction);
-			System.err.println("trust: " + trust);
-			System.err.println("rank: " + rank);
-			e.printStackTrace();
-			throw new RuntimeException(e);
-		}
-	}
-
-	// dnet:oafPersonPersonFromMDStore($personId, $coauthorId)
-	public static String oafPersonPerson_CoAuthorship_FromDMF(final String source,
-			final String target,
-			final String relClass,
-			final String provenanceAction,
-			final String trust) {
-		try {
-			final String eSource = OafRowKeyDecoder.decode(source).getKey();
-			final String eTarget = OafRowKeyDecoder.decode(target).getKey();
-
-			final PersonPerson.Builder pp = PersonPerson.newBuilder();
-			final CoAuthorship.Builder coauth = CoAuthorship.newBuilder().setRelMetadata(
-					RelMetadata.newBuilder().setSemantics(getSimpleQualifier(relClass, "dnet:personroles")));
-
-			OafRel.Builder rel = getRel(eSource, eTarget, RelType.personPerson, SubRelType.coauthorship, relClass, false).setPersonPerson(
-					pp.setCoauthorship(coauth));
-
-			return base64(getOaf(rel, getDataInfo(provenanceAction, trust, false, false)).toByteArray());
-		} catch (Throwable e) {
-			System.err.println("source: " + source);
-			System.err.println("target: " + target);
-			System.err.println("provenanceAction: " + provenanceAction);
-			System.err.println("trust: " + trust);
-			e.printStackTrace();
-			throw new RuntimeException(e);
-		}
-	}
-
-	// dnet:oafPersonFromDMF($personId, ., "sysimport:crosswalk:repository", "0.9")
-	public static String oafPerson_FromDMF(final String personId,
-			final String fullname,
-			final String provenanceAction,
-			final String trust,
-			final String collectedFromId,
-			final String collectedFromName,
-			final String originalId,
-			final String dateOfCollection) {
-		try {
-			final String entityId = OafRowKeyDecoder.decode(personId).getKey();
-
-			final Person.Builder person = Person.newBuilder();
-			final Person.Metadata.Builder metadata = Person.Metadata.newBuilder();
-
-			metadata.setFullname(sf(fullname));
-
-			eu.dnetlib.pace.model.Person p = new eu.dnetlib.pace.model.Person(fullname, false);
-			if (p.isAccurate()) {
-				metadata.setFirstname(sf(p.getNormalisedFirstName()));
-				metadata.clearSecondnames().addSecondnames(sf(p.getNormalisedSurname()));
-				metadata.setFullname(sf(p.getNormalisedFullname()));
-			}
-
-			// metadata.setNationality(getSimpleQualifier("UNKNOWN", "dnet:countries"));
-			List<StructuredProperty> pids = Lists.newArrayList(getStructuredProperty(originalId, "oai", "oai", "dnet:pid_types", "dnet:pid_types"));
-			OafEntity.Builder entity = getEntity(Type.person, entityId, getKV(collectedFromId, collectedFromName), originalId, dateOfCollection, pids)
-					.setPerson(person.setMetadata(metadata));
-
-			return base64(getOaf(entity, getDataInfo(provenanceAction, trust, false, false)).toByteArray());
-		} catch (Throwable e) {
-			System.err.println("personId: " + personId);
-			System.err.println("fullname: " + fullname);
-			System.err.println("provenanceAction: " + provenanceAction);
-			System.err.println("trust: " + trust);
-			System.err.println("collectedFromId: " + collectedFromId);
-			System.err.println("collectedFromName: " + collectedFromName);
-			System.err.println("originalId: " + originalId);
-			System.err.println("dateOfCollection: " + dateOfCollection);
-			e.printStackTrace();
-			throw new RuntimeException(e);
-		}
-	}
-
-	// dnet:oafResultProjectFromDMF($resultId, $projectId, "sysimport:crosswalk:repository", "0.9")
-	public static String oafResultProject_Outcome_FromDMF(final String source,
-			final String target,
-			final String relClass,
-			final String provenanceAction,
-			final String trust) {
-		try {
-			final String eSource = OafRowKeyDecoder.decode(source).getKey();
-			final String eTarget = OafRowKeyDecoder.decode(target).getKey();
-
-			final Outcome.Builder outcome = Outcome.newBuilder().setRelMetadata(
-					RelMetadata.newBuilder().setSemantics(getSimpleQualifier(relClass, "dnet:result_project_relations")));
-
-			final ResultProject.Builder rp = ResultProject.newBuilder().setOutcome(outcome);
-
-			OafRel.Builder rel = getRel(eSource, eTarget, RelType.resultProject, SubRelType.outcome, relClass, false).setResultProject(rp);
-
-			return base64(getOaf(rel, getDataInfo(provenanceAction, trust, false, false)).toByteArray());
-		} catch (Throwable e) {
-			System.err.println("source: " + source);
-			System.err.println("target: " + target);
-			System.err.println("provenanceAction: " + provenanceAction);
-			System.err.println("trust: " + trust);
-
-			e.printStackTrace();
-			throw new RuntimeException(e);
-		}
-	}
-
-	public static String oafResult_FromDMF(final String resultId,
-			final String provenanceAction,
-			final String trust,
-			final String hostedbyId,
-			final String hostedbyName,
-			final String collectedFromId,
-			final String collectedFromName,
-			final String originalId,
-			final String dateOfCollection,
-			final NodeList nodelist) {
-		try {
-			final String entityId = OafRowKeyDecoder.decode(resultId).getKey();
-
-			final Result.Builder result = Result.newBuilder();
-
-			final ValueMap values = ValueMap.parseNodeList(nodelist);
-
-			final Result.Metadata.Builder metadata = Result.Metadata.newBuilder();
-			final Descriptor mDesc = Result.Metadata.getDescriptor();
-
-			addStructuredProps(metadata, mDesc.findFieldByName("subject"), values.get("subject").listValues(), "keyword", "dnet:result_subject");
-			addStructuredProps(metadata, mDesc.findFieldByName("title"), values.get("title").listValues(), "main title", "dnet:dataCite_title");
-
-			for (String fieldname : Lists.newArrayList("description", "source")) {
-				if (values.get(fieldname) != null) {
-					for (String s : values.get(fieldname).listValues()) {
-						addField(metadata, mDesc.findFieldByName(fieldname), s);
-					}
-				}
-			}
-
-			addField(metadata, mDesc.findFieldByName("language"), setQualifier(getDefaultQualifier("dnet:languages"), values.get("language").listValues()));
-			addField(metadata, mDesc.findFieldByName("dateofacceptance"), values.get("dateaccepted").listValues());
-			addField(metadata, mDesc.findFieldByName("publisher"), values.get("publisher").listValues());
-			addField(metadata, mDesc.findFieldByName("embargoenddate"), values.get("embargoenddate").listValues());
-			addField(metadata, mDesc.findFieldByName("storagedate"), values.get("storagedate").listValues());
-
-			addField(metadata, mDesc.findFieldByName("resulttype"), getSimpleQualifier("publication", "dnet:result_typologies"));
-
-			addField(metadata, mDesc.findFieldByName("fulltext"), values.get("fulltext").listValues());
-
-			// addField(metadata, Result.Metadata.getDescriptor().findFieldByName("provenanceaction"),
-			// getSimpleQualifier("sysimport:crosswalk:repository", "dnet:provenanceActions").build());
-
-			if (values.get("concept") != null) {
-				for (Element e : values.get("concept")) {
-					metadata.addContext(Context.newBuilder().setId(e.getAttributes().get("id")));
-				}
-			}
-
-			if (values.get("journal") != null) {
-				for (Element e : values.get("journal")) {
-
-					final Journal.Builder journal = Journal.newBuilder();
-					if (e.getText() != null) {
-						journal.setName(e.getText());
-					}
-
-					final Map<String, String> attr = e.getAttributes();
-					if (attr != null) {
-						if (attr.get("issn") != null) {
-							journal.setIssnPrinted(attr.get("issn"));
-						}
-						if (attr.get("eissn") != null) {
-							journal.setIssnOnline(attr.get("eissn"));
-						}
-						if (attr.get("lissn") != null) {
-							journal.setIssnLinking(attr.get("lissn"));
-						}
-					}
-					metadata.setJournal(journal.build());
-				}
-			}
-
-			final Instance.Builder instance = Instance.newBuilder().setHostedby(getKV(hostedbyId, hostedbyName));
-
-			addField(instance, Instance.getDescriptor().findFieldByName("licence"),
-					setQualifier(getDefaultQualifier("dnet:access_modes"), values.get("accessrights").listValues()));
-			addField(instance, Instance.getDescriptor().findFieldByName("instancetype"),
-					setQualifier(getDefaultQualifier("dnet:publication_resource"), values.get("cobjcategory").listValues()));
-
-			if (values.get("identifier") != null) {
-				addField(instance, Instance.getDescriptor().findFieldByName("url"),
-						Lists.newArrayList(Iterables.filter(values.get("identifier").listValues(), urlFilter)));
-			}
-
-			result.addInstance(instance);
-
-			List<Element> extrefs = values.get("reference");
-			if (!extrefs.isEmpty()) {
-				Descriptor extDesc = ExternalReference.getDescriptor();
-				for (Element element : extrefs) {
-					ExternalReference.Builder extref = ExternalReference.newBuilder();
-					addField(extref, extDesc.findFieldByName("url"), element.getText());
-					addField(extref, extDesc.findFieldByName("sitename"), element.getAttributes().get("source"));
-					addField(extref, extDesc.findFieldByName("refidentifier"), element.getAttributes().get("identifier"));
-					addField(extref, extDesc.findFieldByName("label"), element.getAttributes().get("title"));
-					addField(extref, extDesc.findFieldByName("qualifier"),
-							setQualifier(getDefaultQualifier("dnet:externalReference_typologies"), Lists.newArrayList(element.getAttributes().get("type")))
-									.build());
-
-					result.addExternalReference(extref);
-				}
-			}
-
-			List<StructuredProperty> pids = Lists.newArrayList();
-			pids.addAll(parsePids(nodelist));
-			pids.add(getStructuredProperty(originalId, "oai", "oai", "dnet:pid_types", "dnet:pid_types"));
-
-			OafEntity.Builder entity = getEntity(Type.result, entityId, getKV(collectedFromId, collectedFromName), originalId, dateOfCollection, pids)
-					.setResult(result.setMetadata(metadata));
-
-			Oaf oaf = getOaf(entity, getDataInfo(provenanceAction, trust, false, false));
-			return base64(oaf.toByteArray());
-		} catch (Throwable e) {
-			System.err.println("resultId: " + resultId);
-			System.err.println("hostedbyId: " + hostedbyId);
-			System.err.println("hostedbyName: " + hostedbyName);
-			System.err.println("provenanceAction: " + provenanceAction);
-			System.err.println("trust: " + trust);
-			System.err.println("collectedFromId: " + collectedFromId);
-			System.err.println("collectedFromName: " + collectedFromName);
-			System.err.println("originalId: " + originalId);
-			System.err.println("dateOfCollection: " + dateOfCollection);
-			e.printStackTrace();
-			throw new RuntimeException(e);
-		}
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DNetMdStoreDataCiteToHbaseXsltFunctions.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DNetMdStoreDataCiteToHbaseXsltFunctions.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DNetMdStoreDataCiteToHbaseXsltFunctions.java	(nonexistent)
@@ -1,67 +0,0 @@
-package eu.dnetlib.data.transform.xml;
-
-import org.w3c.dom.NodeList;
-
-public class DNetMdStoreDataCiteToHbaseXsltFunctions extends DataciteToHbaseXsltFunctions {
-
-	public static final String DEFAULT_TRUST = "0.9";
-	public static final String DEFAULT_PROVENANCE = "sysimport:crosswalk:datasetarchive";
-
-	// dnet:oafPersonResultFromMDStore($resultId, $oafPerson, position())
-	public static String oafPersonResult_Authorship_FromDatacite(final String personId, final String resultId, final int rank, final String relClass) {
-		return oafPersonResult_Authorship_FromDatacite(personId, resultId, rank, relClass, DEFAULT_PROVENANCE, DEFAULT_TRUST);
-
-	}
-
-	// dnet:oafPersonResultFromMDStore($resultId, $oafPerson, position())
-	// public static String oafPersonPersonFromMDStore(final String source, final String target) {
-	// return oafPersonPersonFromDMF(source, target, DEFAULT_PROVENANCE, DEFAULT_TRUST);
-	// }
-
-	// dnet:oafResultProjectFromMDStore($resultId, $projectId)
-	public static String oafResultProject_Outcome_FromDatacite(final String sourceId, final String targetId, final String relClass) {
-		return oafResultProject_Outcome_FromDatacite(sourceId, targetId, relClass, DEFAULT_PROVENANCE, DEFAULT_TRUST);
-	}
-
-	// dnet:oafPersonFromMDStore($personId, .)
-	public static String oafPerson_FromDatacite(final String personId,
-			final String collectedFromId,
-			final String collectedFromName,
-			final String originalId,
-			final String dateOfCollection,
-			final String fullname) {
-		return oafPerson_FromDatacite(personId, fullname, DEFAULT_PROVENANCE, DEFAULT_TRUST, collectedFromId, collectedFromName, originalId, dateOfCollection);
-
-	}
-
-	public static String oafResult_FromDatacite(final String resultId,
-			final NodeList metadata,
-			final NodeList titles,
-			final NodeList subjects,
-			final NodeList publisher,
-			final NodeList descriptions,
-			final NodeList dates,
-			final NodeList resourceTypes,
-			final NodeList formats,
-			final NodeList sizes,
-			final NodeList languages,
-			final NodeList rights,
-			final NodeList version,
-			final String hostedbyId,
-			final String hostedbyName,
-			final String collectedfromId,
-			final String collectedfromName,
-			final String originalId,
-			final String instanceUri,
-			final String dateOfCollection) {
-
-		return oafResult_FromDatacite(resultId, metadata, titles, subjects, publisher, descriptions, dates, resourceTypes, formats, sizes, languages, rights,
-				version, DEFAULT_PROVENANCE, DEFAULT_TRUST, hostedbyId, hostedbyName, collectedfromId, collectedfromName, originalId, instanceUri,
-				dateOfCollection);
-	}
-
-	public static String oafResultResult_PublicationDataset_FromDatacite(final String sourceId, final String targetId, final String relClass) {
-		return oafResultResult_PublicationDataset_FromDatacite(sourceId, targetId, relClass, DEFAULT_PROVENANCE, DEFAULT_TRUST);
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DNetMdStoreToHbaseXsltFunctions.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DNetMdStoreToHbaseXsltFunctions.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DNetMdStoreToHbaseXsltFunctions.java	(nonexistent)
@@ -1,47 +0,0 @@
-package eu.dnetlib.data.transform.xml;
-
-import org.w3c.dom.NodeList;
-
-public class DNetMdStoreToHbaseXsltFunctions extends DmfToHbaseXsltFunctions {
-
-	public static final String DEFAULT_TRUST = "0.9";
-	public static final String DEFAULT_PROVENANCE = "sysimport:crosswalk:repository";
-
-	// dnet:oafPersonResultFromMDStore($resultId, $oafPerson, position())
-	public static String oafPersonResult_Authorship_FromMDStore(final String personId, final String resultId, final int rank, final String relClass) {
-		return oafPersonResult_Authorship_FromDMF(personId, resultId, rank, relClass, DEFAULT_PROVENANCE, DEFAULT_TRUST);
-	}
-
-	// dnet:oafPersonResultFromMDStore($resultId, $oafPerson, position())
-	public static String oafPersonPerson_CoAuthorship_FromMDStore(final String source, final String target, final String relClass) {
-		return oafPersonPerson_CoAuthorship_FromDMF(source, target, relClass, DEFAULT_PROVENANCE, DEFAULT_TRUST);
-	}
-
-	// dnet:oafResultProjectFromMDStore($resultId, $projectId)
-	public static String oafResultProject_Outcome_FromMDStore(final String sourceId, final String targetId, final String relClass) {
-		return oafResultProject_Outcome_FromDMF(sourceId, targetId, relClass, DEFAULT_PROVENANCE, DEFAULT_TRUST);
-	}
-
-	// dnet:oafPersonFromMDStore($personId, .)
-	public static String oafPersonFromMDStore(final String personId,
-			final String collectedFromId,
-			final String collectedFromName,
-			final String originalId,
-			final String dateOfCollection,
-			final String fullname) {
-		return oafPerson_FromDMF(personId, fullname, DEFAULT_PROVENANCE, DEFAULT_TRUST, collectedFromId, collectedFromName, originalId, dateOfCollection);
-	}
-
-	public static String oafResultFromMDStore(final String resultId,
-			final String hostedbyId,
-			final String hostedbyName,
-			final String collectedFromId,
-			final String collectedFromName,
-			final String originalId,
-			final String dateOfCollection,
-			final NodeList nodelist) {
-		return oafResult_FromDMF(resultId, DEFAULT_PROVENANCE, DEFAULT_TRUST, hostedbyId, hostedbyName, collectedFromId, collectedFromName, originalId,
-				dateOfCollection, nodelist);
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/ElementList.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/ElementList.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/ElementList.java	(nonexistent)
@@ -1,19 +0,0 @@
-package eu.dnetlib.data.transform.xml;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.google.common.base.Function;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-
-@SuppressWarnings("serial")
-public class ElementList extends ArrayList<Element> {
-	public List<String> listValues() {
-		return Lists.newArrayList(Iterables.transform(this, new Function<Element, String>() {
-			@Override
-			public String apply(Element e) {
-				return e.getText();
-			}}));
-	}
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/AbstractDNetOafXsltFunctions.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/AbstractDNetOafXsltFunctions.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/AbstractDNetOafXsltFunctions.java	(nonexistent)
@@ -1,906 +0,0 @@
-package eu.dnetlib.data.transform.xml;
-
-import java.nio.charset.Charset;
-import java.security.MessageDigest;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.codec.binary.Hex;
-import org.apache.commons.lang.StringUtils;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import com.google.common.base.Predicate;
-import com.google.common.base.Splitter;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.google.protobuf.Descriptors.Descriptor;
-import com.google.protobuf.Descriptors.FieldDescriptor;
-import com.google.protobuf.InvalidProtocolBufferException;
-import com.google.protobuf.Message;
-import com.google.protobuf.Message.Builder;
-import com.google.protobuf.ProtocolMessageEnum;
-
-import eu.dnetlib.data.proto.FieldTypeProtos.BoolField;
-import eu.dnetlib.data.proto.FieldTypeProtos.DataInfo;
-import eu.dnetlib.data.proto.FieldTypeProtos.IntField;
-import eu.dnetlib.data.proto.FieldTypeProtos.KeyValue;
-import eu.dnetlib.data.proto.FieldTypeProtos.Qualifier;
-import eu.dnetlib.data.proto.FieldTypeProtos.StringField;
-import eu.dnetlib.data.proto.FieldTypeProtos.StructuredProperty;
-import eu.dnetlib.data.proto.KindProtos.Kind;
-import eu.dnetlib.data.proto.OafProtos.Oaf;
-import eu.dnetlib.data.proto.OafProtos.OafEntity;
-import eu.dnetlib.data.proto.OafProtos.OafRel;
-import eu.dnetlib.data.proto.RelTypeProtos.RelType;
-import eu.dnetlib.data.proto.RelTypeProtos.SubRelType;
-import eu.dnetlib.data.proto.TypeProtos.Type;
-import eu.dnetlib.miscutils.collections.Pair;
-import eu.dnetlib.miscutils.iterators.IterablePair;
-
-public abstract class AbstractDNetOafXsltFunctions {
-
-	private static final int MAX_NSPREFIX_LEN = 12;
-	public static final String URL_REGEX = "^(http|https|ftp)\\://.*";
-	protected static Map<String, String> code2name = Maps.newHashMap();
-
-	public static Predicate<String> urlFilter = new Predicate<String>() {
-
-		@Override
-		public boolean apply(final String s) {
-			return s.trim().matches(URL_REGEX);
-		}
-	};
-
-	static {
-		code2name.put("AF", "AFGHANISTAN");
-		code2name.put("CX", "CHRISTMAS ISLAND");
-		code2name.put("CC", "COCOS (KEELING) ISLANDS");
-		code2name.put("aka", "Akan");
-		code2name.put("CO", "Colombia");
-		code2name.put("result", "result");
-		code2name.put("AX", "ÅLAND ISLANDS");
-		code2name.put("AS", "AMERICAN SAMOA");
-		code2name.put("AD", "ANDORRA");
-		code2name.put("AO", "ANGOLA");
-		code2name.put("AI", "ANGUILLA");
-		code2name.put("AQ", "ANTARCTICA");
-		code2name.put("AG", "ANTIGUA AND BARBUDA");
-		code2name.put("AW", "ARUBA");
-		code2name.put("BS", "BAHAMAS");
-		code2name.put("BB", "BARBADOS");
-		code2name.put("BZ", "BELIZE");
-		code2name.put("BM", "BERMUDA");
-		code2name.put("BT", "BHUTAN");
-		code2name.put("BQ", "BONAIRE, SINT EUSTATIUS AND SABA");
-		code2name.put("BV", "BOUVET ISLAND");
-		code2name.put("IO", "BRITISH INDIAN OCEAN TERRITORY");
-		code2name.put("KY", "CAYMAN ISLANDS");
-		code2name.put("TD", "CHAD");
-		code2name.put("BG", "Bulgaria");
-		code2name.put("AT", "Austria");
-		code2name.put("BE", "Belgium");
-		code2name.put("CA", "Canada");
-		code2name.put("BJ", "Benin");
-		code2name.put("CN", "China (People's Republic of)");
-		code2name.put("AU", "Australia");
-		code2name.put("BR", "Brazil");
-		code2name.put("AR", "Argentina");
-		code2name.put("BF", "Burkina Faso");
-		code2name.put("AL", "Albania");
-		code2name.put("CV", "Cape Verde");
-		code2name.put("AZ", "Azerbaijan");
-		code2name.put("BA", "Bosnia and Herzegovina");
-		code2name.put("AM", "Armenia");
-		code2name.put("DZ", "Algeria");
-		code2name.put("CM", "Cameroon");
-		code2name.put("BD", "Bangladesh");
-		code2name.put("KH", "Cambodia");
-		code2name.put("CL", "Chile");
-		code2name.put("BW", "Botswana");
-		code2name.put("BY", "Belarus");
-		code2name.put("BO", "Bolivia");
-		code2name.put("CF", "Central African Republic");
-		code2name.put("BH", "Bahrain");
-		code2name.put("BN", "Brunei Darussalam");
-		code2name.put("BI", "Burundi");
-		code2name.put("KM", "COMOROS");
-		code2name.put("CK", "COOK ISLANDS");
-		code2name.put("CW", "CURAÇAO");
-		code2name.put("DJ", "DJIBOUTI");
-		code2name.put("DM", "DOMINICA");
-		code2name.put("GQ", "EQUATORIAL GUINEA");
-		code2name.put("ER", "ERITREA");
-		code2name.put("FK", "FALKLAND ISLANDS (MALVINAS)");
-		code2name.put("PF", "FRENCH POLYNESIA");
-		code2name.put("TF", "FRENCH SOUTHERN TERRITORIES");
-		code2name.put("GI", "GIBRALTAR");
-		code2name.put("GR", "GREECE");
-		code2name.put("GD", "GRENADA");
-		code2name.put("GP", "GUADELOUPE");
-		code2name.put("GU", "GUAM");
-		code2name.put("GG", "GUERNSEY");
-		code2name.put("HM", "HEARD ISLAND AND MCDONALD ISLANDS");
-		code2name.put("VA", "HOLY SEE (VATICAN CITY STATE)");
-		code2name.put("IQ", "IRAQ");
-		code2name.put("IM", "ISLE OF MAN");
-		code2name.put("JE", "JERSEY");
-		code2name.put("KI", "KIRIBATI");
-		code2name.put("KP", "KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF");
-		code2name.put("LR", "LIBERIA");
-		code2name.put("MQ", "MARTINIQUE");
-		code2name.put("MR", "MAURITANIA");
-		code2name.put("YT", "MAYOTTE");
-		code2name.put("FM", "MICRONESIA, FEDERATED STATES OF");
-		code2name.put("MN", "MONGOLIA");
-		code2name.put("MS", "MONTSERRAT");
-		code2name.put("NR", "NAURU");
-		code2name.put("NU", "NIUE");
-		code2name.put("NF", "NORFOLK ISLAND");
-		code2name.put("MP", "NORTHERN MARIANA ISLANDS");
-		code2name.put("PW", "PALAU");
-		code2name.put("PY", "PARAGUAY");
-		code2name.put("PN", "PITCAIRN");
-		code2name.put("PR", "PUERTO RICO");
-		code2name.put("RE", "RÉUNION");
-		code2name.put("BL", "SAINT BARTHÉLEMY");
-		code2name.put("SH", "SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA");
-		code2name.put("KN", "SAINT KITTS AND NEVIS");
-		code2name.put("LC", "SAINT LUCIA");
-		code2name.put("MF", "SAINT MARTIN (FRENCH PART)");
-		code2name.put("PM", "SAINT PIERRE AND MIQUELON");
-		code2name.put("VC", "SAINT VINCENT AND THE GRENADINES");
-		code2name.put("FI", "Finland");
-		code2name.put("NO", "Norway");
-		code2name.put("CZ", "Czech Republic");
-		code2name.put("IL", "Israel");
-		code2name.put("EE", "Estonia");
-		code2name.put("IT", "Italy");
-		code2name.put("RO", "Romania");
-		code2name.put("HU", "Hungary");
-		code2name.put("NL", "Netherlands");
-		code2name.put("FR", "France");
-		code2name.put("IS", "Iceland");
-		code2name.put("LV", "Latvia");
-		code2name.put("PT", "Portugal");
-		code2name.put("MT", "Malta");
-		code2name.put("DK", "Denmark");
-		code2name.put("IE", "Ireland");
-		code2name.put("MA", "Morocco");
-		code2name.put("IN", "India");
-		code2name.put("KR", "Korea (Republic of)");
-		code2name.put("MX", "Mexico");
-		code2name.put("HT", "Haiti");
-		code2name.put("EG", "Egypt");
-		code2name.put("LT", "Lithuania");
-		code2name.put("HR", "Croatia");
-		code2name.put("LU", "Luxembourg");
-		code2name.put("PG", "Papua New Guinea");
-		code2name.put("GT", "Guatemala");
-		code2name.put("ID", "Indonesia");
-		code2name.put("NG", "Nigeria");
-		code2name.put("NZ", "New Zealand");
-		code2name.put("MK", "Former Yugoslav Republic of Macedonia");
-		code2name.put("JP", "Japan");
-		code2name.put("KZ", "Kazakhstan");
-		code2name.put("NE", "Niger");
-		code2name.put("ME", "Montenegro");
-		code2name.put("GE", "Georgia");
-		code2name.put("JO", "Jordan");
-		code2name.put("LB", "Lebanon");
-		code2name.put("PS", "Palestinian-administered areas");
-		code2name.put("CR", "Costa Rica");
-		code2name.put("PH", "Philippines");
-		code2name.put("KE", "Kenya");
-		code2name.put("CI", "Cote d'Ivoire");
-		code2name.put("IR", "Iran (Islamic Republic of)");
-		code2name.put("NI", "Nicaragua");
-		code2name.put("KG", "Kyrgyzstan");
-		code2name.put("EC", "Ecuador");
-		code2name.put("MY", "Malaysia");
-		code2name.put("FO", "Faroe Islands");
-		code2name.put("ET", "Ethiopia");
-		code2name.put("GH", "Ghana");
-		code2name.put("GN", "Guinea");
-		code2name.put("RW", "Rwanda");
-		code2name.put("MG", "Madagascar");
-		code2name.put("PE", "Peru");
-		code2name.put("MW", "Malawi");
-		code2name.put("JM", "Jamaica");
-		code2name.put("HK", "Hong Kong");
-		code2name.put("PK", "Pakistan");
-		code2name.put("MZ", "Mozambique");
-		code2name.put("LS", "Lesotho");
-		code2name.put("NA", "Namibia");
-		code2name.put("DO", "Dominican Republic");
-		code2name.put("HN", "Honduras");
-		code2name.put("CD", "Congo (Democratic Republic of)");
-		code2name.put("ML", "Mali");
-		code2name.put("NP", "Nepal");
-		code2name.put("MU", "Mauritius");
-		code2name.put("CU", "Cuba");
-		code2name.put("PA", "Panama");
-		code2name.put("LI", "Liechtenstein");
-		code2name.put("GL", "Greenland");
-		code2name.put("GA", "Gabon");
-		code2name.put("CG", "Congo");
-		code2name.put("OM", "Oman");
-		code2name.put("KW", "Kuwait");
-		code2name.put("QA", "Qatar");
-		code2name.put("GY", "Guyana");
-		code2name.put("GF", "French Guiana");
-		code2name.put("FJ", "Fiji");
-		code2name.put("NC", "New Caledonia");
-		code2name.put("MM", "Myanmar");
-		code2name.put("GW", "Guinea-Bissau");
-		code2name.put("WS", "SAMOA");
-		code2name.put("ST", "SAO TOME AND PRINCIPE");
-		code2name.put("SL", "SIERRA LEONE");
-		code2name.put("SX", "SINT MAARTEN (DUTCH PART)");
-		code2name.put("SB", "SOLOMON ISLANDS");
-		code2name.put("GS", "SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS");
-		code2name.put("SS", "SOUTH SUDAN");
-		code2name.put("SJ", "SVALBARD AND JAN MAYEN");
-		code2name.put("TL", "TIMOR-LESTE");
-		code2name.put("TK", "TOKELAU");
-		code2name.put("TO", "TONGA");
-		code2name.put("TC", "TURKS AND CAICOS ISLANDS");
-		code2name.put("TV", "TUVALU");
-		code2name.put("GB", "UNITED KINGDOM");
-		code2name.put("UM", "UNITED STATES MINOR OUTLYING ISLANDS");
-		code2name.put("VU", "VANUATU");
-		code2name.put("VI", "VIRGIN ISLANDS, U.S.");
-		code2name.put("WF", "WALLIS AND FUTUNA");
-		code2name.put("EH", "WESTERN SAHARA");
-		code2name.put("EU", "European Union");
-		code2name.put("abk", "Abkhazian");
-		code2name.put("aar", "Afar");
-		code2name.put("afr", "Afrikaans");
-		code2name.put("alb/sqi", "Albanian");
-		code2name.put("amh", "Amharic");
-		code2name.put("ara", "Arabic");
-		code2name.put("arg", "Aragonese");
-		code2name.put("arm/hye", "Armenian");
-		code2name.put("asm", "Assamese");
-		code2name.put("ava", "Avaric");
-		code2name.put("ave", "Avestan");
-		code2name.put("aym", "Aymara");
-		code2name.put("aze", "Azerbaijani");
-		code2name.put("bam", "Bambara");
-		code2name.put("bak", "Bashkir");
-		code2name.put("baq/eus", "Basque");
-		code2name.put("bel", "Belarusian");
-		code2name.put("ben", "Bengali");
-		code2name.put("bih", "Bihari");
-		code2name.put("bis", "Bislama");
-		code2name.put("nob", "Bokmål, Norwegian; Norwegian Bokmål");
-		code2name.put("bos", "Bosnian");
-		code2name.put("bre", "Breton");
-		code2name.put("bul", "Bulgarian");
-		code2name.put("bur/mya", "Burmese");
-		code2name.put("cat", "Catalan; Valencian");
-		code2name.put("cha", "Chamorro");
-		code2name.put("che", "Chechen");
-		code2name.put("nya", "Chewa; Chichewa; Nyanja");
-		code2name.put("chi/zho", "Chinese");
-		code2name.put("chu", "Church Slavic; Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic");
-		code2name.put("chv", "Chuvash");
-		code2name.put("cor", "Cornish");
-		code2name.put("cos", "Corsican");
-		code2name.put("cre", "Cree");
-		code2name.put("scr/hrv", "Croatian");
-		code2name.put("cze/ces", "Czech");
-		code2name.put("dan", "Danish");
-		code2name.put("div", "Divehi");
-		code2name.put("dut/nld", "Dutch; Flemish");
-		code2name.put("dzo", "Dzongkha");
-		code2name.put("eng", "English");
-		code2name.put("epo", "Esperanto");
-		code2name.put("est", "Estonian");
-		code2name.put("ewe", "Ewe");
-		code2name.put("fao", "Faroese");
-		code2name.put("fij", "Fijian");
-		code2name.put("fin", "Finnish");
-		code2name.put("fre/fra", "French");
-		code2name.put("fry", "Frisian");
-		code2name.put("ful", "Fulah");
-		code2name.put("gla", "Gaelic; Scottish Gaelic");
-		code2name.put("glg", "Galician");
-		code2name.put("lug", "Ganda");
-		code2name.put("geo/kat", "Georgian");
-		code2name.put("ger/deu", "German");
-		code2name.put("kik", "Gikuyu; Kikuyu");
-		code2name.put("gre/ell", "Greek, Modern (1453-)");
-		code2name.put("kal", "Greenlandic; Kalaallisut");
-		code2name.put("grn", "Guarani");
-		code2name.put("guj", "Gujarati");
-		code2name.put("hat", "Haitian; Haitian Creole");
-		code2name.put("hau", "Hausa");
-		code2name.put("heb", "Hebrew");
-		code2name.put("her", "Herero");
-		code2name.put("hin", "Hindi");
-		code2name.put("hmo", "Hiri Motu");
-		code2name.put("hun", "Hungarian");
-		code2name.put("ice/isl", "Icelandic");
-		code2name.put("ido", "Ido");
-		code2name.put("ibo", "Igbo");
-		code2name.put("ind", "Indonesian");
-		code2name.put("ina", "Auxiliary Language Association)");
-		code2name.put("ile", "Interlingue");
-		code2name.put("ES", "Spain");
-		code2name.put("SK", "Slovakia");
-		code2name.put("TR", "Turkey");
-		code2name.put("EL", "Greece");
-		code2name.put("SE", "Sweden");
-		code2name.put("UK", "United Kingdom");
-		code2name.put("SI", "Slovenia");
-		code2name.put("US", "United States");
-		code2name.put("ZA", "South Africa");
-		code2name.put("VN", "Viet Nam");
-		code2name.put("TH", "Thailand");
-		code2name.put("UG", "Uganda");
-		code2name.put("TW", "Taiwan");
-		code2name.put("RS", "Serbia");
-		code2name.put("SC", "Seychelles");
-		code2name.put("TN", "Tunisia");
-		code2name.put("UA", "Ukraine");
-		code2name.put("SN", "Senegal");
-		code2name.put("KO", "Kosovo * UN resolution");
-		code2name.put("UY", "Uruguay");
-		code2name.put("UZ", "Uzbekistan");
-		code2name.put("LK", "Sri Lanka");
-		code2name.put("SG", "Singapore");
-		code2name.put("SY", "Syrian Arab Republic");
-		code2name.put("ZM", "Zambia");
-		code2name.put("SO", "Somalia");
-		code2name.put("VE", "Venezuela");
-		code2name.put("VG", "Virgin Islands (British)");
-		code2name.put("AE", "United Arab Emirates");
-		code2name.put("SM", "San Marino");
-		code2name.put("TG", "Togo");
-		code2name.put("AN", "Netherlands Antilles");
-		code2name.put("TJ", "Tajikistan");
-		code2name.put("TM", "Turkmenistan");
-		code2name.put("SA", "Saudi Arabia");
-		code2name.put("YE", "Yemen");
-		code2name.put("SZ", "Swaziland");
-		code2name.put("SR", "Suriname");
-		code2name.put("iku", "Inuktitut");
-		code2name.put("ipk", "Inupiaq");
-		code2name.put("gle", "Irish");
-		code2name.put("ita", "Italian");
-		code2name.put("jpn", "Japanese");
-		code2name.put("jav", "Javanese");
-		code2name.put("kan", "Kannada");
-		code2name.put("kau", "Kanuri");
-		code2name.put("kas", "Kashmiri");
-		code2name.put("kaz", "Kazakh");
-		code2name.put("khm", "Khmer");
-		code2name.put("kin", "Kinyarwanda");
-		code2name.put("kir", "Kirghiz");
-		code2name.put("kom", "Komi");
-		code2name.put("kon", "Kongo");
-		code2name.put("kor", "Korean");
-		code2name.put("kua", "Kuanyama; Kwanyama");
-		code2name.put("kur", "Kurdish");
-		code2name.put("lao", "Lao");
-		code2name.put("lat", "Latin");
-		code2name.put("lav", "Latvian");
-		code2name.put("ltz", "Letzeburgesch; Luxembourgish");
-		code2name.put("lim", "Limburgan; Limburger; Limburgish");
-		code2name.put("lin", "Lingala");
-		code2name.put("lit", "Lithuanian");
-		code2name.put("lub", "Luba-Katanga");
-		code2name.put("mac/mkd", "Macedonian");
-		code2name.put("mlg", "Malagasy");
-		code2name.put("may/msa", "Malay");
-		code2name.put("mal", "Malayalam");
-		code2name.put("mlt", "Maltese");
-		code2name.put("glv", "Manx");
-		code2name.put("mao/mri", "Maori");
-		code2name.put("mar", "Marathi");
-		code2name.put("mah", "Marshallese");
-		code2name.put("mol", "Moldavian");
-		code2name.put("mon", "Mongolian");
-		code2name.put("nau", "Nauru");
-		code2name.put("nav", "Navajo; Navaho");
-		code2name.put("nde", "Ndebele, North");
-		code2name.put("nbl", "Ndebele, South");
-		code2name.put("ndo", "Ndonga");
-		code2name.put("nep", "Nepali");
-		code2name.put("sme", "Northern Sami");
-		code2name.put("nor", "Norwegian");
-		code2name.put("nno", "Norwegian Nynorsk; Nynorsk, Norwegian");
-		code2name.put("oci", "Occitan (post 1500); Provençal");
-		code2name.put("oji", "Ojibwa");
-		code2name.put("ori", "Oriya");
-		code2name.put("orm", "Oromo");
-		code2name.put("oss", "Ossetian; Ossetic");
-		code2name.put("pli", "Pali");
-		code2name.put("pan", "Panjabi; Punjabi");
-		code2name.put("per/fas", "Persian");
-		code2name.put("pol", "Polish");
-		code2name.put("por", "Portuguese");
-		code2name.put("pus", "Pushto");
-		code2name.put("que", "Quechua");
-		code2name.put("roh", "Raeto-Romance");
-		code2name.put("rum/ron", "Romanian");
-		code2name.put("run", "Rundi");
-		code2name.put("rus", "Russian");
-		code2name.put("smo", "Samoan");
-		code2name.put("sag", "Sango");
-		code2name.put("san", "Sanskrit");
-		code2name.put("srd", "Sardinian");
-		code2name.put("scc/srp", "Serbian");
-		code2name.put("sna", "Shona");
-		code2name.put("iii", "Sichuan Yi");
-		code2name.put("snd", "Sindhi");
-		code2name.put("sin", "Sinhala; Sinhalese");
-		code2name.put("slo/slk", "Slovak");
-		code2name.put("slv", "Slovenian");
-		code2name.put("som", "Somali");
-		code2name.put("sot", "Sotho, Southern");
-		code2name.put("spa", "Spanish; Castilian");
-		code2name.put("sun", "Sundanese");
-		code2name.put("swa", "Swahili");
-		code2name.put("ssw", "Swati");
-		code2name.put("swe", "Swedish");
-		code2name.put("tgl", "Tagalog");
-		code2name.put("tah", "Tahitian");
-		code2name.put("tgk", "Tajik");
-		code2name.put("tam", "Tamil");
-		code2name.put("tat", "Tatar");
-		code2name.put("tel", "Telugu");
-		code2name.put("tha", "Thai");
-		code2name.put("tib/bod", "Tibetan");
-		code2name.put("tir", "Tigrinya");
-		code2name.put("ton", "Tonga (Tonga Islands)");
-		code2name.put("tso", "Tsonga");
-		code2name.put("tsn", "Tswana");
-		code2name.put("tur", "Turkish");
-		code2name.put("tuk", "Turkmen");
-		code2name.put("twi", "Twi");
-		code2name.put("uig", "Uighur; Uyghur");
-		code2name.put("ukr", "Ukrainian");
-		code2name.put("urd", "Urdu");
-		code2name.put("uzb", "Uzbek");
-		code2name.put("ven", "Venda");
-		code2name.put("vie", "Vietnamese");
-		code2name.put("vol", "Volapük");
-		code2name.put("wln", "Walloon");
-		code2name.put("wel/cym", "Welsh");
-		code2name.put("wol", "Wolof");
-		code2name.put("xho", "Xhosa");
-		code2name.put("yid", "Yiddish");
-		code2name.put("yor", "Yoruba");
-		code2name.put("zha", "Zhuang; Chuang");
-		code2name.put("zul", "Zulu");
-		code2name.put("deu/ger", "German");
-		code2name.put("fra/fre", "French");
-		code2name.put("srr", "Serbian");
-		code2name.put("esl/spa", "Spanish");
-		code2name.put("und", "Undetermined");
-		code2name.put("UNKNOWN", "UNKNOWN");
-		code2name.put("entityregistry", "entityregistry");
-		code2name.put("aggregator", "aggregator");
-		code2name.put("dataarchive", "dataarchive");
-		code2name.put("cris", "cris");
-		code2name.put("repository", "repository");
-		code2name.put("CIP-EIP-TN", "CIP-Eco-Innovation - CIP-Thematic Network");
-		code2name.put("ec:specificprogram", "specificprogram");
-		code2name.put("ec:program", "program");
-		code2name.put("ec:hasframeworkprogram", "hasframeworkprogram");
-		code2name.put("ec:hasprogram", "hasprogram");
-		code2name.put("171", "Article 171 of the Treaty");
-		code2name.put("BSG", "Research for the benefit of specific groups");
-		code2name.put("CP", "Collaborative project");
-		code2name.put("providedBy", "provided by");
-		code2name.put("dataset", "dataset");
-		code2name.put("publication", "publication");
-		code2name.put("dataset_dataset", "dataset_dataset");
-		code2name.put("publication_dataset", "publication_dataset");
-		code2name.put("publication_publication", "publication_publication");
-		code2name.put("coordinator", "coordinator");
-		code2name.put("participant", "participant");
-		code2name.put("subcontractor", "subcontractor");
-		code2name.put("principal investigating", "principal investigating");
-		code2name.put("exploitation", "exploitation");
-		code2name.put("collection", "collection");
-		code2name.put("event", "event");
-		code2name.put("film", "film");
-		code2name.put("image", "image");
-		code2name.put("interactiveResource", "interactiveResource");
-		code2name.put("model", "model");
-		code2name.put("physicalObject", "physicalObject");
-		code2name.put("service", "service");
-		code2name.put("software", "software");
-		code2name.put("sound", "sound");
-		code2name.put("text", "text");
-		code2name.put("0000", "Unknown");
-		code2name.put("0001", "Article");
-		code2name.put("0002", "Book");
-		code2name.put("0004", "Conference object");
-		code2name.put("0005", "Contribution for newspaper or weekly magazine");
-		code2name.put("0006", "Doctoral thesis");
-		code2name.put("0007", "Master thesis");
-		code2name.put("0008", "Bachelor thesis");
-		code2name.put("0009", "External research report");
-		code2name.put("0010", "Lecture");
-		code2name.put("0011", "Internal report");
-		code2name.put("0012", "Newsletter");
-		code2name.put("0013", "Part of book or chapter of book");
-		code2name.put("0014", "Research");
-		code2name.put("0015", "Review");
-		code2name.put("0016", "Preprint");
-		code2name.put("0017", "Report");
-		code2name.put("0018", "Annotation");
-		code2name.put("0019", "Patent");
-		code2name.put("0020", "Other");
-		code2name.put("0021", "Dataset");
-		code2name.put("main title", "main title");
-		code2name.put("subtitle", "subtitle");
-		code2name.put("alternative title", "alternative title");
-		code2name.put("translated title", "translated title");
-		code2name.put("OPEN", "Open Access");
-		code2name.put("12MONTHS", "12 Months Embargo");
-		code2name.put("OTHER", "Other");
-		code2name.put("6MONTHS", "6 Months Embargo");
-		code2name.put("RESTRICTED", "Restricted");
-		code2name.put("EMBARGO", "Embargo");
-		code2name.put("CLOSED", "Closed Access");
-		code2name.put("wt:fundingStream", "Wellcome Trust: Funding Stream");
-		code2name.put("wt:hasParentFunding", "wt:hasParentFunding");
-		code2name.put("author", "author");
-		code2name.put("isResultOf", "isResultOf");
-		code2name.put("driver", "driver");
-		code2name.put("openaire", "openaire");
-		code2name.put("notCompatible", "notCompatible");
-		code2name.put("available", "available");
-		code2name.put("copyrighted", "copyrighted");
-		code2name.put("created", "created");
-		code2name.put("endDate", "endDate");
-		code2name.put("issued", "issued");
-		code2name.put("startDate", "startDate");
-		code2name.put("submitted", "submitted");
-		code2name.put("updated", "updated");
-		code2name.put("valid", "valid");
-		code2name.put("sysimport:crosswalk:repository", "sysimport:crosswalk:repository");
-		code2name.put("sysimport:crosswalk:aggregator", "sysimport:crosswalk:aggregator");
-		code2name.put("sysimport:crosswalk:entityregistry", "sysimport:crosswalk:entityregistry");
-		code2name.put("sysimport:crosswalk:datasetarchive", "sysimport:crosswalk:datasetarchive");
-		code2name.put("sysimport:crosswalk:cris", "sysimport:crosswalk:cris");
-		code2name.put("sysimport:mining:repository", "sysimport:mining:repository");
-		code2name.put("sysimport:mining:aggregator", "sysimport:mining:aggregator");
-		code2name.put("sysimport:mining:entityregistry", "sysimport:mining:entityregistry");
-		code2name.put("sysimport:mining:datasetarchive", "sysimport:mining:datasetarchive");
-		code2name.put("sysimport:mining:cris", "sysimport:mining:cris");
-		code2name.put("userclaim:doi", "userclaim:doi");
-		code2name.put("userclaim:driver", "userclaim:driver");
-		code2name.put("userclaim:orcid", "userclaim:orcid");
-		code2name.put("ec:frameworkprogram", "frameworkprogram");
-		code2name.put("ec:hasspecificprogram", "hasspecificprogram");
-		code2name.put("CY", "Cyprus");
-		code2name.put("CH", "Switzerland");
-		code2name.put("PL", "Poland");
-		code2name.put("DE", "Germany");
-		code2name.put("RU", "Russian Federation");
-		code2name.put("TZ", "Tanzania (United Republic of)");
-		code2name.put("MD", "Moldova (Republic of)");
-		code2name.put("LA", "Lao (People's Democratic Republic)");
-		code2name.put("SD", "Sudan");
-		code2name.put("ZW", "Zimbabwe");
-		code2name.put("GM", "Gambia");
-		code2name.put("SV", "El Salvador");
-		code2name.put("MV", "Maldives");
-		code2name.put("TT", "Trinidad and Tobago");
-		code2name.put("MH", "Marshall Islands");
-		code2name.put("MO", "Macao");
-		code2name.put("XK", "Kosovo * UN resolution");
-		code2name.put("LY", "Libyan Arab Jamahiriya");
-		code2name.put("CP-CSA", "Combination of CP & CSA");
-		code2name.put("CSA", "Coordination and support action");
-		code2name.put("ERC", "Support for frontier research (ERC)");
-		code2name.put("NoE", "Network of Excellence");
-		code2name.put("MC", "Support for training and career development of researchers (Marie Curie)");
-	}
-
-	// Builder for Entities
-	protected static Oaf getOaf(final OafEntity.Builder entity, final DataInfo.Builder info) {
-		return _getOaf(Oaf.newBuilder(), info).setKind(Kind.entity).setEntity(entity).build();
-	}
-
-	// Builder for Rels
-	protected static Oaf getOaf(final OafRel.Builder rel, final DataInfo.Builder info) {
-		return _getOaf(Oaf.newBuilder(), info).setKind(Kind.relation).setRel(rel).build();
-	}
-
-	private static Oaf.Builder _getOaf(final Oaf.Builder oaf, final DataInfo.Builder info) {
-		return oaf.setDataInfo(ensureDataInfo(info)).setTimestamp(System.currentTimeMillis());
-	}
-
-	protected static DataInfo.Builder ensureDataInfo(final DataInfo.Builder info) {
-		if (info.isInitialized()) { return info; }
-		return getDataInfo("UNKNOWN", "0.9", false, false);
-	}
-
-	protected static KeyValue getKV(final String id, final String name) {
-		return KeyValue.newBuilder().setKey(id).setValue(name).build();
-	}
-
-	protected static OafRel.Builder getRel(final String sourceId,
-			final String targetId,
-			final RelType relType,
-			final SubRelType subRelType,
-			final String relClass,
-			final boolean isChild) {
-		return OafRel.newBuilder().setSource(sourceId).setTarget(targetId).setRelType(relType).setSubRelType(subRelType).setRelClass(relClass)
-				.setChild(isChild);
-	}
-
-	protected static OafEntity.Builder getEntity(final Type type,
-			final String id,
-			final KeyValue collectedFrom,
-			final String originalId,
-			final String dateOfCollection,
-			final List<StructuredProperty> pids) {
-		OafEntity.Builder builder = OafEntity.newBuilder().setType(type).setId(id).addCollectedfrom(collectedFrom).addOriginalId(originalId)
-				.setDateofcollection(dateOfCollection);
-
-		if ((pids != null) && !pids.isEmpty()) {
-			builder.addAllPid(pids);
-		}
-
-		return builder;
-	}
-
-	public static DataInfo.Builder getDataInfo(String provenanceaction, String trust, final boolean deletedbyinference, final boolean inferred) {
-		if ((provenanceaction == null) || provenanceaction.isEmpty()) {
-			provenanceaction = "UNKNOWN";
-		}
-		if ((trust == null) || trust.isEmpty()) {
-			trust = "0.1";
-		}
-		return DataInfo.newBuilder().setDeletedbyinference(deletedbyinference).setInferred(inferred).setTrust(trust)
-				.setProvenanceaction(getSimpleQualifier(provenanceaction, "dnet:provenanceActions"));
-	}
-
-	protected static Qualifier.Builder getSimpleQualifier(final String classname, final String schemename) {
-		return getQualifier(classname, classname, schemename, schemename);
-	}
-
-	protected static Qualifier.Builder getSimpleQualifier(final ProtocolMessageEnum classname, final String schemename) {
-		return getQualifier(classname.toString(), classname.toString(), schemename, schemename);
-	}
-
-	protected static Qualifier.Builder getQualifier(final String classid, final String classname, final String schemeid, final String schemename) {
-		return Qualifier.newBuilder().setClassid(classid).setClassname(classname).setSchemeid(schemeid).setSchemename(schemename);
-	}
-
-	protected static Qualifier.Builder setQualifier(final Qualifier.Builder qualifier, final List<String> fields) {
-		if ((fields == null) || fields.isEmpty() || fields.get(0).isEmpty()) { return null; }
-
-		if ((fields != null) && !fields.isEmpty() && (fields.get(0) != null)) {
-			qualifier.setClassid(fields.get(0));
-			String name = code2name.get(fields.get(0));
-			qualifier.setClassname(name != null ? name : fields.get(0));
-		}
-		return qualifier;
-	}
-
-	protected static void addStructuredProps(final Message.Builder builder,
-			final FieldDescriptor fd,
-			final List<String> values,
-			final String classid,
-			final String schemeid) {
-		if (values != null) {
-			for (String s : values) {
-				addField(builder, fd, getStructuredProperty(s, classid, classid, schemeid, schemeid));
-			}
-		}
-	}
-
-	protected static List<StructuredProperty> parsePids(final NodeList nodelist) {
-
-		final List<StructuredProperty> pids = Lists.newArrayList();
-
-		for (int i = 0; i < nodelist.getLength(); i++) {
-			final Node node = nodelist.item(i);
-			if ((node.getNodeType() == Node.ELEMENT_NODE) && node.getLocalName().toLowerCase().equals("identifier")) {
-
-				final Node pidType = node.getAttributes().getNamedItem("identifierType");
-
-				for (int j = 0; j < node.getChildNodes().getLength(); j++) {
-					Node child = node.getChildNodes().item(j);
-
-					if ((child.getNodeType() == Node.TEXT_NODE) && (pidType != null) && (pidType.getNodeValue() != null) && !pidType.getNodeValue().isEmpty()
-							&& !pidType.getNodeValue().equalsIgnoreCase("url")) {
-
-						String type = pidType.getNodeValue().toLowerCase();
-						String value = child.getTextContent();
-
-						pids.add(getStructuredProperty(value, type, type, "dnet:pid_types", "dnet:pid_types"));
-						break;
-					}
-				}
-			}
-		}
-		return pids;
-	}
-
-	@SuppressWarnings("unchecked")
-	protected static void addField(final Builder builder, final FieldDescriptor descriptor, Object value) {
-
-		if (value == null) { return; }
-
-		if (value instanceof List<?>) {
-			for (Object o : (List<Object>) value) {
-				addField(builder, descriptor, o);
-			}
-		} else {
-			Object fieldValue = value;
-			switch (descriptor.getType()) {
-			case BOOL:
-				fieldValue = Boolean.valueOf(value.toString());
-				break;
-			case BYTES:
-				fieldValue = value.toString().getBytes(Charset.forName("UTF-8"));
-				break;
-			case DOUBLE:
-				fieldValue = Double.valueOf(value.toString());
-				break;
-			case FLOAT:
-				fieldValue = Float.valueOf(value.toString());
-				break;
-			case INT32:
-			case INT64:
-			case SINT32:
-			case SINT64:
-				fieldValue = Integer.valueOf(value.toString());
-				break;
-			case MESSAGE:
-				Builder q = builder.newBuilderForField(descriptor);
-
-				if (value instanceof Builder) {
-					value = ((Builder) value).build();
-					byte[] b = ((Message) value).toByteArray();
-					try {
-						q.mergeFrom(b);
-					} catch (InvalidProtocolBufferException e) {
-						throw new IllegalArgumentException("Unable to merge value: " + value + " with builder: " + q.getDescriptorForType().getName());
-					}
-				} else if (Qualifier.getDescriptor().getName().equals(q.getDescriptorForType().getName())) {
-					if (value instanceof Qualifier) {
-						q.mergeFrom((Qualifier) value);
-					} else {
-						parseMessage(q, Qualifier.getDescriptor(), value.toString(), "@@@");
-					}
-				} else if (StructuredProperty.getDescriptor().getName().equals(q.getDescriptorForType().getName())) {
-					if (value instanceof StructuredProperty) {
-						q.mergeFrom((StructuredProperty) value);
-					} else {
-						parseMessage(q, StructuredProperty.getDescriptor(), value.toString(), "###");
-					}
-				} else if (KeyValue.getDescriptor().getName().equals(q.getDescriptorForType().getName())) {
-					if (value instanceof KeyValue) {
-						q.mergeFrom((KeyValue) value);
-					} else {
-						parseMessage(q, KeyValue.getDescriptor(), value.toString(), "&&&");
-					}
-				} else if (StringField.getDescriptor().getName().equals(q.getDescriptorForType().getName())) {
-					if (value instanceof StringField) {
-						q.mergeFrom((StringField) value);
-					} else {
-						q.setField(StringField.getDescriptor().findFieldByName("value"), value);
-					}
-				} else if (BoolField.getDescriptor().getName().equals(q.getDescriptorForType().getName())) {
-					if (value instanceof BoolField) {
-						q.mergeFrom((BoolField) value);
-					} else {
-						q.setField(BoolField.getDescriptor().findFieldByName("value"), value);
-					}
-				} else if (IntField.getDescriptor().getName().equals(q.getDescriptorForType().getName())) {
-					if (value instanceof IntField) {
-						q.mergeFrom((IntField) value);
-					} else {
-						q.setField(IntField.getDescriptor().findFieldByName("value"), value);
-					}
-				}
-
-				fieldValue = q.buildPartial();
-				break;
-			default:
-				break;
-			}
-
-			doAddField(builder, descriptor, fieldValue);
-		}
-
-	}
-
-	protected static void doAddField(final Builder builder, final FieldDescriptor fd, final Object value) {
-		if (value != null) {
-			if (fd.isRepeated()) {
-				builder.addRepeatedField(fd, value);
-			} else if (fd.isOptional() || fd.isRequired()) {
-				builder.setField(fd, value);
-			}
-		}
-	}
-
-	protected static void parseMessage(final Builder builder, final Descriptor descriptor, final String value, final String split) {
-		IterablePair<FieldDescriptor, String> iterablePair = new IterablePair<FieldDescriptor, String>(descriptor.getFields(), Lists.newArrayList(Splitter
-				.on(split).trimResults().split(value)));
-
-		for (Pair<FieldDescriptor, String> p : iterablePair) {
-			addField(builder, p.getKey(), p.getValue());
-		}
-	}
-
-	protected static String base64(final byte[] data) {
-		return new String(Base64.encodeBase64(data));
-	}
-
-	public static String replace(final String s, final String regex, final String replacement) {
-		return s.replaceAll(regex, replacement);
-	}
-
-	public static String trim(final String s) {
-		return s.trim();
-	}
-
-	protected static String removePrefix(final Type type, final String s) {
-		return removePrefix(type.toString(), s);
-	}
-
-	private static String removePrefix(final String prefix, final String s) {
-		return StringUtils.removeStart("" + s, prefix + "|");
-	}
-
-	protected static Qualifier.Builder getDefaultQualifier(final String scheme) {
-		Qualifier.Builder qualifier = Qualifier.newBuilder().setSchemeid(scheme).setSchemename(scheme);
-		return qualifier;
-	}
-
-	protected static StructuredProperty getStructuredProperty(final String value,
-			final String classid,
-			final String classname,
-			final String schemeid,
-			final String schemename) {
-		if ((value == null) || value.isEmpty()) { return null; }
-		return StructuredProperty.newBuilder().setValue(value).setQualifier(getQualifier(classid, classname, schemeid, schemename)).build();
-	}
-
-	protected static StringField.Builder sf(String s) {
-		return StringField.newBuilder().setValue(s);
-	}
-
-	public static String generateNsPrefix(final String prefix, final String externalId) {
-		return prefix + StringUtils.leftPad(externalId, MAX_NSPREFIX_LEN - prefix.length(), "_");
-	}
-
-	public static String md5(final String s) {
-		try {
-			MessageDigest md = MessageDigest.getInstance("MD5");
-			md.update(s.getBytes("UTF-8"));
-			return new String(Hex.encodeHex(md.digest()));
-		} catch (Exception e) {
-			System.err.println("Error creating id");
-			return null;
-		}
-	}
-
-	public static String oafId(final String entityType, final String prefix, final String id) {
-		if (id.isEmpty() || prefix.isEmpty()) { return ""; }
-		return oafSimpleId(entityType, prefix + "::" + md5(id));
-	}
-
-	public static String oafSimpleId(final String entityType, final String id) {
-		return (Type.valueOf(entityType).getNumber() + "|" + id).replaceAll("\\s|\\n", "");
-	}
-
-	public static String oafSplitId(final String entityType, final String fullId) {
-		return oafId(entityType, StringUtils.substringBefore(fullId, "::"), StringUtils.substringAfter(fullId, "::"));
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DataciteToHbaseXsltFunctions.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DataciteToHbaseXsltFunctions.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DataciteToHbaseXsltFunctions.java	(nonexistent)
@@ -1,327 +0,0 @@
-package eu.dnetlib.data.transform.xml;
-
-import java.util.List;
-import java.util.Map;
-
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import com.google.common.base.Joiner;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-import eu.dnetlib.data.mapreduce.util.OafRowKeyDecoder;
-import eu.dnetlib.data.proto.FieldTypeProtos.StructuredProperty;
-import eu.dnetlib.data.proto.OafProtos.Oaf;
-import eu.dnetlib.data.proto.OafProtos.OafEntity;
-import eu.dnetlib.data.proto.OafProtos.OafRel;
-import eu.dnetlib.data.proto.PersonProtos.Person;
-import eu.dnetlib.data.proto.PersonResultProtos.PersonResult;
-import eu.dnetlib.data.proto.PersonResultProtos.PersonResult.Authorship;
-import eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata;
-import eu.dnetlib.data.proto.RelTypeProtos.RelType;
-import eu.dnetlib.data.proto.RelTypeProtos.SubRelType;
-import eu.dnetlib.data.proto.ResultProjectProtos.ResultProject;
-import eu.dnetlib.data.proto.ResultProjectProtos.ResultProject.Outcome;
-import eu.dnetlib.data.proto.ResultProtos.Result;
-import eu.dnetlib.data.proto.ResultProtos.Result.Instance;
-import eu.dnetlib.data.proto.ResultResultProtos.ResultResult;
-import eu.dnetlib.data.proto.ResultResultProtos.ResultResult.PublicationDataset;
-import eu.dnetlib.data.proto.TypeProtos.Type;
-
-public class DataciteToHbaseXsltFunctions extends AbstractDNetOafXsltFunctions {
-
-	private static Map<String, String> mappingAccess = Maps.newHashMap();
-
-	static {
-
-		mappingAccess.put("info:eu-repo/semantics/openAccess", "OPEN");
-		mappingAccess.put("info:eu-repo/semantics/closedAccess", "CLOSED");
-		mappingAccess.put("info:eu-repo/semantics/restrictedAccess", "RESTRICTED");
-		mappingAccess.put("info:eu-repo/semantics/embargoedAccess", "EMBARGO");
-
-	}
-
-	public static String oafResult_FromDatacite(final String resultId,
-			final NodeList metadata,
-			final NodeList titles,
-			final NodeList subjects,
-			final NodeList publisher,
-			final NodeList descriptions,
-			final NodeList dates,
-			final NodeList resourceTypes,
-			final NodeList formats,
-			final NodeList sizes,
-			final NodeList languages,
-			final NodeList rights,
-			final NodeList version,
-			final String provenance,
-			final String trust,
-			final String hostedbyId,
-			final String hostedbyName,
-			final String collectedfromId,
-			final String collectedfromName,
-			final String originalId,
-			final String instanceUri,
-			final String dateOfCollection) {
-
-		try {
-			final String entityId = OafRowKeyDecoder.decode(resultId).getKey();
-
-			final Result.Builder result = Result.newBuilder();
-			Result.Metadata.Builder metadataProto = Result.Metadata.newBuilder();
-
-			// subject
-			for (int i = 0; i < subjects.getLength(); i++) {
-				Node currentNode = subjects.item(i);
-				NodeList childNodes = currentNode.getChildNodes();
-				if (childNodes.getLength() > 0) {
-					String subjectValue = childNodes.item(0).getNodeValue();
-					addField(metadataProto, Result.Metadata.getDescriptor().findFieldByName("subject"),
-							getStructuredProperty(subjectValue, "keyword", "keyword", "dnet:result_subject", "dnet:result_subject"));
-				}
-			}
-
-			// title
-			for (int i = 0; i < titles.getLength(); i++) {
-				Node currentNode = titles.item(i);
-				NodeList childNodes = currentNode.getChildNodes();
-				if (childNodes.getLength() > 0) {
-					String titleValue = childNodes.item(0).getNodeValue();
-					String classname = "main title";
-					String classid = "main title";
-					if (currentNode.hasAttributes()) {
-						NamedNodeMap attributes = currentNode.getAttributes();
-						Node titleType = attributes.getNamedItem("titleType");
-
-						if (titleType != null && titleType.getNodeValue().equals("AlternativeTitle")) {
-							classname = "alternative title";
-							classid = "alternative title";
-						}
-						if (titleType != null && titleType.getNodeValue().equals("Subtitle")) {
-							classname = "subtitle";
-							classid = "subtitle";
-						}
-						if (titleType != null && titleType.getNodeValue().equals("TranslatedTitle")) {
-							classname = "translated title";
-							classid = "translated title";
-						}
-					}
-					addField(metadataProto, Result.Metadata.getDescriptor().findFieldByName("title"),
-							getStructuredProperty(titleValue, classname, classid, "dnet:dataCite_title", "dnet:dataCite_title"));
-				}
-			}
-
-			// description
-			for (int i = 0; i < descriptions.getLength(); i++) {
-				Node currentNode = descriptions.item(i);
-				if ((currentNode != null) && currentNode.hasChildNodes()) {
-					String descriptionValue = currentNode.getChildNodes().item(0).getNodeValue();
-					addField(metadataProto, Result.Metadata.getDescriptor().findFieldByName("description"), descriptionValue);
-				}
-			}
-
-			// publisher
-			addField(metadataProto, Result.Metadata.getDescriptor().findFieldByName("publisher"), getFirstItem(publisher));
-
-			// dates
-			for (int i = 0; i < dates.getLength(); i++) {
-				Node currentNode = dates.item(i);
-				if ((currentNode != null) && currentNode.hasAttributes() && currentNode.hasChildNodes()) {
-					String dateAttribute = currentNode.getAttributes().getNamedItem("dateType").getNodeValue();
-					String dateValue = currentNode.getChildNodes().item(0).getNodeValue();
-					String protoAttribute = "relevantdate";
-					if ("Accepted".equals(dateAttribute)) {
-						protoAttribute = "dateofacceptance";
-					} else if ("Issued".equals(dateAttribute)) {
-						protoAttribute = "storagedate";
-					} else if ("Updated".equals(dateAttribute)) {
-						protoAttribute = "lastmetadataupdate";
-					} else if ("Available".equals(dateAttribute)) {
-						protoAttribute = "embargoenddate";
-					}
-					if (protoAttribute.equals("relevantdate") == false) {
-						addField(metadataProto, Result.Metadata.getDescriptor().findFieldByName(protoAttribute), dateValue);
-					} else {
-						addField(metadataProto, Result.Metadata.getDescriptor().findFieldByName(protoAttribute),
-								getStructuredProperty(dateValue, "UNKNOWN", "UNKNOWN", "dnet:dataCite_date", "dnet:dataCite_date"));
-					}
-				}
-			}
-
-			// size
-			addField(metadataProto, Result.Metadata.getDescriptor().findFieldByName("size"), getFirstItem(sizes));
-
-			// format
-			addField(metadataProto, Result.Metadata.getDescriptor().findFieldByName("format"), getFirstItem(formats));
-
-			// version
-			addField(metadataProto, Result.Metadata.getDescriptor().findFieldByName("version"), getFirstItem(version));
-
-			// language
-			addField(metadataProto, Result.Metadata.getDescriptor().findFieldByName("language"),
-					setQualifier(getDefaultQualifier("dnet:languages"), Lists.newArrayList(getFirstItem(languages))));
-
-			// resultType
-			addField(metadataProto, Result.Metadata.getDescriptor().findFieldByName("resulttype"), getSimpleQualifier("dataset", "dnet:result_typologies"));
-
-			String tmpID;
-			String TmpName;
-
-			if ((hostedbyId == null) && (hostedbyName == null)) {
-				tmpID = collectedfromId;
-				TmpName = collectedfromName;
-			} else {
-				tmpID = hostedbyId;
-				TmpName = hostedbyName;
-			}
-
-			final Instance.Builder instance = Instance.newBuilder().setHostedby(getKV(tmpID, TmpName));
-
-			String tmpRigths = "UNKNOWN";
-			final String firstRight = getFirstItem(rights);
-			if (mappingAccess.containsKey(firstRight)) {
-				tmpRigths = mappingAccess.get(firstRight);
-			}
-
-			addField(instance, Instance.getDescriptor().findFieldByName("licence"),
-					setQualifier(getDefaultQualifier("dnet:access_modes"), Lists.newArrayList(tmpRigths)));
-
-			addField(instance, Instance.getDescriptor().findFieldByName("instancetype"),
-					setQualifier(getDefaultQualifier("dnet:dataCite_resource"), Lists.newArrayList("0000")));
-			addField(instance, Instance.getDescriptor().findFieldByName("url"), instanceUri);
-
-			result.addInstance(instance);
-
-			List<StructuredProperty> pids = Lists.newArrayList();
-			OafEntity.Builder entity = getEntity(Type.result, entityId, getKV(collectedfromId, collectedfromName), originalId, dateOfCollection, pids)
-					.setResult(result.setMetadata(metadataProto));
-			Oaf oaf = getOaf(entity, getDataInfo(provenance, trust, false, false));
-			return base64(oaf.toByteArray());
-		} catch (Exception e) {
-			e.printStackTrace(System.err);
-			throw new RuntimeException(e);
-		}
-
-	}
-
-	// dnet:dnet:oafResultResultFromMDStore($relatedId, $resultId)
-	public static String oafResultResult_PublicationDataset_FromDatacite(final String source,
-			final String target,
-			final String relClass,
-			final String provenanceAction,
-			final String trust) {
-		try {
-			final String eSource = OafRowKeyDecoder.decode(source).getKey();
-			final String eTarget = OafRowKeyDecoder.decode(target).getKey();
-
-			final RelMetadata.Builder metadata = RelMetadata.newBuilder().setSemantics(getSimpleQualifier(relClass, "dnet:result_result_relations"));
-			final PublicationDataset.Builder builder = PublicationDataset.newBuilder().setRelMetadata(metadata);
-
-			OafRel.Builder rel = getRel(eSource, eTarget, RelType.resultResult, SubRelType.publicationDataset, relClass, false).setResultResult(
-					ResultResult.newBuilder().setPublicationDataset(builder));
-
-			return base64(getOaf(rel, getDataInfo(provenanceAction, trust, false, false)).toByteArray());
-		} catch (Exception e) {
-			e.printStackTrace(System.err);
-			throw new RuntimeException(e);
-		}
-	}
-
-	public static String getFirstItem(final NodeList list) {
-		String out = "";
-		if (list != null) {
-
-			if (list.getLength() > 0 && list.item(0).getChildNodes() != null && list.item(0).getChildNodes().getLength() > 0) {
-				out = list.item(0).getChildNodes().item(0).getNodeValue();
-			}
-		}
-		return out;
-	}
-
-	// dnet:oafResultProjectFromDMF($resultId, $projectId, "sysimport:crosswalk:repository", "0.9")
-	public static String oafResultProject_Outcome_FromDatacite(final String source,
-			final String target,
-			final String relClass,
-			final String provenanceAction,
-			final String trust) {
-		try {
-			final String eSource = OafRowKeyDecoder.decode(source).getKey();
-			final String eTarget = OafRowKeyDecoder.decode(target).getKey();
-
-			final RelMetadata.Builder metadata = RelMetadata.newBuilder().setSemantics(getSimpleQualifier(relClass, "dnet:result_project_relations"));
-			final Outcome.Builder outcome = Outcome.newBuilder().setRelMetadata(metadata);
-
-			OafRel.Builder rel = getRel(eSource, eTarget, RelType.resultProject, SubRelType.outcome, relClass, false).setResultProject(
-					ResultProject.newBuilder().setOutcome(outcome));
-
-			return base64(getOaf(rel, getDataInfo(provenanceAction, trust, false, false)).toByteArray());
-		} catch (Exception e) {
-			e.printStackTrace(System.err);
-			throw new RuntimeException(e);
-		}
-	}
-
-	public static String oafPerson_FromDatacite(final String personId,
-			final String fullname,
-			final String provenanceAction,
-			final String trust,
-			final String collectedfromId,
-			final String collectedfromName,
-			final String originalId,
-			final String dateOfCollection) {
-
-		final String entityId = OafRowKeyDecoder.decode(personId).getKey();
-		try {
-			final Person.Builder person = Person.newBuilder();
-			final Person.Metadata.Builder metadata = Person.Metadata.newBuilder();
-
-			metadata.setFullname(sf(fullname));
-
-			eu.dnetlib.pace.model.Person p = new eu.dnetlib.pace.model.Person(fullname, false);
-			if (p.isAccurate()) {
-				metadata.setFirstname(sf(Joiner.on(" ").join(p.getName())));
-				metadata.clearSecondnames();
-				for (String s : p.getSurname()) {
-					metadata.addSecondnames(sf(s));
-				}
-				metadata.setFullname(sf(p.getNormalisedFullname()));
-			}
-
-			// metadata.setNationality(getSimpleQualifier("UNKNOWN", "dnet:countries"));
-			List<StructuredProperty> pids = Lists.newArrayList();
-			OafEntity.Builder entity = getEntity(Type.person, entityId, getKV(collectedfromId, collectedfromName), originalId, dateOfCollection, pids)
-					.setPerson(person.setMetadata(metadata));
-
-			return base64(getOaf(entity, getDataInfo(provenanceAction, trust, false, false)).toByteArray());
-		} catch (Exception e) {
-			e.printStackTrace(System.err);
-			throw new RuntimeException(e);
-		}
-	}
-
-	public static String oafPersonResult_Authorship_FromDatacite(final String source,
-			final String target,
-			final int rank,
-			final String relClass,
-			final String provenanceAction,
-			final String trust) {
-		try {
-			final String eSource = OafRowKeyDecoder.decode(source).getKey();
-			final String eTarget = OafRowKeyDecoder.decode(target).getKey();
-
-			final RelMetadata.Builder metadata = RelMetadata.newBuilder().setSemantics(getSimpleQualifier(relClass, "dnet:personroles"));
-			final Authorship.Builder auth = Authorship.newBuilder().setRanking("" + rank).setRelMetadata(metadata);
-
-			OafRel.Builder rel = getRel(eSource, eTarget, RelType.personResult, SubRelType.authorship, relClass, false).setPersonResult(
-					PersonResult.newBuilder().setAuthorship(auth));
-
-			return base64(getOaf(rel, getDataInfo(provenanceAction, trust, false, false)).toByteArray());
-		} catch (Exception e) {
-			e.printStackTrace(System.err);
-			throw new RuntimeException(e);
-		}
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/Element.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/Element.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/Element.java	(nonexistent)
@@ -1,61 +0,0 @@
-package eu.dnetlib.data.transform.xml;
-
-import java.util.Map;
-
-import org.apache.commons.lang.StringUtils;
-
-import com.google.common.collect.Maps;
-
-public class Element {
-
-	private String text;
-	private Map<String, String> attributes;
-
-	public Element(final String text, final Map<String, String> attributes) {
-		this.text = text;
-		this.attributes = attributes;
-	}
-
-	public Element(final String text) {
-		this.text = text;
-		this.attributes = Maps.newHashMap();
-	}
-
-	public Element() {
-		this.text = "";
-		this.attributes = Maps.newHashMap();
-	}
-
-	public String getText() {
-		return text;
-	}
-
-	public void setText(final String text) {
-		this.text = text;
-	}
-
-	public Map<String, String> getAttributes() {
-		return attributes;
-	}
-
-	public void setAttributes(final Map<String, String> attributes) {
-		this.attributes = attributes;
-	}
-
-	public boolean isEmpty() {
-		return !(hasText() || hasAttributes());
-	}
-
-	private boolean hasAttributes() {
-		return (getAttributes() != null) && !getAttributes().isEmpty();
-	}
-
-	public boolean hasText() {
-		return (getText() != null) && !getText().isEmpty();
-	}
-
-	@Override
-	public String toString() {
-		return "{ " + StringUtils.left(text, 20) + attributes.toString() + " }";
-	}
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/ValueMap.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/ValueMap.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/ValueMap.java	(nonexistent)
@@ -1,66 +0,0 @@
-package eu.dnetlib.data.transform.xml;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import com.google.common.collect.Maps;
-
-@SuppressWarnings("serial")
-public class ValueMap extends HashMap<String, ElementList> {
-
-	public static ValueMap parseNodeList(final NodeList nodeList) {
-		final ValueMap values = new ValueMap();
-
-		for (int i = 0; i < nodeList.getLength(); i++) {
-			getNodeValue(nodeList.item(i), values);
-		}
-		return values;
-	}
-
-	protected static void getNodeValue(final Node node, final ValueMap values) {
-
-		final String nodeName = node.getLocalName().toLowerCase();
-
-		final Node nodeText = node.getFirstChild();
-		final Element element = nodeText != null ? new Element(nodeText.getNodeValue()) : new Element();
-		final Map<String, String> attrs = Maps.newHashMap();
-
-		final NamedNodeMap attributeList = node.getAttributes();
-		for (int j = 0; j < attributeList.getLength(); j++) {
-			Node attr = attributeList.item(j);
-			if ((attr.getNodeValue() != null) && !attr.getNodeValue().isEmpty()) {
-				attrs.put(attr.getLocalName(), attr.getNodeValue());
-			}
-		}
-		element.setAttributes(attrs);
-
-		if (!element.isEmpty()) {
-			if (!values.containsKey(nodeName)) {
-				values.put(nodeName, new ElementList());
-			}
-
-			values.get(nodeName).add(element);
-		}
-	}
-
-	@Override
-	public ElementList get(final Object key) {
-		ElementList e = super.get(key);
-		return e != null ? e : new ElementList();
-	}
-
-	@Override
-	public String toString() {
-		StringBuilder sb = new StringBuilder();
-		sb.append("{");
-		for (String k : this.keySet()) {
-			sb.append(k).append("=").append(this.get(k)).append("\n");
-		}
-		sb.append("}");
-		return sb.toString();
-	}
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DNetDbToHbaseXsltFunctions.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DNetDbToHbaseXsltFunctions.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DNetDbToHbaseXsltFunctions.java	(nonexistent)
@@ -1,228 +0,0 @@
-package eu.dnetlib.data.transform.xml;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import com.google.protobuf.Descriptors.FieldDescriptor;
-import com.google.protobuf.Message.Builder;
-
-import eu.dnetlib.data.mapreduce.util.OafRowKeyDecoder;
-import eu.dnetlib.data.proto.DatasourceOrganizationProtos.DatasourceOrganization;
-import eu.dnetlib.data.proto.DatasourceOrganizationProtos.DatasourceOrganization.Provision;
-import eu.dnetlib.data.proto.DatasourceProtos.Datasource;
-import eu.dnetlib.data.proto.FieldTypeProtos.DataInfo;
-import eu.dnetlib.data.proto.FieldTypeProtos.KeyValue;
-import eu.dnetlib.data.proto.OafProtos.Oaf;
-import eu.dnetlib.data.proto.OafProtos.OafEntity;
-import eu.dnetlib.data.proto.OafProtos.OafRel;
-import eu.dnetlib.data.proto.OrganizationProtos.Organization;
-import eu.dnetlib.data.proto.PersonProtos.Person;
-import eu.dnetlib.data.proto.PersonResultProtos.PersonResult;
-import eu.dnetlib.data.proto.PersonResultProtos.PersonResult.Authorship;
-import eu.dnetlib.data.proto.ProjectOrganizationProtos.ProjectOrganization;
-import eu.dnetlib.data.proto.ProjectOrganizationProtos.ProjectOrganization.Participation;
-import eu.dnetlib.data.proto.ProjectPersonProtos.ProjectPerson;
-import eu.dnetlib.data.proto.ProjectPersonProtos.ProjectPerson.ContactPerson;
-import eu.dnetlib.data.proto.ProjectProtos.Project;
-import eu.dnetlib.data.proto.RelMetadataProtos.RelMetadata;
-import eu.dnetlib.data.proto.RelTypeProtos.RelType;
-import eu.dnetlib.data.proto.RelTypeProtos.SubRelType;
-import eu.dnetlib.data.proto.ResultProjectProtos.ResultProject;
-import eu.dnetlib.data.proto.ResultProjectProtos.ResultProject.Outcome;
-import eu.dnetlib.data.proto.ResultProtos.Result;
-import eu.dnetlib.data.proto.ResultProtos.Result.Instance;
-import eu.dnetlib.data.proto.TypeProtos.Type;
-
-public class DNetDbToHbaseXsltFunctions extends AbstractDNetOafXsltFunctions {
-
-	public static String oafEntity(final String type,
-			final String id,
-			final String collectedFromId,
-			final String collectedFromName,
-			final String originalId,
-			final String dateOfCollection,
-			final NodeList nodeList) {
-
-		final String entityId = OafRowKeyDecoder.decode(id).getKey();
-		switch (Type.valueOf(type)) {
-		case datasource:
-			return serializeOafEntity(nodeList, Type.datasource, entityId, getKV(collectedFromId, collectedFromName), originalId, dateOfCollection,
-					Datasource.newBuilder());
-		case organization:
-			return serializeOafEntity(nodeList, Type.organization, entityId, getKV(collectedFromId, collectedFromName), originalId, dateOfCollection,
-					Organization.newBuilder());
-		case person:
-			return serializeOafEntity(nodeList, Type.person, entityId, getKV(collectedFromId, collectedFromName), originalId, dateOfCollection,
-					Person.newBuilder());
-		case project:
-			return serializeOafEntity(nodeList, Type.project, entityId, getKV(collectedFromId, collectedFromName), originalId, dateOfCollection,
-					Project.newBuilder());
-		case result:
-			return serializeOafEntity(nodeList, Type.result, entityId, getKV(collectedFromId, collectedFromName), originalId, dateOfCollection,
-					Result.newBuilder());
-		default:
-			throw new IllegalArgumentException("Invalid entity type: " + type);
-		}
-	}
-
-	public static String oafRel(final String relationType,
-			final String source,
-			final String target,
-			final NodeList nodeList,
-			final String relClass,
-			final String relScheme) {
-
-		final String eSource = OafRowKeyDecoder.decode(source).getKey();
-		final String eTarget = OafRowKeyDecoder.decode(target).getKey();
-		final RelType relType = RelType.valueOf(relationType);
-
-		switch (relType) {
-		case datasourceOrganization:
-			Provision.Builder provision = Provision.newBuilder().setRelMetadata(
-					RelMetadata.newBuilder().setSemantics(getSimpleQualifier(Provision.RelName.valueOf(relClass).toString(), relScheme)));
-			DatasourceOrganization.Builder dorg = DatasourceOrganization.newBuilder().setProvision(provision);
-
-			return serializeOafRel(nodeList, eSource, eTarget, relType, SubRelType.provision, relClass, false, dorg, provision);
-		case personResult:
-			Authorship.Builder auth = Authorship.newBuilder().setRelMetadata(
-					RelMetadata.newBuilder().setSemantics(getSimpleQualifier(Authorship.RelName.valueOf(relClass).toString(), relScheme)));
-			PersonResult.Builder personResult = PersonResult.newBuilder().setAuthorship(auth);
-
-			return serializeOafRel(nodeList, eSource, eTarget, relType, SubRelType.authorship, relClass, false, personResult, auth);
-		case projectPerson:
-			ContactPerson.Builder contact = ContactPerson.newBuilder().setRelMetadata(
-					RelMetadata.newBuilder().setSemantics(getSimpleQualifier(ContactPerson.RelName.valueOf(relClass).toString(), relScheme)));
-			ProjectPerson.Builder projectPerson = ProjectPerson.newBuilder().setContactPerson(contact);
-
-			return serializeOafRel(nodeList, eSource, eTarget, relType, SubRelType.contactPerson, relClass, false, projectPerson, contact);
-		case projectOrganization:
-			Participation.Builder participant = Participation.newBuilder().setRelMetadata(
-					RelMetadata.newBuilder().setSemantics(getSimpleQualifier(Participation.RelName.valueOf(relClass).toString(), relScheme)));
-			ProjectOrganization.Builder projectOrganization = ProjectOrganization.newBuilder().setParticipation(participant);
-
-			return serializeOafRel(nodeList, eSource, eTarget, relType, SubRelType.participation, relClass, false, projectOrganization, participant);
-		case resultProject:
-			Outcome.Builder outcome = Outcome.newBuilder().setRelMetadata(
-					RelMetadata.newBuilder().setSemantics(getSimpleQualifier(Outcome.RelName.valueOf(relClass).toString(), relScheme)));
-			ResultProject.Builder resultProject = ResultProject.newBuilder().setOutcome(outcome);
-
-			return serializeOafRel(nodeList, eSource, eTarget, relType, SubRelType.outcome, relClass, false, resultProject, outcome);
-		default:
-			throw new IllegalArgumentException("unhandled relType: " + relationType);
-		}
-	}
-
-	// ////////////////////////////////////////////////////////
-
-	protected static String serializeOafEntity(final NodeList nodelist,
-			final Type type,
-			final String id,
-			final KeyValue collectedFrom,
-			final String originalId,
-			final String dateOfCollection,
-			final Builder entity) {
-		try {
-			final FieldDescriptor md = entity.getDescriptorForType().findFieldByName("metadata");
-
-			final OafEntity.Builder parent = getEntity(type, id, collectedFrom, originalId, dateOfCollection, null);
-			final Builder metadata = entity.newBuilderForField(md);
-			final DataInfo.Builder dataInfo = DataInfo.newBuilder();
-
-			if (type.equals(Type.result)) {
-				final Instance.Builder instance = Instance.newBuilder();
-				parseNodelist(nodelist, instance);
-				FieldDescriptor instanceDescriptor = Result.getDescriptor().findFieldByName(Instance.getDescriptor().getName());
-				if (instanceDescriptor != null) {
-					entity.setField(instanceDescriptor, instance);
-				}
-			}
-			parseNodelist(nodelist, parent, entity, metadata, dataInfo);
-
-			final FieldDescriptor entityDescriptor = OafEntity.getDescriptor().findFieldByName(type.toString());
-
-			final Oaf build = getOaf(parent.setField(entityDescriptor, entity.setField(md, metadata.build()).build()), dataInfo);
-
-			return base64(build.toByteArray());
-		} catch (Exception e) {
-			e.printStackTrace(System.err);
-			throw new RuntimeException(e);
-		}
-	}
-
-	protected static String serializeOafRel(final NodeList nodeList,
-			final String sourceId,
-			final String targetId,
-			final RelType relType,
-			final SubRelType subRelType,
-			final String relClass,
-			final boolean isChild,
-			final Builder rel,
-			final Builder subRel) {
-		try {
-
-			final DataInfo.Builder dataInfo = DataInfo.newBuilder();
-
-			parseNodelist(nodeList, rel, subRel, dataInfo);
-
-			OafRel.Builder builder = getRel(sourceId, targetId, relType, subRelType, relClass, isChild);
-
-			FieldDescriptor subRelDescriptor = rel.getDescriptorForType().findFieldByName(subRelType.toString());
-			rel.setField(subRelDescriptor, subRel.build());
-
-			FieldDescriptor relDescriptor = OafRel.getDescriptor().findFieldByName(relType.toString());
-			builder.setField(relDescriptor, rel.build());
-
-			Oaf build = getOaf(builder, dataInfo);
-			return base64(build.toByteArray());
-		} catch (Exception e) {
-			e.printStackTrace(System.err);
-			throw new RuntimeException(e);
-		}
-	}
-
-	private static void parseNodelist(final NodeList nodeList, final Builder... builders) {
-
-		for (int i = 0; i < nodeList.getLength(); i++) {
-
-			final Node fieldNode = nodeList.item(i);
-			final Node attr = fieldNode.getAttributes().getNamedItem("name");
-
-			final String fieldName = attr.getNodeValue();
-			final NodeList chilidren = fieldNode.getChildNodes();
-
-			for (int j = 0; j < chilidren.getLength(); j++) {
-
-				final Node child = chilidren.item(j);
-				final String childName = child.getLocalName();
-				if ("ITEM".equals(childName) || childName == null || childName.isEmpty()) {
-					for (Builder builder : builders) {
-						FieldDescriptor desc = builder.getDescriptorForType().findFieldByName(fieldName);
-						if (desc != null) {
-							String text = getText((childName == null || childName.isEmpty()) ? fieldNode : child);
-							addField(builder, desc, text);
-						}
-					}
-				}
-			}
-		}
-	}
-
-	private static String getText(final Node node) {
-		StringBuffer result = new StringBuffer();
-		if (!node.hasChildNodes()) { return ""; }
-
-		NodeList list = node.getChildNodes();
-		for (int i = 0; i < list.getLength(); i++) {
-			Node subnode = list.item(i);
-			if (subnode.getNodeType() == Node.TEXT_NODE) {
-				result.append(subnode.getNodeValue());
-			} else if (subnode.getNodeType() == Node.CDATA_SECTION_NODE) {
-				result.append(subnode.getNodeValue());
-			} else if (subnode.getNodeType() == Node.ENTITY_REFERENCE_NODE) {
-				result.append(getText(subnode));
-			}
-		}
-		return result.toString().trim();
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DNetClaimToHbaseXsltFunctions.java
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DNetClaimToHbaseXsltFunctions.java	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/src/main/java/eu/dnetlib/data/transform/xml/DNetClaimToHbaseXsltFunctions.java	(nonexistent)
@@ -1,47 +0,0 @@
-package eu.dnetlib.data.transform.xml;
-
-import org.w3c.dom.NodeList;
-
-public class DNetClaimToHbaseXsltFunctions extends DmfToHbaseXsltFunctions {
-
-	public static final String DEFAULT_TRUST = "0.9";
-	public static final String DEFAULT_PROVENANCE = "user:claim:search";
-
-	// dnet:oafPersonResultFromMDStore($resultId, $oafPerson, position())
-	public static String oafPersonResult_Authorship_FromClaim(final String personId, final String resultId, final int rank, final String relClass) {
-		return oafPersonResult_Authorship_FromDMF(personId, resultId, rank, relClass, DEFAULT_PROVENANCE, DEFAULT_TRUST);
-	}
-
-	// dnet:oafPersonResultFromMDStore($resultId, $oafPerson, position())
-	public static String oafPersonPerson_CoAuthorship_FromClaim(final String source, final String target, final String relClass) {
-		return oafPersonPerson_CoAuthorship_FromDMF(source, target, relClass, DEFAULT_PROVENANCE, DEFAULT_TRUST);
-	}
-
-	// dnet:oafResultProjectFromMDStore($resultId, $projectId)
-	public static String oafResultProject_Outcome_FromClaim(final String sourceId, final String targetId, final String relClass) {
-		return oafResultProject_Outcome_FromDMF(sourceId, targetId, relClass, DEFAULT_PROVENANCE, DEFAULT_TRUST);
-	}
-
-	// dnet:oafPersonFromMDStore($personId, .)
-	public static String oafPerson_FromClaim(final String personId,
-			final String collectedFromId,
-			final String collectedFromName,
-			final String originalId,
-			final String dateOfCollection,
-			final String fullname) {
-		return oafPerson_FromDMF(personId, fullname, DEFAULT_PROVENANCE, DEFAULT_TRUST, collectedFromId, collectedFromName, originalId, dateOfCollection);
-	}
-
-	public static String oafResult_FromClaim(final String resultId,
-			final String hostedbyId,
-			final String hostedbyName,
-			final String collectedFromId,
-			final String collectedFromName,
-			final String originalId,
-			final String dateOfCollection,
-			final NodeList nodelist) {
-		return oafResult_FromDMF(resultId, DEFAULT_PROVENANCE, DEFAULT_TRUST, hostedbyId, hostedbyName, collectedFromId, collectedFromName, originalId,
-				dateOfCollection, nodelist);
-	}
-
-}
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2/pom.xml
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2/pom.xml	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2/pom.xml	(nonexistent)
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<parent>
-		<groupId>eu.dnetlib</groupId>
-		<artifactId>dnet-hadoop-parent</artifactId>
-		<version>1.0.0-SNAPSHOT</version>
-		<relativePath></relativePath>
-	</parent>
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>eu.dnetlib</groupId>
-	<artifactId>dnet-openaireplus-mapping-utils</artifactId>
-	<packaging>jar</packaging>
-	<version>2.2.0-SNAPSHOT</version>
-	<dependencies>
-		<dependency>
-			<groupId>com.google.guava</groupId>
-			<artifactId>guava</artifactId>
-			<version>${google.guava.version}</version>
-		</dependency>		
-		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
-			<version>${junit.version}</version>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>commons-codec</groupId>
-			<artifactId>commons-codec</artifactId>
-			<version>${commons.codec.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>dom4j</groupId>
-			<artifactId>dom4j</artifactId>
-			<version>1.6</version>
-		</dependency>
-		<dependency>
-			<groupId>eu.dnetlib</groupId>
-			<artifactId>dnet-openaire-data-protos</artifactId>
-			<version>[3.1.0-SNAPSHOT]</version>
-		</dependency>
-		<dependency>
-			<groupId>eu.dnetlib</groupId>
-			<artifactId>dnet-pace-core</artifactId>
-			<version>[1.2.0-SNAPSHOT]</version>
-		</dependency>
-		<dependency>
-			<groupId>eu.dnetlib</groupId>
-			<artifactId>cnr-misc-utils</artifactId>
-			<version>[1.0.0-SNAPSHOT]</version>
-		</dependency>
-		<dependency>
-			<groupId>eu.dnetlib</groupId>
-			<artifactId>dnet-hadoop-commons</artifactId>
-			<version>[1.0.0-SNAPSHOT]</version>
-		</dependency>					
-	</dependencies>
-</project>
Index: modules/dnet-openaireplus-mapping-utils/branches/2.2
===================================================================
--- modules/dnet-openaireplus-mapping-utils/branches/2.2	(revision 52198)
+++ modules/dnet-openaireplus-mapping-utils/branches/2.2	(nonexistent)

Property changes on: modules/dnet-openaireplus-mapping-utils/branches/2.2
___________________________________________________________________
Deleted: svn:ignore
## -1,5 +0,0 ##
-.project
-.classpath
-target
-testbin
-.settings
