1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
3
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
|
4
|
xmlns:sec="http://cxf.apache.org/configuration/security" xmlns:wsa="http://cxf.apache.org/ws/addressing"
|
5
|
xmlns:p="http://www.springframework.org/schema/p" xmlns:http="http://cxf.apache.org/transports/http/configuration"
|
6
|
xmlns:t="http://dnetlib.eu/springbeans/t" xmlns:template="http://dnetlib.eu/springbeans/template"
|
7
|
xmlns:util="http://www.springframework.org/schema/util"
|
8
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
9
|
http://cxf.apache.org/ws/addressing http://cxf.apache.org/schemas/ws-addr-conf.xsd
|
10
|
http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd
|
11
|
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
|
12
|
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
|
13
|
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
|
14
|
http://dnetlib.eu/springbeans/template http://dnetlib.eu/springbeans/template.xsd">
|
15
|
|
16
|
<bean id="datasourceManagerService"
|
17
|
class="eu.dnetlib.enabling.datasources.DatasourceManagerServiceImpl"
|
18
|
p:datasourceManagerClients-ref="datasourceManagerClients">
|
19
|
<property name="browsableFields">
|
20
|
<list>
|
21
|
<bean class="eu.dnetlib.enabling.datasources.DbBrowsableField"
|
22
|
p:id="country"
|
23
|
p:label="Datasource countries"
|
24
|
p:sql="select c.code as id, c.name as name, count(*) as count from api a left outer join datasources d on (a.datasource = d.id) left outer join datasource_organization dao on (d.id = dao.datasource) left outer join organizations o on (dao.organization = o.id) left outer join class c on (o.countryclass = c.code) group by c.code, c.name order by count desc" />
|
25
|
<bean class="eu.dnetlib.enabling.datasources.DbBrowsableField"
|
26
|
p:id="type"
|
27
|
p:label="API typologies"
|
28
|
p:sql="select c.code as id, c.name as name, count(*) as count from api a left outer join class c on (a.typologyclass = c.code) group by c.code, c.name order by count desc" />
|
29
|
<bean class="eu.dnetlib.enabling.datasources.DbBrowsableField"
|
30
|
p:id="protocol"
|
31
|
p:label="API protocols"
|
32
|
p:sql="select c.code as id, c.name as name, count(*) as count from api a left outer join class c on (a.protocolclass = c.code) group by c.code, c.name order by count desc" />
|
33
|
<bean class="eu.dnetlib.enabling.datasources.DbBrowsableField"
|
34
|
p:id="compliance"
|
35
|
p:label="API compatibility levels"
|
36
|
p:sql="select c.code as id, c.name as name, count(*) from api a left outer join apicollections ac on (a.id = ac.api and ac.param = 'overriding_compliance') left outer join class c on (c.code = case when (ac.edited IS NOT NULL) then ac.edited when (ac.original IS NOT NULL) then ac.original else a.compatibilityclass end) group by c.code, c.name order by count desc" />
|
37
|
<bean class="eu.dnetlib.enabling.datasources.DbBrowsableField"
|
38
|
p:id="active"
|
39
|
p:label="API activation"
|
40
|
p:sql="select active as id, active as name, count(*) as count from api group by active order by count desc"
|
41
|
p:text="false"/>
|
42
|
</list>
|
43
|
</property>
|
44
|
</bean>
|
45
|
|
46
|
<bean id="datasourceManagerClients"
|
47
|
class="eu.dnetlib.enabling.datasources.DatasourceManagerClients"
|
48
|
p:db="${dnet.openaire.db.name}"
|
49
|
p:serviceLocator-ref="uniqueServiceLocator"
|
50
|
p:resultSetClientFactory-ref="resultSetClientFactory" />
|
51
|
|
52
|
<!-- endpoints -->
|
53
|
<jaxws:endpoint id="datasourceManagerServiceEndpoint"
|
54
|
implementor="#datasourceManagerService"
|
55
|
implementorClass="eu.dnetlib.enabling.datasources.rmi.DatasourceManagerService"
|
56
|
address="/datasourceManager" />
|
57
|
|
58
|
<template:instance name="serviceRegistrationManager"
|
59
|
t:serviceRegistrationManagerClass="eu.dnetlib.enabling.tools.registration.ValidatingServiceRegistrationManagerImpl"
|
60
|
t:name="datasourceManagerServiceRegistrationManager" t:service="datasourceManagerService"
|
61
|
t:endpoint="datasourceManagerServiceEndpoint" t:jobScheduler="jobScheduler" />
|
62
|
|
63
|
</beans>
|