|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Metacat
This interface provides methods for initializing and logging in to a Metacat server, and then querying, reading, transforming, inserting, updating and deleting documents from that server.
| Method Summary | |
|---|---|
java.lang.String |
delete(java.lang.String docid)
Delete an XML document in the repository. |
java.lang.String |
getAccessControl(java.lang.String docid)
|
java.util.Vector |
getAllDocids(java.lang.String scope)
return a list of all docids that match a given scope. |
java.lang.String |
getLastDocid(java.lang.String scope)
Return the highest document id for a given scope. |
java.lang.String |
getloggedinuserinfo()
Get the logged in user for this session. |
int |
getNewestDocRevision(java.lang.String docId)
The method will return the latest revision in metacat server for a given document id. |
java.lang.String |
getSessionId()
Get the session identifier for this session. |
java.lang.String |
insert(java.lang.String docid,
java.io.Reader xmlDocument,
java.io.Reader schema)
Insert an XML document into the repository, making it available for searching using the query() methods. |
boolean |
isRegistered(java.lang.String docid)
return true of the given docid is registered, false if not |
java.lang.String |
login(java.lang.String username,
java.lang.String password)
Method used to log in to a metacat server. |
java.lang.String |
logout()
Method used to log out a metacat server. |
java.io.Reader |
query(java.io.Reader xmlQuery)
Query the metacat document store with the given metacat-compatible query document, and return the result set as a Reader. |
java.io.Reader |
query(java.io.Reader xmlQuery,
java.lang.String qformat)
Query the metacat document store with the given metacat-compatible query document and qformat, and return the result set as a Reader. |
java.io.InputStream |
read(java.lang.String docid)
Read an XML document from the metacat server session, accessed by docid, and returned as a Reader. |
java.io.InputStream |
readInlineData(java.lang.String inlinedataid)
Read inline data from the metacat server session, accessed by inlinedataid, and returned as a Reader. |
java.lang.String |
setAccess(java.lang.String docid,
java.lang.String accessBlock)
|
java.lang.String |
setAccess(java.lang.String docid,
java.lang.String principal,
java.lang.String permission,
java.lang.String permType,
java.lang.String permOrder)
set the access on an XML document in the repository. |
void |
setMetacatUrl(java.lang.String metacatUrl)
When the MetacatFactory creates an instance it needs to set the MetacatUrl to which connections should be made. |
void |
setSessionId(java.lang.String sessionId)
Set the session identifier for this session. |
java.lang.String |
update(java.lang.String docid,
java.io.Reader xmlDocument,
java.io.Reader schema)
Update an XML document in the repository by providing a new version of the XML document. |
java.lang.String |
upload(java.lang.String docid,
java.io.File file)
Upload a data document into the repository. |
java.lang.String |
upload(java.lang.String docid,
java.lang.String fileName,
java.io.InputStream fileData,
int size)
Upload a data document into the repository. |
| Method Detail |
|---|
java.lang.String login(java.lang.String username,
java.lang.String password)
throws MetacatAuthException,
MetacatInaccessibleException
username - the username of the user, like an LDAP DNpassword - the password for that user for authentication
MetacatAuthException - when the username/password could
not be authenticated
MetacatInaccessibleException
java.lang.String logout()
throws MetacatInaccessibleException,
MetacatException
MetacatInaccessibleException - when the metacat server can not be
reached or does not respond
MetacatException
java.io.InputStream read(java.lang.String docid)
throws InsufficientKarmaException,
MetacatInaccessibleException,
DocumentNotFoundException,
MetacatException
docid - the identifier of the document to be read
InsufficientKarmaException - when the user has insufficent rights
for the operation
MetacatInaccessibleException - when the metacat server can not be
reached or does not respond
MetacatException - when the metacat server generates another error
DocumentNotFoundException
java.io.InputStream readInlineData(java.lang.String inlinedataid)
throws InsufficientKarmaException,
MetacatInaccessibleException,
MetacatException
inlinedataid - the identifier of the document to be read
InsufficientKarmaException - when the user has insufficent rights
for the operation
MetacatInaccessibleException - when the metacat server can not be
reached or does not respond
MetacatException - when the metacat server generates another error
java.io.Reader query(java.io.Reader xmlQuery)
throws MetacatInaccessibleException,
java.io.IOException
xmlQuery - a Reader for accessing the XML version of the query
MetacatInaccessibleException
java.io.IOException
java.io.Reader query(java.io.Reader xmlQuery,
java.lang.String qformat)
throws MetacatInaccessibleException,
java.io.IOException
xmlQuery - a Reader for accessing the XML version of the queryqformat - the format of return doc. It can be xml, knb, lter and etal.
MetacatInaccessibleException
java.io.IOException
java.lang.String insert(java.lang.String docid,
java.io.Reader xmlDocument,
java.io.Reader schema)
throws InsufficientKarmaException,
MetacatException,
java.io.IOException,
MetacatInaccessibleException
docid - the docid to insert the documentxmlDocument - a Reader for accessing the XML document to be insertedschema - a Reader for accessing the DTD or XML Schema for
the document
InsufficientKarmaException - when the user has insufficent rights
for the operation
MetacatInaccessibleException - when the metacat server can not be
reached or does not respond
MetacatException - when the metacat server generates another error
java.io.IOException - when there is an error reading the xml document
java.lang.String update(java.lang.String docid,
java.io.Reader xmlDocument,
java.io.Reader schema)
throws InsufficientKarmaException,
MetacatException,
java.io.IOException,
MetacatInaccessibleException
docid - the docid to updatexmlDocument - a Reader for accessing the XML text to be updatedschema - a Reader for accessing the DTD or XML Schema for
the document
InsufficientKarmaException - when the user has insufficent rights
for the operation
MetacatInaccessibleException - when the metacat server can not be
reached or does not respond
MetacatException - when the metacat server generates another error
java.io.IOException - when there is an error reading the xml document
java.lang.String upload(java.lang.String docid,
java.io.File file)
throws InsufficientKarmaException,
MetacatException,
java.io.IOException,
MetacatInaccessibleException
docid - the identifier to be used for the documentfile - the File to be uploadeddocument - a InputStream containing the data to be uploaded
InsufficientKarmaException - when the user has insufficent rights
for the operation
MetacatInaccessibleException - when the metacat server can not be
reached or does not respond
MetacatException - when the metacat server generates another error
java.io.IOException - when there is an error reading the xml document
java.lang.String upload(java.lang.String docid,
java.lang.String fileName,
java.io.InputStream fileData,
int size)
throws InsufficientKarmaException,
MetacatException,
java.io.IOException,
MetacatInaccessibleException
docid - the identifier to be used for the documentfilename - the name to be used in the MIME description of the uploaded filedocument - a InputStream containing the data to be uploaded
InsufficientKarmaException - when the user has insufficent rights
for the operation
MetacatInaccessibleException - when the metacat server can not be
reached or does not respond
MetacatException - when the metacat server generates another error
java.io.IOException - when there is an error reading the xml document
java.lang.String delete(java.lang.String docid)
throws InsufficientKarmaException,
MetacatException,
MetacatInaccessibleException
docid - the docid to delete
InsufficientKarmaException - when the user has insufficent rights
for the operation
MetacatInaccessibleException - when the metacat server can not be
reached or does not respond
MetacatException - when the metacat server generates another error
java.lang.String getAccessControl(java.lang.String docid)
throws InsufficientKarmaException,
MetacatException,
MetacatInaccessibleException
InsufficientKarmaException
MetacatException
MetacatInaccessibleException
java.lang.String setAccess(java.lang.String docid,
java.lang.String principal,
java.lang.String permission,
java.lang.String permType,
java.lang.String permOrder)
throws InsufficientKarmaException,
MetacatException,
MetacatInaccessibleException
_docid - the docid of the document for which the access should be applied._principal - the document's principal_permission - the access permission to be applied to the docid
{e.g. read,write,all}_permType - the permission type to be applied to the document
{e.g. allow or deny}_permOrder - the order that the document's permissions should be
processed {e.g. denyFirst or allowFirst}
InsufficientKarmaException - when the user has insufficent rights
for the operation
MetacatInaccessibleException - when the metacat server can not be
reached or does not respond
MetacatException - when the metacat server generates another error
java.lang.String setAccess(java.lang.String docid,
java.lang.String accessBlock)
throws InsufficientKarmaException,
MetacatException,
MetacatInaccessibleException
InsufficientKarmaException
MetacatException
MetacatInaccessibleExceptionvoid setMetacatUrl(java.lang.String metacatUrl)
metacatUrl - the URL for the metacat serverjava.lang.String getSessionId()
void setSessionId(java.lang.String sessionId)
String - the sessionId from a previously established session
java.lang.String getloggedinuserinfo()
throws MetacatInaccessibleException
MetacatInaccessibleException
int getNewestDocRevision(java.lang.String docId)
throws MetacatException
docId - String the given docid you want to use. the docid it self
can have or haven't revision number
MetacatException
java.lang.String getLastDocid(java.lang.String scope)
throws MetacatException
scope - String the scope to use for looking up the latest id
MetacatException - when an error occurs
java.util.Vector getAllDocids(java.lang.String scope)
throws MetacatException
scope - String the scope to use to limit the docid query
MetacatException - when an error occurs
boolean isRegistered(java.lang.String docid)
throws MetacatException
scope - String the scope to use to limit the docid query
MetacatException - when an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||