Commit 8a39b2607e8551bcb6a9c2658570cd94959ce295
1 parent
35919668
Exists in
master
Get only EPN-core services.
Showing
2 changed files
with
9 additions
and
16 deletions
Show diff stats
src/main/java/eu/omp/irap/vespa/epntapclient/controller/EpnTapController.java
... | ... | @@ -52,7 +52,7 @@ public class EpnTapController { |
52 | 52 | |
53 | 53 | // TODO: Get only *EPN* TAP services |
54 | 54 | servicesController = new VOTableController(Const.DEFAULT_REGISTRY_URL, "ADQL", |
55 | - Queries.GET_TAP_SERVICES); | |
55 | + Queries.GET_EPN_TAP_SERVICES); | |
56 | 56 | |
57 | 57 | resultsController = new VOTableController(); |
58 | 58 | ... | ... |
src/main/java/eu/omp/irap/vespa/epntapclient/utils/Queries.java
... | ... | @@ -22,22 +22,15 @@ package eu.omp.irap.vespa.epntapclient.utils; |
22 | 22 | public final class Queries { |
23 | 23 | |
24 | 24 | /** Query to get all EPN-TAP services. */ |
25 | - public static final String GET_EPN_TAP_SERVICES = "SELECT ivoid, short_name, res_title, reference_url, base_role, role_name, " | |
26 | - + "email, intf_index, access_url, standard_id, cap_type, cap_description, " | |
27 | - + "std_version, res_subjects " | |
28 | - + "FROM rr.resource AS res " | |
25 | + public static final String GET_EPN_TAP_SERVICES = "SELECT short_name, access_url FROM " | |
26 | + + "rr.resource " | |
29 | 27 | + "NATURAL JOIN rr.interface " |
30 | - + "NATURAL JOIN rr.capability " | |
31 | - + "NATURAL LEFT OUTER JOIN rr.res_role " | |
32 | - + "NATURAL LEFT OUTER JOIN (SELECT ivoid, ivo_string_agg(res_subject, ', ') " | |
33 | - + "AS res_subjects " | |
34 | - + "FROM rr.res_subject GROUP BY ivoid) AS sbj " | |
35 | - + "WHERE (base_role='contact' OR base_role='publisher' OR base_role IS NULL) " | |
36 | - + "AND standard_id='ivo://ivoa.net/std/tap' AND intf_type='vs:paramhttp' " | |
37 | - + "AND ((1=ivo_nocasematch(short_name, '%epn%') " | |
38 | - + "OR 1=ivo_hasword(res_title, 'epn') OR 1=ivo_hasword(res_subjects, 'epn') " | |
39 | - + "OR 1=ivo_nocasematch(ivoid, '%epn%') OR (base_role='publisher' " | |
40 | - + "AND 1=ivo_nocasematch(role_name, '%epn%'))))"; | |
28 | + + "NATURAL JOIN rr.res_detail " | |
29 | + + "NATURAL JOIN rr.capability " | |
30 | + + "WHERE standard_id='ivo://ivoa.net/std/tap' AND " | |
31 | + + "intf_type='vs:paramhttp' AND " | |
32 | + + "detail_xpath='/capability/dataModel/@ivo-id' AND " | |
33 | + + "1=ivo_nocasematch(detail_value, 'ivo://vopdc.obspm/std/EpnCore%')"; | |
41 | 34 | |
42 | 35 | /** Query to get all services of the registry. */ |
43 | 36 | public static final String GET_ALL_SERVICES = "SELECT ivoid, short_name, res_title, res_description, accessurl, ntable " | ... | ... |