Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.exist.xmlrpc
Interface RpcAPI

All Known Implementing Classes:
  RpcServer

public interface RpcAPI

Defines the methods callable through the XMLRPC interface.

Author:
  Wolfgang Meier

Field Summary
`static java.lang.String` | `BASE_URI`
`static java.lang.String` | `COLUMN`
`static java.lang.String` | `ERROR`
`static java.lang.String` | `LINE`
`static java.lang.String` | `NAMESPACES`
`static java.lang.String` | `SORT_EXPR`
`static java.lang.String` | `STATIC_DOCUMENTS`
`static java.lang.String` | `VARIABLES`

Method Summary
`boolean` | `backup(User user, java.lang.String userbackup, java.lang.String password, java.lang.String destcollection, java.lang.String collection)`
`java.util.Hashtable` | `compile(User user, byte[] xquery, java.util.Hashtable parameters)`
`boolean` | `configureCollection(User user, java.lang.String collection, java.lang.String configuration)`
`boolean` | `copyCollection(User user, java.lang.String name, java.lang.String namedest)`
`boolean` | `copyCollection(User user, java.lang.String collectionPath, java.lang.String destinationPath, java.lang.String newName)`
`boolean` | `copyResource(User user, java.lang.String docPath, java.lang.String destinationPath, java.lang.String newName)`
`boolean` | `createCollection(User user, java.lang.String name)` Create a new collection on the database.
`boolean` | `createCollection(User user, java.lang.String name, java.util.Date created)`
`java.lang.String` | `createResourceId(User user, java.lang.String collection)`
`boolean` | `dataBackup(User user, java.lang.String dest)`
`java.util.Hashtable` | `describeCollection(User user, java.lang.String collectionName)`
`java.util.Hashtable` | `describeResource(User user, java.lang.String resourceName)`
`java.util.Hashtable` | `execute(User user, java.lang.String path, java.util.Hashtable parameters)` Execute XPath/Xquery from path file (stored inside eXist) returned reference may be used later to get a summary of results or retrieve the actual hits.
`int` | `executeQuery(User user, byte[] xpath, java.util.Hashtable parameters)`
`int` | `executeQuery(User user, byte[] xpath, java.lang.String encoding, java.util.Hashtable parameters)` Execute XPath query and return a reference to the result set.
`int` | `executeQuery(User user, java.lang.String xpath, java.util.Hashtable parameters)`
`byte[]` | `getBinaryResource(User user, java.lang.String name)`
`java.util.Hashtable` | `getCollectionDesc(User user, java.lang.String rootCollection)` Describe a collection: returns a struct with the following fields:
`java.util.Date` | `getCreationDate(User user, java.lang.String collectionName)`
`java.util.Vector` | `getDocType(User user, java.lang.String documentName)`
`byte[]` | `getDocument(User user, java.lang.String name, java.util.Hashtable parameters)` Retrieve document by name.
`byte[]` | `getDocument(User user, java.lang.String name, java.lang.String encoding, int prettyPrint)` Deprecated. Use `getDocument(User, String, Hashtable)` instead.
`byte[]` | `getDocument(User user, java.lang.String name, java.lang.String encoding, int prettyPrint, java.lang.String stylesheet)` Deprecated. Use `getDocument(User, String, Hashtable)` instead.
`java.lang.String` | `getDocumentAsString(User user, java.lang.String name, java.util.Hashtable parameters)`
`java.lang.String` | `getDocumentAsString(User user, java.lang.String name, int prettyPrint)`
`java.lang.String` | `getDocumentAsString(User user, java.lang.String name, int prettyPrint, java.lang.String stylesheet)`
`java.util.Vector` | `getDocumentChunk(User user, java.lang.String name, java.util.Hashtable parameters)`
`byte[]` | `getDocumentChunk(User user, java.lang.String name, int start, int stop)`
`java.util.Hashtable` | `getDocumentData(User user, java.lang.String name, java.util.Hashtable parameters)` Retrieve the specified document, but limit the number of bytes transmitted to avoid memory shortage on the server.
`java.util.Vector` | `getDocumentListing(User user)` Get a list of all documents contained in the database.
`java.util.Vector` | `getDocumentListing(User user, java.lang.String collection)` Get a list of all documents contained in the collection.
`java.util.Vector` | `getGroups(User user)`
`int` | `getHits(User user, int resultId)` Get the number of hits in the result set identified by it's result-set-id.
`java.util.Vector` | `getIndexedElements(User user, java.lang.String collectionName, boolean inclusive)`
`java.util.Hashtable` | `getNextChunk(User user, java.lang.String handle, int offset)`
`java.util.Hashtable` | `getPermissions(User user, java.lang.String resource)`
`int` | `getResourceCount(User user, java.lang.String collectionName)` Returns the number of resources in the collection identified by collectionName.
`java.util.Vector` | `getTimestamps(User user, java.lang.String documentName)`
`java.util.Hashtable` | `getUser(User user, java.lang.String name)`
`java.util.Vector` | `getUsers(User user)`
`boolean` | `hasCollection(User user, java.lang.String name)` Does the Collection identified by `name` exist in the repository?
`boolean` | `hasDocument(User user, java.lang.String name)` Does the document identified by `name` exist in the repository?
`java.lang.String` | `hasUserLock(User user, java.lang.String path)`
`boolean` | `isValid(User user, java.lang.String name)`
`boolean` | `isXACMLEnabled(User user)` Returns true if XACML is enabled for the current database instance
`java.util.Hashtable` | `listCollectionPermissions(User user, java.lang.String name)`
`java.util.Hashtable` | `listDocumentPermissions(User user, java.lang.String name)`
`boolean` | `lockResource(User user, java.lang.String path, java.lang.String userName)`
`boolean` | `moveCollection(User user, java.lang.String collectionPath, java.lang.String destinationPath, java.lang.String newName)`
`boolean` | `moveResource(User user, java.lang.String docPath, java.lang.String destinationPath, java.lang.String newName)`
`boolean` | `parse(User user, byte[] xmlData, java.lang.String docName)` Parse an XML document and store it into the database.
`boolean` | `parse(User user, byte[] xmlData, java.lang.String docName, int overwrite)` Parse an XML document and store it into the database.
`boolean` | `parse(User user, byte[] xmlData, java.lang.String docName, int overwrite, java.util.Date created, java.util.Date modified)`
`boolean` | `parse(User user, java.lang.String xml, java.lang.String docName)`
`boolean` | `parse(User user, java.lang.String xml, java.lang.String docName, int overwrite)`
`boolean` | `parseLocal(User user, java.lang.String localFile, java.lang.String docName, boolean replace)` Parse a file previously uploaded with upload.
`boolean` | `parseLocal(User user, java.lang.String localFile, java.lang.String docName, boolean replace, java.util.Date created, java.util.Date modified)`
`java.lang.String` | `printDiagnostics(User user, java.lang.String query, java.util.Hashtable parameters)` Returns a diagnostic dump of the expression structure after compiling the query.
`byte[]` | `query(User user, byte[] xquery, int howmany, int start, java.util.Hashtable parameters)` Deprecated. use Vector query() or int executeQuery() instead
`java.util.Hashtable` | `queryP(User user, byte[] xpath, java.util.Hashtable parameters)`
`java.util.Hashtable` | `queryP(User user, byte[] xpath, java.lang.String docName, java.lang.String s_id, java.util.Hashtable parameters)`
`java.util.Hashtable` | `querySummary(User user, int resultId)` Retrieve a summary of the result set identified by it's result-set-id.
`java.util.Hashtable` | `querySummary(User user, java.lang.String xquery)` Deprecated. use Vector query() or int executeQuery() instead
`boolean` | `reindexCollection(User user, java.lang.String name)`
`boolean` | `releaseQueryResult(User user, int handle)`
`boolean` | `remove(User user, java.lang.String docName)` Remove a document from the database.
`boolean` | `removeCollection(User user, java.lang.String name)` Remove an entire collection from the database.
`boolean` | `removeUser(User user, java.lang.String name)`
`byte[]` | `retrieve(User user, int resultId, int num, java.util.Hashtable parameters)` Retrieve a single result from the result-set identified by resultId.
`byte[]` | `retrieve(User user, java.lang.String doc, java.lang.String id)` Retrieve a single node from a document.
`byte[]` | `retrieve(User user, java.lang.String doc, java.lang.String id, java.util.Hashtable parameters)` Retrieve a single node from a document.
`byte[]` | `retrieveAll(User user, int resultId, java.util.Hashtable parameters)`
`java.lang.String` | `retrieveAsString(User user, java.lang.String doc, java.lang.String id, java.util.Hashtable parameters)`
`java.util.Vector` | `scanIndexTerms(User user, java.lang.String xpath, java.lang.String start, java.lang.String end)`
`java.util.Vector` | `scanIndexTerms(User user, java.lang.String collectionName, java.lang.String start, java.lang.String end, boolean inclusive)`
`boolean` | `setDocType(User user, java.lang.String documentName, java.lang.String doctypename, java.lang.String publicid, java.lang.String systemid)`
`boolean` | `setPermissions(User user, java.lang.String resource, int permissions)`
`boolean` | `setPermissions(User user, java.lang.String resource, java.lang.String permissions)`
`boolean` | `setPermissions(User user, java.lang.String resource, java.lang.String owner, java.lang.String ownerGroup, int permissions)`
`boolean` | `setPermissions(User user, java.lang.String resource, java.lang.String owner, java.lang.String ownerGroup, java.lang.String permissions)`
`boolean` | `setUser(User user, java.lang.String name, java.lang.String passwd, java.lang.String digestPassword, java.util.Vector groups)`
`boolean` | `setUser(User user, java.lang.String name, java.lang.String passwd, java.lang.String digestPassword, java.util.Vector groups, java.lang.String home)`
`boolean` | `shutdown(User user)` Shut down the database immediately.
`boolean` | `shutdown(User user, long delay)` Shut down the database after the specified delay (in milliseconds).
`boolean` | `storeBinary(User user, byte[] data, java.lang.String docName, java.lang.String mimeType, boolean replace)` Store data as a binary resource.
`boolean` | `storeBinary(User user, byte[] data, java.lang.String docName, java.lang.String mimeType, boolean replace, java.util.Date created, java.util.Date modified)`
`boolean` | `sync(User user)`
`boolean` | `unlockResource(User user, java.lang.String path)`
`java.lang.String` | `upload(User user, byte[] chunk, int length)` An alternative to parse() for larger XML documents.
`java.lang.String` | `upload(User user, java.lang.String file, byte[] chunk, int length)` An alternative to parse() for larger XML documents.
`java.lang.String` | `uploadCompressed(User user, byte[] data, int length)`
`java.lang.String` | `uploadCompressed(User user, java.lang.String file, byte[] data, int length)`
`int` | `xupdate(User user, java.lang.String collectionName, byte[] xupdate)`
`int` | `xupdateResource(User user, java.lang.String resource, byte[] xupdate)`
`int` | `xupdateResource(User user, java.lang.String resource, byte[] xupdate, java.lang.String encoding)`

