Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Content Hosting (CH) is currently implemented via a two-tier set of objects: one to store content and properties in a datbase, the other to store content in files. If content is saved in files and properties are kept in the database, this presents a serious problem with resource integrity. For example, if a file is deleted in Sakai, and the user asks their IT people to restore it, the metadata is lost, potentially corrupting the Content Hosting system. Also, the implementation uses an internally defined method of naming files and directories that makes restoring files nearly impossible.

Given a desire to support restoring lost files and external file system management (via AFS, etc.), I am exploring a new implementation of Content Hosting based solely on a standard file system. Naturally, there are trade-offse with this approach. It may not be as fast as the existing implementation, and some way needs to be found to associate base files with their metadata files. Coupled with this is a desire (expressed by some) to implement some form of JSR-170.

Planned Approach

  1. Map directory names and file names directly to an underlying (specified) file system.
  2. Save properties in a file called file-name.properties, where file name corresponds to the base file name.
  3. Save attachement references in a file called file-name.attachments.

Identifiers

Content resources are identified by a file name. In most cases, this name will have a file extention separated by a period, from which the MIME type may be deduced (via an extention map). All files also have a metadata file associated with it named the same, with a file extension of .properties. These properties may optionally be cached in a database to allow faster access to them.

Resources may have attachements - TBD.

All resources (and attachments) live in a collection. Resource identifiers must be unique within the collection they live in. Collections may contain sub-collections. Collections are simply named and correspond to directories in a file system. Collection names must be unique within the collection they live in.

Collection paths are defined against a local root. This root is associated with a context (usually a site). Local roots branch from a Sakai global root, which in turn is mapped to a file system location.

Issues

  1. Properties can only store string-based properties.

Project Status

  1. Implementation of entity interface on Resource has been started.
  2. Collection is partially implemented.

ContentHostingService Methods

Method Name

Status

Notes

getLabel();

 

 

willArchiveMerge();

 

 

willImport();

 

 

archive();

 

 

merge();

 

 

importEntities();

 

 

parseEntityReference();

 

 

getEntityDescription();

 

 

getEntityResourceProperties();

 

 

getEntity();

 

 

getEntityUrl();

 

 

getEntityAuthzGroups();

 

 

 

 

 

getCollection(String id);

 

 

(many more collection methods)

 

 

 

 

 

(many resource methods)

 

 

ContentCollection Methods

Method Name

Status

Notes

getUrl();

 

 

getReference();

 

 

getUrl(root-prop);

 

 

getReference(root-prop);

 

 

getId();

 

 

getProperties();

 

 

toXml();

 

 

 

 

 

getMembers();

 

 

getMemberResources();

 

 

getBodySizeK();

 

 

getReleaseDate();

 

 

getRetractDate();

 

 

ContentCollectionEdit Methods

Method Name

Status

Notes

ContentResource Methods

Method Name

Status

Notes

getUrl();

 

 

getReference();

 

 

getUrl(root-prop);

 

 

getReference(root-prop);

 

 

getId();

 

 

getProperties();

 

 

toXml();

 

 

 

 

 

getContentLength();

 

 

String getContentType();

 

 

getContent();

 

 

getReleaseDate();

 

 

getRetractDate();

 

 

streamContent();

 

 

ContentResourceEdit Methods

Method Name

Status

Notes

You can track progress via my CH Project Notes.

Things to Do

  1. Move the work to contrib.

Joining

Send me email if you are interested in participating in this project.

  • No labels