org.exist.soap
Class QuerySoapBindingImpl

java.lang.Object
  extended byorg.exist.soap.QuerySoapBindingImpl
All Implemented Interfaces:
Query, java.rmi.Remote

public class QuerySoapBindingImpl
extends java.lang.Object
implements Query

Description of the Class

Author:
Wolfgang Meier

Constructor Summary
QuerySoapBindingImpl()
          Constructor for the QuerySoapBindingImpl object
 
Method Summary
 java.lang.String connect(java.lang.String user, java.lang.String password)
          Create a new user session.
 void disconnect(java.lang.String id)
          Release a user session.
 java.lang.String getResource(java.lang.String sessionId, java.lang.String name, boolean indent, boolean xinclude)
          Gets the resource attribute of the QuerySoapBindingImpl object
 Collection listCollection(java.lang.String sessionId, java.lang.String path)
          Description of the Method
 QueryResponse query(java.lang.String sessionId, java.lang.String query)
          Description of the Method
 java.lang.String[] retrieve(java.lang.String sessionId, int start, int howmany, boolean indent, boolean xinclude, java.lang.String highlight)
          Description of the Method
 java.lang.String[] retrieveByDocument(java.lang.String sessionId, int start, int howmany, java.lang.String docPath, boolean indent, boolean xinclude, java.lang.String highlight)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuerySoapBindingImpl

public QuerySoapBindingImpl()
Constructor for the QuerySoapBindingImpl object

Method Detail

connect

public java.lang.String connect(java.lang.String user,
                                java.lang.String password)
                         throws java.rmi.RemoteException
Description copied from interface: Query
Create a new user session. Authenticates the user against the database. The user has to be a valid database user. If the provided user information is valid, a new session will be registered on the server and a session id will be returned. The session will be valid for at least 60 minutes. Please call disconnect() to release the session. Sessions are shared between the Query and Admin services. A session created through the Query service can be used with the Admin service and vice versa.

Specified by:
connect in interface Query
Parameters:
user -
password -
Returns:
session-id a unique id for the created session
Throws:
java.rmi.RemoteException - if the user cannot log in

disconnect

public void disconnect(java.lang.String id)
                throws java.rmi.RemoteException
Description copied from interface: Query
Release a user session. This will free all resources (including result sets).

Specified by:
disconnect in interface Query
Parameters:
id - a valid session id as returned by connect().
Throws:
java.rmi.RemoteException

getResource

public java.lang.String getResource(java.lang.String sessionId,
                                    java.lang.String name,
                                    boolean indent,
                                    boolean xinclude)
                             throws java.rmi.RemoteException
Gets the resource attribute of the QuerySoapBindingImpl object

Specified by:
getResource in interface Query
Parameters:
name - Description of the Parameter
sessionId - a valid session id as returned by connect().
indent - should the document be pretty-printed (indented)?
xinclude - should xinclude tags be expanded?
Returns:
The resource value
Throws:
java.rmi.RemoteException - Description of the Exception

listCollection

public Collection listCollection(java.lang.String sessionId,
                                 java.lang.String path)
                          throws java.rmi.RemoteException
Description of the Method

Specified by:
listCollection in interface Query
Parameters:
path - Description of the Parameter
sessionId - a valid session id as returned by connect().
Returns:
Description of the Return Value
Throws:
java.rmi.RemoteException - Description of the Exception

query

public QueryResponse query(java.lang.String sessionId,
                           java.lang.String query)
                    throws java.rmi.RemoteException
Description of the Method

Specified by:
query in interface Query
Parameters:
query - Description of the Parameter
sessionId - a valid session id as returned by connect().
Returns:
Description of the Return Value
Throws:
java.rmi.RemoteException - Description of the Exception

retrieve

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
Description of the Method

Specified by:
retrieve in interface Query
Parameters:
sessionId - a valid session id as returned by connect().
start - the first result to retrieve.
howmany - number of results to be returned.
indent - should the XML be pretty-printed?
xinclude - should xinclude tags be expanded?
highlight - highlight matching search terms within elements or attributes. Possible values are: "elements" for elements only, "attributes" for attributes only, "both" for elements and attributes, "none" to disable highlighting. For elements, matching terms are surrounded by <exist:match> tags. For attributes, terms are marked with the char sequence "||".
Returns:
Description of the Return Value
Throws:
java.rmi.RemoteException - Description of the Exception

retrieveByDocument

public java.lang.String[] retrieveByDocument(java.lang.String sessionId,
                                             int start,
                                             int howmany,
                                             java.lang.String docPath,
                                             boolean indent,
                                             boolean xinclude,
                                             java.lang.String highlight)
                                      throws java.rmi.RemoteException
Description of the Method

Specified by:
retrieveByDocument in interface Query
Parameters:
docPath - Description of the Parameter
sessionId - a valid session id as returned by connect().
start - the first result to retrieve.
howmany - number of results to be returned.
indent - should the XML be pretty-printed?
xinclude - should xinclude tags be expanded?
highlight - highlight matching search terms within elements or attributes. Possible values are: "elements" for elements only, "attributes" for attributes only, "both" for elements and attributes, "none" to disable highlighting. For elements, matching terms are surrounded by <exist:match> tags. For attributes, terms are marked with the char sequence "||".
Returns:
Description of the Return Value
Throws:
java.rmi.RemoteException - Description of the Exception


Copyright (C) Wolfgang Meier. All rights reserved.