Compute lucene-style scores for our hits.
[beagle.git] / beagled / WebServices / WebServiceProxy.cs
blobda662f6c9aaaab3c2770b17a7937cd608bef2687
1 // ------------------------------------------------------------------------------
2 // <autogenerated>
3 // This code was generated by a tool.
4 // Mono Runtime Version: 1.1.4322.573
5 //
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
8 // </autogenerated>
9 // ------------------------------------------------------------------------------
11 //
12 // This source code was auto-generated by Mono Web Services Description Language Utility
14 namespace Beagle.Daemon
16 /// <remarks/>
17 /// <remarks>
18 ///Web Service Interface to Beagle
19 ///</remarks>
20 [System.Web.Services.WebServiceBinding(Name="BeagleWebServiceSoap",Namespace="http://www.gnome.org/projects/beagle/webservices"),
21 System.Diagnostics.DebuggerStepThroughAttribute(),
22 System.ComponentModel.DesignerCategoryAttribute("code")]
23 public class BeagleWebService: System.Web.Services.Protocols.SoapHttpClientProtocol {
25 public BeagleWebService () {
26 this.Url = "http://localhost:8888/beagle/search.asmx";
29 string hostname = "localhost";
30 string port = "8888";
32 public BeagleWebService (string Hostname, string Port) {
34 if (Hostname == null || Hostname == "")
35 this.hostname = "localhost";
36 else
37 this.hostname = Hostname;
39 this.Url = "http://" + this.hostname + ":" + this.port + "/beagle/search.asmx";
42 public string Hostname {
43 get {return hostname;}
44 set {
45 hostname = value;
46 this.Url = "http://" + this.hostname + ":" + this.port + "/beagle/search.asmx";
50 public string Port {
51 get {return port;}
52 set {
53 port = value;
54 this.Url = "http://" + this.hostname + ":" + this.port + "/beagle/search.asmx";
58 /// <remarks>
59 ///Full object interface to Beagle
60 ///</remarks>
61 [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.gnome.org/projects/beagle/webservices/BeagleQuery",RequestNamespace="http://www.gnome.org/projects/beagle/webservices",ResponseNamespace="http://www.gnome.org/projects/beagle/webservices",ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,Use=System.Web.Services.Description.SoapBindingUse.Literal)]
62 public SearchResult BeagleQuery(SearchRequest BeagleQueryRequest) {
63 object[] results = this.Invoke("BeagleQuery", new object[] {
64 BeagleQueryRequest});
65 return ((SearchResult)(results[0]));
68 public System.IAsyncResult BeginBeagleQuery(SearchRequest BeagleQueryRequest, System.AsyncCallback callback, object asyncState) {
69 return this.BeginInvoke("BeagleQuery", new object[] {
70 BeagleQueryRequest}, callback, asyncState);
73 public SearchResult EndBeagleQuery(System.IAsyncResult asyncResult) {
74 object[] results = this.EndInvoke(asyncResult);
75 return ((SearchResult)(results[0]));
78 /// <remarks>
79 ///Simple Interface to Beagle
80 ///</remarks>
81 [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.gnome.org/projects/beagle/webservices/SimpleQuery",RequestNamespace="http://www.gnome.org/projects/beagle/webservices",ResponseNamespace="http://www.gnome.org/projects/beagle/webservices",ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,Use=System.Web.Services.Description.SoapBindingUse.Literal)]
82 public SearchResult SimpleQuery(string text) {
83 object[] results = this.Invoke("SimpleQuery", new object[] {
84 text});
85 return ((SearchResult)(results[0]));
88 public System.IAsyncResult BeginSimpleQuery(string text, System.AsyncCallback callback, object asyncState) {
89 return this.BeginInvoke("SimpleQuery", new object[] {
90 text}, callback, asyncState);
93 public SearchResult EndSimpleQuery(System.IAsyncResult asyncResult) {
94 object[] results = this.EndInvoke(asyncResult);
95 return ((SearchResult)(results[0]));
98 /// <remarks>
99 ///Full text Interface to Beagle
100 ///</remarks>
101 [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.gnome.org/projects/beagle/webservices/SimpleQuery2",RequestNamespace="http://www.gnome.org/projects/beagle/webservices",ResponseNamespace="http://www.gnome.org/projects/beagle/webservices",ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,Use=System.Web.Services.Description.SoapBindingUse.Literal)]
102 public SearchResult SimpleQuery2(string text, string mimeType, string source, string queryDomain) {
103 object[] results = this.Invoke("SimpleQuery2", new object[] {
104 text,
105 mimeType,
106 source,
107 queryDomain});
108 return ((SearchResult)(results[0]));
111 public System.IAsyncResult BeginSimpleQuery2(string text, string mimeType, string source, string queryDomain, System.AsyncCallback callback, object asyncState) {
112 return this.BeginInvoke("SimpleQuery2", new object[] {
113 text,
114 mimeType,
115 source,
116 queryDomain}, callback, asyncState);
119 public SearchResult EndSimpleQuery2(System.IAsyncResult asyncResult) {
120 object[] results = this.EndInvoke(asyncResult);
121 return ((SearchResult)(results[0]));
124 /// <remarks>
125 ///Common Interface to get more results from Beagle
126 ///</remarks>
127 [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.gnome.org/projects/beagle/webservices/GetMoreResults",RequestNamespace="http://www.gnome.org/projects/beagle/webservices",ResponseNamespace="http://www.gnome.org/projects/beagle/webservices",ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,Use=System.Web.Services.Description.SoapBindingUse.Literal)]
128 public SearchResult GetMoreResults(string searchToken, int index) {
129 object[] results = this.Invoke("GetMoreResults", new object[] {
130 searchToken,
131 index});
132 return ((SearchResult)(results[0]));
135 public System.IAsyncResult BeginGetMoreResults(string searchToken, int index, System.AsyncCallback callback, object asyncState) {
136 return this.BeginInvoke("GetMoreResults", new object[] {
137 searchToken,
138 index}, callback, asyncState);
141 public SearchResult EndGetMoreResults(System.IAsyncResult asyncResult) {
142 object[] results = this.EndInvoke(asyncResult);
143 return ((SearchResult)(results[0]));
146 /// <remarks>
147 ///Common Interface to get Snippets for results
148 ///</remarks>
149 [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.gnome.org/projects/beagle/webservices/GetSnippets",RequestNamespace="http://www.gnome.org/projects/beagle/webservices",ResponseNamespace="http://www.gnome.org/projects/beagle/webservices",ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped,Use=System.Web.Services.Description.SoapBindingUse.Literal)]
150 public HitSnippet[] GetSnippets(string searchToken, [System.Xml.Serialization.XmlArrayItem(IsNullable=false)]
151 int[] hitIds) {
152 object[] results = this.Invoke("GetSnippets", new object[] {
153 searchToken,
154 hitIds});
155 return ((HitSnippet[])(results[0]));
158 public System.IAsyncResult BeginGetSnippets(string searchToken, int[] hitIds, System.AsyncCallback callback, object asyncState) {
159 return this.BeginInvoke("GetSnippets", new object[] {
160 searchToken,
161 hitIds}, callback, asyncState);
164 public HitSnippet[] EndGetSnippets(System.IAsyncResult asyncResult) {
165 object[] results = this.EndInvoke(asyncResult);
166 return ((HitSnippet[])(results[0]));
170 /// <remarks/>
171 [System.Xml.Serialization.XmlType(Namespace="http://www.gnome.org/projects/beagle/webservices")]
172 public class SearchRequest {
174 /// <remarks/>
175 public string[] text;
177 /// <remarks/>
178 public string[] mimeType;
180 /// <remarks/>
181 public string[] searchSources;
183 /// <remarks/>
184 public QueryDomain qdomain;
186 /// <remarks/>
187 public int searchId = 0;
189 /// <remarks/>
190 public int hopCount = 0;
194 /// <remarks/>
195 [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.gnome.org/projects/beagle/webservices")]
196 public enum QueryDomain {
198 /// <remarks/>
199 Local,
201 /// <remarks/>
202 Neighborhood,
204 /// <remarks/>
205 Global,
209 /// <remarks/>
210 [System.Xml.Serialization.XmlType(Namespace="http://www.gnome.org/projects/beagle/webservices")]
211 public class SearchResult {
213 /// <remarks/>
214 public int statusCode;
216 /// <remarks/>
217 public string statusMsg;
219 /// <remarks/>
220 public string searchToken;
222 /// <remarks/>
223 public int firstResultIndex;
225 /// <remarks/>
226 public int numResults;
228 /// <remarks/>
229 public int totalResults;
231 /// <remarks/>
232 public HitResult[] hitResults;
235 /// <remarks/>
236 [System.Xml.Serialization.XmlType(Namespace="http://www.gnome.org/projects/beagle/webservices")]
237 public class HitResult {
239 /// <remarks/>
240 public string uri;
242 /// <remarks/>
243 public string resourceType;
245 /// <remarks/>
246 public string mimeType;
248 /// <remarks/>
249 public string source;
251 /// <remarks/>
252 public double score;
254 /// <remarks/>
255 public HitProperty[] properties;
257 /// <remarks/>
258 public string snippet;
261 /// <remarks/>
262 [System.Xml.Serialization.XmlType(Namespace="http://www.gnome.org/projects/beagle/webservices")]
263 public class HitProperty {
265 /// <remarks/>
266 public string PKey;
268 /// <remarks/>
269 public string PVal;
271 /// <remarks/>
272 public bool IsMutable;
274 /// <remarks/>
275 public bool IsSearched;
278 /// <remarks/>
279 [System.Xml.Serialization.XmlType(Namespace="http://www.gnome.org/projects/beagle/webservices")]
280 public class HitSnippet {
282 /// <remarks/>
283 public int hitId;
285 /// <remarks/>
286 public string snippet;