1
2
3
4
5
6
7 package org.astrogrid.dataservice.metadata.queryable;
8
9
10 import java.io.IOException;
11
12 /***
13 * Things that represent queryable data can present their metadata through this
14 * interface. Publishing the whole thing may be too large for aggregate systems
15 * (eg Vizier) so this allows us to ask for a bit at a time, suitably eg for
16 * query builders.
17 * A queryable resource consists of 'tree' like search fields, where a search field
18 * (eg a column) may be a member of a group (eg a table), and that group may be part
19 * of a bigger group (eg a dataset)
20 */
21
22 public interface QueryableResourceReader {
23
24
25 /*** Returns group information about the group with the given ID within the parent
26 * group */
27 public SearchGroup getGroup(SearchGroup parent, String groupId) throws IOException ;
28
29 /*** Returns field information about the field with the given ID within the parent group */
30 public SearchField getField(SearchGroup parent, String fieldId) throws IOException;
31
32 /*** Returns the list of 'root' groups - ie top level groups */
33 public SearchGroup[] getRootGroups() throws IOException;
34
35 /*** Returns the list of groups in the given parent group */
36 public SearchGroup[] getGroups(SearchGroup parent) throws IOException;
37
38 /*** Returns the list of fields in the given parent group */
39 public SearchField[] getFields(SearchGroup parent) throws IOException;
40
41 /*** Special case for spatial searches. Returns the groups that contain
42 * fields suitable for spatial searching */
43 public SearchGroup[] getSpatialGroups() throws IOException;
44
45 /*** Special case for spatial searches. Returns the fields in the given
46 * group that can be used for spatial searching */
47 public SearchField[] getSpatialFields(SearchGroup parent) throws IOException;
48 }
49
50