Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "SMILA/Component Requirements/Record XML Storage Requirements"

(New page: This page defines requirements posed on SMILA's components. == Overview == The purpose of record XML storage is to store records and their XML attachments. The natural client component o...)
 
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
This page defines requirements posed on SMILA's components.
+
This page defines requirements posed on SMILA's record XML storage.
  
 
== Overview ==
 
== Overview ==
Line 17: Line 17:
 
#Proposal for essential API:
 
#Proposal for essential API:
 
<source lang="java">
 
<source lang="java">
void storeRecord(String id, Document document)
+
void storeRecord(String id, org.w3c.dom.Document document)
Document getRecord(String id)
+
org.w3c.dom.Document getRecord(String id)
 
void removeRecord(String id)
 
void removeRecord(String id)
Collection<Document> searchRecords(String xQuery)
+
 
Collection<Document> searchAttachments(String xQuery)
+
Collection<Document> searchRecordsAndAttachments(String xQuery)
+
 
void storeRecordAttachment(String attachmentId, InputStream attachmentStream)
 
void storeRecordAttachment(String attachmentId, InputStream attachmentStream)
 
void storeRecordAttachment(String attachmentId, byte[] attachmentStream)
 
void storeRecordAttachment(String attachmentId, byte[] attachmentStream)
Line 29: Line 27:
 
void removeRecordAttachment(String attachmentId)
 
void removeRecordAttachment(String attachmentId)
 
int fetchRecordAttachmentSize(String attachmentId)
 
int fetchRecordAttachmentSize(String attachmentId)
 +
 +
Collection<String> searchRecords(String xQuery)
 +
Collection<String> searchAttachments(String xQuery)
 +
Collection<String> searchRecordsAndAttachments(String xQuery)
 
</source>
 
</source>
  

Latest revision as of 03:31, 14 October 2008

This page defines requirements posed on SMILA's record XML storage.

Overview

The purpose of record XML storage is to store records and their XML attachments. The natural client component of this low level service is the blackboard service.

Note: By storing the content (record attachments) of XML document we enable the client component to fire some XQueries on the document content itself.

Requirements

  1. Record XML store has to offer an implementation-agnostic API. This particularly means that the client component should have no knowledge about the actual persistence technology being used (local file system, XML-DB or distributed file system)
  2. The usage of one special implementation of XML storage service should be simply a matter of the framework configuration.
  3. The essential API should be kept short
  4. Expanded API may contain batch operations
  5. The attachment's 'get' and 'set' methods should operate both with streams (in case very large documents - more than 2GB in size - need to be stored/processed) and byte arrays (for convenience reasons)
  6. The client component must use different instances of the XML store fully transparently
  7. Proposal for essential API:
void storeRecord(String id, org.w3c.dom.Document document)
org.w3c.dom.Document getRecord(String id)
void removeRecord(String id)
 
void storeRecordAttachment(String attachmentId, InputStream attachmentStream)
void storeRecordAttachment(String attachmentId, byte[] attachmentStream)
byte[] fetchRecordAttachmentAsByte(String attachmentId)
InputStream fetchRecordAttachmentAsStream(String attachmentId)
void removeRecordAttachment(String attachmentId)
int fetchRecordAttachmentSize(String attachmentId)
 
Collection<String> searchRecords(String xQuery)
Collection<String> searchAttachments(String xQuery)
Collection<String> searchRecordsAndAttachments(String xQuery)

Note: By being able to get the size of the stored content at first, the client component developer can decide which method (stream or byte-array oriented) he/she should use.

Back to the top