Field Detail

### SORT_EXPR

    public static final java.lang.String SORT_EXPR

See Also:
  Constant Field Values

### NAMESPACES

    public static final java.lang.String NAMESPACES

See Also:
  Constant Field Values

### VARIABLES

    public static final java.lang.String VARIABLES

See Also:
  Constant Field Values

### BASE_URI

    public static final java.lang.String BASE_URI

See Also:
  Constant Field Values

### STATIC_DOCUMENTS

    public static final java.lang.String STATIC_DOCUMENTS

See Also:
  Constant Field Values

### ERROR

    public static final java.lang.String ERROR

See Also:
  Constant Field Values

### LINE

    public static final java.lang.String LINE

See Also:
  Constant Field Values

### COLUMN

    public static final java.lang.String COLUMN

See Also:
  Constant Field Values

Method Detail

### shutdown

    public boolean shutdown(User user)
                     throws PermissionDeniedException

  Shut down the database immediately.

  Returns:
    true if the shutdown succeeded, false otherwise
  Throws:
    `PermissionDeniedException`

### shutdown

    public boolean shutdown(User user,
                            long delay)
                     throws PermissionDeniedException

  Shut down the database after the specified delay (in milliseconds).

  Returns:
    true if the shutdown succeeded, false otherwise
  Throws:
    `PermissionDeniedException`

