Project

General

Profile

« Previous | Next » 

Revision 52275

Test for collected external references

View differences:

modules/dnet-mapreduce-jobs/branches/beta/src/test/java/eu/dnetlib/data/transform/XsltRowTransformerFactoryTest.java
398 398
		printAll(mapAll(buildTable(rows)));
399 399
	}
400 400

  
401
	@Test
402
	public void testParseOafWithExternalRef() throws Exception {
403
		final List<Row> rows = Lists.newArrayList();
404
		rows.addAll(asRows(loadFromTransformationProfile("oaf2hbase.xml"), load("oafWithExternalReference.xml")));
405
		printAll(mapAll(buildTable(rows)));
406
	}
407

  
401 408
	private void doTest(final InputStream xsltStream, final InputStream recordStream) throws Exception {
402 409
		try {
403 410
			final List<Row> rows = asRows(xsltStream, recordStream);
modules/dnet-mapreduce-jobs/branches/beta/src/test/resources/eu/dnetlib/data/transform/oafWithExternalReference.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
        >
7
    <header xmlns="http://namespace.openaire.eu/">
8
        <dri:objIdentifier>acm_________::02a8fbd0aa341df6dbb8323f453091f8</dri:objIdentifier>
9
        <dri:recordIdentifier>2043516</dri:recordIdentifier>
10
        <dri:dateOfCollection/>
11
        <dri:mdFormat/>
12
        <dri:mdFormatInterpretation/>
13
        <dri:repositoryId/>
14
        <dr:objectIdentifier/>
15
        <dr:dateOfCollection>2015-01-20T00:00:00Z</dr:dateOfCollection>
16
        <oaf:datasourceprefix>openaire____</oaf:datasourceprefix>
17
    </header>
18
    <metadata xmlns="http://namespace.openaire.eu/">
19
        <dc:title>Traffic-centric modeling of future wireless internet access technologies</dc:title>
20
        <dc:creator>Paolo Pileggi</dc:creator>
21
        <dc:creator>Giuseppe Bianchi</dc:creator>
22
        <dc:date/>
23
        <dc:identifier>http://dl.acm.org/citation.cfm?id=2043516</dc:identifier>
24
        <dc:language>und</dc:language>
25
        <dc:type/>
26
       <!-- <dr:CobjCategory>0001</dr:CobjCategory>-->
27
	    <dr:CobjCategory type="other">method</dr:CobjCategory>
28
	<dr:CobjIdentifier/>
29
        <oaf:dateAccepted>2011-09-06</oaf:dateAccepted>
30
        <oaf:embargoenddate/>
31
        <oaf:accessrights>CLOSED</oaf:accessrights>
32
        <oaf:hostedBy id="openaire____::acm" name="ACM Digital Library"/>
33
        <oaf:collectedFrom id="openaire____::acm" name="ACM Digital Library"/>
34
        <oaf:identifier identifierType="doi"/>
35
	    <!--
36
	    <oaf:reference type="accessionNumber" source="Protein Data Bank" identifier="3a98" title="the label" query="the query">http://www.rcsb.org/pdb/explore/explore.do?structureId=3a98</oaf:reference>
37
	    -->
38
	    <oaf:reference type="accessionNumber" source="Protein Data Bank">http://www.rcsb.org/pdb/explore/explore.do?structureId=3a98</oaf:reference>
39

  
40
    </metadata>
41
    <about>
42
        <oaf:datainfo>
43
            <oaf:inferred>false</oaf:inferred>
44
            <oaf:deletedbyinference>false</oaf:deletedbyinference>
45
            <oaf:trust>0.9</oaf:trust>
46
            <oaf:inferenceprovenance/>
47
            <oaf:provenanceaction classid="sysimport:mining:repository"
48
                                  classname="sysimport:mining:repository"
49
                                  schemeid="dnet:provenanceActions" schemename="dnet:provenanceActions"/>
50
        </oaf:datainfo>
51
    </about>
52
</record>

Also available in: Unified diff