1
|
<RESOURCE_PROFILE>
|
2
|
<HEADER>
|
3
|
<RESOURCE_IDENTIFIER value="8c64ef19-449e-45fd-a70b-1af37b9cd10b_VHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZXMvVHJhbnNmb3JtYXRpb25SdWxlRFNSZXNvdXJjZVR5cGU="/>
|
4
|
<RESOURCE_TYPE value="TransformationRuleDSResourceType"/>
|
5
|
<RESOURCE_KIND value="TransformationRuleDSResources"/>
|
6
|
<RESOURCE_URI value=""/>
|
7
|
<DATE_OF_CREATION value="2015-06-19T15:27:44+02:00"/>
|
8
|
</HEADER>
|
9
|
<BODY>
|
10
|
<CONFIGURATION>
|
11
|
<IMPORTED/>
|
12
|
<SCRIPT>
|
13
|
<TITLE>nlm2oaf_cleaning_OPENAIREplus</TITLE>
|
14
|
<CODE>declare_script "nlm2oaf_cleaning_OpenAIREplus";
|
15
|
declare_ns oaf = "http://namespace.openaire.eu/oaf";
|
16
|
declare_ns dri = "http://www.driver-repository.eu/namespace/dri";
|
17
|
declare_ns dr = "http://www.driver-repository.eu/namespace/dr";
|
18
|
declare_ns dc = "http://purl.org/dc/elements/1.1/";
|
19
|
$var0 = "''";
|
20
|
$var1 = "'corda_______::'";
|
21
|
$varDummy = "''";
|
22
|
static $varDatasourceid = getValue(PROFILEFIELD, [xpath:"//dri:repositoryId", xpath:"//EXTRA_FIELDS/FIELD[key='OpenAireDataSourceId']/value"]);
|
23
|
static $varRepoid = xpath:"//dri:repositoryId";
|
24
|
static $varOfficialname = getValue(PROFILEFIELD, [xpath:"//dri:repositoryId", xpath:"//OFFICIAL_NAME"]);
|
25
|
dri:objIdentifier = xpath:"//dri:objIdentifier";
|
26
|
dri:repositoryId = $varRepoid;
|
27
|
dri:recordIdentifier = xpath:"//dri:recordIdentifier";
|
28
|
apply xpath:"//article-meta//contrib[@contrib-type='author']/name" if xpath:"true()" dc:creator = xpath:"concat(./surname, ', ', ./given-names)"; else $varDummy = "''";
|
29
|
dc:title = xpath:"//article-meta/title-group/article-title";
|
30
|
apply xpath:"//article-meta//subj-group[@subj-group-type='heading']" if xpath:"true()" dc:subject = xpath:"normalize-space(./subject)"; else $varDummy = "''";
|
31
|
apply xpath:"//article-meta/kwd-group/kwd" if xpath:"true()" dc:subject = xpath:"normalize-space(.)"; else $varDummy = "''";
|
32
|
dc:publisher = xpath:"normalize-space(//journal-meta/publisher/publisher-name)";
|
33
|
dc:description = xpath:"//article-meta/abstract";
|
34
|
$varDoi = xpath:"//article-meta/article-id[@pub-id-type='doi']";
|
35
|
dc:identifier = xpath:"concat('http://dx.doi.org/', $varDoi)";
|
36
|
static dr:dateOfCollection = getValue(CURRENTDATE, []);
|
37
|
// dc:type = xpath:"//dc:type";
|
38
|
//dc:language = Convert(xpath:"//dc:language", Languages);
|
39
|
dc:language = "eng";
|
40
|
$varDateEpub = xpath:"//article-meta/pub-date[@pub-type='epub']";
|
41
|
oaf:dateAccepted = xpath:"concat($varDateEpub/year, '-', $varDateEpub/month, '-', $varDateEpub/day)";
|
42
|
//
|
43
|
//oaf:collectedDatasourceid = getValue(PROFILEFIELD, [xpath:"//dri:repositoryId", xpath:"//EXTRA_FIELDS/FIELD[key='OpenAireDataSourceId']/value"]);
|
44
|
//
|
45
|
dr:CobjCategory = "0001";
|
46
|
oaf:accessrights = "OPEN";
|
47
|
//
|
48
|
static oaf:collectedFrom = set("''", @name = $varOfficialname; , @id = $varDatasourceid;);
|
49
|
static oaf:hostedBy = set("''", @name = $varOfficialname; , @id = $varDatasourceid;);
|
50
|
//
|
51
|
oaf:identifier = set($varDoi, @identifierType = "doi";);
|
52
|
oaf:datasourceprefix = xpath:"//oaf:datasourceprefix";
|
53
|
$varJournal = xpath:"//journal-meta/journal-title";
|
54
|
$varEissn = xpath:"//journal-meta/issn[@pub-type='epub']";
|
55
|
$varVolume = xpath:"//article-meta/volume";
|
56
|
//$varStartPage = xpath:"//amf:serial/amf:startpage";
|
57
|
//$varEndPage = xpath:"//amf:serial/amf:endpage";
|
58
|
//$varIssue = xpath:"//amf:serial/amf:issue";
|
59
|
// $varIssue = "";
|
60
|
// oaf:journal = set($varJournal, @vol = $varVolume;, @iss =$varIssue;, @sp= $varStartPage;, @ep= $varEndPage;, @issn = xpath:"./@issn";, @eissn = xpath:"./@eissn";);
|
61
|
oaf:journal = set($varJournal, @vol = $varVolume;, @issn = $varEissn;, @eissn = $varEissn;);
|
62
|
end</CODE>
|
63
|
</SCRIPT>
|
64
|
</CONFIGURATION>
|
65
|
<STATUS/>
|
66
|
<SECURITY_PARAMETERS/>
|
67
|
</BODY>
|
68
|
</RESOURCE_PROFILE>
|