Revision 49580
Added by Sandro La Bruzzo over 6 years ago
modules/dnet-dli/trunk/src/main/resources/eu/dnetlib/bootstrap/profiles/workflows/closeMesh.xml | ||
---|---|---|
1 |
<RESOURCE_PROFILE> |
|
2 |
<HEADER> |
|
3 |
<RESOURCE_IDENTIFIER |
|
4 |
value="70274106-375d-4135-9de1-536a606b327b_V29ya2Zsb3dUZW1wbGF0ZURTUmVzb3VyY2VzL1dvcmtmbG93VGVtcGxhdGVEU1Jlc291cmNlVHlwZQ=="/> |
|
5 |
<RESOURCE_TYPE value="WorkflowTemplateDSResourceType"/> |
|
6 |
<RESOURCE_KIND value="WorkflowTemplateDSResources"/> |
|
7 |
<RESOURCE_URI value=""/> |
|
8 |
<DATE_OF_CREATION value="2017-02-27T14:05:24+01:00"/> |
|
9 |
</HEADER> |
|
10 |
<BODY> |
|
11 |
<CONFIGURATION> |
|
12 |
<PARAMETERS> |
|
13 |
<PARAM description="HBase table name" name="hbaseTable" required="true" type="string"/> |
|
14 |
<PARAM description="Hadoop cluster name" name="cluster" required="true" type="string"/> |
|
15 |
<PARAM description="minDist algorithm work directory" name="workDir" required="true" type="string"/> |
|
16 |
<PARAM description="csv list of action sets to be promoted" name="actionSets" required="true" |
|
17 |
type="string"/> |
|
18 |
<PARAM default="organization,result" |
|
19 |
description="list of entity names to be considered by the algorithm" name="entitySequence" |
|
20 |
required="true" type="string"/> |
|
21 |
</PARAMETERS> |
|
22 |
<WORKFLOW> |
|
23 |
<NODE isStart="true" name="fetchOntologies" type="FetchOntologies"> |
|
24 |
<DESCRIPTION/> |
|
25 |
<PARAMETERS> |
|
26 |
<PARAM name="ontologiesParamName" value="ontologies"/> |
|
27 |
</PARAMETERS> |
|
28 |
<ARCS> |
|
29 |
<ARC to="promoteActions"/> |
|
30 |
</ARCS> |
|
31 |
</NODE> |
|
32 |
<NODE name="promoteActions" type="PromoteActionsHDFS"> |
|
33 |
<DESCRIPTION>Promote Actions</DESCRIPTION> |
|
34 |
<PARAMETERS> |
|
35 |
<PARAM name="set" ref="actionSets"/> |
|
36 |
<PARAM name="tableName" ref="hbaseTable"/> |
|
37 |
</PARAMETERS> |
|
38 |
<ARCS> |
|
39 |
<ARC to="entitySequence"/> |
|
40 |
</ARCS> |
|
41 |
</NODE> |
|
42 |
<NODE name="entitySequence" type="CheckEntitySequenceJob"> |
|
43 |
<DESCRIPTION>Check entity sequence</DESCRIPTION> |
|
44 |
<PARAMETERS> |
|
45 |
<PARAM name="entitySequence" ref="entitySequence"/> |
|
46 |
<PARAM name="dedupConfigSequenceParam" value="dedup.conf.queue"/> |
|
47 |
<PARAM name="entityTypeNameParam" value="dedup.entity.name"/> |
|
48 |
<PARAM name="entityTypeIdParam" value="dedup.entity.id"/> |
|
49 |
<PARAM name="actionSetParam" value="actionset"/> |
|
50 |
</PARAMETERS> |
|
51 |
<ARCS> |
|
52 |
<ARC to="resetPath"/> |
|
53 |
<ARC name="done" to="success"/> |
|
54 |
</ARCS> |
|
55 |
</NODE> |
|
56 |
<NODE name="resetPath" type="CreateHdfsDirJob"> |
|
57 |
<DESCRIPTION>input files cleanup</DESCRIPTION> |
|
58 |
<PARAMETERS> |
|
59 |
<PARAM name="force" value="true"/> |
|
60 |
<PARAM name="path" ref="workDir"/> |
|
61 |
<PARAM name="cluster" ref="cluster"/> |
|
62 |
</PARAMETERS> |
|
63 |
<ARCS> |
|
64 |
<ARC to="mindist"/> |
|
65 |
</ARCS> |
|
66 |
</NODE> |
|
67 |
<NODE name="mindist" type="MinDistSearchHadoopJob"> |
|
68 |
<DESCRIPTION>find the minimum vertex in each adjacency lists</DESCRIPTION> |
|
69 |
<PARAMETERS> |
|
70 |
<PARAM name="debug" value="false"/> |
|
71 |
<PARAM name="cluster" ref="cluster"/> |
|
72 |
<PARAM name="outPathParam" value="outputPath"/> |
|
73 |
<PARAM env="actionset" name="dedupConfigSequence"/> |
|
74 |
<PARAM name="workDir" ref="workDir"/> |
|
75 |
<PARAM name="jobParams"> |
|
76 |
<MAP> |
|
77 |
<ENTRY key="cluster" ref="cluster"/> |
|
78 |
<ENTRY env="dedup.entity.id" key="entityTypeId"/> |
|
79 |
<ENTRY key="hbase.mapred.inputtable" ref="hbaseTable"/> |
|
80 |
<ENTRY key="hbase.mapreduce.inputtable" ref="hbaseTable"/> |
|
81 |
</MAP> |
|
82 |
</PARAM> |
|
83 |
</PARAMETERS> |
|
84 |
<ARCS> |
|
85 |
<ARC name="depth_n" to="mindist"/> |
|
86 |
<ARC to="components"/> |
|
87 |
</ARCS> |
|
88 |
</NODE> |
|
89 |
<NODE name="components" type="DedupConfigurationLoaderJob"> |
|
90 |
<DESCRIPTION>joins all the vertex ids to build the connected components in the graph</DESCRIPTION> |
|
91 |
<PARAMETERS> |
|
92 |
<PARAM name="hadoopJob" value="connectedComponentsJob"/> |
|
93 |
<PARAM env="actionset" name="dedupConfigSequence"/> |
|
94 |
<PARAM name="cluster" ref="cluster"/> |
|
95 |
<PARAM name="jobParams"> |
|
96 |
<MAP> |
|
97 |
<ENTRY key="hbase.mapred.outputtable" ref="hbaseTable"/> |
|
98 |
<ENTRY key="hbase.mapreduce.outputtable" ref="hbaseTable"/> |
|
99 |
<ENTRY env="dedup.entity.name" key="entityType"/> |
|
100 |
<ENTRY env="dedup.entity.id" key="entityTypeId"/> |
|
101 |
<ENTRY env="outputPath" key="mapred.input.dir"/> |
|
102 |
</MAP> |
|
103 |
</PARAM> |
|
104 |
</PARAMETERS> |
|
105 |
<ARCS> |
|
106 |
<ARC to="markDeleted"/> |
|
107 |
</ARCS> |
|
108 |
</NODE> |
|
109 |
<NODE name="markDeleted" type="DedupConfigurationLoaderJob"> |
|
110 |
<DESCRIPTION>mark duplicates as deleted by inference</DESCRIPTION> |
|
111 |
<PARAMETERS> |
|
112 |
<PARAM name="hadoopJob" value="dedupMarkDeletedEntityJob"/> |
|
113 |
<PARAM env="actionset" name="dedupConfigSequence"/> |
|
114 |
<PARAM name="cluster" ref="cluster"/> |
|
115 |
<PARAM name="jobParams"> |
|
116 |
<MAP> |
|
117 |
<ENTRY key="hbase.mapred.inputtable" ref="hbaseTable"/> |
|
118 |
<ENTRY key="hbase.mapreduce.inputtable" ref="hbaseTable"/> |
|
119 |
<ENTRY key="hbase.mapred.outputtable" ref="hbaseTable"/> |
|
120 |
<ENTRY key="hbase.mapreduce.outputtable" ref="hbaseTable"/> |
|
121 |
<ENTRY env="dedup.entity.name" key="entityType"/> |
|
122 |
<ENTRY env="dedup.entity.id" key="entityTypeId"/> |
|
123 |
</MAP> |
|
124 |
</PARAM> |
|
125 |
</PARAMETERS> |
|
126 |
<ARCS> |
|
127 |
<ARC to="buildRoots"/> |
|
128 |
</ARCS> |
|
129 |
</NODE> |
|
130 |
<NODE name="buildRoots" type="DedupConfigurationLoaderJob"> |
|
131 |
<DESCRIPTION>redirect rels</DESCRIPTION> |
|
132 |
<PARAMETERS> |
|
133 |
<PARAM name="hadoopJob" value="dedupBuildRootsJob"/> |
|
134 |
<PARAM env="actionset" name="dedupConfigSequence"/> |
|
135 |
<PARAM name="cluster" ref="cluster"/> |
|
136 |
<PARAM name="jobParams"> |
|
137 |
<MAP> |
|
138 |
<ENTRY key="hbase.mapred.inputtable" ref="hbaseTable"/> |
|
139 |
<ENTRY key="hbase.mapred.outputtable" ref="hbaseTable"/> |
|
140 |
<ENTRY key="hbase.mapreduce.inputtable" ref="hbaseTable"/> |
|
141 |
<ENTRY key="hbase.mapreduce.outputtable" ref="hbaseTable"/> |
|
142 |
<ENTRY env="dedup.entity.name" key="entityType"/> |
|
143 |
<ENTRY env="dedup.entity.id" key="entityTypeId"/> |
|
144 |
<ENTRY env="ontologies" key="ontologies"/> |
|
145 |
</MAP> |
|
146 |
</PARAM> |
|
147 |
</PARAMETERS> |
|
148 |
<ARCS> |
|
149 |
<ARC to="mergeRels"/> |
|
150 |
</ARCS> |
|
151 |
</NODE> |
|
152 |
<NODE name="mergeRels" type="DedupConfigurationLoaderJob"> |
|
153 |
<DESCRIPTION>merge rels</DESCRIPTION> |
|
154 |
<PARAMETERS> |
|
155 |
<PARAM name="hadoopJob" value="mergeRelationVersionJob"/> |
|
156 |
<PARAM env="actionset" name="dedupConfigSequence"/> |
|
157 |
<PARAM name="cluster" ref="cluster"/> |
|
158 |
<PARAM name="jobParams"> |
|
159 |
<MAP> |
|
160 |
<ENTRY key="hbase.mapred.inputtable" ref="hbaseTable"/> |
|
161 |
<ENTRY key="hbase.mapred.outputtable" ref="hbaseTable"/> |
|
162 |
<ENTRY key="hbase.mapreduce.inputtable" ref="hbaseTable"/> |
|
163 |
<ENTRY key="hbase.mapreduce.outputtable" ref="hbaseTable"/> |
|
164 |
<ENTRY env="dedup.entity.name" key="entityType"/> |
|
165 |
<ENTRY env="dedup.entity.id" key="entityTypeId"/> |
|
166 |
<ENTRY env="ontologies" key="ontologies"/> |
|
167 |
</MAP> |
|
168 |
</PARAM> |
|
169 |
</PARAMETERS> |
|
170 |
<ARCS> |
|
171 |
<ARC to="entitySequence"/> |
|
172 |
</ARCS> |
|
173 |
</NODE> |
|
174 |
</WORKFLOW> |
|
175 |
</CONFIGURATION> |
|
176 |
</BODY> |
|
177 |
</RESOURCE_PROFILE> |
modules/dnet-dli/trunk/src/main/resources/eu/dnetlib/bootstrap/profiles/workflows/reset.hbase.xml | ||
---|---|---|
1 |
<RESOURCE_PROFILE> |
|
2 |
<HEADER> |
|
3 |
<RESOURCE_IDENTIFIER value="75345aba-c069-43f4-90aa-e13688d9845e_V29ya2Zsb3dUZW1wbGF0ZURTUmVzb3VyY2VzL1dvcmtmbG93VGVtcGxhdGVEU1Jlc291cmNlVHlwZQ=="/> |
|
4 |
<RESOURCE_TYPE value="WorkflowTemplateDSResourceType"/> |
|
5 |
<RESOURCE_KIND value="WorkflowTemplateDSResources"/> |
|
6 |
<RESOURCE_URI value=""/> |
|
7 |
<DATE_OF_CREATION value="2006-05-04T18:13:51.0Z"/> |
|
8 |
</HEADER> |
|
9 |
<BODY> |
|
10 |
<CONFIGURATION> |
|
11 |
|
|
12 |
<PARAMETERS> |
|
13 |
<PARAM name="table" description="HBase table to be dropped" required="true" type="string"/> |
|
14 |
<PARAM name="cluster" description="Hadoop cluster logical name" required="true" type="string"/> |
|
15 |
<PARAM name="reuseRegionInfo" description="Reuse table splits" required="true" type="boolean"/> |
|
16 |
|
|
17 |
<PARAM name="tableConf" description="HBase table configuration param name" type="string" default="hbase.table.conf"/> |
|
18 |
<PARAM name="tableColsParam" description="HBase table schema param name" type="string" default="hbase.table.cols"/> |
|
19 |
<PARAM name="tableCols" description="HBase table schema" type="string" default="metadata,rels"/> |
|
20 |
</PARAMETERS> |
|
21 |
|
|
22 |
<WORKFLOW> |
|
23 |
|
|
24 |
<NODE name="checkTable" type="CheckHBaseTable" isStart="true"> |
|
25 |
<DESCRIPTION>check hbase table</DESCRIPTION> |
|
26 |
<PARAMETERS> |
|
27 |
<PARAM name="tableName" ref="table"/> |
|
28 |
<PARAM name="cluster" ref="cluster"/> |
|
29 |
<PARAM name="tableConfigurationParamName" ref="tableConf"/> |
|
30 |
</PARAMETERS> |
|
31 |
<ARCS> |
|
32 |
<ARC to="drop" name="drop"/> |
|
33 |
<ARC to="define" name="define"/> |
|
34 |
</ARCS> |
|
35 |
</NODE> |
|
36 |
|
|
37 |
<NODE name="drop" type="DropHBaseTable"> |
|
38 |
<DESCRIPTION>drop hbase table</DESCRIPTION> |
|
39 |
<PARAMETERS> |
|
40 |
<PARAM name="tableName" ref="table"/> |
|
41 |
<PARAM name="cluster" ref="cluster"/> |
|
42 |
</PARAMETERS> |
|
43 |
<ARCS> |
|
44 |
<ARC to="define"/> |
|
45 |
</ARCS> |
|
46 |
</NODE> |
|
47 |
|
|
48 |
<NODE name="define" type="DefineHBaseSchema"> |
|
49 |
<DESCRIPTION>define hbase table</DESCRIPTION> |
|
50 |
<PARAMETERS> |
|
51 |
<PARAM name="tableColumnsParamName" ref="tableColsParam"/> |
|
52 |
<PARAM name="schema" ref="tableCols"/> |
|
53 |
<PARAM name="tableName" ref="table"/> |
|
54 |
<PARAM name="cluster" ref="cluster"/> |
|
55 |
</PARAMETERS> |
|
56 |
<ARCS> |
|
57 |
<ARC to="create"/> |
|
58 |
</ARCS> |
|
59 |
</NODE> |
|
60 |
<NODE name="create" type="CreateHBaseTable"> |
|
61 |
<DESCRIPTION>create hbase table</DESCRIPTION> |
|
62 |
<PARAMETERS> |
|
63 |
<PARAM name="tableName" ref="table"/> |
|
64 |
<PARAM name="cluster" ref="cluster"/> |
|
65 |
<PARAM name="tableColumnsParamName" ref="tableColsParam"/> |
|
66 |
<PARAM name="tableConfigurationParamName" ref="tableConf"/> |
|
67 |
<PARAM name="reuseRegionInfo" ref="reuseRegionInfo"/> |
|
68 |
</PARAMETERS> |
|
69 |
<ARCS> |
|
70 |
<ARC to="success"/> |
|
71 |
</ARCS> |
|
72 |
</NODE> |
|
73 |
|
|
74 |
</WORKFLOW> |
|
75 |
</CONFIGURATION> |
|
76 |
</BODY> |
|
77 |
</RESOURCE_PROFILE> |
modules/dnet-dli/trunk/src/main/resources/eu/dnetlib/bootstrap/profiles/workflows/fixRelation.xml | ||
---|---|---|
1 |
<RESOURCE_PROFILE> |
|
2 |
<HEADER> |
|
3 |
<RESOURCE_IDENTIFIER |
|
4 |
value="caee3f24-1756-4a96-a25d-7c1b01c8d172_V29ya2Zsb3dUZW1wbGF0ZURTUmVzb3VyY2VzL1dvcmtmbG93VGVtcGxhdGVEU1Jlc291cmNlVHlwZQ=="/> |
|
5 |
<RESOURCE_TYPE value="WorkflowTemplateDSResourceType"/> |
|
6 |
<RESOURCE_KIND value="WorkflowTemplateDSResources"/> |
|
7 |
<RESOURCE_URI value=""/> |
|
8 |
<DATE_OF_CREATION value="2006-05-04T18:13:51.0Z"/> |
|
9 |
</HEADER> |
|
10 |
<BODY> |
|
11 |
<CONFIGURATION> |
|
12 |
|
|
13 |
<PARAMETERS> |
|
14 |
<PARAM name="hbaseTable" description="HBase table name" required="true" type="string"/> |
|
15 |
<PARAM name="cluster" description="Hadoop cluster name" required="true" type="string"/> |
|
16 |
<PARAM name="workDir" description="minDist algorithm work directory" required="true" type="string"/> |
|
17 |
<PARAM name="actionSets" description="csv list of action sets to be promoted" required="true" |
|
18 |
type="string"/> |
|
19 |
<PARAM name="entitySequence" description="list of entity names to be considered by the algorithm" |
|
20 |
required="true" type="string" default="organization,result"/> |
|
21 |
</PARAMETERS> |
|
22 |
|
|
23 |
<WORKFLOW> |
|
24 |
<NODE name="fetchOntologies" type="FetchOntologies" isStart="true"> |
|
25 |
<DESCRIPTION/> |
|
26 |
<PARAMETERS> |
|
27 |
<PARAM name="ontologiesParamName" value="ontologies"/> |
|
28 |
</PARAMETERS> |
|
29 |
<ARCS> |
|
30 |
<ARC to="entitySequence"/> |
|
31 |
</ARCS> |
|
32 |
</NODE> |
|
33 |
|
|
34 |
<NODE name="entitySequence" type="CheckEntitySequenceJob"> |
|
35 |
<DESCRIPTION>Check entity sequence</DESCRIPTION> |
|
36 |
<PARAMETERS> |
|
37 |
<PARAM name="entitySequence" ref="entitySequence"/> |
|
38 |
<PARAM name="dedupConfigSequenceParam" value="dedup.conf.queue"/> |
|
39 |
<PARAM name="entityTypeNameParam" value="dedup.entity.name"/> |
|
40 |
<PARAM name="entityTypeIdParam" value="dedup.entity.id"/> |
|
41 |
<PARAM name="actionSetParam" value="actionset"/> |
|
42 |
</PARAMETERS> |
|
43 |
<ARCS> |
|
44 |
<ARC to="fixRels"/> |
|
45 |
<ARC name="done" to="success"/> |
|
46 |
</ARCS> |
|
47 |
</NODE> |
|
48 |
|
|
49 |
|
|
50 |
<NODE name="fixRels" type="DedupConfigurationLoaderJob"> |
|
51 |
<DESCRIPTION>fix rels</DESCRIPTION> |
|
52 |
<PARAMETERS> |
|
53 |
<PARAM name="hadoopJob" value="dedupFixRelationsJob"/> |
|
54 |
<PARAM name="dedupConfigSequence" env="actionset"/> |
|
55 |
<PARAM name="cluster" ref="cluster"/> |
|
56 |
<PARAM name="jobParams"> |
|
57 |
<MAP> |
|
58 |
<ENTRY key="hbase.mapred.inputtable" ref="hbaseTable"/> |
|
59 |
<ENTRY key="hbase.mapred.outputtable" ref="hbaseTable"/> |
|
60 |
<ENTRY key="hbase.mapreduce.inputtable" ref="hbaseTable"/> |
|
61 |
<ENTRY key="hbase.mapreduce.outputtable" ref="hbaseTable"/> |
|
62 |
<ENTRY key="entityType" env="dedup.entity.name"/> |
|
63 |
<ENTRY key="entityTypeId" env="dedup.entity.id"/> |
|
64 |
<ENTRY key="ontologies" env="ontologies"/> |
|
65 |
</MAP> |
|
66 |
</PARAM> |
|
67 |
</PARAMETERS> |
|
68 |
<ARCS> |
|
69 |
<ARC to="entitySequence"/> |
|
70 |
</ARCS> |
|
71 |
</NODE> |
|
72 |
|
|
73 |
</WORKFLOW> |
|
74 |
</CONFIGURATION> |
|
75 |
</BODY> |
|
76 |
</RESOURCE_PROFILE> |
modules/dnet-dli/trunk/src/main/resources/eu/dnetlib/bootstrap/profiles/workflows/dedup.dli.xml | ||
---|---|---|
1 |
<RESOURCE_PROFILE> |
|
2 |
<HEADER> |
|
3 |
<RESOURCE_IDENTIFIER value="01ed11e8-e874-4478-a8ac-83e63e9699e4_V29ya2Zsb3dUZW1wbGF0ZURTUmVzb3VyY2VzL1dvcmtmbG93VGVtcGxhdGVEU1Jlc291cmNlVHlwZQ=="/> |
|
4 |
<RESOURCE_TYPE value="WorkflowTemplateDSResourceType"/> |
|
5 |
<RESOURCE_KIND value="WorkflowTemplateDSResources"/> |
|
6 |
<RESOURCE_URI value=""/> |
|
7 |
<DATE_OF_CREATION value="2016-06-25T10:24:32+00:00"/> |
|
8 |
</HEADER> |
|
9 |
<BODY> |
|
10 |
<CONFIGURATION> |
|
11 |
|
|
12 |
<PARAMETERS> |
|
13 |
|
|
14 |
<PARAM name="hbaseTable" description="HBase table name" required="true" type="string"/> |
|
15 |
<PARAM name="cluster" description="Hadoop cluster name" required="true" type="string"/> |
|
16 |
|
|
17 |
<PARAM name="dedupConfigSequence" description="dedup configuration orchestration name" required="true" type="string"/> |
|
18 |
<PARAM name="minDistWorkDir" description="work directory for the minDist algorithm" required="true" type="string"/> |
|
19 |
|
|
20 |
<PARAM name="mdFormat" description="dedup index mdFormat" required="true" type="string" default="OPENAIRE"/> |
|
21 |
<PARAM name="layout" description="dedup index layout" required="true" type="string" default="index"/> |
|
22 |
<PARAM name="interpretation" description="dedup index interpretation" required="true" type="string" default="dedup"/> |
|
23 |
|
|
24 |
</PARAMETERS> |
|
25 |
|
|
26 |
<WORKFLOW> |
|
27 |
|
|
28 |
<NODE isStart="true" name="setDedupConfigs" type="SetDedupConfiguration"> |
|
29 |
<DESCRIPTION>Set Dedup conf</DESCRIPTION> |
|
30 |
<PARAMETERS> |
|
31 |
<PARAM name="dedupConfigSequence" ref="dedupConfigSequence"/> |
|
32 |
<PARAM name="dedupConfigSequenceParam" value="dedup.conf.queue"/> |
|
33 |
<PARAM name="entityTypeNameParam" value="entityType"/> |
|
34 |
<PARAM name="entityTypeIdParam" value="entityTypeId"/> |
|
35 |
</PARAMETERS> |
|
36 |
<ARCS> |
|
37 |
<ARC to="resetPath"/> |
|
38 |
</ARCS> |
|
39 |
</NODE> |
|
40 |
|
|
41 |
|
|
42 |
<NODE name="resetPath" type="CreateHdfsDirJob"> |
|
43 |
<DESCRIPTION>input files cleanup</DESCRIPTION> |
|
44 |
<PARAMETERS> |
|
45 |
<PARAM name="force" value="true"/> |
|
46 |
<PARAM name="path" ref="minDistWorkDir"/> |
|
47 |
<PARAM name="cluster" ref="cluster"/> |
|
48 |
</PARAMETERS> |
|
49 |
<ARCS> |
|
50 |
<ARC to="deduplicateScan"/> |
|
51 |
</ARCS> |
|
52 |
</NODE> |
|
53 |
|
|
54 |
|
|
55 |
<NODE name="deduplicateScan" type="DuplicateScanJob"> |
|
56 |
<DESCRIPTION>Dup Scan</DESCRIPTION> |
|
57 |
<PARAMETERS> |
|
58 |
<PARAM name="hadoopJob" value="dedupCandidateScanJob"/> |
|
59 |
<PARAM name="dedupConfigurationOrchestration" env="dedup.conf.queue"/> |
|
60 |
<PARAM name="jobParams"> |
|
61 |
<MAP> |
|
62 |
<ENTRY key="entityTypeId" env="entityTypeId"/> |
|
63 |
<ENTRY key="entityType" env="entityType"/> |
|
64 |
<ENTRY key="cluster" ref="cluster"/> |
|
65 |
<ENTRY key="hbase.mapred.inputtable" ref="hbaseTable"/> |
|
66 |
<ENTRY key="hbase.mapred.outputtable" ref="hbaseTable"/> |
|
67 |
<ENTRY key="hbase.mapreduce.inputtable" ref="hbaseTable"/> |
|
68 |
<ENTRY key="hbase.mapreduce.outputtable" ref="hbaseTable"/> |
|
69 |
</MAP> |
|
70 |
</PARAM> |
|
71 |
</PARAMETERS> |
|
72 |
<ARCS> |
|
73 |
<ARC to="deduplicateScan"/> |
|
74 |
<ARC name="done" to="prepareActionSet"/> |
|
75 |
<ARC name="no_dedup" to="doneActions"/> |
|
76 |
</ARCS> |
|
77 |
</NODE> |
|
78 |
|
|
79 |
<NODE name="prepareActionSet" type="PrepareConfiguredActionSet"> |
|
80 |
<DESCRIPTION>prepare action sets</DESCRIPTION> |
|
81 |
<PARAMETERS> |
|
82 |
<PARAM name="dedupConfigSequence" ref="dedupConfigSequence"/> |
|
83 |
<PARAM name="jobProperty" value="rawSetId"/> |
|
84 |
<PARAM name="actionSetPathParam" value="actionSetPath"/> |
|
85 |
<PARAM name="setsParam" value="sets"/> |
|
86 |
</PARAMETERS> |
|
87 |
<ARCS> |
|
88 |
<ARC to="similarity2actions"/> |
|
89 |
</ARCS> |
|
90 |
</NODE> |
|
91 |
|
|
92 |
<NODE name="similarity2actions" type="DedupSimilarityToActions"> |
|
93 |
<DESCRIPTION>export the similarity rels as Actions</DESCRIPTION> |
|
94 |
<PARAMETERS> |
|
95 |
<PARAM name="hadoopJob" value="dedupSimilarity2HdfsActionsJob"/> |
|
96 |
<PARAM name="dedupConfigSequence" ref="dedupConfigSequence"/> |
|
97 |
<PARAM name="entityType" env="entityType"/> |
|
98 |
<PARAM name="jobParams"> |
|
99 |
<MAP> |
|
100 |
<ENTRY key="dedup.conf" env="dedup.conf"/> |
|
101 |
<ENTRY key="entityTypeId" env="entityTypeId"/> |
|
102 |
<ENTRY key="entityType" env="entityType"/> |
|
103 |
<ENTRY key="cluster" ref="cluster"/> |
|
104 |
<ENTRY key="rawSetId" env="rawSetId"/> |
|
105 |
<ENTRY key="mapred.output.dir" env="actionSetPath"/> |
|
106 |
<ENTRY key="hbase.mapred.inputtable" ref="hbaseTable"/> |
|
107 |
<ENTRY key="hbase.mapreduce.inputtable" ref="hbaseTable"/> |
|
108 |
</MAP> |
|
109 |
</PARAM> |
|
110 |
</PARAMETERS> |
|
111 |
<ARCS> |
|
112 |
<ARC to="updateActionSets"/> |
|
113 |
</ARCS> |
|
114 |
</NODE> |
|
115 |
|
|
116 |
<NODE name="updateActionSets" type="UpdateActionSets"> |
|
117 |
<DESCRIPTION>update action sets</DESCRIPTION> |
|
118 |
<PARAMETERS/> |
|
119 |
<ARCS> |
|
120 |
<ARC to="doneActions"/> |
|
121 |
</ARCS> |
|
122 |
</NODE> |
|
123 |
|
|
124 |
<NODE name="doneActions"> |
|
125 |
<DESCRIPTION>done actions</DESCRIPTION> |
|
126 |
<PARAMETERS/> |
|
127 |
<ARCS> |
|
128 |
<ARC to="success"/> |
|
129 |
</ARCS> |
|
130 |
</NODE> |
|
131 |
|
|
132 |
</WORKFLOW> |
|
133 |
</CONFIGURATION> |
|
134 |
</BODY> |
|
135 |
</RESOURCE_PROFILE> |
modules/dnet-dli/trunk/src/main/resources/eu/dnetlib/bootstrap/profiles/workflows/metadata2hbase.xml | ||
---|---|---|
1 |
<RESOURCE_PROFILE> |
|
2 |
<HEADER> |
|
3 |
<RESOURCE_IDENTIFIER value="5b05a65a-4eeb-4862-bc55-b35c7ec3baf0_V29ya2Zsb3dUZW1wbGF0ZURTUmVzb3VyY2VzL1dvcmtmbG93VGVtcGxhdGVEU1Jlc291cmNlVHlwZQ=="/> |
|
4 |
<RESOURCE_TYPE value="WorkflowTemplateDSResourceType"/> |
|
5 |
<RESOURCE_KIND value="WorkflowTemplateDSResources"/> |
|
6 |
<RESOURCE_URI value=""/> |
|
7 |
<DATE_OF_CREATION value="2016-06-20T07:52:08+00:00"/> |
|
8 |
</HEADER> |
|
9 |
<BODY> |
|
10 |
<CONFIGURATION> |
|
11 |
<PARAMETERS> |
|
12 |
<PARAM name="reuseMdRecords" description="reuse metadata records?" required="true" type="boolean"/> |
|
13 |
<PARAM name="mdFormat" description="metadata format name" required="true" type="string"/> |
|
14 |
<PARAM name="interpretation" description="metadata interpretation name" required="false" type="string" default="cleaned"/> |
|
15 |
<PARAM name="mapping" description="xslt mapping function" required="true" type="string"/> |
|
16 |
<PARAM name="hdfsPath" description="HDFS path" required="true" type="string"/> |
|
17 |
<PARAM name="hbaseTable" description="HBase table name" required="true" type="string"/> |
|
18 |
<PARAM name="cluster" description="Hadoop cluster name" required="true" type="string"/> |
|
19 |
</PARAMETERS> |
|
20 |
<WORKFLOW> |
|
21 |
|
|
22 |
<NODE name="reuseHdfsRecords" type="ReuseHdfsRecords" isStart="true"> |
|
23 |
<DESCRIPTION>reuse mdstore records</DESCRIPTION> |
|
24 |
<PARAMETERS> |
|
25 |
<PARAM name="reuseMdRecords" ref="reuseMdRecords"/> |
|
26 |
</PARAMETERS> |
|
27 |
<ARCS> |
|
28 |
<ARC name="true" to="doneExport"/> |
|
29 |
<ARC name="false" to="exportRecords"/> |
|
30 |
</ARCS> |
|
31 |
</NODE> |
|
32 |
<NODE name="exportRecords" type="MDStoreBatchExporter"> |
|
33 |
<DESCRIPTION>Fetch mdstore records</DESCRIPTION> |
|
34 |
<PARAMETERS> |
|
35 |
<PARAM name="format" ref="mdFormat"/> |
|
36 |
<PARAM name="layout" value="store"/> |
|
37 |
<PARAM name="interpretation" ref="interpretation"/> |
|
38 |
<PARAM name="outputEprParam" value="records_epr"/> |
|
39 |
</PARAMETERS> |
|
40 |
<ARCS> |
|
41 |
<ARC to="storeHdfsRecords"/> |
|
42 |
</ARCS> |
|
43 |
</NODE> |
|
44 |
<NODE name="storeHdfsRecords" type="StoreHdfsRecords"> |
|
45 |
<DESCRIPTION>Store records to HDFS</DESCRIPTION> |
|
46 |
<PARAMETERS> |
|
47 |
<PARAM name="inputEprParam" value="records_epr"/> |
|
48 |
<PARAM name="hdfsPath" ref="hdfsPath"/> |
|
49 |
<PARAM name="cluster" ref="cluster"/> |
|
50 |
</PARAMETERS> |
|
51 |
<ARCS> |
|
52 |
<ARC to="doneExport"/> |
|
53 |
</ARCS> |
|
54 |
</NODE> |
|
55 |
<NODE name="doneExport"> |
|
56 |
<DESCRIPTION/> |
|
57 |
<PARAMETERS/> |
|
58 |
<ARCS> |
|
59 |
<ARC to="loadMapping"/> |
|
60 |
</ARCS> |
|
61 |
</NODE> |
|
62 |
|
|
63 |
<NODE name="loadMapping" type="LoadMappingProfile"> |
|
64 |
<DESCRIPTION>Load mapping profile</DESCRIPTION> |
|
65 |
<PARAMETERS> |
|
66 |
<PARAM name="profileId" ref="mapping"/> |
|
67 |
<PARAM name="loadedMappingParam" value="hbase.import.xslt"/> |
|
68 |
</PARAMETERS> |
|
69 |
<ARCS> |
|
70 |
<ARC to="mapreduce"/> |
|
71 |
</ARCS> |
|
72 |
</NODE> |
|
73 |
|
|
74 |
<NODE name="mapreduce" type="SubmitHadoopJob"> |
|
75 |
<DESCRIPTION>Run M/R import Job</DESCRIPTION> |
|
76 |
<PARAMETERS> |
|
77 |
<PARAM name="cluster" ref="cluster"/> |
|
78 |
<PARAM name="hadoopJob" value="mdStoreHdfsImportJob"/> |
|
79 |
<PARAM name="simulation" value="false"/> |
|
80 |
<PARAM name="jobParams"> |
|
81 |
<MAP> |
|
82 |
<ENTRY key="mapred.input.dir" ref="hdfsPath"/> |
|
83 |
<ENTRY key="hbase.mapred.outputtable" ref="hbaseTable"/> |
|
84 |
<ENTRY key="hbase.import.xslt" env="hbase.import.xslt"/> |
|
85 |
</MAP> |
|
86 |
</PARAM> |
|
87 |
</PARAMETERS> |
|
88 |
<ARCS> |
|
89 |
<ARC to="success"/> |
|
90 |
</ARCS> |
|
91 |
</NODE> |
|
92 |
|
|
93 |
</WORKFLOW> |
|
94 |
</CONFIGURATION> |
|
95 |
</BODY> |
|
96 |
</RESOURCE_PROFILE> |
webapps/dnet-dli-container/trunk/src/main/resources/eu/dnetlib/cnr-site.properties | ||
---|---|---|
62 | 62 |
service.index.feed.repeatDelay=2000 |
63 | 63 |
service.index.solr.nh.mdformat.enable=true |
64 | 64 |
services.mdstore.mongodb.db=mdstore_dli_test |
65 |
dnet.logger.mongo.host=dlib34.isti.cnr.it
|
|
65 |
dnet.logger.mongo.host=playground-t.dnet.d4science.org
|
|
66 | 66 |
#dnet.logger.mongo.host=localhost |
67 | 67 |
dnet.logger.mongo.port=27017 |
68 |
dnet.modular.ui.authorization.mongo.host=dlib34.isti.cnr.it
|
|
69 |
services.mdstore.mongodb.host=dlib34.isti.cnr.it
|
|
68 |
dnet.modular.ui.authorization.mongo.host=playground-t.dnet.d4science.org
|
|
69 |
services.mdstore.mongodb.host=playground-t.dnet.d4science.org
|
|
70 | 70 |
#dnet.modular.ui.authorization.mongo.host=localhost |
71 | 71 |
#services.mdstore.mongodb.host=localhost |
72 | 72 |
services.dli.resolver.store.DatabaseName=resolvedStore |
modules/dnet-graph/trunk/src/main/resources/eu/dnetlib/bootstrap/profiles/workflows/fixRelation.xml | ||
---|---|---|
1 |
<RESOURCE_PROFILE> |
|
2 |
<HEADER> |
|
3 |
<RESOURCE_IDENTIFIER |
|
4 |
value="caee3f24-1756-4a96-a25d-7c1b01c8d172_V29ya2Zsb3dUZW1wbGF0ZURTUmVzb3VyY2VzL1dvcmtmbG93VGVtcGxhdGVEU1Jlc291cmNlVHlwZQ=="/> |
|
5 |
<RESOURCE_TYPE value="WorkflowTemplateDSResourceType"/> |
|
6 |
<RESOURCE_KIND value="WorkflowTemplateDSResources"/> |
|
7 |
<RESOURCE_URI value=""/> |
|
8 |
<DATE_OF_CREATION value="2006-05-04T18:13:51.0Z"/> |
|
9 |
</HEADER> |
|
10 |
<BODY> |
|
11 |
<CONFIGURATION> |
|
12 |
|
|
13 |
<PARAMETERS> |
|
14 |
<PARAM name="hbaseTable" description="HBase table name" required="true" type="string"/> |
|
15 |
<PARAM name="cluster" description="Hadoop cluster name" required="true" type="string"/> |
|
16 |
<PARAM name="workDir" description="minDist algorithm work directory" required="true" type="string"/> |
|
17 |
<PARAM name="actionSets" description="csv list of action sets to be promoted" required="true" |
|
18 |
type="string"/> |
|
19 |
<PARAM name="entitySequence" description="list of entity names to be considered by the algorithm" |
|
20 |
required="true" type="string" default="organization,result"/> |
|
21 |
</PARAMETERS> |
|
22 |
|
|
23 |
<WORKFLOW> |
|
24 |
<NODE name="fetchOntologies" type="FetchOntologies" isStart="true"> |
|
25 |
<DESCRIPTION/> |
|
26 |
<PARAMETERS> |
|
27 |
<PARAM name="ontologiesParamName" value="ontologies"/> |
|
28 |
</PARAMETERS> |
|
29 |
<ARCS> |
|
30 |
<ARC to="entitySequence"/> |
|
31 |
</ARCS> |
|
32 |
</NODE> |
|
33 |
|
|
34 |
<NODE name="entitySequence" type="CheckEntitySequenceJob"> |
|
35 |
<DESCRIPTION>Check entity sequence</DESCRIPTION> |
|
36 |
<PARAMETERS> |
|
37 |
<PARAM name="entitySequence" ref="entitySequence"/> |
|
38 |
<PARAM name="dedupConfigSequenceParam" value="dedup.conf.queue"/> |
|
39 |
<PARAM name="entityTypeNameParam" value="dedup.entity.name"/> |
|
40 |
<PARAM name="entityTypeIdParam" value="dedup.entity.id"/> |
|
41 |
<PARAM name="actionSetParam" value="actionset"/> |
|
42 |
</PARAMETERS> |
|
43 |
<ARCS> |
|
44 |
<ARC to="fixRels"/> |
|
45 |
<ARC name="done" to="success"/> |
|
46 |
</ARCS> |
|
47 |
</NODE> |
|
48 |
|
|
49 |
|
|
50 |
<NODE name="fixRels" type="DedupConfigurationLoaderJob"> |
|
51 |
<DESCRIPTION>fix rels</DESCRIPTION> |
|
52 |
<PARAMETERS> |
|
53 |
<PARAM name="hadoopJob" value="dedupFixRelationsJob"/> |
|
54 |
<PARAM name="dedupConfigSequence" env="actionset"/> |
|
55 |
<PARAM name="cluster" ref="cluster"/> |
|
56 |
<PARAM name="jobParams"> |
|
57 |
<MAP> |
|
58 |
<ENTRY key="hbase.mapred.inputtable" ref="hbaseTable"/> |
|
59 |
<ENTRY key="hbase.mapred.outputtable" ref="hbaseTable"/> |
|
60 |
<ENTRY key="hbase.mapreduce.inputtable" ref="hbaseTable"/> |
|
61 |
<ENTRY key="hbase.mapreduce.outputtable" ref="hbaseTable"/> |
|
62 |
<ENTRY key="entityType" env="dedup.entity.name"/> |
|
63 |
<ENTRY key="entityTypeId" env="dedup.entity.id"/> |
|
64 |
<ENTRY key="ontologies" env="ontologies"/> |
|
65 |
</MAP> |
|
66 |
</PARAM> |
|
67 |
</PARAMETERS> |
|
68 |
<ARCS> |
|
69 |
<ARC to="entitySequence"/> |
|
70 |
</ARCS> |
|
71 |
</NODE> |
|
72 |
|
|
73 |
</WORKFLOW> |
|
74 |
</CONFIGURATION> |
|
75 |
</BODY> |
|
76 |
</RESOURCE_PROFILE> |
modules/dnet-pid-resolver/trunk/src/main/java/eu/dnetlib/pid/resolver/model/serializer/ResolvedObjectDeserializer.java | ||
---|---|---|
1 |
package eu.dnetlib.pid.resolver.model.serializer; |
|
2 |
|
|
3 |
import com.google.gson.JsonArray; |
|
4 |
import com.google.gson.JsonDeserializer; |
|
5 |
import com.google.gson.JsonElement; |
|
6 |
import com.google.gson.JsonObject; |
|
7 |
import eu.dnetlib.pid.resolver.model.ObjectType; |
|
8 |
import eu.dnetlib.pid.resolver.model.ResolvedObject; |
|
9 |
import eu.dnetlib.pid.resolver.model.SubjectType; |
|
10 |
|
|
11 |
import java.util.ArrayList; |
|
12 |
import java.util.List; |
|
13 |
|
|
14 |
public abstract class ResolvedObjectDeserializer implements JsonDeserializer<ResolvedObject> { |
|
15 |
|
|
16 |
protected void partialDeserialization(final JsonObject root, final ResolvedObject resolvedObject) { |
|
17 |
final JsonElement pid = root.get("pid"); |
|
18 |
resolvedObject.setPid(pid!= null ? pid.getAsString():""); |
|
19 |
final JsonElement pidType = root.get("pidType"); |
|
20 |
resolvedObject.setPidType(pidType!= null ? pidType.getAsString():""); |
|
21 |
final JsonElement type = root.get("type"); |
|
22 |
if(type!= null) |
|
23 |
switch (type.getAsString()) { |
|
24 |
case "dataset": |
|
25 |
resolvedObject.setType(ObjectType.dataset); |
|
26 |
break; |
|
27 |
case "publication": |
|
28 |
resolvedObject.setType(ObjectType.publication); |
|
29 |
break; |
|
30 |
default: |
|
31 |
resolvedObject.setType(ObjectType.unknown); |
|
32 |
break; |
|
33 |
} |
|
34 |
if (root.has("subjects") && root.get("subjects").isJsonArray()) { |
|
35 |
final JsonArray subjects = root.getAsJsonArray("subjects"); |
|
36 |
final List<SubjectType> extractedSubjects = new ArrayList<>(); |
|
37 |
subjects.forEach(sub -> { |
|
38 |
if (sub.isJsonObject()) { |
|
39 |
final JsonObject subject =sub.getAsJsonObject(); |
|
40 |
extractedSubjects.add(new SubjectType(subject.get("scheme").getAsString(),subject.get("term").getAsString())); |
|
41 |
} |
|
42 |
}); |
|
43 |
resolvedObject.setSubjects(extractedSubjects); |
|
44 |
} |
|
45 |
} |
|
46 |
|
|
47 |
|
|
48 |
protected String getValue(final JsonObject input, final String field) { |
|
49 |
return input.has(field) ? input.get(field).getAsString(): ""; |
|
50 |
} |
|
51 |
|
|
52 |
protected List<String> extractListValues(final JsonObject root, final String field) { |
|
53 |
final List<String> output = new ArrayList<>(); |
|
54 |
if (root.has(field) && root.get(field).isJsonArray()) { |
|
55 |
root.getAsJsonArray(field) |
|
56 |
.forEach(it -> output.add(it.getAsString())); |
|
57 |
} |
|
58 |
return output; |
|
59 |
|
|
60 |
|
|
61 |
|
|
62 |
} |
|
63 |
} |
modules/dnet-wds-domain/trunk/src/main/resources/eu/dnetlib/bootstrap/profiles/TransformationRuleDSResources/TransformationRuleDSResourceType/dmfwds2hbase.xml | ||
---|---|---|
12 | 12 |
<SINK_METADATA_FORMAT name="dngf_hbase" /> |
13 | 13 |
<IMPORTED/> |
14 | 14 |
<SCRIPT> |
15 |
<TITLE>xslt_mapping_dmf_wds2hbase</TITLE>
|
|
15 |
<TITLE>WDS2HBASE: DMF 2 HBASE</TITLE>
|
|
16 | 16 |
<CODE> |
17 | 17 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
18 | 18 |
xmlns:oaf="http://namespace.openaire.eu/oaf" |
modules/dnet-dli/trunk/src/test/java/eu/dnetlib/resolver/DLISerializerTest.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.resolver; |
2 | 2 |
|
3 | 3 |
import com.google.gson.Gson; |
4 |
import com.google.gson.GsonBuilder; |
|
5 |
import eu.dnetlib.data.transform.OntologyLoader; |
|
6 |
import eu.dnetlib.dli.DLIUtils; |
|
4 | 7 |
import eu.dnetlib.dli.resolver.model.*; |
5 | 8 |
import eu.dnetlib.dli.resolver.model.serializer.DLIResolverSerializer; |
9 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
|
6 | 10 |
import eu.dnetlib.pid.resolver.model.ObjectType; |
7 | 11 |
import eu.dnetlib.pid.resolver.model.PID; |
8 | 12 |
import eu.dnetlib.resolver.parser.DMFResolverParser; |
9 | 13 |
import eu.dnetlib.resolver.parser.PMFResolverParser; |
14 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
|
10 | 15 |
import org.apache.commons.io.IOUtils; |
11 | 16 |
import org.apache.commons.logging.Log; |
12 | 17 |
import org.apache.commons.logging.LogFactory; |
13 | 18 |
import org.junit.Assert; |
19 |
import org.junit.Before; |
|
14 | 20 |
import org.junit.Ignore; |
15 | 21 |
import org.junit.Test; |
22 |
import org.junit.runner.RunWith; |
|
23 |
import org.mockito.Mock; |
|
24 |
import org.mockito.Mockito; |
|
16 | 25 |
import org.springframework.beans.factory.annotation.Autowired; |
26 |
import org.springframework.test.context.ContextConfiguration; |
|
27 |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
|
17 | 28 |
|
18 | 29 |
import javax.xml.transform.OutputKeys; |
19 | 30 |
import javax.xml.transform.Transformer; |
... | ... | |
25 | 36 |
import java.io.InputStream; |
26 | 37 |
import java.io.StringWriter; |
27 | 38 |
import java.util.Arrays; |
39 |
import java.util.List; |
|
40 |
import java.util.Map; |
|
28 | 41 |
|
42 |
import static org.mockito.Mockito.when; |
|
43 |
|
|
29 | 44 |
/** |
30 | 45 |
* Created by sandro on 10/4/16. |
31 | 46 |
*/ |
32 |
//@RunWith(SpringJUnit4ClassRunner.class) |
|
33 |
//@ContextConfiguration(classes = { ConfigurationTestConfig.class, ConfigurationResolverStoreTestConfig.class }) |
|
34 |
@Ignore |
|
35 |
public class DLISerializerTest { |
|
47 |
@RunWith(SpringJUnit4ClassRunner.class) |
|
48 |
@ContextConfiguration(classes = { ConfigurationTestConfig.class }) |
|
36 | 49 |
|
50 |
public class DLISerializerTest extends DLIAbstractTest { |
|
51 |
|
|
37 | 52 |
private static final Log log = LogFactory.getLog(DLISerializerTest.class); |
38 | 53 |
|
39 | 54 |
@Autowired |
... | ... | |
83 | 98 |
@Test |
84 | 99 |
public void testSerializeFromJson() throws Exception { |
85 | 100 |
final InputStream recordStream = this.getClass().getResourceAsStream("/eu/dnetlib/dli/transform/resolvedObject.json"); |
86 |
final Gson gson = new Gson(); |
|
87 |
final DLIResolvedObject resolvedObject = gson.fromJson(IOUtils.toString(recordStream), DLIResolvedObject.class); |
|
101 |
|
|
102 |
|
|
103 |
final DLIResolvedObject resolvedObject = DLIResolvedObject.fromJson(IOUtils.toString(recordStream)); |
|
88 | 104 |
Assert.assertEquals(resolvedObject.getType(), ObjectType.dataset); |
89 | 105 |
final String recordTemplate = |
90 | 106 |
"<root xmlns:oaf=\"http://namespace.dnet.eu/oaf\" xmlns:dri=\"http://www.driver-repository.eu/namespace/dri\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">%s</root>"; |
modules/dnet-dli/trunk/src/test/java/eu/dnetlib/resolver/DLIParserTest.java | ||
---|---|---|
28 | 28 |
import org.junit.Before; |
29 | 29 |
import org.junit.Ignore; |
30 | 30 |
import org.junit.Test; |
31 |
import org.junit.runner.RunWith; |
|
31 | 32 |
import org.mockito.Mock; |
32 | 33 |
import org.mockito.Mockito; |
33 | 34 |
import org.springframework.beans.factory.annotation.Autowired; |
35 |
import org.springframework.test.context.ContextConfiguration; |
|
36 |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
|
34 | 37 |
|
35 | 38 |
import static org.mockito.Mockito.when; |
36 | 39 |
|
... | ... | |
39 | 42 |
*/ |
40 | 43 |
|
41 | 44 |
|
42 |
//@RunWith(SpringJUnit4ClassRunner.class) |
|
43 |
//@ContextConfiguration(classes = { ConfigurationTestConfig.class, ConfigurationResolverStoreTestConfig.class }) |
|
45 |
@RunWith(SpringJUnit4ClassRunner.class) |
|
46 |
@ContextConfiguration(classes = { ConfigurationTestConfig.class}) |
|
47 |
public class DLIParserTest extends DLIAbstractTest{ |
|
44 | 48 |
|
45 |
@Ignore |
|
46 |
public class DLIParserTest { |
|
47 |
|
|
48 | 49 |
private static final Log log = LogFactory.getLog(DLIParserTest.class); |
49 | 50 |
|
50 |
@Mock |
|
51 |
private DLIUtils dliUtilsInstance; |
|
52 |
|
|
53 |
|
|
54 |
@Mock |
|
55 |
private UniqueServiceLocator uniqueServiceLocator; |
|
56 |
|
|
57 |
@Mock |
|
58 |
private ISLookUpService isLookUpServiceMock; |
|
59 |
|
|
60 | 51 |
@Autowired |
61 | 52 |
private DLIResolverSerializer serializer; |
62 | 53 |
|
63 |
|
|
64 |
@Before |
|
65 |
public void initialize() throws ISLookUpException, IOException { |
|
66 |
|
|
67 |
final String query = "for $x in collection('/db/DRIVER/RepositoryServiceResources/RepositoryServiceResourceType') " |
|
68 |
+ "return concat($x//FIELD[./key='NamespacePrefix']/value/text(),'@--@',$x//FIELD[./key='DataSourceId']/value/text(),'@--@',$x//ENGLISH_NAME )"; |
|
69 |
dliUtilsInstance = Mockito.mock(DLIUtils.class); |
|
70 |
|
|
71 |
uniqueServiceLocator = Mockito.mock(UniqueServiceLocator.class); |
|
72 |
isLookUpServiceMock = Mockito.mock(ISLookUpService.class); |
|
73 |
dliUtilsInstance.setServiceLocator(uniqueServiceLocator); |
|
74 |
DLIUtils.setInstance(dliUtilsInstance); |
|
75 |
when(dliUtilsInstance.getServiceLocator()).thenReturn(uniqueServiceLocator); |
|
76 |
when(uniqueServiceLocator.getService(ISLookUpService.class)).thenReturn(isLookUpServiceMock); |
|
77 |
List<String> resutlDS = Arrays.asList( |
|
78 |
"r3d100010255@--@dli_________::r3d100010255@--@icpsr", |
|
79 |
"datacite____@--@dli_________::datacite____@--@Datasets in Datacite", |
|
80 |
"r3d100010134@--@dli_________::r3d100010134@--@pangaea", |
|
81 |
"r3d100010527@--@dli_________::r3d100010527@--@European Nucleotide Archive" |
|
82 |
|
|
83 |
); |
|
84 |
when(isLookUpServiceMock.quickSearchProfile(query)).thenReturn(resutlDS); |
|
85 |
DLIUtils.ontologies = OntologyLoader.loadOntologiesFromCp(); |
|
86 |
|
|
87 |
|
|
88 |
} |
|
89 |
|
|
90 | 54 |
@Test |
91 | 55 |
public void testDMFParser() throws IOException { |
92 | 56 |
final InputStream resourceAsStream = getClass().getResourceAsStream("/eu/dnetlib/dli/parser/InputRecordDMF.xml"); |
modules/dnet-dli/trunk/src/test/java/eu/dnetlib/resolver/DLIAbstractTest.java | ||
---|---|---|
1 |
package eu.dnetlib.resolver; |
|
2 |
|
|
3 |
import com.google.gson.Gson; |
|
4 |
import eu.dnetlib.data.transform.OntologyLoader; |
|
5 |
import eu.dnetlib.dli.DLIUtils; |
|
6 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
|
7 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
|
8 |
import org.apache.commons.io.IOUtils; |
|
9 |
import org.junit.Before; |
|
10 |
import org.mockito.Mock; |
|
11 |
import org.mockito.Mockito; |
|
12 |
|
|
13 |
import java.io.InputStream; |
|
14 |
import java.util.Arrays; |
|
15 |
import java.util.List; |
|
16 |
import java.util.Map; |
|
17 |
|
|
18 |
import static org.mockito.Mockito.when; |
|
19 |
|
|
20 |
public abstract class DLIAbstractTest { |
|
21 |
@Mock |
|
22 |
protected DLIUtils dliUtilsInstance; |
|
23 |
|
|
24 |
|
|
25 |
@Mock |
|
26 |
protected UniqueServiceLocator uniqueServiceLocator; |
|
27 |
|
|
28 |
@Mock |
|
29 |
protected ISLookUpService isLookUpServiceMock; |
|
30 |
|
|
31 |
@Before |
|
32 |
public void initialize() throws Exception { |
|
33 |
|
|
34 |
final String query = "for $x in collection('/db/DRIVER/RepositoryServiceResources/RepositoryServiceResourceType') " |
|
35 |
+ "return concat($x//FIELD[./key='NamespacePrefix']/value/text(),'@--@',$x//FIELD[./key='DataSourceId']/value/text(),'@--@',$x//ENGLISH_NAME )"; |
|
36 |
dliUtilsInstance = Mockito.mock(DLIUtils.class); |
|
37 |
|
|
38 |
uniqueServiceLocator = Mockito.mock(UniqueServiceLocator.class); |
|
39 |
isLookUpServiceMock = Mockito.mock(ISLookUpService.class); |
|
40 |
dliUtilsInstance.setServiceLocator(uniqueServiceLocator); |
|
41 |
|
|
42 |
|
|
43 |
final InputStream inputStream = this.getClass().getResourceAsStream("/eu/dnetlib/transformation/data-center.json"); |
|
44 |
Map<String, String> dataciteDatasource = new Gson().fromJson(IOUtils.toString(inputStream), Map.class); |
|
45 |
|
|
46 |
DLIUtils.setInstance(dliUtilsInstance); |
|
47 |
when(dliUtilsInstance.getServiceLocator()).thenReturn(uniqueServiceLocator); |
|
48 |
when(dliUtilsInstance.getDataciteDatasource()).thenReturn(dataciteDatasource); |
|
49 |
|
|
50 |
when(uniqueServiceLocator.getService(ISLookUpService.class)).thenReturn(isLookUpServiceMock); |
|
51 |
|
|
52 |
|
|
53 |
List<String> resutlDS = Arrays.asList( |
|
54 |
"r3d100010255@--@dli_________::r3d100010255@--@icpsr", |
|
55 |
"r3d100010134@--@dli_________::r3d100010134@--@pangaea", |
|
56 |
"r3d100010464@--@dli_________::r3d100010464@--@ANDS", |
|
57 |
"r3d100010327@--@dli_________::r3d100010327@--@RCSB", |
|
58 |
"nature______@--@dli_________::nature______@--@Nature", |
|
59 |
"ieee________@--@dli_________::ieee________@--@IEEE", |
|
60 |
"r3d100010578@--@dli_________::r3d100010578@--@IEDA", |
|
61 |
"r3d100010216@--@dli_________::r3d100010216@--@3tU", |
|
62 |
"r3d100010255@--@dli_________::r3d100010255@--@icpsr", |
|
63 |
"datacite____@--@dli_________::datacite____@--@Datasets in Datacite", |
|
64 |
"r3d100010527@--@dli_________::r3d100010527@--@European Nucleotide Archive" |
|
65 |
); |
|
66 |
when(isLookUpServiceMock.quickSearchProfile(query)).thenReturn(resutlDS); |
|
67 |
DLIUtils.ontologies = OntologyLoader.loadOntologiesFromCp(); |
|
68 |
} |
|
69 |
} |
modules/dnet-dli/trunk/src/test/java/eu/dnetlib/dli/transform/DLITransformTest.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.dli.transform; |
2 | 2 |
|
3 |
import com.google.gson.Gson; |
|
4 |
import eu.dnetlib.data.transform.OntologyLoader; |
|
5 |
import eu.dnetlib.dli.DLIUtils; |
|
6 | 3 |
import eu.dnetlib.dli.resolver.model.DLIResolvedObject; |
7 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator;
|
|
4 |
import eu.dnetlib.resolver.DLIAbstractTest;
|
|
8 | 5 |
import eu.dnetlib.resolver.parser.DMFResolverParser; |
9 |
import eu.dnetlib.rmi.enabling.ISLookUpService; |
|
10 | 6 |
import org.apache.commons.io.IOUtils; |
11 | 7 |
import org.apache.commons.logging.Log; |
12 | 8 |
import org.apache.commons.logging.LogFactory; |
13 | 9 |
import org.dom4j.Document; |
14 | 10 |
import org.dom4j.DocumentException; |
15 | 11 |
import org.dom4j.io.SAXReader; |
16 |
import org.junit.Before; |
|
17 | 12 |
import org.junit.Test; |
18 | 13 |
import org.junit.runner.RunWith; |
19 |
import org.mockito.Mock; |
|
20 |
import org.mockito.Mockito; |
|
21 | 14 |
import org.mockito.runners.MockitoJUnitRunner; |
22 | 15 |
|
23 | 16 |
import javax.xml.transform.OutputKeys; |
... | ... | |
28 | 21 |
import java.io.IOException; |
29 | 22 |
import java.io.InputStream; |
30 | 23 |
import java.io.StringWriter; |
31 |
import java.util.Arrays; |
|
32 |
import java.util.List; |
|
33 |
import java.util.Map; |
|
34 | 24 |
|
35 |
import static org.mockito.Mockito.when; |
|
36 |
|
|
37 | 25 |
/** |
38 | 26 |
* Created by sandro on 9/16/16. |
39 | 27 |
*/ |
40 | 28 |
|
41 | 29 |
@RunWith(MockitoJUnitRunner.class) |
42 |
public class DLITransformTest { |
|
30 |
public class DLITransformTest extends DLIAbstractTest {
|
|
43 | 31 |
|
44 | 32 |
|
45 | 33 |
private static final Log log = LogFactory.getLog(DLITransformTest.class); |
... | ... | |
47 | 35 |
private static final String BASE_URL = "http://%s:9200/%s?pretty"; |
48 | 36 |
private static final String BASE_CFG_URL = "http://%s:9200/%s?pretty"; |
49 | 37 |
|
50 |
@Mock |
|
51 |
private DLIUtils dliUtilsInstance; |
|
52 | 38 |
|
53 | 39 |
|
54 |
@Mock |
|
55 |
private UniqueServiceLocator uniqueServiceLocator; |
|
56 |
|
|
57 |
@Mock |
|
58 |
private ISLookUpService isLookUpServiceMock; |
|
59 |
|
|
60 |
|
|
61 |
@Before |
|
62 |
public void initialize() throws Exception { |
|
63 |
|
|
64 |
final String query = "for $x in collection('/db/DRIVER/RepositoryServiceResources/RepositoryServiceResourceType') " |
|
65 |
+ "return concat($x//FIELD[./key='NamespacePrefix']/value/text(),'@--@',$x//FIELD[./key='DataSourceId']/value/text(),'@--@',$x//ENGLISH_NAME )"; |
|
66 |
dliUtilsInstance = Mockito.mock(DLIUtils.class); |
|
67 |
|
|
68 |
uniqueServiceLocator = Mockito.mock(UniqueServiceLocator.class); |
|
69 |
isLookUpServiceMock = Mockito.mock(ISLookUpService.class); |
|
70 |
dliUtilsInstance.setServiceLocator(uniqueServiceLocator); |
|
71 |
|
|
72 |
|
|
73 |
final InputStream inputStream = this.getClass().getResourceAsStream("/eu/dnetlib/transformation/data-center.json"); |
|
74 |
Map<String, String> dataciteDatasource = new Gson().fromJson(IOUtils.toString(inputStream), Map.class); |
|
75 |
|
|
76 |
DLIUtils.setInstance(dliUtilsInstance); |
|
77 |
when(dliUtilsInstance.getServiceLocator()).thenReturn(uniqueServiceLocator); |
|
78 |
when(dliUtilsInstance.getDataciteDatasource()).thenReturn(dataciteDatasource); |
|
79 |
|
|
80 |
when(uniqueServiceLocator.getService(ISLookUpService.class)).thenReturn(isLookUpServiceMock); |
|
81 |
|
|
82 |
|
|
83 |
List<String> resutlDS = Arrays.asList( |
|
84 |
"r3d100010255@--@dli_________::r3d100010255@--@icpsr", |
|
85 |
"r3d100010134@--@dli_________::r3d100010134@--@pangaea", |
|
86 |
"r3d100010464@--@dli_________::r3d100010464@--@ANDS", |
|
87 |
"r3d100010327@--@dli_________::r3d100010327@--@RCSB", |
|
88 |
"nature______@--@dli_________::nature______@--@Nature", |
|
89 |
"ieee________@--@dli_________::ieee________@--@IEEE", |
|
90 |
"r3d100010578@--@dli_________::r3d100010578@--@IEDA", |
|
91 |
"r3d100010216@--@dli_________::r3d100010216@--@3tU" |
|
92 |
); |
|
93 |
when(isLookUpServiceMock.quickSearchProfile(query)).thenReturn(resutlDS); |
|
94 |
DLIUtils.ontologies = OntologyLoader.loadOntologiesFromCp(); |
|
95 |
} |
|
96 |
|
|
97 |
|
|
98 | 40 |
private InputStream loadFromTransformationProfile(final String profilePath) throws IOException { |
99 | 41 |
InputStream profile = getClass().getResourceAsStream(profilePath); |
100 | 42 |
SAXReader saxReader = new SAXReader(); |
modules/dnet-dli/trunk/src/test/resources/eu/dnetlib/dli/parser/InputRecordDMF.xml | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
<oai:record xmlns:oai="http://www.openarchives.org/OAI/2.0/" |
3 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
4 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|
5 |
<oai:header> |
|
6 |
<dri:objIdentifier>openaire____::00021200bb9ba9214d0033cf0304615a</dri:objIdentifier> |
|
7 |
<dri:recordIdentifier>oai:dnet:datacite____::b78ed9c0973263caa1d198340493a234</dri:recordIdentifier> |
|
8 |
<dri:dateOfCollection>2017-03-29T12:11:52.875+02:00</dri:dateOfCollection> |
|
9 |
<dri:repositoryId>openaire_UmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU= |
|
10 |
</dri:repositoryId> |
|
11 |
<dri:datasourceprefix>openaire____</dri:datasourceprefix> |
|
12 |
<oai:identifier>oai:dnet:datacite____::b78ed9c0973263caa1d198340493a234</oai:identifier> |
|
13 |
<oai:datestamp>2017-03-16T10:09:22Z</oai:datestamp> |
|
14 |
<oai:setSpec>Datacite</oai:setSpec> |
|
15 |
<oai:setSpec>openaire_data</oai:setSpec> |
|
16 |
<oai:setSpec>Datacite_enriched</oai:setSpec> |
|
17 |
</oai:header> |
|
18 |
<oai:metadata> |
|
19 |
<datacite:resource xmlns:datacite="http://datacite.org/schema/kernel-3" |
|
20 |
xsi:schemaLocation="http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd"> |
|
21 |
<datacite:publicationYear>2016</datacite:publicationYear> |
|
22 |
<datacite:publisher>Figshare</datacite:publisher> |
|
23 |
<datacite:resourceType resourceTypeGeneral="Collection"/> |
|
24 |
<datacite:rightsList> |
|
25 |
<datacite:rights rightsURI="info:eu-repo/semantics/unknownAccess">not available</datacite:rights> |
|
26 |
</datacite:rightsList> |
|
27 |
<datacite:creators> |
|
28 |
<datacite:creator> |
|
29 |
<datacite:creatorName>Juan Yepes-Nuñez</datacite:creatorName> |
|
30 |
</datacite:creator> |
|
31 |
<datacite:creator> |
|
32 |
<datacite:creatorName>Shreyas Gandhi</datacite:creatorName> |
|
33 |
</datacite:creator> |
|
34 |
<datacite:creator> |
|
35 |
<datacite:creatorName>Kirsten Beyer</datacite:creatorName> |
|
36 |
</datacite:creator> |
|
37 |
<datacite:creator> |
|
38 |
<datacite:creatorName>Wesley Burks</datacite:creatorName> |
|
39 |
</datacite:creator> |
|
40 |
<datacite:creator> |
|
41 |
<datacite:creatorName>Giorgio Canonica</datacite:creatorName> |
|
42 |
</datacite:creator> |
|
43 |
<datacite:creator> |
|
44 |
<datacite:creatorName>Motohiro Ebisawa</datacite:creatorName> |
|
45 |
</datacite:creator> |
|
46 |
<datacite:creator> |
|
47 |
<datacite:creatorName>Rose Kamenwa</datacite:creatorName> |
|
48 |
</datacite:creator> |
|
49 |
<datacite:creator> |
|
50 |
<datacite:creatorName>Bee Lee</datacite:creatorName> |
|
51 |
</datacite:creator> |
|
52 |
<datacite:creator> |
|
53 |
<datacite:creatorName>Haiqi Li</datacite:creatorName> |
|
54 |
</datacite:creator> |
|
55 |
<datacite:creator> |
|
56 |
<datacite:creatorName>Susan Prescott</datacite:creatorName> |
|
57 |
</datacite:creator> |
|
58 |
<datacite:creator> |
|
59 |
<datacite:creatorName>John Riva</datacite:creatorName> |
|
60 |
</datacite:creator> |
|
61 |
<datacite:creator> |
|
62 |
<datacite:creatorName>Alessandro Fiocchi</datacite:creatorName> |
|
63 |
</datacite:creator> |
|
64 |
<datacite:creator> |
|
65 |
<datacite:creatorName>Lanny Rosenwasser</datacite:creatorName> |
|
66 |
</datacite:creator> |
|
67 |
<datacite:creator> |
|
68 |
<datacite:creatorName>Hugh Sampson</datacite:creatorName> |
|
69 |
</datacite:creator> |
|
70 |
<datacite:creator> |
|
71 |
<datacite:creatorName>Michael Spigler</datacite:creatorName> |
|
72 |
</datacite:creator> |
|
73 |
<datacite:creator> |
|
74 |
<datacite:creatorName>Luigi Terracciano</datacite:creatorName> |
|
75 |
</datacite:creator> |
|
76 |
<datacite:creator> |
|
77 |
<datacite:creatorName>Andrea Vereda</datacite:creatorName> |
|
78 |
</datacite:creator> |
|
79 |
<datacite:creator> |
|
80 |
<datacite:creatorName>Susan Waserman</datacite:creatorName> |
|
81 |
</datacite:creator> |
|
82 |
<datacite:creator> |
|
83 |
<datacite:creatorName>Holger Schünemann</datacite:creatorName> |
|
84 |
</datacite:creator> |
|
85 |
<datacite:creator> |
|
86 |
<datacite:creatorName>Jan Brożek</datacite:creatorName> |
|
87 |
</datacite:creator> |
|
88 |
<datacite:creator> |
|
89 |
<datacite:creatorName>Ruby Pawankar</datacite:creatorName> |
|
90 |
</datacite:creator> |
|
91 |
<datacite:creator> |
|
92 |
<datacite:creatorName>Carlos Cuello-Garcia</datacite:creatorName> |
|
93 |
</datacite:creator> |
|
94 |
<datacite:creator> |
|
95 |
<datacite:creatorName>Yuan Zhang</datacite:creatorName> |
|
96 |
</datacite:creator> |
|
97 |
<datacite:creator> |
|
98 |
<datacite:creatorName>Gian Morgano</datacite:creatorName> |
|
99 |
</datacite:creator> |
|
100 |
<datacite:creator> |
|
101 |
<datacite:creatorName>Kangmo Ahn</datacite:creatorName> |
|
102 |
</datacite:creator> |
|
103 |
<datacite:creator> |
|
104 |
<datacite:creatorName>Suleiman Al-Hammadi</datacite:creatorName> |
|
105 |
</datacite:creator> |
|
106 |
<datacite:creator> |
|
107 |
<datacite:creatorName>Arnav Agarwal</datacite:creatorName> |
|
108 |
</datacite:creator> |
|
109 |
</datacite:creators> |
|
110 |
<datacite:contributors/> |
|
111 |
<datacite:relatedIdentifiers> |
|
112 |
<datacite:relatedIdentifier relatedIdentifierType="openaire" relationType="IsReferencedBy"> |
|
113 |
oai:dnet:od_______908::8a60c9160e9ae6a5abe76d3d5b1ce7f1 |
|
114 |
</datacite:relatedIdentifier> |
|
115 |
<datacite:relatedIdentifier relatedIdentifierType="openaire" relationType="IsReferencedBy"> |
|
116 |
oai:dnet:od_______908::8a60c9160e9ae6a5abe76d3d5b1ce7f1 |
|
117 |
</datacite:relatedIdentifier> |
|
118 |
<datacite:relatedIdentifier relatedIdentifierType="openaire" relationType="IsReferencedBy"> |
|
119 |
oai:dnet:od_______908::f3714a25f682599838cf41200e7f2a7a |
|
120 |
</datacite:relatedIdentifier> |
|
121 |
<datacite:relatedIdentifier relatedIdentifierType="openaire" relationType="IsReferencedBy"> |
|
122 |
oai:dnet:od_______908::f3714a25f682599838cf41200e7f2a7a |
|
123 |
</datacite:relatedIdentifier> |
|
124 |
<datacite:relatedIdentifier relatedIdentifierType="openaire" relationType="IsReferencedBy"> |
|
125 |
oai:dnet:od_______908::f602032c963cc56d6c9e80508ece44d3 |
|
126 |
</datacite:relatedIdentifier> |
|
127 |
<datacite:relatedIdentifier relatedIdentifierType="openaire" relationType="IsReferencedBy"> |
|
128 |
oai:dnet:od_______908::f602032c963cc56d6c9e80508ece44d3 |
|
129 |
</datacite:relatedIdentifier> |
|
130 |
<datacite:relatedIdentifier relatedIdentifierType="openaire" relationType="IsReferencedBy"> |
|
131 |
oai:dnet:od_______908::f602032c963cc56d6c9e80508ece44d3 |
|
132 |
</datacite:relatedIdentifier> |
|
133 |
</datacite:relatedIdentifiers> |
|
134 |
<datacite:resourceType resourceTypeGeneral="Collection"/> |
|
135 |
<datacite:identifier identifierType="URL">http://dx.doi.org/10.6084/m9.figshare.c.3629063 |
|
136 |
</datacite:identifier> |
|
137 |
<datacite:alternateIdentifiers> |
|
138 |
<datacite:alternateIdentifier alternateIdentifierType="doi">10.6084/m9.figshare.c.3629063 |
|
139 |
</datacite:alternateIdentifier> |
|
140 |
<datacite:alternateIdentifier>10.6084/m9.figshare.c.3629063</datacite:alternateIdentifier> |
|
141 |
<datacite:alternateIdentifier>http://dx.doi.org/10.6084/m9.figshare.c.3629063 |
|
142 |
</datacite:alternateIdentifier> |
|
143 |
</datacite:alternateIdentifiers> |
|
144 |
<datacite:titles> |
|
145 |
<datacite:title>World Allergy Organization-McMaster University Guidelines for Allergic Disease |
|
146 |
Prevention (GLAD-P): Vitamin D |
|
147 |
</datacite:title> |
|
148 |
</datacite:titles> |
|
149 |
<datacite:descriptions> |
|
150 |
<datacite:description descriptionType="Abstract">Abstract Background The prevalence of allergic diseases |
|
151 |
is approximately 10 % in infants whose parents and siblings do not have allergic diseases and 20–30 |
|
152 |
% in those with an allergic first-degree relative. Vitamin D is involved in the regulation of the |
|
153 |
immune system and it may play a role in the development, severity and course of asthma and other |
|
154 |
allergic diseases. Objective The World Allergy Organization (WAO) convened a guideline panel to |
|
155 |
develop evidence-based recommendations addressing the use of vitamin D in primary prevention of |
|
156 |
allergic diseases. Methods Our WAO guideline panel identified the most relevant clinical questions |
|
157 |
and performed a systematic review of randomized controlled trials and non-randomized studies (NRS), |
|
158 |
specifically cohort and case-control studies, of vitamin D supplementation for the prevention of |
|
159 |
allergic diseases. We also reviewed the evidence about values and preferences, and resource |
|
160 |
requirements (up to January 2015, with an update on January 30, 2016). We followed the Grading of |
|
161 |
Recommendations Assessment, Development and Evaluation (GRADE) approach to develop recommendations. |
|
162 |
Results Having reviewed the currently available evidence, the WAO guideline panel found no support |
|
163 |
for the hypothesis that vitamin D supplementation reduces the risk of developing allergic diseases |
|
164 |
in children. The WAO guideline panel suggest not using vitamin D in pregnant women, breastfeeding |
|
165 |
mothers, or healthy term infants as a means of preventing the development of allergic diseases. This |
|
166 |
recommendation does not apply to those mothers and infants who have other indications for |
|
167 |
prophylactic or therapeutic use of vitamin D. The panel’s recommendations are conditional and |
|
168 |
supported by very low certainty evidence. Conclusions WAO recommendations about vitamin D |
|
169 |
supplementation for the prevention of allergic diseases support parents, clinicians and other health |
|
170 |
care professionals in their decisions whether or not to use vitamin D in preventing allergic |
|
171 |
diseases in healthy, term infants. |
|
172 |
</datacite:description> |
|
173 |
</datacite:descriptions> |
|
174 |
<datacite:subjects> |
|
175 |
<datacite:subject>Medicine</datacite:subject> |
|
176 |
<datacite:subject>Biotechnology</datacite:subject> |
|
177 |
<datacite:subject>39999 Chemical Sciences not elsewhere classified</datacite:subject> |
|
178 |
<datacite:subject>Immunology</datacite:subject> |
|
179 |
<datacite:subject>69999 Biological Sciences not elsewhere classified</datacite:subject> |
|
180 |
<datacite:subject>Developmental Biology</datacite:subject> |
|
181 |
<datacite:subject>Cancer</datacite:subject> |
|
182 |
<datacite:subject>Science Policy</datacite:subject> |
|
183 |
</datacite:subjects> |
|
184 |
<datacite:dates> |
|
185 |
<datacite:date dateType="Issued">2016-01-01</datacite:date> |
|
186 |
</datacite:dates> |
|
187 |
<datacite:sizes/> |
|
188 |
</datacite:resource> |
|
189 |
</oai:metadata> |
|
190 |
<oai:about> |
|
191 |
<provenance xmlns="http://www.openarchives.org/OAI/2.0/provenance" |
|
192 |
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/provenance http://www.openarchives.org/OAI/2.0/provenance.xsd"> |
|
193 |
<originDescription xmlns="" altered="true" harvestDate="2017-03-29T12:11:52.875+02:00"> |
|
194 |
<baseURL>http%3A%2F%2Fservices.openaire.eu%2Fprovision%2Fmvc%2Foai%2Foai.do</baseURL> |
|
195 |
<identifier>oai:dnet:datacite____::b78ed9c0973263caa1d198340493a234</identifier> |
|
196 |
<datestamp>2017-03-16T10:09:22Z</datestamp> |
|
197 |
<metadataNamespace>http://schema.datacite.org/oai/oai-1.0/</metadataNamespace> |
|
198 |
</originDescription> |
|
199 |
</provenance> |
|
200 |
</oai:about> |
|
3 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
4 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|
5 |
<oai:header> |
|
6 |
<dri:objIdentifier>r3d100010134::00002f60593fd1f758fb838fafb46795</dri:objIdentifier> |
|
7 |
<dri:recordIdentifier>oai:pangaea.de:doi:10.1594/PANGAEA.432865</dri:recordIdentifier> |
|
8 |
<dri:dateOfCollection>2017-10-19T03:39:33.663+02:00</dri:dateOfCollection> |
|
9 |
<dri:repositoryId>aaadf8b3-01a8-4cc2-9964-63cfb19df3b4_UmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=</dri:repositoryId> |
|
10 |
<dri:datasourceprefix>r3d100010134</dri:datasourceprefix> |
|
11 |
<identifier xmlns="http://www.openarchives.org/OAI/2.0/">oai:pangaea.de:doi:10.1594/PANGAEA.432865</identifier> |
|
12 |
<datestamp xmlns="http://www.openarchives.org/OAI/2.0/">2017-08-04T21:17:31Z</datestamp> |
|
13 |
</oai:header> |
|
14 |
<metadata xmlns="http://www.openarchives.org/OAI/2.0/"> |
|
15 |
<resource xmlns="http://datacite.org/schema/kernel-3" |
|
16 |
xsi:schemaLocation="http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd"> |
|
17 |
<identifier xmlns="" identifierType="DOI">10.1594/PANGAEA.432865</identifier> |
|
18 |
<creators xmlns=""> |
|
19 |
<creator> |
|
20 |
<creatorName>WOCE Sea Level, WSL</creatorName> |
|
21 |
</creator> |
|
22 |
</creators> |
|
23 |
<titles xmlns=""> |
|
24 |
<title>Daily sea level from coastal tide gauge station Woods_Hole in 1978 (Research quality database)</title> |
|
25 |
</titles> |
|
26 |
<publisher xmlns="">PANGAEA - Data Publisher for Earth & Environmental Science</publisher> |
|
27 |
<publicationYear xmlns="">2006</publicationYear> |
|
28 |
<subjects xmlns=""> |
|
29 |
<subject subjectScheme="Parameter">DATE/TIME</subject> |
|
30 |
<subject subjectScheme="Parameter">Sea level</subject> |
|
31 |
<subject subjectScheme="Campaign">SeaLevel</subject> |
|
32 |
<subject subjectScheme="Project">World Ocean Circulation Experiment (WOCE)</subject> |
|
33 |
</subjects> |
|
34 |
<contributors xmlns=""> |
|
35 |
<contributor contributorType="HostingInstitution"> |
|
36 |
<contributorName>Sea Level Center, University of Hawaii</contributorName> |
|
37 |
</contributor> |
|
38 |
</contributors> |
|
39 |
<dates xmlns=""> |
|
40 |
<date dateType="Collected">1978-01-01T12:00:00/1978-12-31T12:00:00</date> |
|
41 |
</dates> |
|
42 |
<language xmlns="">eng</language> |
|
43 |
<resourceType xmlns="" resourceTypeGeneral="Dataset">Dataset</resourceType> |
|
44 |
<relatedIdentifiers xmlns=""> |
|
45 |
<relatedIdentifier xmlns:oaf="http://namespace.dnet.eu/oaf" inverseRelationType="documents" |
|
46 |
relatedIdentifierType="URL" |
|
47 |
relationType="isDocumentedBy">http://store.pangaea.de/Projects/WOCE/SeaLevel_rqds/Woods_Hole.txt</relatedIdentifier> |
|
48 |
</relatedIdentifiers> |
|
49 |
<sizes xmlns=""> |
|
50 |
<size>365 data points</size> |
|
51 |
</sizes> |
|
52 |
<formats xmlns=""> |
|
53 |
<format>text/tab-separated-values</format> |
|
54 |
</formats> |
|
55 |
<rightsList xmlns=""> |
|
56 |
<rights rightsURI="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported (CC-BY)</rights> |
|
57 |
</rightsList> |
|
58 |
<geoLocations xmlns=""> |
|
59 |
<geoLocation> |
|
60 |
<geoLocationPoint>41.5233 -70.6717</geoLocationPoint> |
|
61 |
</geoLocation> |
|
62 |
</geoLocations> |
|
63 |
</resource> |
|
64 |
</metadata> |
|
65 |
<oaf:about xmlns:oaf="http://namespace.dnet.eu/oaf"> |
|
66 |
<oaf:datainfo> |
|
67 |
<oaf:collectedFrom completionStatus="complete" id="dli_________::r3d100010134" name="Pangaea"/> |
|
68 |
<oaf:completionStatus>complete</oaf:completionStatus> |
|
69 |
<oaf:provisionMode>collected</oaf:provisionMode> |
|
70 |
</oaf:datainfo> |
|
71 |
</oaf:about> |
|
201 | 72 |
</oai:record> |
modules/dnet-dli/trunk/src/main/java/eu/dnetlib/resolver/parser/PMFResolverParser.java | ||
---|---|---|
29 | 29 |
final VTDNav vn = vg.getNav(); |
30 | 30 |
final AutoPilot ap = new AutoPilot(vn); |
31 | 31 |
|
32 |
ap.declareXPathNameSpace("dri", "http://www.driver-repository.eu/namespace/dri"); |
|
33 | 32 |
|
34 |
final String resolvedDate = VtdUtilityParser.getSingleValue(ap, vn, "//dri:resolvedDate"); |
|
33 |
|
|
34 |
final String resolvedDate = VtdUtilityParser.getSingleValue(ap, vn, "//*[local-name()='resolvedDate']"); |
|
35 | 35 |
parsedObject.setResolvedDate(resolvedDate); |
36 | 36 |
|
37 |
ap.declareXPathNameSpace("oaf", "http://namespace.dnet.eu/oaf"); |
|
38 |
final List<Node> pid = VtdUtilityParser.getTextValuesWithAttributes(ap, vn, "//oaf:pid", Arrays.asList("type")); |
|
39 | 37 |
|
38 |
final List<Node> pid = VtdUtilityParser.getTextValuesWithAttributes(ap, vn, "//*[local-name()='pid']", Arrays.asList("type")); |
|
39 |
|
|
40 | 40 |
if (extractIdentifier(parsedObject, pid)) return null; |
41 | 41 |
|
42 | 42 |
List<Node> collectedFromNodes = |
43 |
VtdUtilityParser.getTextValuesWithAttributes(ap, vn, "//oaf:collectedFrom", Arrays.asList("name", "id", "mode", "completionStatus"));
|
|
43 |
VtdUtilityParser.getTextValuesWithAttributes(ap, vn, "//*[local-name()='collectedFrom']", Arrays.asList("name", "id", "mode", "completionStatus"));
|
|
44 | 44 |
|
45 | 45 |
final List<ObjectProvenance> provenances = new ArrayList<>(); |
46 | 46 |
|
... | ... | |
56 | 56 |
} |
57 | 57 |
|
58 | 58 |
parsedObject.setDatasourceProvenance(provenances); |
59 |
parsedObject.setCompletionStatus(VtdUtilityParser.getSingleValue(ap, vn, "//oaf:completionStatus"));
|
|
59 |
parsedObject.setCompletionStatus(VtdUtilityParser.getSingleValue(ap, vn, "//*[local-name()='completionStatus']"));
|
|
60 | 60 |
|
61 | 61 |
List<Node> relatedIdentifiers = |
62 |
VtdUtilityParser.getTextValuesWithAttributes(ap, vn, "//oaf:relatedIdentifier",
|
|
62 |
VtdUtilityParser.getTextValuesWithAttributes(ap, vn, "//*[local-name()='relatedIdentifier']",
|
|
63 | 63 |
Arrays.asList("relatedIdentifierType", "relationType", "entityType", "inverseRelationType")); |
64 | 64 |
|
65 | 65 |
if (relatedIdentifiers != null && relatedIdentifiers.size() > 0) { |
... | ... | |
93 | 93 |
parsedObject.setRelations(relations); |
94 | 94 |
} |
95 | 95 |
|
96 |
ap.declareXPathNameSpace("dc", "http://purl.org/dc/elements/1.1/"); |
|
97 |
final List<String> authorsNode = VtdUtilityParser.getTextValue(ap, vn, "//dc:creator");
|
|
96 |
|
|
97 |
final List<String> authorsNode = VtdUtilityParser.getTextValue(ap, vn, "//*[local-name()='creator']");
|
|
98 | 98 |
parsedObject.setAuthors(authorsNode); |
99 |
parsedObject.setTitles(VtdUtilityParser.getTextValue(ap, vn, "//dc:title"));
|
|
99 |
parsedObject.setTitles(VtdUtilityParser.getTextValue(ap, vn, "//*[local-name()='title']"));
|
|
100 | 100 |
|
101 |
parsedObject.setDescription(VtdUtilityParser.getSingleValue(ap, vn, "//dc:description"));
|
|
102 |
parsedObject.setDate(VtdUtilityParser.getSingleValue(ap, vn, "//dc:date"));
|
|
103 |
List<Node> subjects = VtdUtilityParser.getTextValuesWithAttributes(ap, vn, "//dc:subject", Arrays.asList("scheme"));
|
|
101 |
parsedObject.setDescription(VtdUtilityParser.getSingleValue(ap, vn, "//*[local-name()='description']"));
|
|
102 |
parsedObject.setDate(VtdUtilityParser.getSingleValue(ap, vn, "//*[local-name()='date']"));
|
|
103 |
List<Node> subjects = VtdUtilityParser.getTextValuesWithAttributes(ap, vn, "//*[local-name()='subject']", Arrays.asList("scheme"));
|
|
104 | 104 |
extractSubject(parsedObject, subjects); |
105 | 105 |
|
106 | 106 |
|
107 |
setType(parsedObject, VtdUtilityParser.getSingleValue(ap, vn, "//dc:type"));
|
|
107 |
setType(parsedObject, VtdUtilityParser.getSingleValue(ap, vn, "//*[local-name()='type']"));
|
|
108 | 108 |
|
109 | 109 |
return parsedObject; |
110 | 110 |
} catch (Throwable e) { |
modules/dnet-dli/trunk/src/main/java/eu/dnetlib/resolver/parser/DMFResolverParser.java | ||
---|---|---|
38 | 38 |
|
39 | 39 |
final VTDNav vn = vg.getNav(); |
40 | 40 |
final AutoPilot ap = new AutoPilot(vn); |
41 |
ap.declareXPathNameSpace("dri", "http://www.driver-repository.eu/namespace/dri"); |
|
42 | 41 |
|
43 |
final String resolvedDate = VtdUtilityParser.getSingleValue(ap, vn, "//dri:resolvedDate");
|
|
42 |
final String resolvedDate = VtdUtilityParser.getSingleValue(ap, vn, "//*[local-name()='resolvedDate']");
|
|
44 | 43 |
parsedObject.setResolvedDate(resolvedDate); |
45 | 44 |
|
46 |
final String datasourcePrefix = VtdUtilityParser.getSingleValue(ap, vn, "//dri:datasourceprefix"); |
|
47 |
ap.declareXPathNameSpace("oaf", "http://namespace.dnet.eu/oaf"); |
|
45 |
final String datasourcePrefix = VtdUtilityParser.getSingleValue(ap, vn, "//*[local-name()='datasourceprefix']"); |
|
48 | 46 |
|
49 |
final String completionStatus = VtdUtilityParser.getSingleValue(ap, vn, "//oaf:completionStatus");
|
|
50 |
final String provisionMode = VtdUtilityParser.getSingleValue(ap, vn, "//oaf:provisionMode");
|
|
47 |
final String completionStatus = VtdUtilityParser.getSingleValue(ap, vn, "//*[local-name()='completionStatus']");
|
|
48 |
final String provisionMode = VtdUtilityParser.getSingleValue(ap, vn, "//*[local-name()='provisionMode']");
|
|
51 | 49 |
|
52 | 50 |
final String publisher = VtdUtilityParser.getSingleValue(ap, vn, "//*[local-name()='resource']/*[local-name()='publisher']"); |
53 | 51 |
|
... | ... | |
61 | 59 |
provenance.setProvisionMode(provisionMode); |
62 | 60 |
parsedObject.setDatasourceProvenance(Lists.newArrayList(provenance)); |
63 | 61 |
|
64 |
ap.declareXPathNameSpace("datacite", "http://datacite.org/schema/kernel-3"); |
|
62 |
|
|
65 | 63 |
final List<Node> identifierType = |
66 | 64 |
VtdUtilityParser.getTextValuesWithAttributes(ap, vn, "//*[local-name()='resource']/*[local-name()='identifier']", Lists.newArrayList("identifierType")); |
67 | 65 |
|
modules/dnet-dli/trunk/src/main/java/eu/dnetlib/dli/resolver/CrossrefResolver.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.net.URLEncoder; |
4 | 4 |
|
5 |
import com.mongodb.DBObject; |
|
6 |
import com.mongodb.MongoClient; |
|
7 |
import com.mongodb.QueryBuilder; |
|
8 |
import com.mongodb.client.FindIterable; |
|
9 |
import com.mongodb.client.MongoCollection; |
|
10 |
import com.mongodb.client.MongoCursor; |
|
11 |
import com.mongodb.client.MongoDatabase; |
|
5 | 12 |
import eu.dnetlib.dli.resolver.model.DLIResolvedObject; |
6 | 13 |
import eu.dnetlib.pid.resolver.AbstractPIDResolver; |
7 | 14 |
import groovy.transform.Synchronized; |
8 | 15 |
import org.apache.commons.logging.Log; |
9 | 16 |
import org.apache.commons.logging.LogFactory; |
17 |
import org.bson.Document; |
|
18 |
import org.bson.conversions.Bson; |
|
10 | 19 |
import org.springframework.beans.factory.annotation.Autowired; |
11 | 20 |
|
12 | 21 |
// TODO: Auto-generated Javadoc |
... | ... | |
32 | 41 |
@Autowired |
33 | 42 |
private CrossRefParserJSON parser; |
34 | 43 |
|
44 |
|
|
45 |
@Autowired |
Also available in: Unified diff
Changed Crossref to use dump on mongoDB