Revision 52212
Added by Alessia Bardi over 6 years ago
modules/dnet-mapreduce-jobs/branches/beta/src/test/resources/eu/dnetlib/data/transform/recordOAFsoftware.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>0021</dr:CobjCategory> |
|
27 |
<dr:CobjIdentifier/> |
|
28 |
<oaf:dateAccepted>2011-09-06</oaf:dateAccepted> |
|
29 |
<oaf:embargoenddate/> |
|
30 |
<oaf:accessrights>CLOSED</oaf:accessrights> |
|
31 |
<oaf:hostedBy id="openaire____::acm" name="ACM Digital Library"/> |
|
32 |
<oaf:collectedFrom id="openaire____::acm" name="ACM Digital Library"/> |
|
33 |
<oaf:identifier identifierType="doi"/> |
|
34 |
</metadata> |
|
35 |
<about> |
|
36 |
<oaf:datainfo> |
|
37 |
<oaf:inferred>false</oaf:inferred> |
|
38 |
<oaf:deletedbyinference>false</oaf:deletedbyinference> |
|
39 |
<oaf:trust>0.9</oaf:trust> |
|
40 |
<oaf:inferenceprovenance/> |
|
41 |
<oaf:provenanceaction classid="sysimport:mining:repository" |
|
42 |
classname="sysimport:mining:repository" |
|
43 |
schemeid="dnet:provenanceActions" schemename="dnet:provenanceActions"/> |
|
44 |
</oaf:datainfo> |
|
45 |
</about> |
|
46 |
</record> |
modules/dnet-mapreduce-jobs/branches/beta/src/test/java/eu/dnetlib/data/transform/XsltRowTransformerFactoryTest.java | ||
---|---|---|
384 | 384 |
printAll(mapAll(buildTable(rows))); |
385 | 385 |
} |
386 | 386 |
|
387 |
@Test(expected = AssertionError.class)
|
|
387 |
@Test |
|
388 | 388 |
public void testParseSoftwareFromOAF() throws Exception { |
389 | 389 |
final List<Row> rows = Lists.newArrayList(); |
390 |
rows.addAll(asRows(loadFromTransformationProfile("oaf2hbase.xml"), load("recordOAFsoftware.xml"))); |
|
390 |
rows.addAll(asRows(loadFromTransformationProfile("oaf2hbase.xml"), load("recordOAFsoftwareCLOSED.xml")));
|
|
391 | 391 |
printAll(mapAll(buildTable(rows))); |
392 | 392 |
} |
393 | 393 |
|
394 |
@Test |
|
395 |
public void testParseSoftwareFromOAFOpen() throws Exception { |
|
396 |
final List<Row> rows = Lists.newArrayList(); |
|
397 |
rows.addAll(asRows(loadFromTransformationProfile("oaf2hbase.xml"), load("recordOAFsoftwareOPEN.xml"))); |
|
398 |
printAll(mapAll(buildTable(rows))); |
|
399 |
} |
|
400 |
|
|
394 | 401 |
private void doTest(final InputStream xsltStream, final InputStream recordStream) throws Exception { |
395 | 402 |
try { |
396 | 403 |
final List<Row> rows = asRows(xsltStream, recordStream); |
modules/dnet-mapreduce-jobs/branches/beta/src/test/resources/eu/dnetlib/data/transform/recordOAFsoftwareCLOSED.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>0029</dr:CobjCategory> |
|
27 |
<dr:CobjIdentifier/> |
|
28 |
<oaf:dateAccepted>2011-09-06</oaf:dateAccepted> |
|
29 |
<oaf:embargoenddate/> |
|
30 |
<oaf:accessrights>CLOSED</oaf:accessrights> |
|
31 |
<oaf:hostedBy id="openaire____::acm" name="ACM Digital Library"/> |
|
32 |
<oaf:collectedFrom id="openaire____::acm" name="ACM Digital Library"/> |
|
33 |
<oaf:identifier identifierType="doi"/> |
|
34 |
</metadata> |
|
35 |
<about> |
|
36 |
<oaf:datainfo> |
|
37 |
<oaf:inferred>false</oaf:inferred> |
|
38 |
<oaf:deletedbyinference>false</oaf:deletedbyinference> |
|
39 |
<oaf:trust>0.9</oaf:trust> |
|
40 |
<oaf:inferenceprovenance/> |
|
41 |
<oaf:provenanceaction classid="sysimport:mining:repository" |
|
42 |
classname="sysimport:mining:repository" |
|
43 |
schemeid="dnet:provenanceActions" schemename="dnet:provenanceActions"/> |
|
44 |
</oaf:datainfo> |
|
45 |
</about> |
|
46 |
</record> |
modules/dnet-mapreduce-jobs/branches/beta/src/test/resources/eu/dnetlib/data/transform/recordOAFsoftwareOPEN.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>0029</dr:CobjCategory> |
|
27 |
<dr:CobjIdentifier/> |
|
28 |
<oaf:dateAccepted>2011-09-06</oaf:dateAccepted> |
|
29 |
<oaf:embargoenddate/> |
|
30 |
<oaf:accessrights>OPEN SOURCE</oaf:accessrights> |
|
31 |
<oaf:hostedBy id="openaire____::acm" name="ACM Digital Library"/> |
|
32 |
<oaf:collectedFrom id="openaire____::acm" name="ACM Digital Library"/> |
|
33 |
<oaf:identifier identifierType="doi"/> |
|
34 |
</metadata> |
|
35 |
<about> |
|
36 |
<oaf:datainfo> |
|
37 |
<oaf:inferred>false</oaf:inferred> |
|
38 |
<oaf:deletedbyinference>false</oaf:deletedbyinference> |
|
39 |
<oaf:trust>0.9</oaf:trust> |
|
40 |
<oaf:inferenceprovenance/> |
|
41 |
<oaf:provenanceaction classid="sysimport:mining:repository" |
|
42 |
classname="sysimport:mining:repository" |
|
43 |
schemeid="dnet:provenanceActions" schemename="dnet:provenanceActions"/> |
|
44 |
</oaf:datainfo> |
|
45 |
</about> |
|
46 |
</record> |
modules/dnet-mapreduce-jobs/branches/beta/src/main/java/eu/dnetlib/data/mapreduce/util/LicenseComparator.java | ||
---|---|---|
18 | 18 |
|
19 | 19 |
if (lClass.equals(rClass)) return 0; |
20 | 20 |
|
21 |
if (lClass.equals("OPEN SOURCE")) return -1; |
|
22 |
if (rClass.equals("OPEN SOURCE")) return 1; |
|
23 |
|
|
21 | 24 |
if (lClass.equals("OPEN")) return -1; |
22 | 25 |
if (rClass.equals("OPEN")) return 1; |
23 | 26 |
|
Also available in: Unified diff
Including Open SOurce among the licenses