View Javadoc

1   /*
2    * $Id: CutoutPlugin.java,v 1.2 2005/03/10 15:13:48 mch Exp $
3    *
4    * (C) Copyright Astrogrid...
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  //       make image...
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   $Log: CutoutPlugin.java,v $
60   Revision 1.2  2005/03/10 15:13:48  mch
61   Seperating out fits, table and xdb servers
62  
63  
64   */
65  
66  
67  
68