### sync

    public boolean sync(User user)

### isXACMLEnabled

    public boolean isXACMLEnabled(User user)

  Returns true if XACML is enabled for the current database instance

  Returns:
    if XACML is enabled

### getDocument

    public byte[] getDocument(User user,
                              java.lang.String name,
                              java.lang.String encoding,
                              int prettyPrint)
                       throws EXistException,
                              PermissionDeniedException

  Deprecated. Use `getDocument(User, String, Hashtable)` instead.

  Retrieve document by name. XML content is indented if prettyPrint is set to >=0. Use supplied encoding for output. This method is provided to retrieve a document with encodings other than UTF-8. Since the data is handled as binary data, character encodings are preserved. byte[]-values are automatically BASE64-encoded by the XMLRPC library.

  Parameters:
    `name` - the document's name.
    `prettyPrint` - pretty print XML if >0.
    `encoding` - character encoding to use.
    `user` -
  Returns:
    Document data as binary array.
  Throws:
    `EXistException`
    `PermissionDeniedException`

### getDocument

    public byte[] getDocument(User user,
                              java.lang.String name,
                              java.lang.String encoding,
                              int prettyPrint,
                              java.lang.String stylesheet)
                       throws EXistException,
                              PermissionDeniedException

  Deprecated. Use `getDocument(User, String, Hashtable)` instead.

  Retrieve document by name. XML content is indented if prettyPrint is set to >=0. Use supplied encoding for output and apply the specified stylesheet. This method is provided to retrieve a document with encodings other than UTF-8. Since the data is handled as binary data, character encodings are preserved. byte[]-values are automatically BASE64-encoded by the XMLRPC library.

  Parameters:
    `name` - the document's name.
    `prettyPrint` - pretty print XML if >0.
    `encoding` - character encoding to use.
    `user` - Description of the Parameter
  Returns:
    The document value
  Throws:
    `EXistException`
    `PermissionDeniedException`

### getDocument

    public byte[] getDocument(User user,
                              java.lang.String name,
                              java.util.Hashtable parameters)
                       throws EXistException,
                              PermissionDeniedException

  Retrieve document by name. All optional output parameters are passed as key/value pairs int the hashtable `parameters`. Valid keys may either be taken from `OutputKeys` or `EXistOutputKeys`. For example, the encoding is identified by the value of key `OutputKeys.ENCODING`.

  Parameters:
    `name` - the document's name.
    `parameters` - Hashtable of parameters.
  Returns:
    The document value
  Throws:
    `EXistException`
    `PermissionDeniedException`

