public class ServerConnection extends java.lang.Object implements DOConstants
ABSTRACT_ATTRIBUTE, ADD_RELATIONSHIPS_OP_ID, ADD_TYPE_OP_ID, ANONYMOUS_ID, AUDIT_GET_OP_ID, AUDIT_QUERY_OP_ID, CHECK_AUTHORIZATION_OP_ID, CHECK_DELEGATE_OP_ID, CLIENT_AUTH_TYPE_HSPUBKEY, CLIENT_AUTH_TYPE_HSSECKEY, CONTENT_ELEMENT_ID, CREATE_OBJ_OP_ID, CREATOR_ATTRIBUTE, DATE_CREATED_ATTRIBUTE, DATE_FORMAT_MDYHMS, DATE_MODIFIED_ATTRIBUTE, DEFAULT_CLIENT_CERT_EXPIRATION_DAYS, DEL_ATTRIBUTES_OP_ID, DELETE_DATA_OP_ID, DELETE_OBJ_OP_ID, DOES_OBJ_EXIST_OP_ID, ELEMENT_ATTS_MSGTYPE, EM_COMMAND_CREATE_DATASTREAM, EM_COMMAND_CREATE_DISSEMINATOR, EM_COMMAND_CREATE_DO, EM_COMMAND_DELETE_ATTACHMENTS, EM_COMMAND_DELETE_DATASTREAM, EM_COMMAND_DELETE_DISSEMINATOR, EM_COMMAND_DELETE_DO, EM_COMMAND_GET_DATASTREAM_BYTES, EM_COMMAND_GET_DATASTREAM_KEY_METADATA, EM_COMMAND_GET_DISSEMINATION, EM_COMMAND_GET_DISSEMINATOR_METADATA, EM_COMMAND_GET_EXECUTABLE, EM_COMMAND_GET_KEY_METADATA, EM_COMMAND_GET_READ_REQUEST, EM_COMMAND_GET_SERVLET, EM_COMMAND_GET_TYPE_SIGNATURE, EM_COMMAND_GET_VERSION, EM_COMMAND_LIST_ATTACHMENTS, EM_COMMAND_LIST_DATASTREAMS, EM_COMMAND_LIST_DISSEMINATORS, EM_COMMAND_LIST_DO, EM_COMMAND_LIST_DO_POLICIES, EM_COMMAND_SET_ATTACHMENTS, EM_COMMAND_SET_DATASTREAM_BYTES, EM_COMMAND_SET_DO_POLICIES, EM_COMMAND_SET_EXECUTABLE, EM_COMMAND_SET_READ_REQUEST, EM_COMMAND_VERIFY_DO, FILE_NAME_ATTRIBUTE, FOLDER_ATTRIBUTE, GET_ATTRIBUTES_OP_ID, GET_CREDENTIALS_OP_ID, GET_DATA_OP_ID, GET_REPO_TXNS_OP_ID, GET_SERIALIZED_FORM_OP_ID, GRANT_KEY_OP_ID, HAS_TYPE_OP_ID, INDEX_UP_TO_DATE_ID, INJECT_KNOWBOT_OP_ID, IS_PART_OF_ATTRIBUTE, LANGUAGE_ATTRIBUTE, LIST_DATA_OP_ID, LIST_DELEGATORS_OP_ID, LIST_OBJECTS_OP_ID, LIST_OPERATIONS_OP_ID, LIST_TYPES_OP_ID, MIME_TYPE_ATTRIBUTE, NOTES_ATTRIBUTE, OBJECT_ATTS_MSGTYPE, OBJECT_NAME_HDL_TYPE, OBJECT_SERVER_HDL_TYPE, OBJECT_SVRINFO_HDL_TYPE, OWNER_ATTRIBUTE, PARAM_ATTRIBUTES, PARAM_ELEMENT_ID, PUSH_REPO_TXN_OP_ID, REFERENCES_ATTRIBUTE, REINDEX_OBJECT_ID, REMOVE_TYPE_OP_ID, REPO_RIGHTS_ELEMENT_ID, RIGHTS_DELEGATION_OBJECT_HDL_TYPE, RIGHTS_ELEMENT_ID, SEARCH_OP_ID, SET_ATTRIBUTES_OP_ID, SIZE_ATTRIBUTE, STORE_CREDENTIAL_OP_ID, STORE_DATA_OP_ID, TITLE_ATTRIBUTE
Constructor and Description |
---|
ServerConnection(java.lang.String hdl)
Opens a connection to the repository
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the repository connection
|
void |
CreateDatastream(java.lang.String doID,
java.lang.String dsId,
java.lang.String mimetype,
int kind)
Create a digital object data stream
|
void |
CreateDisseminator(java.lang.String doID,
java.lang.String dissId,
java.lang.String descriptor,
java.lang.String signatureID,
java.lang.String servletID,
int kind)
Create a digital object disseminator
|
void |
CreateDO(java.lang.String doID)
Create a digital object
|
void |
DeleteAttachments(java.lang.String doID,
java.lang.String dissID,
net.cnri.adore.RAP.Attachment[] attachments)
Delete attachments for a digital object disseminator
|
void |
DeleteDatastream(java.lang.String doID,
java.lang.String dsId)
Delete a digital object data stream
|
void |
DeleteDisseminator(java.lang.String doID,
java.lang.String dissId)
Delete a digital object disseminator
|
void |
DeleteDO(java.lang.String doID)
Delete a digital object
|
net.cnri.adore.RAP.Executable |
GetAttachedExe(java.lang.String doID,
java.lang.String dissID)
Set the executable for a servlet or signature disseminator
|
byte[] |
GetDataStream(java.lang.String doID,
java.lang.String dsId)
Helper to retrieve all of a digital object data stream
|
java.io.InputStream |
GetDataStreamBytes(java.lang.String doID,
java.lang.String dsId)
Retrieves bytes from a digital object data element as a stream.
|
byte[] |
GetDataStreamBytes(java.lang.String doID,
java.lang.String dsId,
long offset,
long length)
Retrieves bytes from a digital object data stream
|
net.cnri.adore.RAP.DatastreamMetadata |
GetDatastreamMetadata(java.lang.String id,
java.lang.String ds)
Retrieves the key metadata for a digital object's data stream
|
net.cnri.adore.RAP.MIMETypedStream[] |
GetDissemination(java.lang.String id,
java.lang.String dis,
java.lang.String method,
net.cnri.adore.RAP.NamedTypedValue[] args)
Disseminates a digital object
|
net.cnri.adore.RAP.DisseminatorMetadata |
GetDisseminatorMetadata(java.lang.String id,
java.lang.String dis)
Retrieves the key metadata for a digital object's disseminator
|
java.lang.String |
GetHandle()
Accessor for the handle of this repository
|
net.cnri.adore.RAP.DOKeyMetadata |
GetKeyMetadata(java.lang.String id)
Retrieves the key metadata for a digital object
|
net.cnri.adore.RAP.Servlet |
GetServletMetadata(java.lang.String id)
Retrieves the key metadata for a servlet
|
net.cnri.adore.RAP.TypeSignature |
GetTypeSignature(java.lang.String id)
Retrieves info for a type signature
|
java.lang.String |
GetVersion()
Retrieve the RAP version the repository is running
|
net.cnri.adore.RAP.Attachment[] |
ListAttachments(java.lang.String doID,
java.lang.String dissID)
List attachments for a digital object disseminator
|
java.lang.String[] |
ListDataStreams(java.lang.String id)
Retrieves the data streams for a digital object
|
java.lang.String[] |
ListDigitalObjectIDs(java.lang.String filter)
Retrieve a list of digital objects stored in the repository
|
java.lang.String[] |
ListDisseminators(java.lang.String id)
Retrieves the disseminators for a digital object
|
java.lang.String[] |
ListPolicies(java.lang.String id)
Retrieve a list of policy disseminator ids for a DO
|
java.lang.String[] |
ListRepositoryPolicies()
Retrieve a list of policy disseminator ids for the repository
|
void |
SetAttachedExe(java.lang.String doID,
java.lang.String dissID,
java.lang.String exename,
java.lang.String dsID)
Set the executable for a servlet or signature disseminator
|
void |
SetAttachments(java.lang.String doID,
java.lang.String dissID,
net.cnri.adore.RAP.Attachment[] attachments)
Set attachments for a digital object disseminator
|
void |
SetDataStreamBytes(java.lang.String doID,
java.lang.String dsId,
java.io.InputStream data)
Sets bytes for a digital object data stream
|
void |
SetDataStreamBytes(java.lang.String doID,
java.lang.String dsId,
long offset,
byte[] data,
int mode)
Sets bytes for a digital object data stream
|
void |
setUseNewMethods(boolean useNewOperations)
Sets whether or not this API should use the newer, faster methods (when
available) for accessing data elements and creating objects.
|
boolean |
VerifyDigitalObject(java.lang.String id)
Verify a digital object exists in a repository
|
public ServerConnection(java.lang.String hdl) throws net.cnri.adore.RAP.RAPException
hdl
- The handle of the repository to connect to. This
can also be the handle of a digital object, in which
case the connection will be resolved to a repository that
contains the object.net.cnri.adore.RAP.RAPException
public void setUseNewMethods(boolean useNewOperations)
public java.lang.String GetVersion() throws net.cnri.adore.RAP.RAPException, java.io.IOException
net.cnri.adore.RAP.RAPException
java.io.IOException
public java.lang.String[] ListDigitalObjectIDs(java.lang.String filter) throws net.cnri.adore.RAP.RAPException, java.io.IOException
filter
- A glob of digital objects to returnnet.cnri.adore.RAP.RAPException
java.io.IOException
public java.lang.String[] ListRepositoryPolicies() throws net.cnri.adore.RAP.RAPException, java.io.IOException
filter
- A glob of digital objects to returnnet.cnri.adore.RAP.RAPException
java.io.IOException
public java.lang.String[] ListPolicies(java.lang.String id) throws net.cnri.adore.RAP.RAPException, java.io.IOException
id
- The digital object IDnet.cnri.adore.RAP.RAPException
java.io.IOException
public boolean VerifyDigitalObject(java.lang.String id) throws net.cnri.adore.RAP.RAPException, java.io.IOException
id
- the identifier of the digital object to verifynet.cnri.adore.RAP.RAPException
java.io.IOException
public net.cnri.adore.RAP.DOKeyMetadata GetKeyMetadata(java.lang.String id) throws net.cnri.adore.RAP.RAPException, java.io.IOException
id
- the identifier of the digital objectnet.cnri.adore.RAP.RAPException
java.io.IOException
public java.lang.String[] ListDisseminators(java.lang.String id) throws net.cnri.adore.RAP.RAPException, java.io.IOException
id
- the identifier of the digital objectnet.cnri.adore.RAP.RAPException
java.io.IOException
public java.lang.String[] ListDataStreams(java.lang.String id) throws net.cnri.adore.RAP.RAPException, java.io.IOException
id
- the identifier of the digital objectnet.cnri.adore.RAP.RAPException
java.io.IOException
public net.cnri.adore.RAP.MIMETypedStream[] GetDissemination(java.lang.String id, java.lang.String dis, java.lang.String method, net.cnri.adore.RAP.NamedTypedValue[] args) throws net.cnri.adore.RAP.RAPException, java.io.IOException
id
- the identifier of the digital objectdis
- the identifier of the digital object's disseminatormethod
- the method to invokeargs
- the arguments to the methodnet.cnri.adore.RAP.RAPException
java.io.IOException
public net.cnri.adore.RAP.DisseminatorMetadata GetDisseminatorMetadata(java.lang.String id, java.lang.String dis) throws net.cnri.adore.RAP.RAPException, java.io.IOException
id
- the identifier of the digital objectds
- the identifier of the digital object's data streamnet.cnri.adore.RAP.RAPException
java.io.IOException
public net.cnri.adore.RAP.TypeSignature GetTypeSignature(java.lang.String id) throws net.cnri.adore.RAP.RAPException, java.io.IOException
id
- the identifier of the type signaturenet.cnri.adore.RAP.RAPException
java.io.IOException
public net.cnri.adore.RAP.DatastreamMetadata GetDatastreamMetadata(java.lang.String id, java.lang.String ds) throws net.cnri.adore.RAP.RAPException, java.io.IOException
id
- the identifier of the digital objectds
- the identifier of the digital object's data streamnet.cnri.adore.RAP.RAPException
java.io.IOException
public net.cnri.adore.RAP.Servlet GetServletMetadata(java.lang.String id) throws net.cnri.adore.RAP.RAPException, java.io.IOException
id
- the identifier for the servletnet.cnri.adore.RAP.RAPException
java.io.IOException
public byte[] GetDataStreamBytes(java.lang.String doID, java.lang.String dsId, long offset, long length) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital objectdsId
- the data stream idoffset
- location in data stream to retrieve fromlength
- number of bytes to retrievenet.cnri.adore.RAP.RAPException
java.io.IOException
public java.io.InputStream GetDataStreamBytes(java.lang.String doID, java.lang.String dsId) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital objectdsId
- the data stream idnet.cnri.adore.RAP.RAPException
java.io.IOException
public void SetDataStreamBytes(java.lang.String doID, java.lang.String dsId, java.io.InputStream data) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital objectdsId
- the data stream idoffset
- location in data streamdata
- the bytes to setmode
- RAP.OVERWRITE or RAP.APPENDnet.cnri.adore.RAP.RAPException
java.io.IOException
public void SetDataStreamBytes(java.lang.String doID, java.lang.String dsId, long offset, byte[] data, int mode) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital objectdsId
- the data stream idoffset
- location in data streamdata
- the bytes to setmode
- RAP.OVERWRITE or RAP.APPENDnet.cnri.adore.RAP.RAPException
java.io.IOException
public byte[] GetDataStream(java.lang.String doID, java.lang.String dsId) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital objectdsId
- the data stream idnet.cnri.adore.RAP.RAPException
java.io.IOException
public void CreateDO(java.lang.String doID) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital object to createnet.cnri.adore.RAP.RAPException
java.io.IOException
public void DeleteDO(java.lang.String doID) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital object to createnet.cnri.adore.RAP.RAPException
java.io.IOException
public void CreateDatastream(java.lang.String doID, java.lang.String dsId, java.lang.String mimetype, int kind) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital objectdsId
- the identifier for the data stream to createnet.cnri.adore.RAP.RAPException
java.io.IOException
public void DeleteDatastream(java.lang.String doID, java.lang.String dsId) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital objectdsId
- the identifier for the data stream to deletenet.cnri.adore.RAP.RAPException
java.io.IOException
public void CreateDisseminator(java.lang.String doID, java.lang.String dissId, java.lang.String descriptor, java.lang.String signatureID, java.lang.String servletID, int kind) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital objectdissId
- the identifier for the disseminator to createnet.cnri.adore.RAP.RAPException
java.io.IOException
public void DeleteDisseminator(java.lang.String doID, java.lang.String dissId) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital objectdissId
- the identifier for the disseminator to deletenet.cnri.adore.RAP.RAPException
java.io.IOException
public net.cnri.adore.RAP.Executable GetAttachedExe(java.lang.String doID, java.lang.String dissID) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital objectdissId
- the identifier for the disseminatorexename
- the name of the executabledsID
- the datastream the executable is stored innet.cnri.adore.RAP.RAPException
java.io.IOException
public void SetAttachedExe(java.lang.String doID, java.lang.String dissID, java.lang.String exename, java.lang.String dsID) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital objectdissId
- the identifier for the disseminatorexename
- the name of the executabledsID
- the datastream the executable is stored innet.cnri.adore.RAP.RAPException
java.io.IOException
public net.cnri.adore.RAP.Attachment[] ListAttachments(java.lang.String doID, java.lang.String dissID) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital objectdissId
- the identifier for the disseminatornet.cnri.adore.RAP.RAPException
java.io.IOException
public void SetAttachments(java.lang.String doID, java.lang.String dissID, net.cnri.adore.RAP.Attachment[] attachments) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital objectdissId
- the identifier for the disseminatorattachments
- what to attachnet.cnri.adore.RAP.RAPException
java.io.IOException
public void DeleteAttachments(java.lang.String doID, java.lang.String dissID, net.cnri.adore.RAP.Attachment[] attachments) throws net.cnri.adore.RAP.RAPException, java.io.IOException
doID
- the identifier for the digital objectdissId
- the identifier for the disseminatorattachments
- what to dettachnet.cnri.adore.RAP.RAPException
java.io.IOException
public java.lang.String GetHandle()
public void close() throws net.cnri.adore.RAP.RAPException, java.io.IOException
net.cnri.adore.RAP.RAPException
java.io.IOException