Technical description of the asset file representation and the metadata in the censhare database. This information is provided for developers and administrators.


Introduction

Every file that is maintained by the censhare system, is described in exactly one entry in the table "storage_item" of the censhare Core Database. Each file has a unique sequence number ("sid") and a large set of metadata that describe the physical condition as the mimetype, original path and file name, filelength and modification date. Certain mimetypes produce additional metadata, like the doctype for XML documents or the number of chars ("charcount"), words ("wordcount") and lines ("linecount") in text files. Image files produce information about colorspace ("color"), width and height ("width_px", "height_px") and resolution ("dpi"). There is also functional metadata like the state ("available", "offline/archived" etc). The "key"-attribute determines the role, that a storage item plays for its associated asset and the list of keys can be customized in the censhare AdminClient.

In the asset XML data model, every storage item belonging to this asset is representated by a "storage_item" element. The link between an asset and a storage item is qualified in the "storage_item" table by the parameters "asset_id", "asset_version", "element_idx" and "key".

The actual storage location of a file is determined by the filesystem ("filesys_name", which is a symbolic name for a logical filesystem as defined in the Application Server configuration) and a relative path ("relpath") within this filesystem. The relative path is constructed from the unique sequence number ("sid") — every two digits of the sid form a subdirectory of the path. This is to limit the number of files per directory to 100 (there are recursion-problems with directories of more than a couple of hundred files per directory in some of the file system solutions in the market). This means, that there is no absolute path to a file anywhere in the database. The absolute path of a file is generated on the fly, by concatenating the URL-attribute of the referenced filesystem and the relative path.

The storage location of a file (and all other metadata of the "storage_item" table) can be made visible in the censhare Client by activating the Administrative mode and selecting "Admin>Show XML" from the context menu of an asset.