### getDocumentAsString

    public java.lang.String getDocumentAsString(User user,
                                                java.lang.String name,
                                                int prettyPrint)
                                         throws EXistException,
                                                PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### getDocumentAsString

    public java.lang.String getDocumentAsString(User user,
                                                java.lang.String name,
                                                int prettyPrint,
                                                java.lang.String stylesheet)
                                         throws EXistException,
                                                PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### getDocumentAsString

    public java.lang.String getDocumentAsString(User user,
                                                java.lang.String name,
                                                java.util.Hashtable parameters)
                                         throws EXistException,
                                                PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### getDocumentData

    public java.util.Hashtable getDocumentData(User user,
                                               java.lang.String name,
                                               java.util.Hashtable parameters)
                                        throws EXistException,
                                               PermissionDeniedException

  Retrieve the specified document, but limit the number of bytes transmitted to avoid memory shortage on the server.

  Parameters:
    `user` -
    `name` -
    `parameters` -
  Throws:
    `EXistException`
    `PermissionDeniedException`

### getNextChunk

    public java.util.Hashtable getNextChunk(User user,
                                            java.lang.String handle,
                                            int offset)
                                     throws EXistException,
                                            PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### getBinaryResource

    public byte[] getBinaryResource(User user,
                                    java.lang.String name)
                             throws EXistException,
                                    PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### hasDocument

    public boolean hasDocument(User user,
                               java.lang.String name)
                        throws EXistException,
                               PermissionDeniedException

  Does the document identified by `name` exist in the repository?

  Parameters:
    `name` - Description of the Parameter
    `user` - Description of the Parameter
  Returns:
    Description of the Return Value
  Throws:
    `EXistException` - Description of the Exception
    `PermissionDeniedException` - Description of the Exception

### hasCollection

    public boolean hasCollection(User user,
                                 java.lang.String name)
                          throws EXistException,
                                 PermissionDeniedException

  Does the Collection identified by `name` exist in the repository?

  Parameters:
    `name` - Description of the Parameter
    `user` - Description of the Parameter
  Returns:
    Description of the Return Value
  Throws:
    `EXistException` - Description of the Exception
    `PermissionDeniedException` - Description of the Exception

### getDocumentListing

    public java.util.Vector getDocumentListing(User user)
                                        throws EXistException,
                                               PermissionDeniedException

  Get a list of all documents contained in the database.

  Parameters:
    `user` -
  Returns:
    list of document paths
  Throws:
    `EXistException` - Description of the Exception
    `PermissionDeniedException` - Description of the Exception

### getDocumentListing

    public java.util.Vector getDocumentListing(User user,
                                               java.lang.String collection)
                                        throws EXistException,
                                               PermissionDeniedException

  Get a list of all documents contained in the collection.

  Parameters:
    `collection` - the collection to use.
    `user` - Description of the Parameter
  Returns:
    list of document paths
  Throws:
    `EXistException` - Description of the Exception
    `PermissionDeniedException` - Description of the Exception

### listDocumentPermissions

    public java.util.Hashtable listDocumentPermissions(User user,
                                                       java.lang.String name)
                                                throws EXistException,
                                                       PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### listCollectionPermissions

    public java.util.Hashtable listCollectionPermissions(User user,
                                                         java.lang.String name)
                                                  throws EXistException,
                                                         PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### getCollectionDesc

    public java.util.Hashtable getCollectionDesc(User user,
                                                 java.lang.String rootCollection)
                                          throws EXistException,
                                                 PermissionDeniedException

  Describe a collection: returns a struct with the following fields:

      	name				The name of the collection

      	owner				The name of the user owning the collection.

      	group				The group owning the collection.

      	permissions	The permissions that apply to this collection (int value)

      	created			The creation date of this collection (long value)

      	collections		An array containing the names of all subcollections.

      	documents		An array containing a struct for each document in the collection.

  Each of the elements in the "documents" array is another struct containing the properties of the document:

      	name				The full path of the document.

      	owner				The name of the user owning the document.

      	group				The group owning the document.

      	permissions	The permissions that apply to this document (int)

      	type					Type of the resource: either "XMLResource" or "BinaryResource"

  Parameters:
    `rootCollection` - Description of the Parameter
    `user` - Description of the Parameter
  Returns:
    The collectionDesc value
  Throws:
    `EXistException` - Description of the Exception
    `PermissionDeniedException` - Description of the Exception

### describeCollection

    public java.util.Hashtable describeCollection(User user,
                                                  java.lang.String collectionName)
                                           throws EXistException,
                                                  PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### describeResource

    public java.util.Hashtable describeResource(User user,
                                                java.lang.String resourceName)
                                         throws EXistException,
                                                PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### getResourceCount

    public int getResourceCount(User user,
                                java.lang.String collectionName)
                         throws EXistException,
                                PermissionDeniedException

  Returns the number of resources in the collection identified by collectionName.

  Parameters:
    `collectionName` -
    `user` -
  Returns:
    number of resources
  Throws:
    `EXistException`
    `PermissionDeniedException`

