Project

General

Profile

« Previous | Next » 

Revision 53983

added test to verify the parsing of EPMC record

View differences:

modules/dnet-mapreduce-jobs/branches/master/src/test/java/eu/dnetlib/data/transform/XsltRowTransformerFactoryTest.java
85 85
	}
86 86

  
87 87
	@Test
88
	public void testParseEPMC() throws Exception {
89

  
90
		doTest(loadFromTransformationProfile("oaf2hbase.xml"), load("epmc.xml"));
91
	}
92

  
93
	@Test
88 94
	public void testParseRecordCrossref() throws Exception {
89 95

  
90 96
		doTest(loadFromTransformationProfile("oaf2hbase.xml"), load("recordCrossref.xml"));
modules/dnet-mapreduce-jobs/branches/master/src/test/resources/eu/dnetlib/data/transform/epmc.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<record xmlns:dc="http://purl.org/dc/elements/1.1/"
3
        xmlns:dr="http://www.driver-repository.eu/namespace/dr"
4
        xmlns:dri="http://www.driver-repository.eu/namespace/dri"
5
        xmlns:oaf="http://namespace.openaire.eu/oaf"
6
        xmlns:oai="http://www.openarchives.org/OAI/2.0/"
7
        xmlns:prov="http://www.openarchives.org/OAI/2.0/provenance"
8
        xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
9
    <header xmlns="http://namespace.openaire.eu/">
10
        <dri:objIdentifier>od_______908::00000cb1add990c8f8d9e985215022bb</dri:objIdentifier>
11
        <dri:recordIdentifier>oai:europepmc.org:3384469</dri:recordIdentifier>
12
        <dri:dateOfCollection/>
13
        <dri:mdFormat/>
14
        <dri:mdFormatInterpretation/>
15
        <dri:repositoryId>4fd8cd43-226c-408b-8401-0840456a678a_UmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=</dri:repositoryId>
16
        <dr:objectIdentifier/>
17
        <dr:dateOfCollection>2015-07-08T21:16:52.72Z</dr:dateOfCollection>
18
        <dr:dateOfTransformation>2018-03-02T14:19:34.265Z</dr:dateOfTransformation>
19
        <oaf:datasourceprefix>od_______908</oaf:datasourceprefix>
20
    </header>
21
    <metadata xmlns="http://namespace.openaire.eu/">
22
        <dc:title>Healthier happier children</dc:title>
23
        <dc:creator>Dunsford, Elizabeth</dc:creator>
24
        <dc:date>2008</dc:date>
25
        <dc:description/>
26
        <dc:identifier>http://europepmc.org/articles/PMC4212736</dc:identifier>
27
        <dc:language>eng</dc:language>
28
        <dc:publisher>Radcliffe Publishing Ltd.</dc:publisher>
29
        <dc:subject>Commentary – Alma Ata</dc:subject>
30
        <dc:rights>© 2008 Royal College of General Practitioners</dc:rights>
31
        <dc:type>Text</dc:type>
32
        <dr:CobjCategory>0001</dr:CobjCategory>
33
        <oaf:dateAccepted>2008-01-01</oaf:dateAccepted>
34
        <oaf:projectid/>
35
        <oaf:collectedDatasourceid>opendoar____::908</oaf:collectedDatasourceid>
36
        <oaf:accessrights>OPEN</oaf:accessrights>
37
        <oaf:hostedBy id="opendoar____::908" name="Europe PubMed Central"/>
38
        <oaf:collectedFrom id="opendoar____::908" name="Europe PubMed Central"/>
39
        <oaf:identifier identifierType="pmc">PMC4212736</oaf:identifier>
40
        <oaf:identifier identifierType="doi"/>
41
    </metadata>
42
    <about xmlns="http://namespace.openaire.eu/">
43
        <provenance xmlns="http://www.openarchives.org/OAI/2.0/provenance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/provenance http://www.openarchives.org/OAI/2.0/provenance.xsd">
44
            <originDescription altered="true" harvestDate="2015-07-08T21:16:52.72Z">
45
                <baseURL>file:///mnt/harvested_pdfs/od_______908_epmc/mergedrecs_epmc_dc_harvdate_08072015.xml.gz</baseURL>
46
                <identifier>oai:europepmc.org:3384469</identifier>
47
                <datestamp>2015-05-07</datestamp>
48
                <metadataNamespace/>
49
            </originDescription>
50
        </provenance>
51
        <oaf:datainfo>
52
            <oaf:inferred>false</oaf:inferred>
53
            <oaf:deletedbyinference>false</oaf:deletedbyinference>
54
            <oaf:trust>0.9</oaf:trust>
55
            <oaf:inferenceprovenance/>
56
            <oaf:provenanceaction classid="sysimport:crosswalk:repository"
57
                                  classname="sysimport:crosswalk:repository"
58
                                  schemeid="dnet:provenanceActions" schemename="dnet:provenanceActions"/>
59
        </oaf:datainfo>
60
    </about>
61
</record>

Also available in: Unified diff