View Javadoc

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