Project

General

Profile

« Previous | Next » 

Revision 745

Fixed bug in metacat where return doctypes were not being properly
back traced. Changed DBQuery.findDocuments() so that it no longer
takes a returndoc array, but instead retrieves the returndoc array
fromthe QUERYSpecification. The QuerySpecification was augmented
with a whole bunch of get/set accessor methods.

View differences:

QuerySpecification.java
50 50
 */
51 51
public class QuerySpecification extends DefaultHandler {
52 52
 
53
  /** flag determining whether extended query terms are present */
53 54
  private boolean containsExtendedSQL=false;
54
 
55
  // Query data structures
55
  /** Identifier for this query document */
56 56
  private String meta_file_id;
57
  /** Title of this query */
58
  private String queryTitle;
59
  /** List of document types to be returned using package back tracing */
57 60
  private Vector returnDocList;
61
  /** List of document types to be searched */
58 62
  private Vector filterDocList;
63
  /** List of fields to be returned in result set */
59 64
  private Vector returnFieldList;
65
  /** List of users owning documents to be searched */
60 66
  private Vector ownerList;
67
  /** List of sites/scopes used to constrain search */
61 68
  private Vector siteList;
69
  /** The root query group that contains the recursive query constraints */
62 70
  private QueryGroup query = null;
63 71

  
72
  // Query data structures used temporarily during XML parsing
64 73
  private Stack elementStack;
65 74
  private Stack queryStack;
66 75
  private String currentValue;
......
166 175
  }
167 176
  
168 177
  /**
178
   * Accessor method to return the identifier of this Query
179
   */
180
  public String getIdentifier()
181
  {
182
    return meta_file_id;
183
  }
184

  
185
  /**
186
   * method to set the identifier of this query
187
   */
188
  public void setIdentifier(String id) {
189
    this.meta_file_id = id;
190
  }
191

  
192
  /**
193
   * Accessor method to return the title of this Query
194
   */
195
  public String getQueryTitle()
196
  {
197
    return queryTitle;
198
  }
199

  
200
  /**
201
   * method to set the title of this query
202
   */
203
  public void setQueryTitle(String title)
204
  {
205
    this.queryTitle = title;
206
  }
207

  
208
  /**
209
   * Accessor method to return a vector of the return document types as
210
   * defined in the <returndoctype> tag in the pathquery dtd.
211
   */
212
  public Vector getReturnDocList()
213
  {
214
    return this.returnDocList;
215
  }
216

  
217
  /**
218
   * method to set the list of return docs of this query
219
   */
220
  public void setReturnDocList(Vector returnDocList)
221
  {
222
    this.returnDocList = returnDocList;
223
  }
224

  
225
  /**
226
   * Accessor method to return a vector of the filter doc types as
227
   * defined in the <filterdoctype> tag in the pathquery dtd.
228
   */
229
  public Vector getFilterDocList()
230
  {
231
    return this.filterDocList;
232
  }
233

  
234
  /**
235
   * method to set the list of filter docs of this query
236
   */
237
  public void setFilterDocList(Vector filterDocList)
238
  {
239
    this.filterDocList = filterDocList;
240
  }
241

  
242
  /**
169 243
   * Accessor method to return a vector of the extended return fields as
170 244
   * defined in the <returnfield> tag in the pathquery dtd.
171 245
   */
......
175 249
  }
176 250

  
177 251
  /**
252
   * method to set the list of fields to be returned by this query
253
   */
254
  public void setReturnFieldList(Vector returnFieldList)
255
  {
256
    this.returnFieldList = returnFieldList;
257
  }
258

  
259
  /**
260
   * Accessor method to return a vector of the owner fields as
261
   * defined in the <owner> tag in the pathquery dtd.
262
   */
263
  public Vector getOwnerList()
264
  {
265
    return this.ownerList;
266
  }
267

  
268
  /**
269
   * method to set the list of owners used to constrain this query
270
   */
271
  public void setOwnerList(Vector ownerList)
272
  {
273
    this.ownerList = ownerList;
274
  }
275

  
276
  /**
277
   * Accessor method to return a vector of the site fields as
278
   * defined in the <site> tag in the pathquery dtd.
279
   */
280
  public Vector getSiteList()
281
  {
282
    return this.siteList;
283
  }
284

  
285
  /**
286
   * method to set the list of sites used to constrain this query
287
   */
288
  public void setSiteList(Vector siteList)
289
  {
290
    this.siteList = siteList;
291
  }
292

  
293
  /**
294
   * get the QueryGroup used to express query constraints
295
   */
296
  public QueryGroup getQueryGroup()
297
  {
298
    return query;
299
  }
300

  
301
  /**
178 302
   * Set up the SAX parser for reading the XML serialized query
179 303
   */
180 304
  private XMLReader initializeParser() {
......
272 396
    String currentTag = currentNode.getTagName();
273 397
    if (currentTag.equals("meta_file_id")) {
274 398
      meta_file_id = inputString;
399
    } else if (currentTag.equals("querytitle")) {
400
      queryTitle = inputString;
275 401
    } else if (currentTag.equals("value")) {
276 402
      currentValue = inputString;
277 403
    } else if (currentTag.equals("pathexpr")) {
278 404
      currentPathexpr = inputString;
279 405
    } else if (currentTag.equals("returndoctype")) {
280 406
      returnDocList.add(inputString);
407
    } else if (currentTag.equals("filterdoctype")) {
408
      filterDocList.add(inputString);
281 409
    } else if (currentTag.equals("returnfield")) {
282 410
      returnFieldList.add(inputString);
283 411
      containsExtendedSQL = true;

Also available in: Unified diff