View Javadoc

1   /*
2    * $Id: QuerierPlugin.java,v 1.2 2006/06/15 16:50:08 clq2 Exp $
3    *
4    * (C) Copyright Astrogrid...
5    */
6   
7   package org.astrogrid.dataservice.queriers;
8   
9   
10  
11  import java.io.IOException;
12  import java.security.Principal;
13  import org.astrogrid.query.Query;
14  import org.astrogrid.query.QueryException;
15  
16  /***
17   * Querier Plugins are used to carry out all the database specific backend
18   * tasks.  They are given a parent at construction time; this is the Querier
19   * class that provides all the information a young plugin needs, such as the
20   * Query itself, a way of updating status, etc
21   *
22   */
23  
24  public interface QuerierPlugin  {
25  
26     /*** This is the method called to carry out the query.
27       * Used by both synchronous (blocking) and asynchronous (threaded) querying
28       * through processQuery. Should run the query and send the results although
29       * the parent has methods to help with this.  The plugin should have everyting
30       * tidied up and discarded as nec before returning - there is no close() method
31       */
32     public void askQuery(Principal user, Query query, Querier querier) throws IOException, QueryException;
33     
34     /*** Abort - if this is called, try and top the query and tidy up.   */
35     public void abort();
36     
37     /*** Returns just the number of matches rather than the list of matches */
38     public long getCount(Principal user, Query query, Querier querier) throws IOException, QueryException;
39     
40     /*** Returns a string array of the formats that can be produced */
41     public String[] getFormats();
42  }
43  /*
44   $Log: QuerierPlugin.java,v $
45   Revision 1.2  2006/06/15 16:50:08  clq2
46   PAL_KEA_1612
47  
48   Revision 1.1.1.1.92.1  2006/04/21 11:54:05  kea
49   Changed QueryException from a RuntimeException to an Exception.
50  
51   Revision 1.1.1.1  2005/02/17 18:37:35  mch
52   Initial checkin
53  
54   Revision 1.1.1.1  2005/02/16 17:11:24  mch
55   Initial checkin
56  
57   Revision 1.5.2.1  2004/11/22 00:57:16  mch
58   New interfaces for SIAP etc and new slinger package
59  
60   Revision 1.5  2004/11/12 13:49:12  mch
61   Fix where keyword maker might not have had keywords made
62  
63   Revision 1.4  2004/11/03 00:17:56  mch
64   PAL_MCH Candidate 2 merge
65  
66   Revision 1.3.6.1  2004/10/27 00:43:39  mch
67   Started adding getCount, some resource fixes, some jsps
68  
69   Revision 1.3  2004/10/18 13:11:30  mch
70   Lumpy Merge
71  
72   Revision 1.2.2.1  2004/10/15 19:59:05  mch
73   Lots of changes during trip to CDS to improve int test pass rate
74  
75   Revision 1.2  2004/10/06 21:12:17  mch
76   Big Lump of changes to pass Query OM around instead of Query subclasses, and TargetIndicator mixed into Slinger
77  
78   Revision 1.1  2004/09/28 15:02:13  mch
79   Merged PAL and server packages
80  
81   Revision 1.16  2004/09/07 00:54:20  mch
82   Tidied up Querier/Plugin/Results, and removed deprecated SPI-visitor-SQL-translator
83  
84   Revision 1.15  2004/09/06 20:23:00  mch
85   Replaced metadata generators/servers with plugin mechanism. Added Authority plugin
86  
87   Revision 1.14  2004/08/25 23:38:34  mch
88   (Days changes) moved many query- and results- related classes, renamed packages, added tests, added CIRCLE to sql/adql parsers
89  
90   Revision 1.13  2004/08/17 20:19:36  mch
91   Moved TargetIndicator to client
92  
93   Revision 1.12  2004/04/01 17:15:21  mch
94   Attempt to remove plugin on close
95  
96   Revision 1.11  2004/03/22 12:31:10  mch
97   Removed datacenter prefix from emailing keys
98  
99   Revision 1.10  2004/03/22 12:26:12  mch
100  Removed writer close
101 
102  Revision 1.9  2004/03/18 18:32:45  mch
103  Added info
104 
105  Revision 1.8  2004/03/18 00:31:33  mch
106  Added adql 7.3.1 tests and max row information to status
107 
108  Revision 1.7  2004/03/15 19:16:12  mch
109  Lots of fixes to status updates
110 
111  Revision 1.6  2004/03/15 17:13:21  mch
112  changed to configurable from address
113 
114  Revision 1.5  2004/03/15 11:25:35  mch
115  Fixes to emailer and JSP targetting
116 
117  Revision 1.4  2004/03/14 16:55:48  mch
118  Added XSLT ADQL->SQL support
119 
120  Revision 1.3  2004/03/14 04:13:04  mch
121  Wrapped output target in TargetIndicator
122 
123  Revision 1.2  2004/03/14 02:17:07  mch
124  Added CVS format and emailer
125 
126  Revision 1.1  2004/03/12 04:45:26  mch
127  It05 MCH Refactor
128 
129  */
130 
131 
132 
133