module RAP
{ //######################################################## // Notes: // -methods prefaced with a "List" are to return a // list of strings // -methods prefaced with a "Get" are to return a list // of instances. // //########################################################; const string VERSION = "Version 0.3"; //******************************************** // Forward declarations //******************************************** interface DataStream; interface ContentTypeDisseminator; interface ServletDisseminator; interface SignatureDisseminator; interface AccessControl; //********************************************* // Type definitions //********************************************* typedef sequence <octet> ByteStream; typedef sequence <string> StringList; typedef sequence <DataStream> DataStreamList; typedef ByteStream SessionID; // For maintaining current context typedef ByteStream RDFAttachmentSpec; typedef string ContentTypeSigName; // URN of content-type signature typedef string ContentTypeImplName; // URN of content-type servlet (implementation of a signature) //****************************************** // General Exception for Repository operations //****************************************** exception RepositorySystemError { long ExceptionCode; string ExceptionString; }; //******************************************** // Definitions of structures used to identify a content type //******************************************** struct ContentTypeID { ContentTypeSigName signatureID; string logicalDisseminatorName; }; typedef sequence <ContentTypeSigName> ContentTypeList; //******************************************** // Definition of a content-type servlet //******************************************** struct Servlet { string MIMEType; // type of the servlet byte stream ByteStream servletStream; }; //******************************************** // Definitions of structures used to form // dissemination method requests //******************************************** struct NamedTypedValue { string name; any typedValue; }; struct NamedType { string name; TypeCode typecode; }; struct MethodRequest { string methodName; sequence <NamedTypedValue> parameters; }; //******************************************** // Definitions of structures used for dissemination results //******************************************** struct ResultHolder { string MIMEType; ByteStream resultData; }; //struct MethodResult //{ // sequence <ResultHolder> result; //}; typedef sequence <ResultHolder> MethodResult; //******************************************** // Structures for describing the signature for a content type. // A content-type signature is a set of method signatures. //******************************************** struct MethodSignature { string methodName; sequence <NamedType> parameterSignatures; MethodResult resultSignature; // null in context of signature }; typedef sequence <MethodSignature> ContentTypeSignature; //************************************************ // Definition of a Disseminator which can be one of three kinds. //************************************************ enum DisseminatorKind { DISSEMINATOR_SERVLET, DISSEMINATOR_SIGNATURE, DISSEMINATOR_CONTENT }; enum WriteBytesMode { APPEND, OVERWRITE }; union Disseminator switch(DisseminatorKind) { case DISSEMINATOR_SERVLET : ServletDisseminator servletDisseminator; case DISSEMINATOR_SIGNATURE : SignatureDisseminator signatureDisseminator; case DISSEMINATOR_CONTENT : ContentTypeDisseminator contentDisseminator; }; typedef sequence <Disseminator> DisseminatorList; //******************************************** // Definition of the structures for attaching one or more // DataStreams to a Disseminator //******************************************** struct AttachedDataStream { string logicalName; DataStream dataStream; }; typedef sequence <AttachedDataStream> AttachedDataStreamList; //********************************************* // Current Context Structure definitions // Note: just a stub at this point //********************************************* struct CurrentContext { string userID; SessionID sessionID; string IPaddr; }; //********************************************** // Key Metadata structure definitions // Future: are there other attributes required to support // versioning, archiving, preservation? //********************************************** struct DOKeyMetadata { string dateCreated; string dateLastRevision; }; struct DSKeyMetadata { string MIMEType; string descriptor; long size; string dateDeposited; string dateLastRevision; }; //************************************************ // DataStream interface definition //************************************************ interface DataStream { string GetDataStreamID() raises (RepositorySystemError); string GetMIMEType() raises (RepositorySystemError); DSKeyMetadata GetKeyMetadata() raises (RepositorySystemError); ByteStream GetBytes(in long length, in long offset) raises (RepositorySystemError); long WriteBytes(in long bufferLength, in long absoluteDataStreamOffset, in WriteBytesMode mode, in ByteStream buffer) raises (RepositorySystemError); }; //************************************************ // ContentTypeDisseminator interface definition //************************************************ interface ContentTypeDisseminator { ContentTypeID GetContentTypeID() raises (RepositorySystemError); // returns URN of signature + disseminator name ContentTypeImplName GetServletID() raises (RepositorySystemError); AttachedDataStreamList GetAttachedDataStreams() raises (RepositorySystemError); void SetAttachedDataStreams(in AttachedDataStreamList attachmentList) raises (RepositorySystemError); void DeleteAttachedDataStreams(in AttachedDataStreamList attachmentList) raises (RepositorySystemError); }; //************************************************ // ServletDisseminator interface definition //************************************************ interface ServletDisseminator : ContentTypeDisseminator { const string CONTENT_TYPE_SIGID = "SERVLET_DISSEMINATOR"; const string CONTENT_TYPE_LOGICALNAME = "SERVLET"; const string SERVLET_ATTACHMENT_NAME = "SERVLET"; ContentTypeSigName GetSignatureID() raises (RepositorySystemError); Servlet GetServlet() raises (RepositorySystemError); RDFAttachmentSpec GetAttachmentSpecification() raises (RepositorySystemError); }; //************************************************ // SignatureDisseminator interface definition //*********************************************** interface SignatureDisseminator : ContentTypeDisseminator { const string CONTENT_TYPE_SIGID = "SIGNATURE_DISSEMINATOR"; const string CONTENT_TYPE_LOGICALNAME = "SIGNATURE"; const string SIGNATURE_ATTACHMENT_NAME = "SIGNATURE"; ContentTypeSignature GetSignature() raises (RepositorySystemError); }; //************************************************ // DigitalObject interface definition //************************************************ interface DigitalObject { string GetDigitalObjectID() raises (RepositorySystemError); // a URN DOKeyMetadata GetDOKeyMetadata() raises (RepositorySystemError); DataStreamList GetDataStreams() raises (RepositorySystemError); StringList ListDataStreams() raises (RepositorySystemError); DataStream GetDataStream(in string dataStreamID) raises (RepositorySystemError); DataStream CreateDataStream ( in string MIMEType, in string descriptor, in ByteStream data ) raises (RepositorySystemError); void DeleteDataStream(in string dataStreamID) raises (RepositorySystemError); Disseminator CreateDisseminator( in ContentTypeID contentType, in ContentTypeImplName servletID, in DisseminatorKind enumKind) raises (RepositorySystemError); void DeleteDisseminator(in ContentTypeID contentType) raises (RepositorySystemError); ContentTypeList ListContentTypes() raises (RepositorySystemError); DisseminatorList GetDisseminators() raises (RepositorySystemError); ContentTypeSignature GetContentTypeMethods(in ContentTypeSigName contentType) raises (RepositorySystemError); MethodResult GetDissemination(in ContentTypeID contentType, in MethodRequest request) raises (RepositorySystemError); }; //************************************************ // Repository interface definition //************************************************ interface Repository : DigitalObject { string GetVersion() raises (RepositorySystemError); // RAP version DigitalObject CreateDigitalObject(in string digitalObjectID) raises (RepositorySystemError); // digitalObjectID is a URN DigitalObject GetDigitalObject(in string digitalObjectID) raises (RepositorySystemError); // digitalObjectID is a URN void DeleteDigitalObject(in string digitalObjectID) raises (RepositorySystemError); SessionID GetSessionID(in string userID) raises (RepositorySystemError); long VerifyDigitalObject(in string digitalObjectID) raises (RepositorySystemError); CurrentContext GetCurrentContext(in SessionID sessionID) raises (RepositorySystemError); StringList ListDigitalObjects(in string filter) raises (RepositorySystemError); // filter: simple string search on URN }; //************************************************ // FUTURE USE: AccessControl interface definition //************************************************ interface AccessControl { string GetAccessControlType() raises (RepositorySystemError); }; };
Contact Authors:
Email Christophe at
cblanchi@cnri.reston.va.us
Email Ed at eoverly@cnri.reston.va.us
Email Sandy at payette@cs.cornell.edu