### retrieve

    public byte[] retrieve(User user,
                           java.lang.String doc,
                           java.lang.String id)
                    throws EXistException,
                           PermissionDeniedException

  Retrieve a single node from a document. The node is identified by it's internal id.

  Parameters:
    `doc` - the document containing the node
    `id` - the node's internal id
    `user` - Description of the Parameter
  Returns:
    Description of the Return Value
  Throws:
    `EXistException` - Description of the Exception
    `PermissionDeniedException` - Description of the Exception

### retrieve

    public byte[] retrieve(User user,
                           java.lang.String doc,
                           java.lang.String id,
                           java.util.Hashtable parameters)
                    throws EXistException,
                           PermissionDeniedException

  Retrieve a single node from a document. The node is identified by it's internal id.

  Parameters:
    `parameters` -
    `doc` - the document containing the node
    `id` - the node's internal id
    `user` - Description of the Parameter
  Throws:
    `EXistException` - Description of the Exception
    `PermissionDeniedException` - Description of the Exception

### retrieveAsString

    public java.lang.String retrieveAsString(User user,
                                             java.lang.String doc,
                                             java.lang.String id,
                                             java.util.Hashtable parameters)
                                      throws EXistException,
                                             PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### retrieveAll

    public byte[] retrieveAll(User user,
                              int resultId,
                              java.util.Hashtable parameters)
                       throws EXistException,
                              PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### compile

    public java.util.Hashtable compile(User user,
                                       byte[] xquery,
                                       java.util.Hashtable parameters)
                                throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### queryP

    public java.util.Hashtable queryP(User user,
                                      byte[] xpath,
                                      java.util.Hashtable parameters)
                               throws EXistException,
                                      PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### queryP

    public java.util.Hashtable queryP(User user,
                                      byte[] xpath,
                                      java.lang.String docName,
                                      java.lang.String s_id,
                                      java.util.Hashtable parameters)
                               throws EXistException,
                                      PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### query

    public byte[] query(User user,
                        byte[] xquery,
                        int howmany,
                        int start,
                        java.util.Hashtable parameters)
                 throws EXistException,
                        PermissionDeniedException

  Deprecated. use Vector query() or int executeQuery() instead

  execute XPath query and return howmany nodes from the result set, starting at position `start`. If `prettyPrint` is set to >0 (true), results are pretty printed.

  Parameters:
    `xquery` -
    `parameters` -
    `howmany` - maximum number of results to return.
    `start` - item in the result set to start with.
    `user` -
  Throws:
    `EXistException`
    `PermissionDeniedException`

### querySummary

    public java.util.Hashtable querySummary(User user,
                                            java.lang.String xquery)
                                     throws EXistException,
                                            PermissionDeniedException

  Deprecated. use Vector query() or int executeQuery() instead

  execute XPath query and return a summary of hits per document and hits per doctype. This method returns a struct with the following fields:

  "queryTime" | int
  "hits" | int
  "documents" | array of array: Object[][3]
  "doctypes" | array of array: Object[][2]

  Documents and doctypes represent tables where each row describes one document or doctype for which hits were found. Each document entry has the following structure: docId (int), docName (string), hits (int) The doctype entry has this structure: doctypeName (string), hits (int)

  Parameters:
    `xquery` -
    `user` - Description of the Parameter
  Throws:
    `EXistException` - Description of the Exception
    `PermissionDeniedException` - Description of the Exception

### printDiagnostics

    public java.lang.String printDiagnostics(User user,
                                             java.lang.String query,
                                             java.util.Hashtable parameters)
                                      throws EXistException,
                                             PermissionDeniedException

  Returns a diagnostic dump of the expression structure after compiling the query. The query is read from the query cache if it has already been run before.

  Parameters:
    `user` -
    `query` -
  Throws:
    `EXistException`
    `PermissionDeniedException`

### createResourceId

    public java.lang.String createResourceId(User user,
                                             java.lang.String collection)
                                      throws EXistException,
                                             PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### parse

    public boolean parse(User user,
                         byte[] xmlData,
                         java.lang.String docName)
                  throws EXistException,
                         PermissionDeniedException

  Parse an XML document and store it into the database. The document will later be identified by `docName`. Some xmlrpc clients seem to have problems with character encodings when sending xml content. To avoid this, parse() accepts the xml document content as byte[]. If `overwrite` is >0, an existing document with the same name will be replaced by the new document.

  Parameters:
    `xmlData` - The document data
    `docName` - The path where the document will be stored
  Throws:
    `EXistException`
    `PermissionDeniedException`

### parse

    public boolean parse(User user,
                         byte[] xmlData,
                         java.lang.String docName,
                         int overwrite)
                  throws EXistException,
                         PermissionDeniedException

  Parse an XML document and store it into the database. The document will later be identified by `docName`. Some xmlrpc clients seem to have problems with character encodings when sending xml content. To avoid this, parse() accepts the xml document content as byte[]. If `overwrite` is >0, an existing document with the same name will be replaced by the new document.

  Parameters:
    `xmlData` - The document data
    `docName` - The path where the document will be stored
    `overwrite` - Overwrite an existing document with the same path?
  Throws:
    `EXistException`
    `PermissionDeniedException`

