1 /**
2 * Query.java
3 *
4 * This file was auto-generated from WSDL
5 * by the Apache Axis 1.2.1 Jun 14, 2005 (09:15:57 EDT) WSDL2Java emitter.
6 */
7
8 package net.kwfgrid.gwes.xmldbclient;
9
10 import javax.activation.DataHandler;
11 import java.rmi.RemoteException;
12
13 public interface QueryInterface extends java.rmi.Remote {
14
15 /**
16 * Retrieve a document from the database.
17 *
18 * @param sessionId a valid session id as returned by connect().
19 * @param path the full path to the document.
20 * @param indent should the document be pretty-printed (indented)?
21 * @param xinclude should xinclude tags be expanded?
22 * @return the resource as string
23 * @throws RemoteException
24 */
25 public java.lang.String getResource(java.lang.String sessionId, java.lang.String path, boolean indent, boolean xinclude) throws java.rmi.RemoteException;
26 /**
27 * Execute a simple XPath query passed as string.
28 *
29 * @param sessionId a valid session id as returned by connect().
30 * @param xpath XPath query string.
31 * @return QueryResponse describing the query results.
32 * @throws RemoteException
33 * @deprecated use {@link #xquery(String, byte[])} instead.
34 */
35 public QueryServiceStub.QueryResponse query(java.lang.String sessionId, java.lang.String xpath) throws java.rmi.RemoteException;
36 /**
37 * Create a new user session. Authenticates the user against the database.
38 * The user has to be a valid database user. If the provided user information
39 * is valid, a new session will be registered on the server and a session id
40 * will be returned.
41 *
42 * The session will be valid for at least 60 minutes. Please call disconnect() to
43 * release the session.
44 *
45 * Sessions are shared between the Query and Admin services. A session created
46 * through the Query service can be used with the Admin service and vice versa.
47 *
48 * @param userId
49 * @param password
50 * @return session-id a unique id for the created session
51 * @throws RemoteException if the user cannot log in
52 */
53 public java.lang.String connect(java.lang.String userId, java.lang.String password) throws java.rmi.RemoteException;
54 /**
55 * Retrieve a set of query results from the last query executed within
56 * the current session.
57 *
58 * The first result to be retrieved from the result set is defined by the
59 * start-parameter. Results are counted from 1.
60 *
61 * @param sessionId a valid session id as returned by connect().
62 * @param start the first result to retrieve.
63 * @param howmany number of results to be returned.
64 * @param indent should the XML be pretty-printed?
65 * @param xinclude should xinclude tags be expanded?
66 * @param highlight highlight matching search terms within elements
67 * or attributes. Possible values are: "elements" for elements only,
68 * "attributes" for attributes only, "both" for elements and attributes,
69 * "none" to disable highlighting. For elements, matching terms are
70 * surrounded by <exist:match> tags. For attributes, terms are
71 * marked with the char sequence "||".
72 *
73 * @throws RemoteException
74 */
75 public java.lang.String[] retrieve(java.lang.String sessionId, int start, int howmany, boolean indent, boolean xinclude, java.lang.String highlight) throws java.rmi.RemoteException;
76 /**
77 * Release a user session. This will free all resources (including result sets).
78 *
79 * @param sessionId a valid session id as returned by connect().
80 * @throws java.rmi.RemoteException
81 */
82 public void disconnect(java.lang.String sessionId) throws java.rmi.RemoteException;
83 /**
84 * Retrieve a document from the database.
85 *
86 * This method returns the document data in binary form to avoid possible
87 * conflicts.
88 *
89 * @param sessionId a valid session id as returned by connect().
90 * @param path the full path to the document.
91 * @param indent should the document be pretty-printed (indented)?
92 * @param xinclude should xinclude tags be expanded?
93 * @param processXSLPI should XSL processing instructions be processed?
94 * @return the resource in base64 binary encoding
95 * @throws RemoteException
96 */
97 public DataHandler getResourceData(java.lang.String sessionId, java.lang.String path, boolean indent, boolean xinclude, boolean processXSLPI) throws java.rmi.RemoteException;
98 /**
99 * Execute an XQuery.
100 *
101 * @param sessionId a valid session id as returned by connect().
102 * @param xquery the XQuery script in binary encoding.
103 * @return query response
104 * @throws RemoteException
105 */
106 public QueryServiceStub.QueryResponse xquery(java.lang.String sessionId, DataHandler xquery) throws java.rmi.RemoteException;
107 /**
108 * Retrieve a set of query results from the last query executed within
109 * the current session.
110 *
111 * This method returns the data as an array of base64 encoded data.
112 * The first result to be retrieved from the result set is defined by the
113 * start-parameter. Results are counted from 1.
114 *
115 * @param sessionId a valid session id as returned by connect().
116 * @param start the first result to retrieve.
117 * @param howmany number of results to be returned.
118 * @param indent should the XML be pretty-printed?
119 * @param xinclude should xinclude tags be expanded?
120 * @param highlight highlight matching search terms within elements
121 * or attributes. Possible values are: "elements" for elements only,
122 * "attributes" for attributes only, "both" for elements and attributes,
123 * "none" to disable highlighting. For elements, matching terms are
124 * surrounded by <exist:match> tags. For attributes, terms are
125 * marked with the char sequence "||".
126 *
127 * @throws RemoteException
128 */
129 public QueryServiceStub.Base64BinaryArray retrieveData(java.lang.String sessionId, int start, int howmany, boolean indent, boolean xinclude, java.lang.String highlight) throws java.rmi.RemoteException;
130 /**
131 * For the specified document, retrieve a set of query results from
132 * the last query executed within the current session. Only hits in
133 * the given document (identified by its path) are returned.
134 *
135 * The first result to be retrieved from the result set is defined by the
136 * start-parameter. Results are counted from 1.
137 *
138 * @param sessionId a valid session id as returned by connect().
139 * @param start the first result to retrieve.
140 * @param howmany number of results to be returned.
141 * @param path the full path to the document.
142 * @param indent should the XML be pretty-printed?
143 * @param xinclude should xinclude tags be expanded?
144 * @param highlight highlight matching search terms within elements
145 * or attributes. Possible values are: "elements" for elements only,
146 * "attributes" for attributes only, "both" for elements and attributes,
147 * "none" to disable highlighting. For elements, matching terms are
148 * surrounded by <exist:match> tags. For attributes, terms are
149 * marked with the char sequence "||".
150 *
151 * @throws RemoteException
152 */
153 public java.lang.String[] retrieveByDocument(java.lang.String sessionId, int start, int howmany, java.lang.String path, boolean indent, boolean xinclude, java.lang.String highlight) throws java.rmi.RemoteException;
154 /**
155 * Get information on the specified collection.
156 *
157 * @param sessionId a valid session id as returned by connect().
158 * @param path the full path to the collection.
159 * @throws java.rmi.RemoteException
160 */
161 public QueryServiceStub.Collection listCollection(java.lang.String sessionId, java.lang.String path) throws java.rmi.RemoteException;
162 }