org.exist.soap
Class QuerySoapBindingStub

java.lang.Object
  extended byorg.apache.axis.client.Stub
      extended byorg.exist.soap.QuerySoapBindingStub
All Implemented Interfaces:
Query, java.rmi.Remote, javax.xml.rpc.Stub

public class QuerySoapBindingStub
extends org.apache.axis.client.Stub
implements Query


Field Summary
 
Fields inherited from interface javax.xml.rpc.Stub
ENDPOINT_ADDRESS_PROPERTY, PASSWORD_PROPERTY, SESSION_MAINTAIN_PROPERTY, USERNAME_PROPERTY
 
Constructor Summary
QuerySoapBindingStub()
           
QuerySoapBindingStub(javax.xml.rpc.Service service)
           
QuerySoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service)
           
 
Method Summary
 java.lang.String connect(java.lang.String userId, java.lang.String password)
          Create a new user session.
 void disconnect(java.lang.String sessionId)
          Release a user session.
 java.lang.String getResource(java.lang.String sessionId, java.lang.String path, boolean indent, boolean xinclude)
          Retrieve a document from the database.
 byte[] getResourceData(java.lang.String sessionId, java.lang.String path, boolean indent, boolean xinclude, boolean processXSLPI)
          Retrieve a document from the database.
 Collection listCollection(java.lang.String sessionId, java.lang.String path)
          Get information on the specified collection.
 QueryResponse query(java.lang.String sessionId, java.lang.String xpath)
          Execute a simple XPath query passed as string.
 java.lang.String[] retrieve(java.lang.String sessionId, int start, int howmany, boolean indent, boolean xinclude, java.lang.String highlight)
          Retrieve a set of query results from the last query executed within the current session.
 java.lang.String[] retrieveByDocument(java.lang.String sessionId, int start, int howmany, java.lang.String path, boolean indent, boolean xinclude, java.lang.String highlight)
          For the specified document, retrieve a set of query results from the last query executed within the current session.
 Base64BinaryArray retrieveData(java.lang.String sessionId, int start, int howmany, boolean indent, boolean xinclude, java.lang.String highlight)
          Retrieve a set of query results from the last query executed within the current session.
 QueryResponse xquery(java.lang.String sessionId, byte[] xquery)
          Execute an XQuery.
 
Methods inherited from class org.apache.axis.client.Stub
_createCall, _getCall, _getProperty, _getPropertyNames, _getService, _setProperty, addAttachment, clearAttachments, clearHeaders, extractAttachments, getAttachments, getHeader, getHeaders, getPassword, getPortName, getResponseHeader, getResponseHeaders, getTimeout, getUsername, removeProperty, setHeader, setHeader, setMaintainSession, setPassword, setPortName, setPortName, setTimeout, setUsername
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuerySoapBindingStub

public QuerySoapBindingStub()
                     throws org.apache.axis.AxisFault

QuerySoapBindingStub

public QuerySoapBindingStub(java.net.URL endpointURL,
                            javax.xml.rpc.Service service)
                     throws org.apache.axis.AxisFault

QuerySoapBindingStub

public QuerySoapBindingStub(javax.xml.rpc.Service service)
                     throws org.apache.axis.AxisFault
Method Detail

getResource

public java.lang.String getResource(java.lang.String sessionId,
                                    java.lang.String path,
                                    boolean indent,
                                    boolean xinclude)
                             throws java.rmi.RemoteException
Description copied from interface: Query
Retrieve a document from the database.

Specified by:
getResource in interface Query
Parameters:
sessionId - a valid session id as returned by connect().
path - the full path to the document.
indent - should the document be pretty-printed (indented)?
xinclude - should xinclude tags be expanded?
Returns:
the resource as string
Throws:
java.rmi.RemoteException

query

public QueryResponse query(java.lang.String sessionId,
                           java.lang.String xpath)
                    throws java.rmi.RemoteException
Description copied from interface: Query
Execute a simple XPath query passed as string.

Specified by:
query in interface Query
Parameters:
sessionId - a valid session id as returned by connect().
xpath - XPath query string.
Returns:
QueryResponse describing the query results.
Throws:
java.rmi.RemoteException

connect

public java.lang.String connect(java.lang.String userId,
                                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:
userId -
password -
Returns:
session-id a unique id for the created session
Throws:
java.rmi.RemoteException - if the user cannot log in

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 copied from interface: Query
Retrieve a set of query results from the last query executed within the current session. The first result to be retrieved from the result set is defined by the start-parameter. Results are counted from 1.

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 "||".
Throws:
java.rmi.RemoteException

disconnect

public void disconnect(java.lang.String sessionId)
                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:
sessionId - a valid session id as returned by connect().
Throws:
java.rmi.RemoteException

getResourceData

public byte[] getResourceData(java.lang.String sessionId,
                              java.lang.String path,
                              boolean indent,
                              boolean xinclude,
                              boolean processXSLPI)
                       throws java.rmi.RemoteException
Description copied from interface: Query
Retrieve a document from the database. This method returns the document data in binary form to avoid possible conflicts.

Specified by:
getResourceData in interface Query
Parameters:
sessionId - a valid session id as returned by connect().
path - the full path to the document.
indent - should the document be pretty-printed (indented)?
xinclude - should xinclude tags be expanded?
processXSLPI - should XSL processing instructions be processed?
Returns:
the resource in base64 binary encoding
Throws:
java.rmi.RemoteException

xquery

public QueryResponse xquery(java.lang.String sessionId,
                            byte[] xquery)
                     throws java.rmi.RemoteException
Description copied from interface: Query
Execute an XQuery.

Specified by:
xquery in interface Query
Parameters:
sessionId - a valid session id as returned by connect().
xquery - the XQuery script in binary encoding.
Returns:
query response
Throws:
java.rmi.RemoteException

retrieveData

public Base64BinaryArray retrieveData(java.lang.String sessionId,
                                      int start,
                                      int howmany,
                                      boolean indent,
                                      boolean xinclude,
                                      java.lang.String highlight)
                               throws java.rmi.RemoteException
Description copied from interface: Query
Retrieve a set of query results from the last query executed within the current session. This method returns the data as an array of base64 encoded data. The first result to be retrieved from the result set is defined by the start-parameter. Results are counted from 1.

Specified by:
retrieveData 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 "||".
Throws:
java.rmi.RemoteException

retrieveByDocument

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
Description copied from interface: Query
For the specified document, retrieve a set of query results from the last query executed within the current session. Only hits in the given document (identified by its path) are returned. The first result to be retrieved from the result set is defined by the start-parameter. Results are counted from 1.

Specified by:
retrieveByDocument 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.
path - the full path to the document.
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 "||".
Throws:
java.rmi.RemoteException

listCollection

public Collection listCollection(java.lang.String sessionId,
                                 java.lang.String path)
                          throws java.rmi.RemoteException
Description copied from interface: Query
Get information on the specified collection.

Specified by:
listCollection in interface Query
Parameters:
sessionId - a valid session id as returned by connect().
path - the full path to the collection.
Throws:
java.rmi.RemoteException


Copyright (C) Wolfgang Meier. All rights reserved.