### parse

    public boolean parse(User user,
                         byte[] xmlData,
                         java.lang.String docName,
                         int overwrite,
                         java.util.Date created,
                         java.util.Date modified)
                  throws EXistException,
                         PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### parse

    public boolean parse(User user,
                         java.lang.String xml,
                         java.lang.String docName,
                         int overwrite)
                  throws EXistException,
                         PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### parse

    public boolean parse(User user,
                         java.lang.String xml,
                         java.lang.String docName)
                  throws EXistException,
                         PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### upload

    public java.lang.String upload(User user,
                                   byte[] chunk,
                                   int length)
                            throws EXistException,
                                   PermissionDeniedException

  An alternative to parse() for larger XML documents. The document is first uploaded chunk by chunk using upload(), then parseLocal() is called to actually store the uploaded file.

  Parameters:
    `user` -
    `chunk` - the current chunk
    `length` - total length of the file
  Returns:
    the name of the file to which the chunk has been appended.
  Throws:
    `EXistException`
    `PermissionDeniedException`

### upload

    public java.lang.String upload(User user,
                                   java.lang.String file,
                                   byte[] chunk,
                                   int length)
                            throws EXistException,
                                   PermissionDeniedException

  An alternative to parse() for larger XML documents. The document is first uploaded chunk by chunk using upload(), then parseLocal() is called to actually store the uploaded file.

  Parameters:
    `user` -
    `chunk` - the current chunk
    `file` - the name of the file to which the chunk will be appended. This should be the file name returned by the first call to upload.
    `length` - total length of the file
  Returns:
    the name of the file to which the chunk has been appended.
  Throws:
    `EXistException`
    `PermissionDeniedException`

### uploadCompressed

    public java.lang.String uploadCompressed(User user,
                                             byte[] data,
                                             int length)
                                      throws EXistException,
                                             PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### uploadCompressed

    public java.lang.String uploadCompressed(User user,
                                             java.lang.String file,
                                             byte[] data,
                                             int length)
                                      throws EXistException,
                                             PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### parseLocal

    public boolean parseLocal(User user,
                              java.lang.String localFile,
                              java.lang.String docName,
                              boolean replace)
                       throws EXistException,
                              PermissionDeniedException,
                              org.xml.sax.SAXException

  Parse a file previously uploaded with upload. The temporary file will be removed.

  Parameters:
    `user` -
    `localFile` -
  Throws:
    `EXistException`
    `java.io.IOException`
    `PermissionDeniedException`
    `org.xml.sax.SAXException`

### parseLocal

    public boolean parseLocal(User user,
                              java.lang.String localFile,
                              java.lang.String docName,
                              boolean replace,
                              java.util.Date created,
                              java.util.Date modified)
                       throws EXistException,
                              PermissionDeniedException,
                              org.xml.sax.SAXException

  Throws:
    `EXistException`
    `PermissionDeniedException`
    `org.xml.sax.SAXException`

### storeBinary

    public boolean storeBinary(User user,
                               byte[] data,
                               java.lang.String docName,
                               java.lang.String mimeType,
                               boolean replace)
                        throws EXistException,
                               PermissionDeniedException

  Store data as a binary resource.

  Parameters:
    `user` -
    `data` - the data to be stored
    `docName` - the path to the new document
    `replace` - if true, an old document with the same path will be overwritten
  Throws:
    `EXistException`
    `PermissionDeniedException`

### storeBinary

    public boolean storeBinary(User user,
                               byte[] data,
                               java.lang.String docName,
                               java.lang.String mimeType,
                               boolean replace,
                               java.util.Date created,
                               java.util.Date modified)
                        throws EXistException,
                               PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### remove

    public boolean remove(User user,
                          java.lang.String docName)
                   throws EXistException,
                          PermissionDeniedException

  Remove a document from the database.

  Parameters:
    `docName` - path to the document to be removed
    `user` -
  Returns:
    true on success.
  Throws:
    `EXistException`
    `PermissionDeniedException`

### removeCollection

    public boolean removeCollection(User user,
                                    java.lang.String name)
                             throws EXistException,
                                    PermissionDeniedException

  Remove an entire collection from the database.

  Parameters:
    `name` - path to the collection to be removed.
    `user` -
  Throws:
    `EXistException`
    `PermissionDeniedException`

### createCollection

    public boolean createCollection(User user,
                                    java.lang.String name)
                             throws EXistException,
                                    PermissionDeniedException

  Create a new collection on the database.

  Parameters:
    `user` -
    `name` - the path to the new collection.
  Throws:
    `EXistException`
    `PermissionDeniedException`

### createCollection

    public boolean createCollection(User user,
                                    java.lang.String name,
                                    java.util.Date created)
                             throws EXistException,
                                    PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### configureCollection

    public boolean configureCollection(User user,
                                       java.lang.String collection,
                                       java.lang.String configuration)
                                throws EXistException,
                                       PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### executeQuery

    public int executeQuery(User user,
                            byte[] xpath,
                            java.lang.String encoding,
                            java.util.Hashtable parameters)
                     throws EXistException,
                            PermissionDeniedException

  Execute XPath query and return a reference to the result set. The returned reference may be used later to get a summary of results or retrieve the actual hits.

  Parameters:
    `xpath` - Description of the Parameter
    `encoding` - Description of the Parameter
    `user` - Description of the Parameter
  Returns:
    Description of the Return Value
  Throws:
    `EXistException` - Description of the Exception
    `PermissionDeniedException` - Description of the Exception

