|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.xmlrpc.RpcConnection
public class RpcConnection
This class implements the actual methods defined by
RpcAPI
.
Field Summary |
---|
Fields inherited from interface org.exist.xmlrpc.RpcAPI |
---|
BASE_URI, COLUMN, ERROR, LINE, NAMESPACES, PROTECTED_MODE, SORT_EXPR, STATIC_DOCUMENTS, VARIABLES |
Constructor Summary | |
---|---|
RpcConnection(XmldbRequestProcessorFactory factory,
User user)
Creates a new RpcConnection instance. |
Method Summary | |
---|---|
void |
backup(String userbackup,
String password,
String destcollection,
String collection)
The method backup |
HashMap |
compile(byte[] xquery,
HashMap parameters)
|
HashMap |
compile(String query,
HashMap parameters)
The method compile |
boolean |
configureCollection(String collName,
String configuration)
The method configureCollection |
boolean |
copyCollection(String name,
String namedest)
|
boolean |
copyCollection(String collectionPath,
String destinationPath,
String newName)
|
boolean |
copyResource(String docPath,
String destinationPath,
String newName)
|
boolean |
createCollection(String name)
Create a new collection on the database. |
boolean |
createCollection(String name,
Date created)
The method createCollection |
String |
createId(String collName)
The method createId |
String |
createResourceId(String collectionName)
The method createResourceId |
boolean |
dataBackup(String dest)
The method dataBackup |
HashMap |
describeCollection(String rootCollection)
The method describeCollection |
HashMap |
describeResource(String resourceName)
The method describeResource |
boolean |
enterServiceMode()
|
HashMap |
execute(String xpath,
HashMap parameters)
The method execute |
int |
executeQuery(byte[] xpath,
HashMap parameters)
|
int |
executeQuery(byte[] xpath,
String encoding,
HashMap parameters)
Execute XPath query and return a reference to the result set. |
int |
executeQuery(String xpath,
HashMap parameters)
The method executeQuery |
void |
exitServiceMode()
|
byte[] |
getBinaryResource(String name)
The method getBinaryResource |
HashMap |
getCollectionDesc(String rootCollection)
The method getCollectionDesc |
Date |
getCreationDate(String collectionPath)
The method getCreationDate |
Vector |
getDocType(String documentPath)
The method getDocType |
byte[] |
getDocument(String name,
HashMap parametri)
Retrieve document by name. |
byte[] |
getDocument(String name,
String encoding,
int prettyPrint)
Retrieve document by name. |
byte[] |
getDocument(String name,
String encoding,
int prettyPrint,
String stylesheet)
Retrieve document by name. |
String |
getDocumentAsString(String docName,
HashMap parametri)
The method getDocument |
String |
getDocumentAsString(String name,
int prettyPrint)
|
String |
getDocumentAsString(String name,
int prettyPrint,
String stylesheet)
|
List |
getDocumentChunk(String name,
HashMap parameters)
|
byte[] |
getDocumentChunk(String name,
int start,
int len)
|
HashMap |
getDocumentData(String docName,
HashMap parameters)
The method getDocumentData |
Vector |
getDocumentListing()
The method getDocumentListing |
Vector |
getDocumentListing(String collName)
The method getDocumentListing |
Vector |
getGroups()
The method getGroups |
int |
getHits(int resultId)
The method getHits |
Vector |
getIndexedElements(String collectionName,
boolean inclusive)
The method getIndexedElements |
HashMap |
getNextChunk(String handle,
int offset)
The method getNextChunk |
HashMap |
getPermissions(String name)
The method getPermissions |
int |
getResourceCount(String collectionName)
The method getResourceCount |
Vector |
getTimestamps(String documentPath)
The method getTimestamps |
HashMap |
getUser(String name)
The method getUser |
Vector |
getUsers()
The method getUsers |
boolean |
hasCollection(String collectionName)
The method hasCollection |
boolean |
hasDocument(String documentPath)
The method hasDocument |
String |
hasUserLock(String documentPath)
The method hasUserLock |
boolean |
isValid(String documentPath)
Validate if specified document is Valid. |
boolean |
isXACMLEnabled()
The method isXACMLEnabled |
HashMap |
listCollectionPermissions(String name)
The method listCollectionPermissions |
HashMap |
listDocumentPermissions(String name)
The method listDocumentPermissions |
boolean |
lockResource(String documentPath,
String userName)
The method lockResource |
boolean |
moveCollection(String collectionPath,
String destinationPath,
String newName)
|
boolean |
moveOrCopyCollection(String collectionName,
String destinationPath,
String newName,
boolean move)
The method moveOrCopyCollection |
boolean |
moveOrCopyResource(String documentPath,
String destinationPath,
String newName,
boolean move)
The method moveOrCopyResource |
boolean |
moveResource(String docPath,
String destinationPath,
String newName)
|
boolean |
parse(byte[] xmlData,
String docName)
Parse an XML document and store it into the database. |
boolean |
parse(byte[] xml,
String documentPath,
int overwrite)
The method parse |
boolean |
parse(byte[] xml,
String documentPath,
int overwrite,
Date created,
Date modified)
The method parse |
boolean |
parse(String xml,
String docName)
|
boolean |
parse(String xml,
String docName,
int overwrite)
|
boolean |
parseLocal(String localFile,
String docName,
boolean replace,
String mimeType)
Parse a file previously uploaded with upload. |
boolean |
parseLocal(String localFile,
String docName,
boolean replace,
String mimeType,
Date created,
Date modified)
|
boolean |
parseLocal(String localFile,
String documentPath,
int overwrite,
String mimeType)
Parse a file previously uploaded with upload. |
boolean |
parseLocal(String localFile,
String documentPath,
int overwrite,
String mimeType,
Date created,
Date modified)
The method parseLocal |
String |
printDiagnostics(String query,
HashMap parameters)
The method printDiagnostics |
byte[] |
query(byte[] xquery,
int howmany,
int start,
HashMap parameters)
execute XPath query and return howmany nodes from the result set, starting at position start . |
String |
query(String xpath,
int howmany,
int start,
HashMap parameters)
The method query |
HashMap |
queryP(byte[] xpath,
HashMap parameters)
|
HashMap |
queryP(byte[] xpath,
String docName,
String s_id,
HashMap parameters)
|
HashMap |
queryP(String xpath,
String documentPath,
String s_id,
HashMap parameters)
The method queryP |
HashMap |
querySummary(int resultId)
Retrieve a summary of the result set identified by it's result-set-id. |
HashMap |
querySummary(String xquery)
execute XPath query and return a summary of hits per document and hits per doctype. |
void |
reindexCollection(String collectionName)
The method reindexCollection |
void |
releaseQueryResult(int handle)
The method releaseQueryResult |
boolean |
remove(String documentPath)
The method remove |
boolean |
removeCollection(String collectionName)
The method removeCollection |
boolean |
removeUser(String name)
The method removeUser |
byte[] |
retrieve(int resultId,
int num,
HashMap parameters)
Retrieve a single result from the result-set identified by resultId. |
byte[] |
retrieve(String doc,
String id)
Retrieve a single node from a document. |
byte[] |
retrieve(String doc,
String id,
HashMap parameters)
Retrieve a single node from a document. |
byte[] |
retrieveAll(int resultId,
HashMap parameters)
|
String |
retrieveAsString(String documentPath,
String s_id,
HashMap parameters)
The method retrieve |
Vector |
scanIndexTerms(String xpath,
String start,
String end)
The method scanIndexTerms |
Vector |
scanIndexTerms(String collectionName,
String start,
String end,
boolean inclusive)
The method scanIndexTerms |
boolean |
setDocType(String documentPath,
String doctypename,
String publicid,
String systemid)
The method setDocType |
boolean |
setPermissions(String resource,
int permissions)
|
boolean |
setPermissions(String resource,
String permissions)
|
boolean |
setPermissions(String resource,
String owner,
String ownerGroup,
int permissions)
The method setPermissions |
boolean |
setPermissions(String resource,
String owner,
String ownerGroup,
String permissions)
The method setPermissions |
boolean |
setUser(String name,
String passwd,
String digestPassword,
Vector groups)
|
boolean |
setUser(String name,
String passwd,
String passwdDigest,
Vector groups,
String home)
The method setUser |
boolean |
setUser(String name,
Vector groups)
Added by {Marco.Tampucci, Massimo.Martinelli} @isti.cnr.it |
boolean |
setUser(String name,
Vector groups,
String rgroup)
Added by {Marco.Tampucci, Massimo.Martinelli} @isti.cnr.it |
boolean |
shutdown()
Shut down the database immediately. |
boolean |
shutdown(long delay)
Shut down the database after the specified delay (in milliseconds). |
boolean |
storeBinary(byte[] data,
String docName,
String mimeType,
boolean replace)
Store data as a binary resource. |
boolean |
storeBinary(byte[] data,
String docName,
String mimeType,
boolean replace,
Date created,
Date modified)
|
boolean |
storeBinary(byte[] data,
String documentPath,
String mimeType,
int overwrite)
The method storeBinary |
boolean |
storeBinary(byte[] data,
String documentPath,
String mimeType,
int overwrite,
Date created,
Date modified)
The method storeBinary |
HashMap |
summary(int resultId)
The method summary |
HashMap |
summary(String xpath)
The method summary |
boolean |
sync()
The method sync |
void |
synchronize()
The method synchronize |
boolean |
unlockResource(String documentPath)
The method unlockResource |
String |
upload(byte[] chunk,
int length)
An alternative to parse() for larger XML documents. |
String |
upload(byte[] chunk,
int length,
String fileName,
boolean compressed)
The method upload |
String |
upload(String file,
byte[] chunk,
int length)
An alternative to parse() for larger XML documents. |
String |
uploadCompressed(byte[] data,
int length)
|
String |
uploadCompressed(String file,
byte[] data,
int length)
|
int |
xupdate(String collectionName,
byte[] xupdate)
The method xupdate |
int |
xupdateResource(String resource,
byte[] xupdate)
|
int |
xupdateResource(String resource,
byte[] xupdate,
String encoding)
The method xupdateResource |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RpcConnection(XmldbRequestProcessorFactory factory, User user)
RpcConnection
instance.
EXistException
- if an error occursMethod Detail |
---|
public boolean createCollection(String name) throws EXistException, PermissionDeniedException
RpcAPI
createCollection
in interface RpcAPI
name
- the path to the new collection.
EXistException
PermissionDeniedException
public boolean createCollection(String name, Date created) throws EXistException, PermissionDeniedException
createCollection
createCollection
in interface RpcAPI
name
- a String
valuecreated
- a Date
value
Exception
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
public boolean configureCollection(String collName, String configuration) throws EXistException, PermissionDeniedException
configureCollection
configureCollection
in interface RpcAPI
collName
- a String
valueconfiguration
- a String
value
EXistException
- if an error occurs
URISyntaxException
- if an error occurs
PermissionDeniedException
public String createId(String collName) throws EXistException, URISyntaxException
createId
collName
- a String
value
String
value
EXistException
- if an error occurs
URISyntaxException
- if an error occurspublic String printDiagnostics(String query, HashMap parameters) throws EXistException, PermissionDeniedException
printDiagnostics
printDiagnostics
in interface RpcAPI
query
- a String
valueparameters
- a HashMap
value
String
value
Exception
- if an error occurs
EXistException
PermissionDeniedException
public int executeQuery(byte[] xpath, String encoding, HashMap parameters) throws EXistException, PermissionDeniedException
RpcAPI
executeQuery
in interface RpcAPI
xpath
- Description of the Parameterencoding
- Description of the Parameterparameters
- a HashMap
value
EXistException
- Description of the Exception
PermissionDeniedException
- Description of the Exceptionpublic int executeQuery(String xpath, HashMap parameters) throws EXistException, PermissionDeniedException
executeQuery
executeQuery
in interface RpcAPI
xpath
- a String
valueparameters
- a HashMap
value
int
value
Exception
- if an error occurs
EXistException
PermissionDeniedException
public HashMap getCollectionDesc(String rootCollection) throws EXistException, PermissionDeniedException
getCollectionDesc
getCollectionDesc
in interface RpcAPI
rootCollection
- a String
value
HashMap
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
- Description of the Exception
PermissionDeniedException
- Description of the Exceptionpublic HashMap describeResource(String resourceName) throws EXistException, PermissionDeniedException
describeResource
describeResource
in interface RpcAPI
resourceName
- a String
value
HashMap
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurspublic HashMap describeCollection(String rootCollection) throws EXistException, PermissionDeniedException
describeCollection
describeCollection
in interface RpcAPI
rootCollection
- a String
value
HashMap
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
PermissionDeniedException
public byte[] getDocument(String name, HashMap parametri) throws EXistException, PermissionDeniedException
RpcAPI
parameters
.
Valid keys may either be taken from OutputKeys
or
EXistOutputKeys
. For example, the encoding is identified by
the value of key OutputKeys.ENCODING
.
getDocument
in interface RpcAPI
name
- the document's name.parametri
- HashMap of parameters.
EXistException
PermissionDeniedException
public String getDocumentAsString(String docName, HashMap parametri) throws EXistException, PermissionDeniedException
getDocument
getDocumentAsString
in interface RpcAPI
docName
- a String
valueparametri
- a HashMap
value
String
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
PermissionDeniedException
public HashMap getDocumentData(String docName, HashMap parameters) throws EXistException, PermissionDeniedException
getDocumentData
getDocumentData
in interface RpcAPI
docName
- a String
valueparameters
- a HashMap
value
HashMap
value
Exception
- if an error occurs
EXistException
PermissionDeniedException
public HashMap getNextChunk(String handle, int offset) throws EXistException, PermissionDeniedException
getNextChunk
getNextChunk
in interface RpcAPI
handle
- a String
valueoffset
- an int
value
HashMap
value
Exception
- if an error occurs
EXistException
PermissionDeniedException
public byte[] getBinaryResource(String name) throws EXistException, PermissionDeniedException, URISyntaxException
getBinaryResource
getBinaryResource
in interface RpcAPI
name
- a String
value
byte[]
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurspublic int xupdate(String collectionName, byte[] xupdate) throws PermissionDeniedException, EXistException
xupdate
xupdate
in interface RpcAPI
collectionName
- a String
valuexupdate
- a String
value
int
value
SAXException
- if an error occurs
LockException
- if an error occurs
PermissionDeniedException
- if an error occurs
EXistException
- if an error occurs
XPathException
- if an error occurs
URISyntaxException
- if an error occurspublic int xupdateResource(String resource, byte[] xupdate, String encoding) throws PermissionDeniedException, EXistException
xupdateResource
xupdateResource
in interface RpcAPI
resource
- a String
valuexupdate
- a String
value
int
value
SAXException
- if an error occurs
LockException
- if an error occurs
PermissionDeniedException
- if an error occurs
EXistException
- if an error occurs
XPathException
- if an error occurs
URISyntaxException
- if an error occurspublic boolean sync()
sync
sync
in interface RpcAPI
boolean
valuepublic boolean isXACMLEnabled()
isXACMLEnabled
isXACMLEnabled
in interface RpcAPI
boolean
valuepublic boolean dataBackup(String dest)
dataBackup
dataBackup
in interface RpcAPI
dest
- a String
value
boolean
valuepublic Vector getDocumentListing() throws EXistException
getDocumentListing
getDocumentListing
in interface RpcAPI
Vector
value
EXistException
- if an error occurspublic Vector getDocumentListing(String collName) throws EXistException, PermissionDeniedException, URISyntaxException
getDocumentListing
getDocumentListing
in interface RpcAPI
collName
- a String
value
Vector
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurspublic int getResourceCount(String collectionName) throws EXistException, PermissionDeniedException, URISyntaxException
getResourceCount
getResourceCount
in interface RpcAPI
collectionName
- a String
value
int
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurspublic String createResourceId(String collectionName) throws EXistException, PermissionDeniedException, URISyntaxException
createResourceId
createResourceId
in interface RpcAPI
collectionName
- a String
value
String
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurspublic HashMap listDocumentPermissions(String name) throws EXistException, PermissionDeniedException, URISyntaxException
listDocumentPermissions
listDocumentPermissions
in interface RpcAPI
HashMap
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurspublic HashMap listCollectionPermissions(String name) throws EXistException, PermissionDeniedException, URISyntaxException
listCollectionPermissions
listCollectionPermissions
in interface RpcAPI
name
- a String
value
HashMap
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurspublic int getHits(int resultId) throws EXistException
getHits
getHits
in interface RpcAPI
resultId
- an int
value
int
value
EXistException
- if an error occurspublic HashMap getPermissions(String name) throws EXistException, PermissionDeniedException, URISyntaxException
getPermissions
getPermissions
in interface RpcAPI
name
- a String
value
HashMap
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurspublic Date getCreationDate(String collectionPath) throws PermissionDeniedException, EXistException, URISyntaxException
getCreationDate
getCreationDate
in interface RpcAPI
collectionPath
- a String
value
Date
value
PermissionDeniedException
- if an error occurs
EXistException
- if an error occurs
URISyntaxException
- if an error occurspublic Vector getTimestamps(String documentPath) throws PermissionDeniedException, EXistException, URISyntaxException
getTimestamps
getTimestamps
in interface RpcAPI
documentPath
- a String
value
Vector
value
PermissionDeniedException
- if an error occurs
EXistException
- if an error occurs
URISyntaxException
- if an error occurspublic HashMap getUser(String name) throws EXistException, PermissionDeniedException
getUser
getUser
in interface RpcAPI
name
- a String
value
HashMap
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurspublic Vector getUsers() throws EXistException, PermissionDeniedException
getUsers
getUsers
in interface RpcAPI
Vector
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurspublic Vector getGroups() throws EXistException, PermissionDeniedException
getGroups
getGroups
in interface RpcAPI
Vector
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurspublic boolean hasDocument(String documentPath) throws URISyntaxException, EXistException, PermissionDeniedException
hasDocument
hasDocument
in interface RpcAPI
documentPath
- a String
value
boolean
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
- Description of the Exception
PermissionDeniedException
- Description of the Exceptionpublic boolean hasCollection(String collectionName) throws EXistException, URISyntaxException
hasCollection
hasCollection
in interface RpcAPI
collectionName
- a String
value
boolean
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
- Description of the Exceptionpublic boolean parse(byte[] xml, String documentPath, int overwrite) throws URISyntaxException, EXistException, PermissionDeniedException
parse
parse
in interface RpcAPI
xml
- a byte
valuedocumentPath
- a String
valueoverwrite
- Overwrite an existing document with the same path?
boolean
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
PermissionDeniedException
public boolean parse(byte[] xml, String documentPath, int overwrite, Date created, Date modified) throws URISyntaxException, EXistException, PermissionDeniedException
parse
parse
in interface RpcAPI
xml
- a byte
valuedocumentPath
- a String
valuecreated
- a Date
valuemodified
- a Date
value
boolean
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
PermissionDeniedException
public boolean parseLocal(String localFile, String documentPath, int overwrite, String mimeType) throws Exception, URISyntaxException
localFile
-
EXistException
IOException
Exception
URISyntaxException
public boolean parseLocal(String localFile, String documentPath, int overwrite, String mimeType, Date created, Date modified) throws URISyntaxException, EXistException, PermissionDeniedException
parseLocal
localFile
- a String
valuedocumentPath
- a String
valuemimeType
- a String
valuecreated
- a Date
valuemodified
- a Date
value
boolean
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
PermissionDeniedException
public boolean storeBinary(byte[] data, String documentPath, String mimeType, int overwrite) throws Exception, URISyntaxException
storeBinary
data
- a byte
valuedocumentPath
- a String
valuemimeType
- a String
value
boolean
value
Exception
- if an error occurs
URISyntaxException
- if an error occurspublic boolean storeBinary(byte[] data, String documentPath, String mimeType, int overwrite, Date created, Date modified) throws URISyntaxException, EXistException, PermissionDeniedException
storeBinary
data
- a byte
valuedocumentPath
- a String
valuemimeType
- a String
valuecreated
- a Date
valuemodified
- a Date
value
boolean
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
PermissionDeniedException
public String upload(byte[] chunk, int length, String fileName, boolean compressed) throws EXistException, IOException
upload
chunk
- a byte
valuelength
- an int
valuefileName
- a String
valuecompressed
- a boolean
value
String
value
EXistException
- if an error occurs
IOException
- if an error occurspublic HashMap compile(String query, HashMap parameters) throws EXistException, PermissionDeniedException
compile
query
- a String
valueparameters
- a HashMap
value
HashMap
value
Exception
- if an error occurs
EXistException
PermissionDeniedException
public String query(String xpath, int howmany, int start, HashMap parameters) throws EXistException, PermissionDeniedException
query
xpath
- a String
valuehowmany
- an int
valuestart
- an int
valueparameters
- a HashMap
value
String
value
Exception
- if an error occurs
EXistException
PermissionDeniedException
public HashMap queryP(String xpath, String documentPath, String s_id, HashMap parameters) throws URISyntaxException, EXistException, PermissionDeniedException
queryP
xpath
- a String
valuedocumentPath
- a String
values_id
- a String
valueparameters
- a HashMap
value
HashMap
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
PermissionDeniedException
public HashMap execute(String xpath, HashMap parameters) throws EXistException, PermissionDeniedException
execute
execute
in interface RpcAPI
xpath
- a String
valueparameters
- a HashMap
value
HashMap
value
Exception
- if an error occurs
EXistException
PermissionDeniedException
public void releaseQueryResult(int handle)
releaseQueryResult
releaseQueryResult
in interface RpcAPI
handle
- an int
valuepublic boolean remove(String documentPath) throws URISyntaxException, EXistException, PermissionDeniedException
remove
remove
in interface RpcAPI
documentPath
- a String
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
PermissionDeniedException
public boolean removeCollection(String collectionName) throws URISyntaxException, EXistException, PermissionDeniedException
removeCollection
removeCollection
in interface RpcAPI
collectionName
- a String
value
boolean
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
PermissionDeniedException
public boolean removeUser(String name) throws EXistException, PermissionDeniedException
removeUser
removeUser
in interface RpcAPI
name
- a String
value
boolean
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurspublic byte[] retrieve(String doc, String id, HashMap parameters) throws EXistException, PermissionDeniedException
RpcAPI
retrieve
in interface RpcAPI
doc
- the document containing the nodeid
- the node's internal id
EXistException
- Description of the Exception
PermissionDeniedException
- Description of the Exceptionpublic String retrieveAsString(String documentPath, String s_id, HashMap parameters) throws URISyntaxException, EXistException, PermissionDeniedException
retrieve
retrieveAsString
in interface RpcAPI
documentPath
- a String
values_id
- a String
valueparameters
- a HashMap
value
String
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
PermissionDeniedException
public byte[] retrieve(int resultId, int num, HashMap parameters) throws EXistException, PermissionDeniedException
RpcAPI
retrieve
in interface RpcAPI
resultId
- Description of the Parameternum
- Description of the Parameter
EXistException
- Description of the Exception
PermissionDeniedException
- Description of the Exceptionpublic byte[] retrieveAll(int resultId, HashMap parameters) throws EXistException, PermissionDeniedException
retrieveAll
in interface RpcAPI
EXistException
PermissionDeniedException
public boolean setPermissions(String resource, String owner, String ownerGroup, String permissions) throws EXistException, PermissionDeniedException, URISyntaxException
setPermissions
setPermissions
in interface RpcAPI
resource
- a String
valueowner
- a String
valueownerGroup
- a String
valuepermissions
- a String
value
boolean
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurspublic boolean setPermissions(String resource, String owner, String ownerGroup, int permissions) throws EXistException, PermissionDeniedException, URISyntaxException
setPermissions
setPermissions
in interface RpcAPI
resource
- a String
valueowner
- a String
valueownerGroup
- a String
valuepermissions
- an int
value
boolean
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurspublic boolean setUser(String name, String passwd, String passwdDigest, Vector groups, String home) throws EXistException, PermissionDeniedException
setUser
setUser
in interface RpcAPI
name
- a String
valuepasswd
- a String
valuepasswdDigest
- a String
valuegroups
- a Vector
valuehome
- a String
value
boolean
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurspublic boolean setUser(String name, Vector groups) throws EXistException, PermissionDeniedException
EXistException
PermissionDeniedException
public boolean setUser(String name, Vector groups, String rgroup) throws EXistException, PermissionDeniedException
EXistException
PermissionDeniedException
public boolean lockResource(String documentPath, String userName) throws EXistException, PermissionDeniedException, URISyntaxException
lockResource
lockResource
in interface RpcAPI
documentPath
- a String
valueuserName
- a String
value
boolean
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
PermissionDeniedException
public String hasUserLock(String documentPath) throws URISyntaxException, EXistException, PermissionDeniedException
hasUserLock
hasUserLock
in interface RpcAPI
documentPath
- a String
value
String
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
PermissionDeniedException
public boolean unlockResource(String documentPath) throws URISyntaxException, EXistException, PermissionDeniedException
unlockResource
unlockResource
in interface RpcAPI
documentPath
- a String
value
boolean
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
PermissionDeniedException
public HashMap summary(String xpath) throws EXistException, PermissionDeniedException
summary
xpath
- a String
value
HashMap
value
Exception
- if an error occurs
EXistException
PermissionDeniedException
public HashMap summary(int resultId) throws EXistException, XPathException
summary
resultId
- an int
value
HashMap
value
EXistException
- if an error occurs
XPathException
- if an error occurspublic Vector getIndexedElements(String collectionName, boolean inclusive) throws EXistException, PermissionDeniedException, URISyntaxException
getIndexedElements
getIndexedElements
in interface RpcAPI
collectionName
- a String
valueinclusive
- a boolean
value
Vector
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurspublic Vector scanIndexTerms(String collectionName, String start, String end, boolean inclusive) throws PermissionDeniedException, EXistException, URISyntaxException
scanIndexTerms
scanIndexTerms
in interface RpcAPI
collectionName
- a String
valuestart
- a String
valueend
- a String
valueinclusive
- a boolean
value
Vector
value
PermissionDeniedException
- if an error occurs
EXistException
- if an error occurs
URISyntaxException
- if an error occurspublic Vector scanIndexTerms(String xpath, String start, String end) throws PermissionDeniedException, EXistException, XPathException
scanIndexTerms
scanIndexTerms
in interface RpcAPI
xpath
- a String
valuestart
- a String
valueend
- a String
value
Vector
value
PermissionDeniedException
- if an error occurs
EXistException
- if an error occurs
XPathException
- if an error occurspublic void synchronize()
synchronize
public byte[] getDocumentChunk(String name, int start, int len) throws EXistException, PermissionDeniedException, IOException
getDocumentChunk
in interface RpcAPI
EXistException
PermissionDeniedException
IOException
public boolean moveOrCopyResource(String documentPath, String destinationPath, String newName, boolean move) throws EXistException, PermissionDeniedException, URISyntaxException
moveOrCopyResource
documentPath
- a String
valuedestinationPath
- a String
valuenewName
- a String
valuemove
- a boolean
value
boolean
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurspublic boolean moveOrCopyCollection(String collectionName, String destinationPath, String newName, boolean move) throws EXistException, PermissionDeniedException, URISyntaxException
moveOrCopyCollection
collectionName
- a String
valuedestinationPath
- a String
valuenewName
- a String
valuemove
- a boolean
value
boolean
value
EXistException
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurspublic void reindexCollection(String collectionName) throws URISyntaxException, EXistException, PermissionDeniedException
reindexCollection
reindexCollection
in interface RpcAPI
collectionName
- a String
value
Exception
- if an error occurs
PermissionDeniedException
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
public void backup(String userbackup, String password, String destcollection, String collection) throws EXistException, PermissionDeniedException
backup
backup
in interface RpcAPI
userbackup
- a String
valuepassword
- a String
valuedestcollection
- a String
valuecollection
- a String
value
Exception
- if an error occurs
PermissionDeniedException
- if an error occurs
EXistException
public boolean isValid(String documentPath) throws PermissionDeniedException, URISyntaxException, EXistException
isValid
in interface RpcAPI
documentPath
- Path to XML document in database
Exception
- Generic exception
PermissionDeniedException
- User is not allowed to perform action.
URISyntaxException
EXistException
public Vector getDocType(String documentPath) throws PermissionDeniedException, EXistException, URISyntaxException
getDocType
getDocType
in interface RpcAPI
documentPath
- a String
value
Vector
value
PermissionDeniedException
- if an error occurs
EXistException
- if an error occurs
URISyntaxException
- if an error occurspublic boolean setDocType(String documentPath, String doctypename, String publicid, String systemid) throws URISyntaxException, EXistException, PermissionDeniedException
setDocType
setDocType
in interface RpcAPI
documentPath
- a String
valuedoctypename
- a String
valuepublicid
- a String
valuesystemid
- a String
value
boolean
value
Exception
- if an error occurs
URISyntaxException
- if an error occurs
EXistException
PermissionDeniedException
public boolean copyResource(String docPath, String destinationPath, String newName) throws EXistException, PermissionDeniedException, URISyntaxException
copyResource
in interface RpcAPI
EXistException
PermissionDeniedException
URISyntaxException
public boolean copyCollection(String collectionPath, String destinationPath, String newName) throws EXistException, PermissionDeniedException, URISyntaxException
copyCollection
in interface RpcAPI
EXistException
PermissionDeniedException
URISyntaxException
public boolean moveResource(String docPath, String destinationPath, String newName) throws EXistException, PermissionDeniedException, URISyntaxException
moveResource
in interface RpcAPI
EXistException
PermissionDeniedException
URISyntaxException
public boolean moveCollection(String collectionPath, String destinationPath, String newName) throws EXistException, PermissionDeniedException, URISyntaxException
moveCollection
in interface RpcAPI
EXistException
PermissionDeniedException
URISyntaxException
public List getDocumentChunk(String name, HashMap parameters) throws EXistException, PermissionDeniedException, IOException
getDocumentChunk
in interface RpcAPI
EXistException
PermissionDeniedException
IOException
public boolean copyCollection(String name, String namedest) throws PermissionDeniedException, EXistException
copyCollection
in interface RpcAPI
PermissionDeniedException
EXistException
public int xupdateResource(String resource, byte[] xupdate) throws PermissionDeniedException, EXistException, SAXException
xupdateResource
in interface RpcAPI
PermissionDeniedException
EXistException
SAXException
public boolean setPermissions(String resource, int permissions) throws EXistException, PermissionDeniedException, URISyntaxException
setPermissions
in interface RpcAPI
EXistException
PermissionDeniedException
URISyntaxException
public boolean setPermissions(String resource, String permissions) throws EXistException, PermissionDeniedException, URISyntaxException
setPermissions
in interface RpcAPI
EXistException
PermissionDeniedException
URISyntaxException
public boolean setUser(String name, String passwd, String digestPassword, Vector groups) throws EXistException, PermissionDeniedException
setUser
in interface RpcAPI
EXistException
PermissionDeniedException
public HashMap querySummary(int resultId) throws EXistException, PermissionDeniedException, XPathException
RpcAPI
querySummary
in interface RpcAPI
resultId
- Description of the Parameter
EXistException
- Description of the Exception
PermissionDeniedException
- Description of the Exception
XPathException
public int executeQuery(byte[] xpath, HashMap parameters) throws EXistException, PermissionDeniedException
executeQuery
in interface RpcAPI
EXistException
PermissionDeniedException
public boolean storeBinary(byte[] data, String docName, String mimeType, boolean replace, Date created, Date modified) throws EXistException, PermissionDeniedException, URISyntaxException
storeBinary
in interface RpcAPI
EXistException
PermissionDeniedException
URISyntaxException
public boolean storeBinary(byte[] data, String docName, String mimeType, boolean replace) throws EXistException, PermissionDeniedException, URISyntaxException
RpcAPI
storeBinary
in interface RpcAPI
data
- the data to be storeddocName
- the path to the new documentreplace
- if true, an old document with the same path will be overwritten
EXistException
PermissionDeniedException
URISyntaxException
public boolean parseLocal(String localFile, String docName, boolean replace, String mimeType, Date created, Date modified) throws EXistException, PermissionDeniedException, SAXException, URISyntaxException
parseLocal
in interface RpcAPI
EXistException
PermissionDeniedException
SAXException
URISyntaxException
public boolean parseLocal(String localFile, String docName, boolean replace, String mimeType) throws EXistException, PermissionDeniedException, SAXException, URISyntaxException
RpcAPI
parseLocal
in interface RpcAPI
EXistException
PermissionDeniedException
SAXException
URISyntaxException
public String uploadCompressed(String file, byte[] data, int length) throws EXistException, PermissionDeniedException, IOException
uploadCompressed
in interface RpcAPI
EXistException
PermissionDeniedException
IOException
public String uploadCompressed(byte[] data, int length) throws EXistException, PermissionDeniedException, IOException
uploadCompressed
in interface RpcAPI
EXistException
PermissionDeniedException
IOException
public String upload(String file, byte[] chunk, int length) throws EXistException, PermissionDeniedException, IOException
RpcAPI
upload
in interface RpcAPI
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.chunk
- the current chunklength
- total length of the file
EXistException
PermissionDeniedException
IOException
public String upload(byte[] chunk, int length) throws EXistException, PermissionDeniedException, IOException
RpcAPI
upload
in interface RpcAPI
chunk
- the current chunklength
- total length of the file
EXistException
PermissionDeniedException
IOException
public boolean parse(String xml, String docName) throws EXistException, PermissionDeniedException, URISyntaxException
parse
in interface RpcAPI
EXistException
PermissionDeniedException
URISyntaxException
public boolean parse(String xml, String docName, int overwrite) throws EXistException, PermissionDeniedException, URISyntaxException
parse
in interface RpcAPI
EXistException
PermissionDeniedException
URISyntaxException
public boolean parse(byte[] xmlData, String docName) throws EXistException, PermissionDeniedException, URISyntaxException
RpcAPI
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.
parse
in interface RpcAPI
xmlData
- The document datadocName
- The path where the document will be stored
EXistException
PermissionDeniedException
URISyntaxException
public HashMap querySummary(String xquery) throws EXistException, PermissionDeniedException
RpcAPI
"queryTime" | int |
"hits" | int |
"documents" | array of array: Object[][3] |
"doctypes" | array of array: Object[][2] |
querySummary
in interface RpcAPI
xquery
- Description of the Parameter
EXistException
- Description of the Exception
PermissionDeniedException
- Description of the Exceptionpublic byte[] query(byte[] xquery, int howmany, int start, HashMap parameters) throws EXistException, PermissionDeniedException
RpcAPI
start
. If prettyPrint
is
set to >0 (true), results are pretty printed.
query
in interface RpcAPI
howmany
- maximum number of results to
return.start
- item in the result set to start
with.
EXistException
- Description of the Exception
PermissionDeniedException
- Description of the Exceptionpublic HashMap queryP(byte[] xpath, String docName, String s_id, HashMap parameters) throws EXistException, PermissionDeniedException, URISyntaxException
queryP
in interface RpcAPI
EXistException
PermissionDeniedException
URISyntaxException
public HashMap queryP(byte[] xpath, HashMap parameters) throws EXistException, PermissionDeniedException
queryP
in interface RpcAPI
EXistException
PermissionDeniedException
public HashMap compile(byte[] xquery, HashMap parameters) throws EXistException, PermissionDeniedException
compile
in interface RpcAPI
EXistException
PermissionDeniedException
public byte[] retrieve(String doc, String id) throws EXistException, PermissionDeniedException
RpcAPI
retrieve
in interface RpcAPI
doc
- the document containing the nodeid
- the node's internal id
EXistException
- Description of the Exception
PermissionDeniedException
- Description of the Exceptionpublic String getDocumentAsString(String name, int prettyPrint, String stylesheet) throws EXistException, PermissionDeniedException
getDocumentAsString
in interface RpcAPI
EXistException
PermissionDeniedException
public String getDocumentAsString(String name, int prettyPrint) throws EXistException, PermissionDeniedException
getDocumentAsString
in interface RpcAPI
EXistException
PermissionDeniedException
public byte[] getDocument(String name, String encoding, int prettyPrint, String stylesheet) throws EXistException, PermissionDeniedException
RpcAPI
getDocument
in interface RpcAPI
name
- the document's name.encoding
- character encoding to use.prettyPrint
- pretty print XML if >0.
EXistException
PermissionDeniedException
public byte[] getDocument(String name, String encoding, int prettyPrint) throws EXistException, PermissionDeniedException
RpcAPI
getDocument
in interface RpcAPI
name
- the document's name.encoding
- character encoding to use.prettyPrint
- pretty print XML if >0.
EXistException
PermissionDeniedException
public boolean shutdown() throws PermissionDeniedException
RpcAPI
shutdown
in interface RpcAPI
PermissionDeniedException
public boolean shutdown(long delay) throws PermissionDeniedException
RpcAPI
shutdown
in interface RpcAPI
PermissionDeniedException
public boolean enterServiceMode() throws PermissionDeniedException, EXistException
PermissionDeniedException
EXistException
public void exitServiceMode() throws PermissionDeniedException, EXistException
PermissionDeniedException
EXistException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |