source: trunk/java-client/org/nzdl/gsdl/hli/Query.java@ 2254

Last change on this file since 2254 was 2220, checked in by say1, 23 years ago

change int-> long in a number of places, new createNzdlService method taking only an IOR, added the start of a hli (high level interface

  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1/*
2 * TODO.java
3 * Copyright (C) 2000 Stuart Yeates
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20// the package we're in
21package org.nzdl.gsdl.hli;
22
23import org.nzdl.gsdl.service.*;
24import org.nzdl.gsdl.corba.gsdlInterface.*;
25import org.nzdl.gsdl.util.*;
26
27// java standard library classes used
28import java.io.IOException;
29import java.io.Serializable;
30import java.lang.Cloneable;
31import java.util.Vector;
32
33/**
34 * A high-level view of a Query
35 *
36 * @author stuart yeates ([email protected])
37 * @version $Revision: 2220 $
38 * @see
39 * @see
40 * @see
41 *
42 */
43
44public class Query implements Cloneable, Serializable
45{
46 /** */
47 Collection collection = null;
48
49 /** */
50 String queryString = "";
51
52 /** */
53 Vector docIDs = new Vector();
54
55 /** */
56 Vector documents = new Vector();
57
58 /** */
59 long numberOfHits = 0;
60
61 /** */
62 String[] queryTerms = null;
63
64 /** */
65 long[] termTermFequencies = null;
66
67 Query(Collection collection, String queryString) {
68 this.collection = collection;
69 this.queryString = queryString;
70 }
71
72 void runQuery() {
73 if (collection == null)
74 throw new Error ("null collection in runQuery");
75 if (queryString == null)
76 throw new Error ("null queryString in runQuery");
77
78// // create the argument objects
79// corbaFilterResponseHolder reposnse =
80// NzdlCorbaFactory.createFilterResponseHolder();
81// corbaFilterRequest request =
82// NzdlCorbaFactory.createQueryFilterRequest( queryString );
83// corbatext_t c_name =
84// NzdlCorbaFactory.toCorbaText( collection.getName() );
85// corbaComErrorHolder c_err =
86// NzdlCorbaFactory.createComErrorHolder();
87
88// // run the actual query
89// m_nzdlServer.filter( c_name, request, response, c_err );
90// if (c_err.value.value() != 0)
91// System.err.println("service() error " + c_err.value.value());
92
93// // parse the results
94// numberOfHits = response.numDocs;
95
96
97 }
98
99
100
101
102
103
104 /**
105 *
106 *
107 * @exception java.io.IOException when ...
108 * @param arg2 ...
109 * @param arg1 ...
110 * @return ...
111 * @see
112 * @see
113 */
114
115
116
117
118 /**
119 * Tests...
120 *
121 *
122 * @exception java.io.IOException when ...
123 * @param args the arguments ...
124 */
125
126 public static void main(String args[]) throws IOException
127 {
128
129 }
130}
131
Note: See TracBrowser for help on using the repository browser.