### executeQuery

    public int executeQuery(User user,
                            byte[] xpath,
                            java.util.Hashtable parameters)
                     throws EXistException,
                            PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### executeQuery

    public int executeQuery(User user,
                            java.lang.String xpath,
                            java.util.Hashtable parameters)
                     throws EXistException,
                            PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### execute

    public java.util.Hashtable execute(User user,
                                       java.lang.String path,
                                       java.util.Hashtable parameters)
                                throws EXistException,
                                       PermissionDeniedException

  Execute XPath/Xquery from path file (stored inside eXist) returned reference may be used later to get a summary of results or retrieve the actual hits.

  Throws:
    `EXistException`
    `PermissionDeniedException`

### querySummary

    public java.util.Hashtable querySummary(User user,
                                            int resultId)
                                     throws EXistException,
                                            PermissionDeniedException,
                                            XPathException

  Retrieve a summary of the result set identified by it's result-set-id. This method returns a struct with the following fields:
  "queryTime" int
  "hits" int
  "documents" array of array: Object[][3]
  "doctypes" array of array: Object[][2]
  Documents and doctypes represent tables where each row describes one document or doctype for which hits were found. Each document entry has the following structure: docId (int), docName (string), hits (int) The doctype entry has this structure: doctypeName (string), hits (int)

  Parameters:
    `resultId` - Description of the Parameter
    `user` - Description of the Parameter
  Returns:
    Description of the Return Value
  Throws:
    `EXistException` - Description of the Exception
    `PermissionDeniedException` - Description of the Exception
    `XPathException`

### getPermissions

    public java.util.Hashtable getPermissions(User user,
                                              java.lang.String resource)
                                       throws EXistException,
                                              PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### getHits

    public int getHits(User user,
                       int resultId)
                throws EXistException,
                       PermissionDeniedException

  Get the number of hits in the result set identified by it's result-set-id.

  Parameters:
    `resultId` - Description of the Parameter
    `user` - Description of the Parameter
  Returns:
    The hits value
  Throws:
    `EXistException` - Description of the Exception
    `PermissionDeniedException` - Description of the Exception

### retrieve

    public byte[] retrieve(User user,
                           int resultId,
                           int num,
                           java.util.Hashtable parameters)
                    throws EXistException,
                           PermissionDeniedException

  Retrieve a single result from the result-set identified by resultId. The XML fragment at position num in the result set is returned.

  Parameters:
    `parameters` -
    `resultId` -
    `num` -
    `user` -
  Returns:
    Description of the Return Value
  Throws:
    `EXistException`
    `PermissionDeniedException`

### setUser

    public boolean setUser(User user,
                           java.lang.String name,
                           java.lang.String passwd,
                           java.lang.String digestPassword,
                           java.util.Vector groups,
                           java.lang.String home)
                    throws EXistException,
                           PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### setUser

    public boolean setUser(User user,
                           java.lang.String name,
                           java.lang.String passwd,
                           java.lang.String digestPassword,
                           java.util.Vector groups)
                    throws EXistException,
                           PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### setPermissions

    public boolean setPermissions(User user,
                                  java.lang.String resource,
                                  java.lang.String permissions)
                           throws EXistException,
                                  PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### setPermissions

    public boolean setPermissions(User user,
                                  java.lang.String resource,
                                  int permissions)
                           throws EXistException,
                                  PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### setPermissions

    public boolean setPermissions(User user,
                                  java.lang.String resource,
                                  java.lang.String owner,
                                  java.lang.String ownerGroup,
                                  java.lang.String permissions)
                           throws EXistException,
                                  PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### setPermissions

    public boolean setPermissions(User user,
                                  java.lang.String resource,
                                  java.lang.String owner,
                                  java.lang.String ownerGroup,
                                  int permissions)
                           throws EXistException,
                                  PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### lockResource

    public boolean lockResource(User user,
                                java.lang.String path,
                                java.lang.String userName)
                         throws EXistException,
                                PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### unlockResource

    public boolean unlockResource(User user,
                                  java.lang.String path)
                           throws EXistException,
                                  PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### hasUserLock

    public java.lang.String hasUserLock(User user,
                                        java.lang.String path)
                                 throws EXistException,
                                        PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### getUser

    public java.util.Hashtable getUser(User user,
                                       java.lang.String name)
                                throws EXistException,
                                       PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### getUsers

    public java.util.Vector getUsers(User user)
                              throws EXistException,
                                     PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### removeUser

    public boolean removeUser(User user,
                              java.lang.String name)
                       throws EXistException,
                              PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### getGroups

    public java.util.Vector getGroups(User user)
                               throws EXistException,
                                      PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### getIndexedElements

    public java.util.Vector getIndexedElements(User user,
                                               java.lang.String collectionName,
                                               boolean inclusive)
                                        throws EXistException,
                                               PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### scanIndexTerms

    public java.util.Vector scanIndexTerms(User user,
                                           java.lang.String collectionName,
                                           java.lang.String start,
                                           java.lang.String end,
                                           boolean inclusive)
                                    throws PermissionDeniedException,
                                           EXistException

  Throws:
    `PermissionDeniedException`
    `EXistException`

