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="localOpenaireDatasourceManager"
|
17
|
class="eu.dnetlib.enabling.datasources.LocalOpenaireDatasourceManager"
|
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 o.country as id, o.country as name, count(*) as count from dsm_api a left outer join dsm_datasources d on (a.datasource = d.id) left outer join dsm_datasource_organization dao on (d.id = dao.datasource) left outer join dsm_organizations o on (dao.organization = o.id) group by o.country 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 a.typology as id, a.typology as name, count(*) from dsm_api a group by a.typology 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 a.protocol as id, a.protocol as name, count(*) from dsm_api a group by a.protocol 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 coalesce(a.compatibility_override, a.compatibility) as id, coalesce(a.compatibility_override, a.compatibility) as name, count(*) from dsm_api a group by coalesce(a.compatibility_override, a.compatibility) 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 a.active as id, a.active as name, count(*) from dsm_api a group by a.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
|
</beans>
|