Revision 50509
Added by Sandro La Bruzzo over 6 years ago
webapps/dnet-container-openaireplus/trunk/pom.xml | ||
---|---|---|
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" |
3 | 3 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
4 |
<parent>
|
|
5 |
<groupId>eu.dnetlib</groupId>
|
|
6 |
<artifactId>dnet45-container-parent</artifactId>
|
|
7 |
<version>1.0.0-SNAPSHOT</version>
|
|
8 |
<relativePath></relativePath>
|
|
9 |
</parent>
|
|
10 |
<modelVersion>4.0.0</modelVersion>
|
|
11 |
<groupId>eu.dnetlib</groupId>
|
|
12 |
<artifactId>dnet-container-openaireplus</artifactId>
|
|
13 |
<packaging>war</packaging>
|
|
14 |
<version>3.0.0-SNAPSHOT</version>
|
|
15 |
<dependencies>
|
|
4 |
<parent>
|
|
5 |
<groupId>eu.dnetlib</groupId>
|
|
6 |
<artifactId>dnet45-container-parent</artifactId>
|
|
7 |
<version>1.0.0-SNAPSHOT</version>
|
|
8 |
<relativePath></relativePath>
|
|
9 |
</parent>
|
|
10 |
<modelVersion>4.0.0</modelVersion>
|
|
11 |
<groupId>eu.dnetlib</groupId>
|
|
12 |
<artifactId>dnet-container-openaireplus</artifactId>
|
|
13 |
<packaging>war</packaging>
|
|
14 |
<version>3.0.0-SNAPSHOT</version>
|
|
15 |
<dependencies>
|
|
16 | 16 |
|
17 | 17 |
|
18 |
<dependency>
|
|
19 |
<groupId>eu.dnetlib</groupId>
|
|
20 |
<artifactId>dnet-objectStore-ui</artifactId>
|
|
21 |
<version>[1.0.0,2.0.0)</version>
|
|
22 |
</dependency>
|
|
18 |
<dependency>
|
|
19 |
<groupId>eu.dnetlib</groupId>
|
|
20 |
<artifactId>dnet-objectStore-ui</artifactId>
|
|
21 |
<version>[1.0.0,2.0.0)</version>
|
|
22 |
</dependency>
|
|
23 | 23 |
|
24 | 24 |
|
25 |
<!-- Common components in every container -->
|
|
26 |
<dependency>
|
|
27 |
<groupId>eu.dnetlib</groupId>
|
|
28 |
<artifactId>cnr-log4j-inspector</artifactId>
|
|
29 |
<version>[1.0.0,2.0.0)</version>
|
|
30 |
</dependency>
|
|
31 |
<dependency>
|
|
32 |
<groupId>eu.dnetlib</groupId>
|
|
33 |
<artifactId>dnet-schemas</artifactId>
|
|
34 |
<version>[1.0.0,2.0.0)</version>
|
|
35 |
</dependency>
|
|
25 |
<!-- Common components in every container -->
|
|
26 |
<dependency>
|
|
27 |
<groupId>eu.dnetlib</groupId>
|
|
28 |
<artifactId>cnr-log4j-inspector</artifactId>
|
|
29 |
<version>[1.0.0,2.0.0)</version>
|
|
30 |
</dependency>
|
|
31 |
<dependency>
|
|
32 |
<groupId>eu.dnetlib</groupId>
|
|
33 |
<artifactId>dnet-schemas</artifactId>
|
|
34 |
<version>[1.0.0,2.0.0)</version>
|
|
35 |
</dependency>
|
|
36 | 36 |
|
37 |
<!-- Common services in every container -->
|
|
38 |
<dependency>
|
|
39 |
<groupId>eu.dnetlib</groupId>
|
|
40 |
<artifactId>cnr-enabling-hnm-service</artifactId>
|
|
41 |
<version>[2.0.0,3.0.0)</version>
|
|
42 |
</dependency>
|
|
43 |
<dependency>
|
|
44 |
<groupId>eu.dnetlib</groupId>
|
|
45 |
<artifactId>cnr-enabling-hcm-service</artifactId>
|
|
46 |
<version>[2.0.0,3.0.0)</version>
|
|
47 |
</dependency>
|
|
37 |
<!-- Common services in every container -->
|
|
38 |
<dependency>
|
|
39 |
<groupId>eu.dnetlib</groupId>
|
|
40 |
<artifactId>cnr-enabling-hnm-service</artifactId>
|
|
41 |
<version>[2.0.0,3.0.0)</version>
|
|
42 |
</dependency>
|
|
43 |
<dependency>
|
|
44 |
<groupId>eu.dnetlib</groupId>
|
|
45 |
<artifactId>cnr-enabling-hcm-service</artifactId>
|
|
46 |
<version>[2.0.0,3.0.0)</version>
|
|
47 |
</dependency>
|
|
48 | 48 |
|
49 |
<!-- Enabling services service -->
|
|
50 |
<dependency>
|
|
51 |
<groupId>eu.dnetlib</groupId>
|
|
52 |
<artifactId>cnr-enabling-services</artifactId>
|
|
53 |
<version>[2.0.0,3.0.0)</version>
|
|
54 |
<exclusions>
|
|
55 |
<exclusion>
|
|
56 |
<groupId>apache</groupId>
|
|
57 |
<artifactId>commons-pool</artifactId>
|
|
58 |
</exclusion>
|
|
59 |
</exclusions>
|
|
60 |
</dependency>
|
|
61 |
<dependency>
|
|
62 |
<groupId>eu.dnetlib</groupId>
|
|
63 |
<artifactId>cnr-enabling-inspector</artifactId>
|
|
64 |
<version>[2.0.0,3.0.0)</version>
|
|
65 |
</dependency>
|
|
66 |
<dependency>
|
|
67 |
<groupId>eu.dnetlib</groupId>
|
|
68 |
<artifactId>cnr-resultset-inspector</artifactId>
|
|
69 |
<version>[2.0.0,3.0.0)</version>
|
|
70 |
</dependency>
|
|
49 |
<!-- Enabling services service -->
|
|
50 |
<dependency>
|
|
51 |
<groupId>eu.dnetlib</groupId>
|
|
52 |
<artifactId>cnr-enabling-services</artifactId>
|
|
53 |
<version>[2.0.0,3.0.0)</version>
|
|
54 |
<exclusions>
|
|
55 |
<exclusion>
|
|
56 |
<groupId>apache</groupId>
|
|
57 |
<artifactId>commons-pool</artifactId>
|
|
58 |
</exclusion>
|
|
59 |
</exclusions>
|
|
60 |
</dependency>
|
|
61 |
<dependency>
|
|
62 |
<groupId>eu.dnetlib</groupId>
|
|
63 |
<artifactId>cnr-enabling-inspector</artifactId>
|
|
64 |
<version>[2.0.0,3.0.0)</version>
|
|
65 |
</dependency>
|
|
66 |
<dependency>
|
|
67 |
<groupId>eu.dnetlib</groupId>
|
|
68 |
<artifactId>cnr-resultset-inspector</artifactId>
|
|
69 |
<version>[2.0.0,3.0.0)</version>
|
|
70 |
</dependency>
|
|
71 | 71 |
|
72 |
<!-- Manager Service Resource Orchestration (required for workflows) -->
|
|
73 |
<dependency>
|
|
74 |
<groupId>eu.dnetlib</groupId>
|
|
75 |
<artifactId>dnet-msro-service</artifactId>
|
|
76 |
<version>[3.0.0,4.0.0)</version>
|
|
77 |
</dependency>
|
|
78 |
<dependency>
|
|
79 |
<groupId>eu.dnetlib</groupId>
|
|
80 |
<artifactId>dnet-mongo-logging</artifactId>
|
|
81 |
<version>[2.0.0,3.0.0)</version>
|
|
82 |
</dependency>
|
|
72 |
<!-- Manager Service Resource Orchestration (required for workflows) -->
|
|
73 |
<dependency>
|
|
74 |
<groupId>eu.dnetlib</groupId>
|
|
75 |
<artifactId>dnet-msro-service</artifactId>
|
|
76 |
<version>[3.0.0,4.0.0)</version>
|
|
77 |
</dependency>
|
|
78 |
<dependency>
|
|
79 |
<groupId>eu.dnetlib</groupId>
|
|
80 |
<artifactId>dnet-mongo-logging</artifactId>
|
|
81 |
<version>[2.0.0,3.0.0)</version>
|
|
82 |
</dependency>
|
|
83 | 83 |
|
84 |
<!-- Modular User Interfaces -->
|
|
85 |
<dependency>
|
|
86 |
<groupId>eu.dnetlib</groupId>
|
|
87 |
<artifactId>dnet-modular-ui</artifactId>
|
|
88 |
<version>[3.0.0,4.0.0)</version>
|
|
89 |
</dependency>
|
|
90 |
<dependency>
|
|
91 |
<groupId>eu.dnetlib</groupId>
|
|
92 |
<artifactId>dnet-modular-workflows-ui</artifactId>
|
|
93 |
<version>[4.0.0,5.0.0)</version>
|
|
94 |
</dependency>
|
|
95 |
<dependency>
|
|
96 |
<groupId>eu.dnetlib</groupId>
|
|
97 |
<artifactId>dnet-modular-is-ui</artifactId>
|
|
98 |
<version>[2.0.1,3.0.0)</version>
|
|
99 |
</dependency>
|
|
100 |
<dependency>
|
|
101 |
<groupId>eu.dnetlib</groupId>
|
|
102 |
<artifactId>dnet-modular-repositories-ui</artifactId>
|
|
103 |
<version>[4.0.0,5.0.0)</version>
|
|
104 |
</dependency>
|
|
105 |
<dependency>
|
|
106 |
<groupId>eu.dnetlib</groupId>
|
|
107 |
<artifactId>dnet-modular-oai-explorer-ui</artifactId>
|
|
108 |
<version>[2.0.0,3.0.0)</version>
|
|
109 |
</dependency>
|
|
110 |
<dependency>
|
|
111 |
<groupId>eu.dnetlib</groupId>
|
|
112 |
<artifactId>dnet-oai-modular-ui</artifactId>
|
|
113 |
<version>[3.0.0,4.0.0)</version>
|
|
114 |
</dependency>
|
|
115 |
<dependency>
|
|
116 |
<groupId>eu.dnetlib</groupId>
|
|
117 |
<artifactId>dnet-modular-vocabularies-ui</artifactId>
|
|
118 |
<version>[2.0.1,3.0.0)</version>
|
|
119 |
</dependency>
|
|
120 |
<dependency>
|
|
121 |
<groupId>eu.dnetlib</groupId>
|
|
122 |
<artifactId>dnet-modular-cleaning-rules-ui</artifactId>
|
|
123 |
<version>[2.0.0,3.0.0)</version>
|
|
124 |
</dependency>
|
|
125 |
<dependency>
|
|
126 |
<groupId>eu.dnetlib</groupId>
|
|
127 |
<artifactId>dnet-modular-database-ui</artifactId>
|
|
128 |
<version>[2.0.0,3.0.0)</version>
|
|
129 |
</dependency>
|
|
130 |
<dependency>
|
|
131 |
<groupId>eu.dnetlib</groupId>
|
|
132 |
<artifactId>dnet-modular-index-ui</artifactId>
|
|
133 |
<version>[2.0.1,3.0.0)</version>
|
|
134 |
</dependency>
|
|
84 |
<!-- Modular User Interfaces -->
|
|
85 |
<dependency>
|
|
86 |
<groupId>eu.dnetlib</groupId>
|
|
87 |
<artifactId>dnet-modular-ui</artifactId>
|
|
88 |
<version>[3.0.0,4.0.0)</version>
|
|
89 |
</dependency>
|
|
90 |
<dependency>
|
|
91 |
<groupId>eu.dnetlib</groupId>
|
|
92 |
<artifactId>dnet-modular-workflows-ui</artifactId>
|
|
93 |
<version>[4.0.0,5.0.0)</version>
|
|
94 |
</dependency>
|
|
95 |
<dependency>
|
|
96 |
<groupId>eu.dnetlib</groupId>
|
|
97 |
<artifactId>dnet-modular-is-ui</artifactId>
|
|
98 |
<version>[2.0.1,3.0.0)</version>
|
|
99 |
</dependency>
|
|
100 |
<dependency>
|
|
101 |
<groupId>eu.dnetlib</groupId>
|
|
102 |
<artifactId>dnet-modular-repositories-ui</artifactId>
|
|
103 |
<version>[4.0.0,5.0.0)</version>
|
|
104 |
</dependency>
|
|
105 |
<dependency>
|
|
106 |
<groupId>eu.dnetlib</groupId>
|
|
107 |
<artifactId>dnet-modular-oai-explorer-ui</artifactId>
|
|
108 |
<version>[2.0.0,3.0.0)</version>
|
|
109 |
</dependency>
|
|
110 |
<dependency>
|
|
111 |
<groupId>eu.dnetlib</groupId>
|
|
112 |
<artifactId>dnet-oai-modular-ui</artifactId>
|
|
113 |
<version>[3.0.0,4.0.0)</version>
|
|
114 |
</dependency>
|
|
115 |
<dependency>
|
|
116 |
<groupId>eu.dnetlib</groupId>
|
|
117 |
<artifactId>dnet-modular-vocabularies-ui</artifactId>
|
|
118 |
<version>[2.0.1,3.0.0)</version>
|
|
119 |
</dependency>
|
|
120 |
<dependency>
|
|
121 |
<groupId>eu.dnetlib</groupId>
|
|
122 |
<artifactId>dnet-modular-cleaning-rules-ui</artifactId>
|
|
123 |
<version>[2.0.0,3.0.0)</version>
|
|
124 |
</dependency>
|
|
125 |
<dependency>
|
|
126 |
<groupId>eu.dnetlib</groupId>
|
|
127 |
<artifactId>dnet-modular-database-ui</artifactId>
|
|
128 |
<version>[2.0.0,3.0.0)</version>
|
|
129 |
</dependency>
|
|
130 |
<dependency>
|
|
131 |
<groupId>eu.dnetlib</groupId>
|
|
132 |
<artifactId>dnet-modular-index-ui</artifactId>
|
|
133 |
<version>[2.0.1,3.0.0)</version>
|
|
134 |
</dependency>
|
|
135 | 135 |
|
136 |
<!-- Aggregation services -->
|
|
137 |
<dependency>
|
|
138 |
<groupId>eu.dnetlib</groupId>
|
|
139 |
<artifactId>cnr-mongo-mdstore</artifactId>
|
|
140 |
<version>[6.0.0-SNAPSHOT,7.0.0)</version>
|
|
141 |
</dependency>
|
|
142 |
<dependency>
|
|
143 |
<groupId>eu.dnetlib</groupId>
|
|
144 |
<artifactId>dnet-modular-collector-service</artifactId>
|
|
145 |
<version>[3.0.0,4.0.0)</version>
|
|
146 |
</dependency>
|
|
147 |
<!-- <dependency> -->
|
|
148 |
<!-- <groupId>eu.dnetlib</groupId> -->
|
|
149 |
<!-- <artifactId>dnet-gridfs-objectstore</artifactId> -->
|
|
150 |
<!-- <version>[4.0.0,5.0.0)</version> -->
|
|
151 |
<!-- <exclusions> -->
|
|
152 |
<!-- <exclusion> -->
|
|
153 |
<!-- <groupId>apache</groupId> -->
|
|
154 |
<!-- <artifactId>commons-net</artifactId> -->
|
|
155 |
<!-- </exclusion> -->
|
|
156 |
<!-- </exclusions> -->
|
|
157 |
<!-- </dependency> -->
|
|
136 |
<!-- Aggregation services -->
|
|
137 |
<dependency>
|
|
138 |
<groupId>eu.dnetlib</groupId>
|
|
139 |
<artifactId>cnr-mongo-mdstore</artifactId>
|
|
140 |
<version>[6.0.0-SNAPSHOT,7.0.0)</version>
|
|
141 |
</dependency>
|
|
142 |
<dependency>
|
|
143 |
<groupId>eu.dnetlib</groupId>
|
|
144 |
<artifactId>dnet-modular-collector-service</artifactId>
|
|
145 |
<version>[3.0.0,4.0.0)</version>
|
|
146 |
</dependency>
|
|
147 |
<!-- <dependency> -->
|
|
148 |
<!-- <groupId>eu.dnetlib</groupId> -->
|
|
149 |
<!-- <artifactId>dnet-gridfs-objectstore</artifactId> -->
|
|
150 |
<!-- <version>[4.0.0,5.0.0)</version> -->
|
|
151 |
<!-- <exclusions> -->
|
|
152 |
<!-- <exclusion> -->
|
|
153 |
<!-- <groupId>apache</groupId> -->
|
|
154 |
<!-- <artifactId>commons-net</artifactId> -->
|
|
155 |
<!-- </exclusion> -->
|
|
156 |
<!-- </exclusions> -->
|
|
157 |
<!-- </dependency> -->
|
|
158 | 158 |
|
159 | 159 |
|
160 |
<dependency>
|
|
161 |
<groupId>eu.dnetlib</groupId>
|
|
162 |
<artifactId>dnet-fs-objectstore</artifactId>
|
|
163 |
<version>[2.0.0,3.0.0)</version>
|
|
164 |
</dependency>
|
|
160 |
<dependency>
|
|
161 |
<groupId>eu.dnetlib</groupId>
|
|
162 |
<artifactId>dnet-fs-objectstore</artifactId>
|
|
163 |
<version>[2.0.0,3.0.0)</version>
|
|
164 |
</dependency>
|
|
165 | 165 |
|
166 |
<dependency>
|
|
167 |
<groupId>eu.dnetlib</groupId>
|
|
168 |
<artifactId>dnet-data-transformation-service</artifactId>
|
|
169 |
<version>[3.0.0,4.0.0)</version>
|
|
170 |
</dependency>
|
|
166 |
<dependency>
|
|
167 |
<groupId>eu.dnetlib</groupId>
|
|
168 |
<artifactId>dnet-data-transformation-service</artifactId>
|
|
169 |
<version>[3.0.0,4.0.0)</version>
|
|
170 |
</dependency>
|
|
171 | 171 |
|
172 |
<dependency>
|
|
173 |
<groupId>eu.dnetlib</groupId>
|
|
174 |
<artifactId>cnr-enabling-database-service</artifactId>
|
|
175 |
<version>[3.0.0,4.0.0)</version>
|
|
176 |
</dependency>
|
|
177 |
<dependency>
|
|
178 |
<groupId>eu.dnetlib</groupId>
|
|
179 |
<artifactId>dnet-openaireplus-profiles</artifactId>
|
|
180 |
<version>[1.0.0,2.0.0)</version>
|
|
181 |
</dependency>
|
|
182 |
<dependency>
|
|
183 |
<groupId>eu.dnetlib</groupId>
|
|
184 |
<artifactId>cnr-data-utility-cleaner-service</artifactId>
|
|
185 |
<version>[3.0.0,4.0.0)</version>
|
|
186 |
</dependency>
|
|
187 |
<dependency>
|
|
188 |
<groupId>eu.dnetlib</groupId>
|
|
189 |
<artifactId>dnet-openaireplus-workflows</artifactId>
|
|
190 |
<version>[6.0.0,7.0.0)</version>
|
|
191 |
</dependency>
|
|
172 |
<dependency>
|
|
173 |
<groupId>eu.dnetlib</groupId>
|
|
174 |
<artifactId>cnr-enabling-database-service</artifactId>
|
|
175 |
<version>[3.0.0,4.0.0)</version>
|
|
176 |
</dependency>
|
|
177 |
<dependency>
|
|
178 |
<groupId>eu.dnetlib</groupId>
|
|
179 |
<artifactId>dnet-openaireplus-profiles</artifactId>
|
|
180 |
<version>[1.0.0,2.0.0)</version>
|
|
181 |
</dependency>
|
|
182 |
<dependency>
|
|
183 |
<groupId>eu.dnetlib</groupId>
|
|
184 |
<artifactId>cnr-data-utility-cleaner-service</artifactId>
|
|
185 |
<version>[3.0.0,4.0.0)</version>
|
|
186 |
</dependency>
|
|
187 |
<dependency>
|
|
188 |
<groupId>eu.dnetlib</groupId>
|
|
189 |
<artifactId>dnet-openaireplus-workflows</artifactId>
|
|
190 |
<version>[6.0.0,7.0.0)</version>
|
|
191 |
</dependency>
|
|
192 | 192 |
|
193 |
<dependency>
|
|
194 |
<groupId>eu.dnetlib</groupId>
|
|
195 |
<artifactId>dnet-openaireplus-mapping-utils</artifactId>
|
|
196 |
<version>[6.1.0,7.0.0]</version>
|
|
197 |
</dependency>
|
|
193 |
<dependency> |
|
194 |
<groupId>eu.dnetlib</groupId> |
|
195 |
<artifactId>dnet-openaireplus-mapping-utils</artifactId>
|
|
196 |
<version>[6.1.0,7.0.0]</version>
|
|
197 |
</dependency>
|
|
198 | 198 |
|
199 |
<dependency>
|
|
200 |
<groupId>eu.dnetlib</groupId>
|
|
201 |
<artifactId>dnet-index-solr-common</artifactId>
|
|
202 |
<version>[1.3.2-SNAPSHOT]</version>
|
|
203 |
</dependency>
|
|
199 |
<dependency> |
|
200 |
<groupId>eu.dnetlib</groupId> |
|
201 |
<artifactId>dnet-index-solr-common</artifactId> |
|
202 |
<version>[1.3.2-SNAPSHOT]</version> |
|
203 |
</dependency> |
|
204 | 204 |
|
205 |
<dependency>
|
|
206 |
<groupId>eu.dnetlib</groupId>
|
|
207 |
<artifactId>dnet-deduplication</artifactId>
|
|
208 |
<version>[1.0.0,2.0.0)</version>
|
|
209 |
</dependency>
|
|
210 |
<dependency>
|
|
211 |
<groupId>eu.dnetlib</groupId>
|
|
212 |
<artifactId>dnet-hadoop-service</artifactId>
|
|
213 |
<version>[2.0.0,3.0.0)</version>
|
|
214 |
<exclusions>
|
|
215 |
<exclusion>
|
|
216 |
<groupId>org.jruby</groupId>
|
|
217 |
<artifactId>jruby-complete</artifactId>
|
|
218 |
</exclusion>
|
|
219 |
</exclusions>
|
|
220 |
</dependency>
|
|
221 |
<dependency>
|
|
222 |
<groupId>eu.dnetlib</groupId>
|
|
223 |
<artifactId>dnet-actionmanager-service</artifactId>
|
|
224 |
<version>[5.0.0,6.0.0)</version>
|
|
225 |
</dependency>
|
|
226 |
<dependency>
|
|
227 |
<groupId>eu.dnetlib</groupId>
|
|
228 |
<artifactId>dnet-download-service</artifactId>
|
|
229 |
<version>[2.0.0,3.0.0)</version>
|
|
230 |
</dependency>
|
|
231 |
<dependency>
|
|
232 |
<groupId>eu.dnetlib</groupId>
|
|
233 |
<artifactId>dnet-download-plugins</artifactId>
|
|
234 |
<version>[2.0.0,3.0.0)</version>
|
|
235 |
</dependency>
|
|
205 |
<dependency>
|
|
206 |
<groupId>eu.dnetlib</groupId>
|
|
207 |
<artifactId>dnet-deduplication</artifactId>
|
|
208 |
<version>[1.0.0,2.0.0)</version>
|
|
209 |
</dependency>
|
|
210 |
<dependency>
|
|
211 |
<groupId>eu.dnetlib</groupId>
|
|
212 |
<artifactId>dnet-hadoop-service</artifactId>
|
|
213 |
<version>[2.0.0,3.0.0)</version>
|
|
214 |
<exclusions>
|
|
215 |
<exclusion>
|
|
216 |
<groupId>org.jruby</groupId>
|
|
217 |
<artifactId>jruby-complete</artifactId>
|
|
218 |
</exclusion>
|
|
219 |
</exclusions>
|
|
220 |
</dependency>
|
|
221 |
<dependency>
|
|
222 |
<groupId>eu.dnetlib</groupId>
|
|
223 |
<artifactId>dnet-actionmanager-service</artifactId>
|
|
224 |
<version>[5.0.0,6.0.0)</version>
|
|
225 |
</dependency>
|
|
226 |
<dependency>
|
|
227 |
<groupId>eu.dnetlib</groupId>
|
|
228 |
<artifactId>dnet-download-service</artifactId>
|
|
229 |
<version>[2.0.0,3.0.0)</version>
|
|
230 |
</dependency>
|
|
231 |
<dependency>
|
|
232 |
<groupId>eu.dnetlib</groupId>
|
|
233 |
<artifactId>dnet-download-plugins</artifactId>
|
|
234 |
<version>[2.0.0,3.0.0)</version>
|
|
235 |
</dependency>
|
|
236 | 236 |
|
237 |
<dependency>
|
|
238 |
<groupId>eu.dnetlib</groupId>
|
|
239 |
<artifactId>cnr-inspector-security</artifactId>
|
|
240 |
<version>[1.0.0,2.0.0)</version>
|
|
241 |
</dependency>
|
|
242 |
<dependency>
|
|
243 |
<groupId>eu.dnetlib</groupId>
|
|
244 |
<artifactId>dnet-webapp-monitoring</artifactId>
|
|
245 |
<version>[1.0.0,2.0.0)</version>
|
|
246 |
</dependency>
|
|
237 |
<dependency>
|
|
238 |
<groupId>eu.dnetlib</groupId>
|
|
239 |
<artifactId>cnr-inspector-security</artifactId>
|
|
240 |
<version>[1.0.0,2.0.0)</version>
|
|
241 |
</dependency>
|
|
242 |
<dependency>
|
|
243 |
<groupId>eu.dnetlib</groupId>
|
|
244 |
<artifactId>dnet-webapp-monitoring</artifactId>
|
|
245 |
<version>[1.0.0,2.0.0)</version>
|
|
246 |
</dependency>
|
|
247 | 247 |
|
248 |
<dependency>
|
|
249 |
<groupId>eu.dnetlib</groupId>
|
|
250 |
<artifactId>dnet-openaire-blacklist</artifactId>
|
|
251 |
<version>[1.0.0,2.0.0)</version>
|
|
252 |
</dependency>
|
|
248 |
<dependency>
|
|
249 |
<groupId>eu.dnetlib</groupId>
|
|
250 |
<artifactId>dnet-openaire-blacklist</artifactId>
|
|
251 |
<version>[1.0.0,2.0.0)</version>
|
|
252 |
</dependency>
|
|
253 | 253 |
|
254 |
<dependency>
|
|
255 |
<groupId>eu.dnetlib</groupId>
|
|
256 |
<artifactId>dnet-modular-mdstore-ui</artifactId>
|
|
257 |
<version>[1.0.0-SNAPSHOT, 2.0.0)</version>
|
|
258 |
</dependency>
|
|
254 |
<dependency>
|
|
255 |
<groupId>eu.dnetlib</groupId>
|
|
256 |
<artifactId>dnet-modular-mdstore-ui</artifactId>
|
|
257 |
<version>[1.0.0-SNAPSHOT, 2.0.0)</version>
|
|
258 |
</dependency>
|
|
259 | 259 |
|
260 |
<!-- Light-ui for pre-public check -->
|
|
261 |
<!-- <dependency> -->
|
|
262 |
<!-- <groupId>eu.dnetlib</groupId> -->
|
|
263 |
<!-- <artifactId>dnet-modular-lightui-ui</artifactId> -->
|
|
264 |
<!-- <version>[2.0.0,3.0.0)</version> -->
|
|
265 |
<!-- </dependency> -->
|
|
260 |
<!-- Light-ui for pre-public check -->
|
|
261 |
<!-- <dependency> -->
|
|
262 |
<!-- <groupId>eu.dnetlib</groupId> -->
|
|
263 |
<!-- <artifactId>dnet-modular-lightui-ui</artifactId> -->
|
|
264 |
<!-- <version>[2.0.0,3.0.0)</version> -->
|
|
265 |
<!-- </dependency> -->
|
|
266 | 266 |
|
267 |
<dependency>
|
|
268 |
<groupId>xerces</groupId>
|
|
269 |
<artifactId>xercesImpl</artifactId>
|
|
270 |
<version>2.11.0</version>
|
|
271 |
<scope>compile</scope>
|
|
272 |
</dependency>
|
|
267 |
<dependency>
|
|
268 |
<groupId>xerces</groupId>
|
|
269 |
<artifactId>xercesImpl</artifactId>
|
|
270 |
<version>2.11.0</version>
|
|
271 |
<scope>compile</scope>
|
|
272 |
</dependency>
|
|
273 | 273 |
|
274 |
<dependency>
|
|
275 |
<groupId>eu.dnetlib</groupId>
|
|
276 |
<artifactId>dnet-mapreduce-jobs</artifactId>
|
|
277 |
<version>[1.0.0,2.0.0)</version>
|
|
278 |
</dependency>
|
|
274 |
<dependency>
|
|
275 |
<groupId>eu.dnetlib</groupId>
|
|
276 |
<artifactId>dnet-mapreduce-jobs</artifactId>
|
|
277 |
<version>[1.0.0,2.0.0)</version>
|
|
278 |
</dependency>
|
|
279 | 279 |
|
280 |
<dependency>
|
|
281 |
<groupId>javax.servlet</groupId>
|
|
282 |
<artifactId>javax.servlet-api</artifactId>
|
|
283 |
<version>${javax.servlet.version}</version>
|
|
284 |
<scope>provided</scope>
|
|
285 |
</dependency>
|
|
280 |
<dependency>
|
|
281 |
<groupId>javax.servlet</groupId>
|
|
282 |
<artifactId>javax.servlet-api</artifactId>
|
|
283 |
<version>${javax.servlet.version}</version>
|
|
284 |
<scope>provided</scope>
|
|
285 |
</dependency>
|
|
286 | 286 |
|
287 |
<!-- SWAGGER -->
|
|
288 |
<dependency>
|
|
289 |
<groupId>com.fasterxml.jackson.datatype</groupId>
|
|
290 |
<artifactId>jackson-datatype-joda</artifactId>
|
|
291 |
<version>2.6.6</version>
|
|
292 |
<exclusions>
|
|
293 |
<exclusion>
|
|
294 |
<groupId>com.fasterxml.jackson.core</groupId>
|
|
295 |
<artifactId>jackson-annotations</artifactId>
|
|
296 |
</exclusion>
|
|
297 |
</exclusions>
|
|
298 |
</dependency>
|
|
299 |
<dependency>
|
|
300 |
<groupId>joda-time</groupId>
|
|
301 |
<artifactId>joda-time</artifactId>
|
|
302 |
<version>2.8.2</version>
|
|
303 |
</dependency>
|
|
287 |
<!-- SWAGGER -->
|
|
288 |
<dependency>
|
|
289 |
<groupId>com.fasterxml.jackson.datatype</groupId>
|
|
290 |
<artifactId>jackson-datatype-joda</artifactId>
|
|
291 |
<version>2.6.6</version>
|
|
292 |
<exclusions>
|
|
293 |
<exclusion>
|
|
294 |
<groupId>com.fasterxml.jackson.core</groupId>
|
|
295 |
<artifactId>jackson-annotations</artifactId>
|
|
296 |
</exclusion>
|
|
297 |
</exclusions>
|
|
298 |
</dependency>
|
|
299 |
<dependency>
|
|
300 |
<groupId>joda-time</groupId>
|
|
301 |
<artifactId>joda-time</artifactId>
|
|
302 |
<version>2.8.2</version>
|
|
303 |
</dependency>
|
|
304 | 304 |
|
305 |
<dependency>
|
|
306 |
<groupId>io.springfox</groupId>
|
|
307 |
<artifactId>springfox-swagger2</artifactId>
|
|
308 |
<version>${springfox-version}</version>
|
|
309 |
</dependency>
|
|
310 |
<dependency>
|
|
311 |
<groupId>io.springfox</groupId>
|
|
312 |
<artifactId>springfox-swagger-ui</artifactId>
|
|
313 |
<version>${springfox-version}</version>
|
|
314 |
</dependency>
|
|
305 |
<dependency>
|
|
306 |
<groupId>io.springfox</groupId>
|
|
307 |
<artifactId>springfox-swagger2</artifactId>
|
|
308 |
<version>${springfox-version}</version>
|
|
309 |
</dependency>
|
|
310 |
<dependency>
|
|
311 |
<groupId>io.springfox</groupId>
|
|
312 |
<artifactId>springfox-swagger-ui</artifactId>
|
|
313 |
<version>${springfox-version}</version>
|
|
314 |
</dependency>
|
|
315 | 315 |
|
316 |
<dependency>
|
|
317 |
<groupId>org.hibernate</groupId>
|
|
318 |
<artifactId>hibernate-validator</artifactId>
|
|
319 |
<version>5.2.4.Final</version>
|
|
320 |
</dependency>
|
|
316 |
<dependency>
|
|
317 |
<groupId>org.hibernate</groupId>
|
|
318 |
<artifactId>hibernate-validator</artifactId>
|
|
319 |
<version>5.2.4.Final</version>
|
|
320 |
</dependency>
|
|
321 | 321 |
|
322 |
</dependencies>
|
|
322 |
</dependencies>
|
|
323 | 323 |
|
324 |
<properties>
|
|
325 |
<springfox-version>2.5.0</springfox-version>
|
|
326 |
</properties>
|
|
324 |
<properties>
|
|
325 |
<springfox-version>2.5.0</springfox-version>
|
|
326 |
</properties>
|
|
327 | 327 |
|
328 | 328 |
</project> |
modules/dnet-openaireplus-workflows/trunk/src/main/java/eu/dnetlib/msro/openaireplus/workflows/nodes/repohi/UpdateOpenaireMetaWfStatusJobNode.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.msro.openaireplus.workflows.nodes.repohi; |
2 | 2 |
|
3 |
import eu.dnetlib.enabling.datasources.common.LocalDatasourceManager; |
|
3 | 4 |
import org.springframework.beans.factory.annotation.Autowired; |
4 | 5 |
|
5 | 6 |
import eu.dnetlib.enabling.datasources.LocalOpenaireDatasourceManager; |
6 | 7 |
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; |
7 | 8 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
8 | 9 |
import eu.dnetlib.msro.workflows.nodes.repohi.UpdateMetaWfStatusJobNode; |
10 |
import org.springframework.beans.factory.annotation.Required; |
|
9 | 11 |
|
10 | 12 |
public class UpdateOpenaireMetaWfStatusJobNode extends UpdateMetaWfStatusJobNode { |
11 | 13 |
|
12 | 14 |
@Autowired |
13 | 15 |
private UniqueServiceLocator serviceLocator; |
16 |
|
|
14 | 17 |
@Autowired |
15 |
private LocalOpenaireDatasourceManager dsManager;
|
|
18 |
private LocalDatasourceManager dsManager; |
|
16 | 19 |
|
17 | 20 |
@Override |
18 | 21 |
protected void updateDatasource(final String dsId, final String ifaceId) throws Exception { |
... | ... | |
28 | 31 |
} |
29 | 32 |
} |
30 | 33 |
|
34 |
|
|
31 | 35 |
} |
modules/dnet-openaireplus-workflows/trunk/src/main/java/eu/dnetlib/msro/openaireplus/workflows/nodes/repobye/DeleteOpenaireMetaWfJobNode.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.msro.openaireplus.workflows.nodes.repobye; |
2 | 2 |
|
3 |
import org.springframework.beans.factory.annotation.Autowired; |
|
4 |
|
|
5 |
import eu.dnetlib.enabling.datasources.LocalOpenaireDatasourceManager; |
|
3 |
import eu.dnetlib.enabling.datasources.common.LocalDatasourceManager; |
|
6 | 4 |
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; |
7 | 5 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
8 | 6 |
import eu.dnetlib.msro.workflows.nodes.repobye.DeleteMetaWfJobNode; |
7 |
import org.springframework.beans.factory.annotation.Autowired; |
|
9 | 8 |
|
10 | 9 |
public class DeleteOpenaireMetaWfJobNode extends DeleteMetaWfJobNode { |
11 | 10 |
|
... | ... | |
13 | 12 |
private UniqueServiceLocator serviceLocator; |
14 | 13 |
|
15 | 14 |
@Autowired |
16 |
private LocalOpenaireDatasourceManager dsManager;
|
|
15 |
private LocalDatasourceManager dsManager; |
|
17 | 16 |
|
18 | 17 |
@Override |
19 | 18 |
protected void setActivationStatus(final String dsId, final String ifaceId, final boolean active) throws Exception { |
modules/dnet-openaireplus-workflows/trunk/src/main/resources/eu/dnetlib/msro/openaireplus/workflows/applicationContext-msro-openaire-nodes.xml | ||
---|---|---|
52 | 52 |
|
53 | 53 |
<bean id="wfNodeUpdateOpenaireMetaWfStatus" |
54 | 54 |
class="eu.dnetlib.msro.openaireplus.workflows.nodes.repohi.UpdateOpenaireMetaWfStatusJobNode" |
55 |
scope="prototype"/>
|
|
55 |
scope="prototype"/>
|
|
56 | 56 |
|
57 | 57 |
<bean id="wfNodeDeleteOpenaireMetaWf" |
58 | 58 |
class="eu.dnetlib.msro.openaireplus.workflows.nodes.repobye.DeleteOpenaireMetaWfJobNode" |
modules/cnr-enabling-database-service/trunk/pom.xml | ||
---|---|---|
3 | 3 |
<parent> |
4 | 4 |
<groupId>eu.dnetlib</groupId> |
5 | 5 |
<artifactId>dnet45-parent</artifactId> |
6 |
<version>1.0.0</version> |
|
6 |
<version>1.0.0-SNAPSHOT</version>
|
|
7 | 7 |
</parent> |
8 | 8 |
<modelVersion>4.0.0</modelVersion> |
9 | 9 |
<groupId>eu.dnetlib</groupId> |
... | ... | |
36 | 36 |
</dependency> |
37 | 37 |
<dependency> |
38 | 38 |
<groupId>org.postgresql</groupId> |
39 |
<artifactId>jdbc4driver</artifactId>
|
|
40 |
<version>8.3</version>
|
|
39 |
<artifactId>postgresql</artifactId>
|
|
40 |
<version>${postgres.jdbc.version}</version>
|
|
41 | 41 |
</dependency> |
42 | 42 |
<dependency> |
43 | 43 |
<groupId>org.apache.commons</groupId> |
modules/dnet-openaire-datasource-manager/trunk/src/main/java/eu/dnetlib/enabling/datasources/DatasourceFunctions.java | ||
---|---|---|
23 | 23 |
|
24 | 24 |
public class DatasourceFunctions { |
25 | 25 |
|
26 |
private static final Log log = LogFactory.getLog(DatasourceFunctions.class);
|
|
26 |
private static final Log log = LogFactory.getLog(DatasourceFunctions.class);
|
|
27 | 27 |
|
28 |
private static final Resource baseDsProfile = new ClassPathResource("/eu/dnetlib/enabling/datasources/templates/datasource_base.xml");
|
|
28 |
private static final Resource baseDsProfile = new ClassPathResource("/eu/dnetlib/enabling/datasources/templates/datasource_base.xml");
|
|
29 | 29 |
|
30 |
public static SimpleDatasource mapToSimpleDs(final Map<String, Object> map) { |
|
31 |
final SimpleDatasource ds = new SimpleDatasource(); |
|
32 |
ds.setId(castObject(map.get("id"), String.class)); |
|
33 |
ds.setName(castObject(map.get("name"), String.class)); |
|
34 |
ds.setOrigId(castObject(map.get("id"), String.class)); |
|
35 |
ds.setTypology(castObject(map.get("typology"), String.class)); |
|
36 |
ds.setValid(true); |
|
37 |
try { |
|
38 |
final Array arr = castObject(map.get("apis"), Array.class); |
|
39 |
if (arr != null) { |
|
40 |
ds.setApis(Arrays.stream((Object[]) arr.getArray()) |
|
41 |
.filter(Objects::nonNull) |
|
42 |
.map(Object::toString) |
|
43 |
.collect(Collectors.toSet())); |
|
44 |
} |
|
45 |
} catch (final SQLException e) { |
|
46 |
log.error("Error parsing array (apis)", e); |
|
47 |
throw new RuntimeException("Error parsing array (apis)", e); |
|
48 |
} |
|
30 |
public static SimpleDatasource mapToSimpleDs(final Map<String, Object> map) { |
|
31 |
final SimpleDatasource ds = new SimpleDatasource(); |
|
32 |
ds.setId(castObject(map.get("id"), String.class)); |
|
33 |
ds.setName(castObject(map.get("name"), String.class)); |
|
34 |
ds.setOrigId(castObject(map.get("id"), String.class)); |
|
35 |
ds.setTypology(castObject(map.get("typology"), String.class)); |
|
36 |
ds.setValid(true); |
|
37 |
try { |
|
38 |
final Array arr = castObject(map.get("apis"), Array.class); |
|
49 | 39 |
|
50 |
return ds; |
|
51 |
} |
|
40 |
for (Object o : (Object[]) (arr).getArray()) { |
|
41 |
log.info(o); |
|
42 |
} |
|
43 |
if (arr != null && ((Object[]) arr.getArray()).length > 0) { |
|
44 |
ds.setApis(Arrays.stream((Object[]) arr.getArray()) |
|
45 |
.filter(Objects::nonNull) |
|
46 |
.map(Object::toString) |
|
47 |
.collect(Collectors.toSet())); |
|
48 |
} |
|
49 |
} catch (final SQLException e) { |
|
50 |
log.error("Error parsing array (apis)", e); |
|
51 |
throw new RuntimeException("Error parsing array (apis)", e); |
|
52 |
} |
|
52 | 53 |
|
53 |
public static Datasource<Organization<?>, Identity> mapToDatasource(final Map<String, Object> map) { |
|
54 |
final Datasource<Organization<?>, Identity> ds = new Datasource<>(); |
|
55 |
ds.setId(castObject(map.get("id"), String.class)); |
|
56 |
ds.setOfficialname(castObject(map.get("officialname"), String.class)); |
|
57 |
ds.setEnglishname(castObject(map.get("englishname"), String.class)); |
|
58 |
ds.setWebsiteurl(castObject(map.get("websiteurl"), String.class)); |
|
59 |
ds.setLogourl(castObject(map.get("logourl"), String.class)); |
|
60 |
ds.setContactemail(castObject(map.get("contactemail"), String.class)); |
|
61 |
ds.setLatitude(castObject(map.get("latitude"), Double.class)); |
|
62 |
ds.setLongitude(castObject(map.get("longitude"), Double.class)); |
|
63 |
ds.setTimezone(castObject(map.get("timezone"), String.class)); |
|
64 |
ds.setNamespaceprefix(castObject(map.get("namespaceprefix"), String.class)); |
|
65 |
ds.setLanguages(castObject(map.get("languages"), String.class)); |
|
66 |
ds.setOd_contenttypes(castObject(map.get("od_contenttypes"), String.class)); |
|
67 |
ds.setCollectedfrom(castObject(map.get("collectedfrom"), String.class)); |
|
68 |
ds.setDateofvalidation(castObject(map.get("dateofvalidation"), Date.class)); |
|
69 |
ds.setTypology(castObject(map.get("typology"), String.class)); |
|
70 |
ds.setProvenanceaction(castObject(map.get("provenanceaction"), String.class)); |
|
71 |
ds.setDateofcollection(castObject(map.get("dateofcollection"), Date.class)); |
|
72 |
ds.setPlatform(castObject(map.get("platform"), String.class)); |
|
73 |
ds.setActivationId(castObject(map.get("activationId"), String.class)); |
|
74 |
ds.setDescription(castObject(map.get("description"), String.class)); |
|
75 |
ds.setReleasestartdate(castObject(map.get("releasestartdate"), Date.class)); |
|
76 |
ds.setReleaseenddate(castObject(map.get("releaseenddate"), Date.class)); |
|
77 |
ds.setMissionstatementurl(castObject(map.get("missionstatementurl"), String.class)); |
|
78 |
ds.setDataprovider(castObject(map.get("dataprovider"), Boolean.class)); |
|
79 |
ds.setServiceprovider(castObject(map.get("serviceprovider"), Boolean.class)); |
|
80 |
ds.setDatabaseaccesstype(castObject(map.get("databaseaccesstype"), String.class)); |
|
81 |
ds.setDatauploadtype(castObject(map.get("datauploadtype"), String.class)); |
|
82 |
ds.setDatabaseaccessrestriction(castObject(map.get("databaseaccessrestriction"), String.class)); |
|
83 |
ds.setDatauploadrestriction(castObject(map.get("datauploadrestriction"), String.class)); |
|
84 |
ds.setVersioning(castObject(map.get("versioning"), Boolean.class)); |
|
85 |
ds.setCitationguidelineurl(castObject(map.get("citationguidelineurl"), String.class)); |
|
86 |
ds.setQualitymanagementkind(castObject(map.get("qualitymanagementkind"), String.class)); |
|
87 |
ds.setPidsystems(castObject(map.get("pidsystems"), String.class)); |
|
88 |
ds.setCertificates(castObject(map.get("certificates"), String.class)); |
|
89 |
ds.setAggregator(castObject(map.get("aggregator"), String.class)); |
|
90 |
ds.setIssn(castObject(map.get("issn"), String.class)); |
|
91 |
ds.setEissn(castObject(map.get("eissn"), String.class)); |
|
92 |
ds.setLissn(castObject(map.get("lissn"), String.class)); |
|
93 |
ds.setRegisteredby(castObject(map.get("registeredby"), String.class)); |
|
94 |
ds.setSubjects(castObject(map.get("subjects"), String.class)); |
|
95 |
ds.setManaged(castObject(map.get("managed"), Boolean.class)); |
|
96 |
return ds; |
|
97 |
} |
|
54 |
return ds; |
|
55 |
} |
|
98 | 56 |
|
99 |
public static Identity mapToDsIdentity(final Map<String, Object> map) { |
|
100 |
final Identity id = new Identity(); |
|
101 |
id.setPid(castObject(map.get("pid"), String.class)); |
|
102 |
id.setIssuertype(castObject(map.get("issuertype"), String.class)); |
|
103 |
return id; |
|
104 |
} |
|
57 |
public static Datasource<Organization<?>, Identity> mapToDatasource(final Map<String, Object> map) { |
|
58 |
final Datasource<Organization<?>, Identity> ds = new Datasource<>(); |
|
59 |
ds.setId(castObject(map.get("id"), String.class)); |
|
60 |
ds.setOfficialname(castObject(map.get("officialname"), String.class)); |
|
61 |
ds.setEnglishname(castObject(map.get("englishname"), String.class)); |
|
62 |
ds.setWebsiteurl(castObject(map.get("websiteurl"), String.class)); |
|
63 |
ds.setLogourl(castObject(map.get("logourl"), String.class)); |
|
64 |
ds.setContactemail(castObject(map.get("contactemail"), String.class)); |
|
65 |
ds.setLatitude(castObject(map.get("latitude"), Double.class)); |
|
66 |
ds.setLongitude(castObject(map.get("longitude"), Double.class)); |
|
67 |
ds.setTimezone(castObject(map.get("timezone"), String.class)); |
|
68 |
ds.setNamespaceprefix(castObject(map.get("namespaceprefix"), String.class)); |
|
69 |
ds.setLanguages(castObject(map.get("languages"), String.class)); |
|
70 |
ds.setOd_contenttypes(castObject(map.get("od_contenttypes"), String.class)); |
|
71 |
ds.setCollectedfrom(castObject(map.get("collectedfrom"), String.class)); |
|
72 |
ds.setDateofvalidation(castObject(map.get("dateofvalidation"), Date.class)); |
|
73 |
ds.setTypology(castObject(map.get("typology"), String.class)); |
|
74 |
ds.setProvenanceaction(castObject(map.get("provenanceaction"), String.class)); |
|
75 |
ds.setDateofcollection(castObject(map.get("dateofcollection"), Date.class)); |
|
76 |
ds.setPlatform(castObject(map.get("platform"), String.class)); |
|
77 |
ds.setActivationId(castObject(map.get("activationId"), String.class)); |
|
78 |
ds.setDescription(castObject(map.get("description"), String.class)); |
|
79 |
ds.setReleasestartdate(castObject(map.get("releasestartdate"), Date.class)); |
|
80 |
ds.setReleaseenddate(castObject(map.get("releaseenddate"), Date.class)); |
|
81 |
ds.setMissionstatementurl(castObject(map.get("missionstatementurl"), String.class)); |
|
82 |
ds.setDataprovider(castObject(map.get("dataprovider"), Boolean.class)); |
|
83 |
ds.setServiceprovider(castObject(map.get("serviceprovider"), Boolean.class)); |
|
84 |
ds.setDatabaseaccesstype(castObject(map.get("databaseaccesstype"), String.class)); |
|
85 |
ds.setDatauploadtype(castObject(map.get("datauploadtype"), String.class)); |
|
86 |
ds.setDatabaseaccessrestriction(castObject(map.get("databaseaccessrestriction"), String.class)); |
|
87 |
ds.setDatauploadrestriction(castObject(map.get("datauploadrestriction"), String.class)); |
|
88 |
ds.setVersioning(castObject(map.get("versioning"), Boolean.class)); |
|
89 |
ds.setCitationguidelineurl(castObject(map.get("citationguidelineurl"), String.class)); |
|
90 |
ds.setQualitymanagementkind(castObject(map.get("qualitymanagementkind"), String.class)); |
|
91 |
ds.setPidsystems(castObject(map.get("pidsystems"), String.class)); |
|
92 |
ds.setCertificates(castObject(map.get("certificates"), String.class)); |
|
93 |
ds.setAggregator(castObject(map.get("aggregator"), String.class)); |
|
94 |
ds.setIssn(castObject(map.get("issn"), String.class)); |
|
95 |
ds.setEissn(castObject(map.get("eissn"), String.class)); |
|
96 |
ds.setLissn(castObject(map.get("lissn"), String.class)); |
|
97 |
ds.setRegisteredby(castObject(map.get("registeredby"), String.class)); |
|
98 |
ds.setSubjects(castObject(map.get("subjects"), String.class)); |
|
99 |
ds.setManaged(castObject(map.get("managed"), Boolean.class)); |
|
100 |
return ds; |
|
101 |
} |
|
105 | 102 |
|
106 |
public static Organization<Datasource<?, ?>> mapToDsOrganization(final Map<String, Object> map) { |
|
107 |
final Organization<Datasource<?, ?>> org = new Organization<>(); |
|
108 |
org.setId(castObject(map.get("id"), String.class)); |
|
109 |
org.setLegalshortname(castObject(map.get("legalshortname"), String.class)); |
|
110 |
org.setLegalname(castObject(map.get("legalname"), String.class)); |
|
111 |
org.setWebsiteurl(castObject(map.get("websiteurl"), String.class)); |
|
112 |
org.setLogourl(castObject(map.get("logourl"), String.class)); |
|
113 |
org.setCountry(castObject(map.get("country"), String.class)); |
|
114 |
org.setCollectedfrom(castObject(map.get("collectedfrom"), String.class)); |
|
115 |
org.setDateofcollection(castObject(map.get("dateofcollection"), Date.class)); |
|
116 |
org.setProvenanceaction(castObject(map.get("provenanceaction"), String.class)); |
|
117 |
return org; |
|
118 |
} |
|
103 |
public static Identity mapToDsIdentity(final Map<String, Object> map) { |
|
104 |
final Identity id = new Identity(); |
|
105 |
id.setPid(castObject(map.get("pid"), String.class)); |
|
106 |
id.setIssuertype(castObject(map.get("issuertype"), String.class)); |
|
107 |
return id; |
|
108 |
} |
|
119 | 109 |
|
120 |
public static SearchApisEntry mapToSearchApisEntry(final Map<String, Object> map) { |
|
121 |
final SearchApisEntry a = new SearchApisEntry(); |
|
122 |
a.setId(castObject(map.get("id"), String.class)); |
|
123 |
a.setCompliance(castObject(map.get("compliance"), String.class)); |
|
124 |
a.setActive(castObject(map.get("active"), Boolean.class)); |
|
125 |
a.setRepoId(castObject(map.get("dsId"), String.class)); |
|
126 |
a.setRepoName(castObject(map.get("name"), String.class)); |
|
127 |
a.setRepoCountry(castObject(map.get("country"), String.class)); |
|
128 |
a.setRepoPrefix(castObject(map.get("prefix"), String.class)); |
|
129 |
a.setAggrDate(castObject(map.get("aggrDate"), String.class)); |
|
130 |
a.setAggrTotal(castObject(map.get("aggrTotal"), Integer.class)); |
|
131 |
a.setProtocol(castObject(map.get("protocol"), String.class)); |
|
132 |
a.setAlternativeName(castObject(map.get("alternativeName"), String.class)); |
|
133 |
a.setRepoOrganization(castObject(map.get("organization"), String.class)); |
|
134 |
return a; |
|
135 |
} |
|
110 |
public static Organization<Datasource<?, ?>> mapToDsOrganization(final Map<String, Object> map) { |
|
111 |
final Organization<Datasource<?, ?>> org = new Organization<>(); |
|
112 |
org.setId(castObject(map.get("id"), String.class)); |
|
113 |
org.setLegalshortname(castObject(map.get("legalshortname"), String.class)); |
|
114 |
org.setLegalname(castObject(map.get("legalname"), String.class)); |
|
115 |
org.setWebsiteurl(castObject(map.get("websiteurl"), String.class)); |
|
116 |
org.setLogourl(castObject(map.get("logourl"), String.class)); |
|
117 |
org.setCountry(castObject(map.get("country"), String.class)); |
|
118 |
org.setCollectedfrom(castObject(map.get("collectedfrom"), String.class)); |
|
119 |
org.setDateofcollection(castObject(map.get("dateofcollection"), Date.class)); |
|
120 |
org.setProvenanceaction(castObject(map.get("provenanceaction"), String.class)); |
|
121 |
return org; |
|
122 |
} |
|
136 | 123 |
|
137 |
public static Api<ApiParam> mapToApi(final Map<String, Object> map) { |
|
138 |
final Api<ApiParam> a = new Api<>(); |
|
139 |
a.setId(castObject(map.get("id"), String.class)); |
|
140 |
a.setProtocol(castObject(map.get("protocol"), String.class)); |
|
141 |
a.setDatasource(castObject(map.get("datasource"), String.class)); |
|
142 |
a.setContentdescription(castObject(map.get("contentdescription"), String.class)); |
|
143 |
a.setActive(castObject(map.get("active"), Boolean.class)); |
|
144 |
a.setRemovable(castObject(map.get("removable"), Boolean.class)); |
|
145 |
a.setTypology(castObject(map.get("typology"), String.class)); |
|
146 |
a.setCompatibility(castObject(map.get("compatibility"), String.class)); |
|
147 |
a.setCompatibilityOverrided(castObject(map.get("isCompatibilityOverrided"), Boolean.class)); |
|
148 |
a.setMetadataIdentifierPath(castObject(map.get("metadataIdentifierPath"), String.class)); |
|
149 |
a.setLastCollectionTotal(castObject(map.get("lastCollectionTotal"), Integer.class)); |
|
150 |
a.setLastCollectionDate(castObject(map.get("lastCollectionDate"), Timestamp.class)); |
|
151 |
a.setLastCollectionMdid(castObject(map.get("lastCollectionMdid"), String.class)); |
|
152 |
a.setLastAggregationTotal(castObject(map.get("lastAggregationTotal"), Integer.class)); |
|
153 |
a.setLastAggregationDate(castObject(map.get("lastAggregationDate"), Timestamp.class)); |
|
154 |
a.setLastAggregationMdid(castObject(map.get("lastAggregationMdid"), String.class)); |
|
155 |
a.setLastDownloadTotal(castObject(map.get("lastDownloadTotal"), Integer.class)); |
|
156 |
a.setLastDownloadDate(castObject(map.get("lastDownloadDate"), Timestamp.class)); |
|
157 |
a.setLastDownloadObjid(castObject(map.get("lastDownloadObjid"), String.class)); |
|
158 |
a.setLastValidationJob(castObject(map.get("lastValidationJob"), String.class)); |
|
159 |
a.setBaseurl(castObject(map.get("baseUrl"), String.class)); |
|
160 |
try { |
|
161 |
final Array arr = castObject(map.get("params"), Array.class); |
|
162 |
if (arr != null) { |
|
163 |
a.setApiParams(Arrays.stream((Object[]) arr.getArray()) |
|
164 |
.filter(Objects::nonNull) |
|
165 |
.map(Object::toString) |
|
166 |
.map(s -> { |
|
167 |
final ApiParam p = new ApiParamImpl(); |
|
168 |
p.setParam(StringUtils.substringBefore(s, "=")); |
|
169 |
p.setValue(StringUtils.substringAfter(s, "=")); |
|
170 |
return p; |
|
171 |
}) |
|
172 |
.collect(Collectors.toSet())); |
|
173 |
} |
|
174 |
} catch (final SQLException e) { |
|
175 |
log.error("Error parsing array params", e); |
|
176 |
throw new RuntimeException("Error parsing array params", e); |
|
177 |
} |
|
124 |
public static SearchApisEntry mapToSearchApisEntry(final Map<String, Object> map) { |
|
125 |
final SearchApisEntry a = new SearchApisEntry(); |
|
126 |
a.setId(castObject(map.get("id"), String.class)); |
|
127 |
a.setCompliance(castObject(map.get("compliance"), String.class)); |
|
128 |
a.setActive(castObject(map.get("active"), Boolean.class)); |
|
129 |
a.setRepoId(castObject(map.get("dsId"), String.class)); |
|
130 |
a.setRepoName(castObject(map.get("name"), String.class)); |
|
131 |
a.setRepoCountry(castObject(map.get("country"), String.class)); |
|
132 |
a.setRepoPrefix(castObject(map.get("prefix"), String.class)); |
|
133 |
a.setAggrDate(castObject(map.get("aggrDate"), String.class)); |
|
134 |
a.setAggrTotal(castObject(map.get("aggrTotal"), Integer.class)); |
|
135 |
a.setProtocol(castObject(map.get("protocol"), String.class)); |
|
136 |
a.setAlternativeName(castObject(map.get("alternativeName"), String.class)); |
|
137 |
a.setRepoOrganization(castObject(map.get("organization"), String.class)); |
|
138 |
return a; |
|
139 |
} |
|
178 | 140 |
|
179 |
return a; |
|
180 |
} |
|
141 |
public static Api<ApiParam> mapToApi(final Map<String, Object> map) { |
|
142 |
final Api<ApiParam> a = new Api<>(); |
|
143 |
a.setId(castObject(map.get("id"), String.class)); |
|
144 |
a.setProtocol(castObject(map.get("protocol"), String.class)); |
|
145 |
a.setDatasource(castObject(map.get("datasource"), String.class)); |
|
146 |
a.setContentdescription(castObject(map.get("contentdescription"), String.class)); |
|
147 |
a.setActive(castObject(map.get("active"), Boolean.class)); |
|
148 |
a.setRemovable(castObject(map.get("removable"), Boolean.class)); |
|
149 |
a.setTypology(castObject(map.get("typology"), String.class)); |
|
150 |
a.setCompatibility(castObject(map.get("compatibility"), String.class)); |
|
151 |
a.setCompatibilityOverrided(castObject(map.get("isCompatibilityOverrided"), Boolean.class)); |
|
152 |
a.setMetadataIdentifierPath(castObject(map.get("metadataIdentifierPath"), String.class)); |
|
153 |
a.setLastCollectionTotal(castObject(map.get("lastCollectionTotal"), Integer.class)); |
|
154 |
a.setLastCollectionDate(castObject(map.get("lastCollectionDate"), Timestamp.class)); |
|
155 |
a.setLastCollectionMdid(castObject(map.get("lastCollectionMdid"), String.class)); |
|
156 |
a.setLastAggregationTotal(castObject(map.get("lastAggregationTotal"), Integer.class)); |
|
157 |
a.setLastAggregationDate(castObject(map.get("lastAggregationDate"), Timestamp.class)); |
|
158 |
a.setLastAggregationMdid(castObject(map.get("lastAggregationMdid"), String.class)); |
|
159 |
a.setLastDownloadTotal(castObject(map.get("lastDownloadTotal"), Integer.class)); |
|
160 |
a.setLastDownloadDate(castObject(map.get("lastDownloadDate"), Timestamp.class)); |
|
161 |
a.setLastDownloadObjid(castObject(map.get("lastDownloadObjid"), String.class)); |
|
162 |
a.setLastValidationJob(castObject(map.get("lastValidationJob"), String.class)); |
|
163 |
a.setBaseurl(castObject(map.get("baseUrl"), String.class)); |
|
164 |
try { |
|
165 |
final Array arr = castObject(map.get("params"), Array.class); |
|
166 |
if (arr != null) { |
|
167 |
a.setApiParams(Arrays.stream((Object[]) arr.getArray()) |
|
168 |
.filter(Objects::nonNull) |
|
169 |
.map(Object::toString) |
|
170 |
.map(s -> { |
|
171 |
final ApiParam p = new ApiParamImpl(); |
|
172 |
p.setParam(StringUtils.substringBefore(s, "=")); |
|
173 |
p.setValue(StringUtils.substringAfter(s, "=")); |
|
174 |
return p; |
|
175 |
}) |
|
176 |
.collect(Collectors.toSet())); |
|
177 |
} |
|
178 |
} catch (final SQLException e) { |
|
179 |
log.error("Error parsing array params", e); |
|
180 |
throw new RuntimeException("Error parsing array params", e); |
|
181 |
} |
|
181 | 182 |
|
182 |
public static String dsToProfile(final Datasource<Organization<?>, Identity> ds, final List<Api<ApiParam>> apis, final String profId) |
|
183 |
throws DocumentException, IOException { |
|
184 |
final Document doc = new SAXReader().read(baseDsProfile.getInputStream()); |
|
183 |
return a; |
|
184 |
} |
|
185 | 185 |
|
186 |
setValue(doc, "//DATASOURCE_TYPE", ds.getPlatform()); |
|
187 |
setValue(doc, "//DATASOURCE_ORIGINAL_ID", ds.getId()); |
|
188 |
setValue(doc, "//TYPOLOGY", ds.getTypology()); |
|
189 |
setValue(doc, "//OFFICIAL_NAME", ds.getOfficialname()); |
|
190 |
setValue(doc, "//ENGLISH_NAME", ds.getEnglishname()); |
|
191 |
setValue(doc, "//ICON_URI", ds.getLogourl()); |
|
192 |
setValue(doc, "//COUNTRY", ds.getOrganizations().stream().map(Organization::getCountry).findFirst().orElse("")); |
|
193 |
setValue(doc, "//LONGITUDE", ds.getLongitude()); |
|
194 |
setValue(doc, "//LATITUDE", ds.getLatitude()); |
|
195 |
setValue(doc, "//TIMEZONE", ds.getTimezone()); |
|
196 |
setValue(doc, "//REPOSITORY_WEBPAGE", ds.getWebsiteurl()); |
|
197 |
setValue(doc, "//REPOSITORY_INSTITUTION", ds.getOrganizations().stream().map(Organization::getLegalname).findFirst().orElse("")); |
|
198 |
setValue(doc, "//ADMIN_INFO", ds.getContactemail()); |
|
199 |
setValue(doc, "//REGISTERED_BY", ds.getRegisteredby()); |
|
200 |
setValue(doc, "//LAST_UPDATE/@value", DateUtils.now_ISO8601()); |
|
186 |
public static String dsToProfile(final Datasource<Organization<?>, Identity> ds, final List<Api<ApiParam>> apis, final String profId) |
|
187 |
throws DocumentException, IOException { |
|
188 |
final Document doc = new SAXReader().read(baseDsProfile.getInputStream()); |
|
201 | 189 |
|
202 |
final Element ef = (Element) doc.selectSingleNode("//EXTRA_FIELDS"); |
|
203 |
addExtraField(ef, "OpenAireDataSourceId", ds.getId()); |
|
204 |
addExtraField(ef, "NamespacePrefix", ds.getNamespaceprefix()); |
|
205 |
addExtraField(ef, "VERIFIED", "NO"); |
|
206 |
addExtraField(ef, "aggregatorName", ds.getAggregator()); |
|
207 |
addExtraField(ef, "dateOfValidation", ds.getDateofvalidation()); |
|
208 |
addExtraField(ef, "dateOfCollection", ds.getDateofcollection()); |
|
209 |
addExtraField(ef, "mergeHomonyms", "NO"); |
|
210 |
addExtraField(ef, "ACTID", ds.getActivationId()); |
|
190 |
setValue(doc, "//DATASOURCE_TYPE", ds.getPlatform()); |
|
191 |
setValue(doc, "//DATASOURCE_ORIGINAL_ID", ds.getId()); |
|
192 |
setValue(doc, "//TYPOLOGY", ds.getTypology()); |
|
193 |
setValue(doc, "//OFFICIAL_NAME", ds.getOfficialname()); |
|
194 |
setValue(doc, "//ENGLISH_NAME", ds.getEnglishname()); |
|
195 |
setValue(doc, "//ICON_URI", ds.getLogourl()); |
|
196 |
setValue(doc, "//COUNTRY", ds.getOrganizations().stream().map(Organization::getCountry).findFirst().orElse("")); |
|
197 |
setValue(doc, "//LONGITUDE", ds.getLongitude()); |
|
198 |
setValue(doc, "//LATITUDE", ds.getLatitude()); |
|
199 |
setValue(doc, "//TIMEZONE", ds.getTimezone()); |
|
200 |
setValue(doc, "//REPOSITORY_WEBPAGE", ds.getWebsiteurl()); |
|
201 |
setValue(doc, "//REPOSITORY_INSTITUTION", ds.getOrganizations().stream().map(Organization::getLegalname).findFirst().orElse("")); |
|
202 |
setValue(doc, "//ADMIN_INFO", ds.getContactemail()); |
|
203 |
setValue(doc, "//REGISTERED_BY", ds.getRegisteredby()); |
|
204 |
setValue(doc, "//LAST_UPDATE/@value", DateUtils.now_ISO8601()); |
|
211 | 205 |
|
212 |
if (apis != null) { |
|
213 |
final Element ifaces = (Element) doc.selectSingleNode("//INTERFACES"); |
|
214 |
apis.forEach(api -> addInterface(ifaces, api)); |
|
215 |
} |
|
216 |
return doc.asXML(); |
|
217 |
} |
|
206 |
final Element ef = (Element) doc.selectSingleNode("//EXTRA_FIELDS"); |
|
207 |
addExtraField(ef, "OpenAireDataSourceId", ds.getId()); |
|
208 |
addExtraField(ef, "NamespacePrefix", ds.getNamespaceprefix()); |
|
209 |
addExtraField(ef, "VERIFIED", "NO"); |
|
210 |
addExtraField(ef, "aggregatorName", ds.getAggregator()); |
|
211 |
addExtraField(ef, "dateOfValidation", ds.getDateofvalidation()); |
|
212 |
addExtraField(ef, "dateOfCollection", ds.getDateofcollection()); |
|
213 |
addExtraField(ef, "mergeHomonyms", "NO"); |
|
214 |
addExtraField(ef, "ACTID", ds.getActivationId()); |
|
218 | 215 |
|
219 |
private static void setValue(final Document doc, final String xpath, final Object value) { |
|
220 |
if (value != null) { |
|
221 |
doc.selectSingleNode(xpath).setText(value.toString()); |
|
222 |
} |
|
223 |
} |
|
216 |
if (apis != null) { |
|
217 |
final Element ifaces = (Element) doc.selectSingleNode("//INTERFACES"); |
|
218 |
apis.forEach(api -> addInterface(ifaces, api)); |
|
219 |
} |
|
220 |
return doc.asXML(); |
|
221 |
} |
|
224 | 222 |
|
225 |
private static void addInterface(final Element ifaces, final Api<?> api) { |
|
223 |
private static void setValue(final Document doc, final String xpath, final Object value) { |
|
224 |
if (value != null) { |
|
225 |
doc.selectSingleNode(xpath).setText(value.toString()); |
|
226 |
} |
|
227 |
} |
|
226 | 228 |
|
227 |
final Element ifc = ifaces.addElement("INTERFACE"); |
|
228 |
ifc.addAttribute("id", api.getId()); |
|
229 |
ifc.addAttribute("label", String.format("%s (%s)", |
|
230 |
StringUtils.defaultIfBlank(api.getTypology(), "-"), |
|
231 |
StringUtils.defaultIfBlank(api.getCompatibility(), "-"))); |
|
232 |
ifc.addAttribute("typology", StringUtils.defaultIfBlank(api.getTypology(), "")); |
|
233 |
ifc.addAttribute("active", "" + BooleanUtils.toBooleanDefaultIfNull(api.getActive(), false)); |
|
234 |
ifc.addAttribute("compliance", StringUtils.defaultIfBlank(api.getCompatibility(), "")); |
|
235 |
ifc.addAttribute("contentDescription", StringUtils.defaultIfBlank(api.getContentdescription(), "")); |
|
236 |
ifc.addAttribute("removable", "" + BooleanUtils.toBooleanDefaultIfNull(api.getRemovable(), false)); |
|
229 |
private static void addInterface(final Element ifaces, final Api<?> api) { |
|
237 | 230 |
|
238 |
final Element ap = ifc.addElement("ACCESS_PROTOCOL"); |
|
239 |
api.getApiParams().forEach(p -> ap.addAttribute(p.getParam(), p.getValue())); |
|
240 |
ap.setText(StringUtils.defaultIfBlank(api.getProtocol(), "")); |
|
241 |
ifc.addElement("BASE_URL").setText(StringUtils.defaultIfBlank(api.getBaseurl(), "")); |
|
231 |
final Element ifc = ifaces.addElement("INTERFACE"); |
|
232 |
ifc.addAttribute("id", api.getId()); |
|
233 |
ifc.addAttribute("label", String.format("%s (%s)", |
|
234 |
StringUtils.defaultIfBlank(api.getTypology(), "-"), |
|
235 |
StringUtils.defaultIfBlank(api.getCompatibility(), "-"))); |
|
236 |
ifc.addAttribute("typology", StringUtils.defaultIfBlank(api.getTypology(), "")); |
|
237 |
ifc.addAttribute("active", "" + BooleanUtils.toBooleanDefaultIfNull(api.getActive(), false)); |
|
238 |
ifc.addAttribute("compliance", StringUtils.defaultIfBlank(api.getCompatibility(), "")); |
|
239 |
ifc.addAttribute("contentDescription", StringUtils.defaultIfBlank(api.getContentdescription(), "")); |
|
240 |
ifc.addAttribute("removable", "" + BooleanUtils.toBooleanDefaultIfNull(api.getRemovable(), false)); |
|
242 | 241 |
|
243 |
if (api.isCompatibilityOverrided()) { |
|
244 |
addInterfaceExtraField(ifc, "overriding_compliance", true); |
|
245 |
} |
|
242 |
final Element ap = ifc.addElement("ACCESS_PROTOCOL"); |
|
243 |
api.getApiParams().forEach(p -> ap.addAttribute(p.getParam(), p.getValue())); |
|
244 |
ap.setText(StringUtils.defaultIfBlank(api.getProtocol(), "")); |
|
245 |
ifc.addElement("BASE_URL").setText(StringUtils.defaultIfBlank(api.getBaseurl(), "")); |
|
246 | 246 |
|
247 |
addInterfaceExtraField(ifc, "metadata_identifier_path", api.getMetadataIdentifierPath()); |
|
248 |
addInterfaceExtraField(ifc, "last_collection_date", api.getLastCollectionDate()); |
|
249 |
addInterfaceExtraField(ifc, "last_collection_mdId", api.getLastCollectionMdid()); |
|
250 |
addInterfaceExtraField(ifc, "last_collection_total", api.getLastCollectionTotal()); |
|
251 |
addInterfaceExtraField(ifc, "last_aggregation_date", api.getLastAggregationDate()); |
|
252 |
addInterfaceExtraField(ifc, "last_aggregation_mdId", api.getLastAggregationMdid()); |
|
253 |
addInterfaceExtraField(ifc, "last_aggregation_total", api.getLastAggregationTotal()); |
|
254 |
addInterfaceExtraField(ifc, "last_download_date", api.getLastDownloadDate()); |
|
255 |
addInterfaceExtraField(ifc, "last_download_objId", api.getLastDownloadObjid()); |
|
256 |
addInterfaceExtraField(ifc, "last_download_total", api.getLastDownloadTotal()); |
|
257 |
} |
|
247 |
if (api.isCompatibilityOverrided()) { |
|
248 |
addInterfaceExtraField(ifc, "overriding_compliance", true); |
|
249 |
} |
|
258 | 250 |
|
259 |
private static void addExtraField(final Element parent, final String field, final Object value) { |
|
260 |
if (value != null && StringUtils.isNotBlank(value.toString())) { |
|
261 |
final Element f = parent.addElement("FIELD"); |
|
262 |
f.addElement("key").setText(field); |
|
263 |
f.addElement("value").setText(value.toString()); |
|
264 |
} |
|
265 |
} |
|
251 |
addInterfaceExtraField(ifc, "metadata_identifier_path", api.getMetadataIdentifierPath()); |
|
252 |
addInterfaceExtraField(ifc, "last_collection_date", api.getLastCollectionDate()); |
|
253 |
addInterfaceExtraField(ifc, "last_collection_mdId", api.getLastCollectionMdid()); |
|
254 |
addInterfaceExtraField(ifc, "last_collection_total", api.getLastCollectionTotal()); |
|
255 |
addInterfaceExtraField(ifc, "last_aggregation_date", api.getLastAggregationDate()); |
|
256 |
addInterfaceExtraField(ifc, "last_aggregation_mdId", api.getLastAggregationMdid()); |
|
257 |
addInterfaceExtraField(ifc, "last_aggregation_total", api.getLastAggregationTotal()); |
|
258 |
addInterfaceExtraField(ifc, "last_download_date", api.getLastDownloadDate()); |
|
259 |
addInterfaceExtraField(ifc, "last_download_objId", api.getLastDownloadObjid()); |
|
260 |
addInterfaceExtraField(ifc, "last_download_total", api.getLastDownloadTotal()); |
|
261 |
} |
|
266 | 262 |
|
267 |
private static void addInterfaceExtraField(final Element parent, final String field, final Object value) {
|
|
268 |
if (value != null && StringUtils.isNotBlank(value.toString())) {
|
|
269 |
final Element f = parent.addElement("INTERFACE_EXTRA_FIELD");
|
|
270 |
f.addAttribute("name", field);
|
|
271 |
f.setText(value.toString());
|
|
272 |
}
|
|
273 |
}
|
|
263 |
private static void addExtraField(final Element parent, final String field, final Object value) {
|
|
264 |
if (value != null && StringUtils.isNotBlank(value.toString())) {
|
|
265 |
final Element f = parent.addElement("FIELD");
|
|
266 |
f.addElement("key").setText(field);
|
|
267 |
f.addElement("value").setText(value.toString());
|
|
268 |
}
|
|
269 |
}
|
|
274 | 270 |
|
275 |
public static Map<String, Object> dsToMap(final Datasource<Organization<?>, Identity> ds) { |
|
276 |
final Map<String, Object> map = new HashMap<>(); |
|
271 |
private static void addInterfaceExtraField(final Element parent, final String field, final Object value) { |
|
272 |
if (value != null && StringUtils.isNotBlank(value.toString())) { |
|
273 |
final Element f = parent.addElement("INTERFACE_EXTRA_FIELD"); |
|
274 |
f.addAttribute("name", field); |
|
275 |
f.setText(value.toString()); |
|
276 |
} |
|
277 |
} |
|
277 | 278 |
|
278 |
map.put("id", ds.getId()); |
|
279 |
map.put("officialname", ds.getOfficialname()); |
|
280 |
map.put("englishname", ds.getEnglishname()); |
|
281 |
map.put("websiteurl", ds.getWebsiteurl()); |
|
282 |
map.put("logourl", ds.getLogourl()); |
|
283 |
map.put("contactemail", ds.getContactemail()); |
|
284 |
map.put("latitude", ds.getLatitude()); |
|
285 |
map.put("longitude", ds.getLongitude()); |
|
286 |
map.put("timezone", ds.getTimezone()); |
|
287 |
map.put("namespaceprefix", ds.getNamespaceprefix()); |
|
288 |
map.put("languages", ds.getLanguages()); |
|
289 |
map.put("od_contenttypes", ds.getOd_contenttypes()); |
|
290 |
map.put("collectedfrom", ds.getCollectedfrom()); |
|
291 |
map.put("dateofvalidation", ds.getDateofvalidation()); |
|
292 |
map.put("typology", ds.getTypology()); |
|
293 |
map.put("provenanceaction", ds.getProvenanceaction()); |
|
294 |
map.put("platform", ds.getPlatform()); |
|
295 |
map.put("activationid", ds.getActivationId()); |
|
296 |
map.put("description", ds.getDescription()); |
|
297 |
map.put("releasestartdate", ds.getReleasestartdate()); |
|
298 |
map.put("releaseenddate", ds.getReleaseenddate()); |
|
299 |
map.put("missionstatementurl", ds.getMissionstatementurl()); |
|
300 |
map.put("dataprovider", ds.isDataprovider()); |
|
301 |
map.put("serviceprovider", ds.isServiceprovider()); |
|
302 |
map.put("databaseaccesstype", ds.getDatabaseaccesstype()); |
|
303 |
map.put("datauploadtype", ds.getDatauploadtype()); |
|
304 |
map.put("databaseaccessrestriction", ds.getDatabaseaccessrestriction()); |
|
305 |
map.put("datauploadrestriction", ds.getDatauploadrestriction()); |
|
306 |
map.put("versioning", ds.isVersioning()); |
|
307 |
map.put("citationguidelineurl", ds.getCitationguidelineurl()); |
|
308 |
map.put("qualitymanagementkind", ds.getQualitymanagementkind()); |
|
309 |
map.put("pidsystems", ds.getPidsystems()); |
|
310 |
map.put("certificates", ds.getCertificates()); |
|
311 |
map.put("aggregator", ds.getAggregator()); |
|
312 |
map.put("issn", ds.getIssn()); |
|
313 |
map.put("eissn", ds.getEissn()); |
|
314 |
map.put("lissn", ds.getLissn()); |
|
315 |
map.put("registeredby", ds.getRegisteredby()); |
|
316 |
map.put("subjects", ds.getSubjects()); |
|
317 |
map.put("managed", ds.isManaged()); |
|
279 |
public static Map<String, Object> dsToMap(final Datasource<Organization<?>, Identity> ds) { |
|
280 |
final Map<String, Object> map = new HashMap<>(); |
|
318 | 281 |
|
319 |
return map; |
|
320 |
} |
|
282 |
map.put("id", ds.getId()); |
|
283 |
map.put("officialname", ds.getOfficialname()); |
|
284 |
map.put("englishname", ds.getEnglishname()); |
|
285 |
map.put("websiteurl", ds.getWebsiteurl()); |
|
286 |
map.put("logourl", ds.getLogourl()); |
|
287 |
map.put("contactemail", ds.getContactemail()); |
|
288 |
map.put("latitude", ds.getLatitude()); |
|
289 |
map.put("longitude", ds.getLongitude()); |
|
290 |
map.put("timezone", ds.getTimezone()); |
|
291 |
map.put("namespaceprefix", ds.getNamespaceprefix()); |
|
292 |
map.put("languages", ds.getLanguages()); |
|
293 |
map.put("od_contenttypes", ds.getOd_contenttypes()); |
|
294 |
map.put("collectedfrom", ds.getCollectedfrom()); |
|
295 |
map.put("dateofvalidation", ds.getDateofvalidation()); |
|
296 |
map.put("typology", ds.getTypology()); |
|
297 |
map.put("provenanceaction", ds.getProvenanceaction()); |
|
298 |
map.put("platform", ds.getPlatform()); |
|
299 |
map.put("activationid", ds.getActivationId()); |
|
300 |
map.put("description", ds.getDescription()); |
|
301 |
map.put("releasestartdate", ds.getReleasestartdate()); |
|
302 |
map.put("releaseenddate", ds.getReleaseenddate()); |
|
303 |
map.put("missionstatementurl", ds.getMissionstatementurl()); |
|
304 |
map.put("dataprovider", ds.isDataprovider()); |
|
305 |
map.put("serviceprovider", ds.isServiceprovider()); |
|
306 |
map.put("databaseaccesstype", ds.getDatabaseaccesstype()); |
|
307 |
map.put("datauploadtype", ds.getDatauploadtype()); |
|
308 |
map.put("databaseaccessrestriction", ds.getDatabaseaccessrestriction()); |
|
309 |
map.put("datauploadrestriction", ds.getDatauploadrestriction()); |
|
310 |
map.put("versioning", ds.isVersioning()); |
|
311 |
map.put("citationguidelineurl", ds.getCitationguidelineurl()); |
|
312 |
map.put("qualitymanagementkind", ds.getQualitymanagementkind()); |
|
313 |
map.put("pidsystems", ds.getPidsystems()); |
|
314 |
map.put("certificates", ds.getCertificates()); |
|
315 |
map.put("aggregator", ds.getAggregator()); |
|
316 |
map.put("issn", ds.getIssn()); |
|
317 |
map.put("eissn", ds.getEissn()); |
|
318 |
map.put("lissn", ds.getLissn()); |
|
319 |
map.put("registeredby", ds.getRegisteredby()); |
|
320 |
map.put("subjects", ds.getSubjects()); |
|
321 |
map.put("managed", ds.isManaged()); |
|
321 | 322 |
|
322 |
public static Map<String, Object> orgToMap(final String dsId, final Organization<?> org) { |
|
323 |
final Map<String, Object> map = new HashMap<>(); |
|
324 |
map.put("dsId", dsId); |
|
325 |
map.put("orgId", org.getId()); |
|
326 |
map.put("legalname", org.getLegalname()); |
|
327 |
map.put("legalshortname", org.getLegalshortname()); |
|
328 |
map.put("websiteurl", org.getWebsiteurl()); |
|
329 |
map.put("logourl", org.getLogourl()); |
|
330 |
map.put("country", org.getCountry()); |
|
331 |
return map; |
|
332 |
} |
|
323 |
return map; |
|
324 |
} |
|
333 | 325 |
|
334 |
public static Map<String, Object> apiToMap(final Api<?> api) { |
|
335 |
final Map<String, Object> map = new HashMap<>(); |
|
336 |
map.put("apiId", api.getId()); |
|
337 |
map.put("protocol", api.getProtocol()); |
|
338 |
map.put("baseUrl", api.getBaseurl()); |
|
339 |
map.put("dsId", api.getDatasource()); |
|
340 |
map.put("contentDescription", api.getContentdescription()); |
|
341 |
map.put("typology", api.getTypology()); |
|
342 |
map.put("compatibility", api.getCompatibility()); |
|
343 |
map.put("metadataIdentifierPath", api.getMetadataIdentifierPath()); |
|
344 |
// The other fields are not required in the INSERT operation |
|
345 |
return map; |
|
346 |
} |
|
326 |
public static Map<String, Object> orgToMap(final String dsId, final Organization<?> org) { |
|
327 |
final Map<String, Object> map = new HashMap<>(); |
|
328 |
map.put("dsId", dsId); |
|
329 |
map.put("orgId", org.getId()); |
|
330 |
map.put("legalname", org.getLegalname()); |
|
331 |
map.put("legalshortname", org.getLegalshortname()); |
|
332 |
map.put("websiteurl", org.getWebsiteurl()); |
|
333 |
map.put("logourl", org.getLogourl()); |
|
334 |
map.put("country", org.getCountry()); |
|
335 |
return map; |
|
336 |
} |
|
347 | 337 |
|
348 |
@SuppressWarnings("unchecked") |
|
349 |
private static <T> T castObject(final Object o, final Class<T> clazz) { |
|
350 |
if (o == null) { return null; } |
|
351 |
if (clazz.isInstance(o)) { return (T) o; } |
|
352 |
throw new IllegalArgumentException("Type not managed: " + clazz.getSimpleName()); |
|
353 |
} |
|
338 |
public static Map<String, Object> apiToMap(final Api<?> api) { |
|
339 |
final Map<String, Object> map = new HashMap<>(); |
|
340 |
map.put("apiId", api.getId()); |
|
341 |
map.put("protocol", api.getProtocol()); |
|
342 |
map.put("baseUrl", api.getBaseurl()); |
|
343 |
map.put("dsId", api.getDatasource()); |
|
344 |
map.put("contentDescription", api.getContentdescription()); |
|
345 |
map.put("typology", api.getTypology()); |
|
346 |
map.put("compatibility", api.getCompatibility()); |
|
347 |
map.put("metadataIdentifierPath", api.getMetadataIdentifierPath()); |
|
348 |
// The other fields are not required in the INSERT operation |
|
349 |
return map; |
|
350 |
} |
|
354 | 351 |
|
352 |
@SuppressWarnings("unchecked") |
|
353 |
private static <T> T castObject(final Object o, final Class<T> clazz) { |
|
354 |
if (o == null) { |
|
355 |
return null; |
|
356 |
} |
|
357 |
if (clazz.isInstance(o)) { |
|
358 |
return (T) o; |
|
359 |
} |
|
360 |
throw new IllegalArgumentException("Type not managed: " + clazz.getSimpleName()); |
|
361 |
} |
|
362 |
|
|
355 | 363 |
} |
modules/dnet-openaire-datasource-manager/trunk/src/main/java/eu/dnetlib/enabling/datasources/LocalOpenaireDatasourceManager.java | ||
---|---|---|
36 | 36 |
import eu.dnetlib.enabling.datasources.common.Organization; |
37 | 37 |
import eu.dnetlib.enabling.datasources.common.SearchApisEntry; |
38 | 38 |
import eu.dnetlib.enabling.datasources.common.SimpleDatasource; |
39 |
import org.springframework.transaction.annotation.Transactional; |
|
39 | 40 |
|
40 | 41 |
public class LocalOpenaireDatasourceManager implements LocalDatasourceManager<Datasource<Organization<?>, Identity>, Api<ApiParam>> { |
41 | 42 |
|
... | ... | |
68 | 69 |
private static final String REPO_PROFILEID_SUFFIX = "_UmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU="; |
69 | 70 |
|
70 | 71 |
@Override |
72 |
@Transactional(readOnly = true) |
|
71 | 73 |
public Set<String> listManagedDatasourceIds() throws DsmRuntimeException { |
72 | 74 |
try { |
73 | 75 |
return datasourceManagerClients.searchSQL("SELECT id FROM dsm_datasources WHERE managed = true", new HashMap<>()) |
... | ... | |
80 | 82 |
} |
81 | 83 |
|
82 | 84 |
@Override |
85 |
@Transactional(readOnly = true) |
|
83 | 86 |
public List<SimpleDatasource> searchDatasourcesByType(final String type) throws DsmException { |
87 |
|
|
84 | 88 |
return datasourceManagerClients.searchSQL(searchDsByType, ImmutableMap.of("type", type)) |
85 | 89 |
.stream() |
86 | 90 |
.map(DatasourceFunctions::mapToSimpleDs) |
... | ... | |
88 | 92 |
} |
89 | 93 |
|
90 | 94 |
@Override |
95 |
@Transactional(readOnly = true) |
|
91 | 96 |
public List<? extends SearchApisEntry> searchApis(final String field, final Object value) throws DsmException { |
92 | 97 |
try { |
93 | 98 |
final StringWriter sql = new StringWriter(); |
... | ... | |
114 | 119 |
} |
115 | 120 |
|
116 | 121 |
@Override |
122 |
@Transactional |
|
117 | 123 |
public void saveDs(final Datasource<Organization<?>, Identity> ds) throws DsmException { |
118 | 124 |
|
119 | 125 |
if (StringUtils.isBlank(ds.getAggregator())) { |
... | ... | |
135 | 141 |
} |
136 | 142 |
|
137 | 143 |
@Override |
144 |
@Transactional |
|
138 | 145 |
public void deleteDs(final String dsId) throws DsmException { |
139 | 146 |
datasourceManagerClients.updateSQL(fixDsId(dsId), deleteDs, AfterSqlUpdate.DELETE_DS_PROFILE, ImmutableMap.of("dsId", dsId)); |
140 | 147 |
} |
... | ... | |
173 | 180 |
} |
174 | 181 |
|
175 | 182 |
@Override |
183 |
@Transactional |
|
176 | 184 |
public void setActive(final String dsId, final String apiId, final boolean active) throws DsmException { |
177 | 185 |
final String id = fixDsId(dsId); |
178 | 186 |
|
... | ... | |
190 | 198 |
} |
191 | 199 |
|
192 | 200 |
@Override |
201 |
@Transactional(readOnly = true) |
|
193 | 202 |
public boolean isActive(final String dsId, final String apiId) throws DsmException { |
194 | 203 |
final String q = "SELECT * from dsm_api WHERE id = :apiId AND datasource = :dsId AND active = true"; |
195 | 204 |
return !datasourceManagerClients.searchSQL(q, ImmutableMap.of("dsId", fixDsId(dsId), "apiId", apiId)).isEmpty(); |
196 | 205 |
} |
197 | 206 |
|
198 | 207 |
@Override |
208 |
@Transactional(readOnly = true) |
|
199 | 209 |
public boolean isRemovable(final String dsId, final String apiId) throws DsmException { |
200 | 210 |
final String q = "SELECT * from dsm_api WHERE id = :apiId AND datasource = :dsId AND active != true AND removable = true"; |
201 | 211 |
return !datasourceManagerClients.searchSQL(q, ImmutableMap.of("dsId", fixDsId(dsId), "apiId", apiId)).isEmpty(); |
202 | 212 |
} |
203 | 213 |
|
204 | 214 |
@Override |
215 |
@Transactional |
|
205 | 216 |
public void updateCompliance(final String dsId, final String apiId, final String level, final boolean override) throws DsmException { |
206 | 217 |
final String id = fixDsId(dsId); |
207 | 218 |
|
... | ... | |
217 | 228 |
} |
218 | 229 |
|
219 | 230 |
@Override |
231 |
|
|
220 | 232 |
public void setLastCollectionInfo(final String dsId, final String apiId, final String mdId, final Integer size, final Date date) |
221 | 233 |
throws DsmException { |
222 | 234 |
setLastOperationInfo(setLastCollectionInfo, fixDsId(dsId), apiId, mdId, size, date); |
... | ... | |
234 | 246 |
setLastOperationInfo(setLastDownloadInfo, fixDsId(dsId), apiId, objId, size, date); |
235 | 247 |
} |
236 | 248 |
|
237 |
private void setLastOperationInfo(final Resource sqlResource, final String dsId, final String apiId, final String mdId, final Integer size, final Date date) |
|
249 |
@Transactional |
|
250 |
protected void setLastOperationInfo(final Resource sqlResource, final String dsId, final String apiId, final String mdId, final Integer size, final Date date) |
|
238 | 251 |
throws DsmException { |
239 | 252 |
final Map<String, Object> params = new HashMap<>(); |
240 | 253 |
params.put("dsId", dsId); |
... | ... | |
251 | 264 |
} |
252 | 265 |
|
253 | 266 |
@Override |
267 |
@Transactional |
|
254 | 268 |
public void updateApiDetails(final String dsId, |
255 | 269 |
final String apiId, |
256 | 270 |
final String metadataIdentifierPath, |
... | ... | |
311 | 325 |
} |
312 | 326 |
|
313 | 327 |
@Override |
328 |
@Transactional |
|
314 | 329 |
public void addApi(final Api<ApiParam> api) throws DsmException { |
315 | 330 |
|
316 | 331 |
datasourceManagerClients.updateSQL(api.getDatasource(), insertApi, AfterSqlUpdate.NONE, DatasourceFunctions.apiToMap(api)); |
... | ... | |
328 | 343 |
} |
329 | 344 |
|
330 | 345 |
@Override |
346 |
@Transactional |
|
331 | 347 |
public void deleteApi(final String dsId, final String apiId) throws DsmException { |
332 | 348 |
if (!isRemovable(dsId, apiId)) { throw new DsmException("The api " + apiId + " can't be deleted"); } |
333 | 349 |
|
Also available in: Unified diff
upgraded version of jdbc driver for postgres, this includes a lot of changes, Because we have to add @transactional
annotation in some properties to avoid connection closed exception