1
2
3
4
5
6
7 package org.astrogrid.dataservice.queriers.cutout;
8
9 import java.io.IOException;
10 import java.security.Principal;
11 import org.astrogrid.dataservice.queriers.DefaultPlugin;
12 import org.astrogrid.dataservice.queriers.Querier;
13 import org.astrogrid.dataservice.queriers.status.QuerierComplete;
14 import org.astrogrid.dataservice.queriers.status.QuerierQuerying;
15 import org.astrogrid.query.Query;
16
17 /***
18 * An example plugin skeleton
19 *
20 * @author M Hill
21 */
22
23 public class CutoutPlugin extends DefaultPlugin {
24
25
26 public CutoutPlugin() throws IOException
27 {
28 }
29
30 /*** Does Query */
31 public void askQuery(Principal user, Query query, Querier querier) throws IOException {
32 querier.setStatus(new QuerierQuerying(querier.getStatus(), query.toString()));
33
34
35
36
37
38 querier.setStatus(new QuerierComplete(querier.getStatus()));
39
40
41
42 }
43
44 /*** Returns just the number of matches rather than the list of matches */
45 public long getCount(Principal user, Query query, Querier querier) throws IOException {
46 throw new UnsupportedOperationException("Not done yet");
47 }
48
49 /*** Returns the formats that this plugin can provide. Asks the results class; override in subclasse if nec */
50 public String[] getFormats() {
51 return new String[] { "FITS" };
52 }
53
54
55
56 }
57
58
59
60
61
62
63
64
65
66
67
68