### scanIndexTerms

    public java.util.Vector scanIndexTerms(User user,
                                           java.lang.String xpath,
                                           java.lang.String start,
                                           java.lang.String end)
                                    throws PermissionDeniedException,
                                           EXistException,
                                           XPathException

  Throws:
    `PermissionDeniedException`
    `EXistException`
    `XPathException`

### releaseQueryResult

    public boolean releaseQueryResult(User user,
                                      int handle)

### xupdate

    public int xupdate(User user,
                       java.lang.String collectionName,
                       byte[] xupdate)
                throws PermissionDeniedException,
                       EXistException,
                       org.xml.sax.SAXException

  Throws:
    `PermissionDeniedException`
    `EXistException`
    `org.xml.sax.SAXException`

### xupdateResource

    public int xupdateResource(User user,
                               java.lang.String resource,
                               byte[] xupdate)
                        throws PermissionDeniedException,
                               EXistException,
                               org.xml.sax.SAXException

  Throws:
    `PermissionDeniedException`
    `EXistException`
    `org.xml.sax.SAXException`

### xupdateResource

    public int xupdateResource(User user,
                               java.lang.String resource,
                               byte[] xupdate,
                               java.lang.String encoding)
                        throws PermissionDeniedException,
                               EXistException,
                               org.xml.sax.SAXException

  Throws:
    `PermissionDeniedException`
    `EXistException`
    `org.xml.sax.SAXException`

### getCreationDate

    public java.util.Date getCreationDate(User user,
                                          java.lang.String collectionName)
                                   throws PermissionDeniedException,
                                          EXistException

  Throws:
    `PermissionDeniedException`
    `EXistException`

### getTimestamps

    public java.util.Vector getTimestamps(User user,
                                          java.lang.String documentName)
                                   throws PermissionDeniedException,
                                          EXistException

  Throws:
    `PermissionDeniedException`
    `EXistException`

### copyCollection

    public boolean copyCollection(User user,
                                  java.lang.String name,
                                  java.lang.String namedest)
                           throws PermissionDeniedException,
                                  EXistException

  Throws:
    `PermissionDeniedException`
    `EXistException`

### getDocumentChunk

    public java.util.Vector getDocumentChunk(User user,
                                             java.lang.String name,
                                             java.util.Hashtable parameters)
                                      throws EXistException,
                                             PermissionDeniedException,
                                             java.io.IOException

  Throws:
    `EXistException`
    `PermissionDeniedException`
    `java.io.IOException`

### getDocumentChunk

    public byte[] getDocumentChunk(User user,
                                   java.lang.String name,
                                   int start,
                                   int stop)
                            throws EXistException,
                                   PermissionDeniedException,
                                   java.io.IOException

  Throws:
    `EXistException`
    `PermissionDeniedException`
    `java.io.IOException`

### moveCollection

    public boolean moveCollection(User user,
                                  java.lang.String collectionPath,
                                  java.lang.String destinationPath,
                                  java.lang.String newName)
                           throws EXistException,
                                  PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### moveResource

    public boolean moveResource(User user,
                                java.lang.String docPath,
                                java.lang.String destinationPath,
                                java.lang.String newName)
                         throws EXistException,
                                PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### copyCollection

    public boolean copyCollection(User user,
                                  java.lang.String collectionPath,
                                  java.lang.String destinationPath,
                                  java.lang.String newName)
                           throws EXistException,
                                  PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### copyResource

    public boolean copyResource(User user,
                                java.lang.String docPath,
                                java.lang.String destinationPath,
                                java.lang.String newName)
                         throws EXistException,
                                PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### reindexCollection

    public boolean reindexCollection(User user,
                                     java.lang.String name)
                              throws EXistException,
                                     PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### backup

    public boolean backup(User user,
                          java.lang.String userbackup,
                          java.lang.String password,
                          java.lang.String destcollection,
                          java.lang.String collection)
                   throws EXistException,
                          PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### dataBackup

    public boolean dataBackup(User user,
                              java.lang.String dest)
                       throws PermissionDeniedException

  Throws:
    `PermissionDeniedException`

### isValid

    public boolean isValid(User user,
                           java.lang.String name)
                    throws EXistException,
                           PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

### getDocType

    public java.util.Vector getDocType(User user,
                                       java.lang.String documentName)
                                throws PermissionDeniedException,
                                       EXistException

  Throws:
    `PermissionDeniedException`
    `EXistException`

### setDocType

    public boolean setDocType(User user,
                              java.lang.String documentName,
                              java.lang.String doctypename,
                              java.lang.String publicid,
                              java.lang.String systemid)
                       throws EXistException,
                              PermissionDeniedException

  Throws:
    `EXistException`
    `PermissionDeniedException`

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) Wolfgang Meier. All rights reserved.