Docs / Development / Content Repository

Content Repository

A content repository is a store of digital content with an associated set of data management, search and access methods allowing application-independent access to the content rather like a digital library, but with the ability to store and modify content in addition to searching and retrieving. The sensenet Content Repository (SNCR) creates the technical underpinning of sensenet. It gives a structure to the unstructured content as the logical storage facility. It is the container of content (individual blocks of information) that also provides the service layer to manipulate (add, copy, move, delete, etc.) it.

Managing Content

The Content Repository provides services to end users for managing content. It has the following features:

Structured storage of Content

The Content Repository is basically a tree structure of the various stored content. A specific content is identified by a unique id and also by its path in SNCR. The root of SNCR is at the /Root path, all other content is placed somewhere under this root content - for example the login page for the default site is placed at /Root/Sites/Default_Site/login. The default structure is organized as follows (only the main folder structure is listed here):

Content Repository tree
  • Root - this is the root of the tree structure. If you click on it in Content Explorer you will get a link summary page where the most common administrative functions are listed (Root Console)
    • (apps) - top level (apps) folder containing the global applications for various Content Types
    • ContentTemplates - folder containing Content Templates: pre-defined default values and structures for Content Types
    • Global - the global resources of the portal. Requested skin resources will fall back to these contents if not defined in the current skin
      • celltemplates
      • contentviews
      • fieldcontroltemplates
      • images
      • pagetemplates
      • plugins
      • renderers
      • scripts - JavaScript files
      • styles - Css files
    • IMS - folder containing Domains, Organizational units, Groups and Users in a hierarchical tree structrure
    • Localization - resource files with multi-language text content for Localization
    • Portlets - folder of installed Portlets
    • Sites - container of defined sites
      • Default_Site - demo site
    • Skins - container folder for Skins
      • empty - an empty skin for creating new skins
      • sensenet - default skin and resources of demo site
    • System - system related Content
      • Devices - contains Device content which can help you to create specific application pages to display the same content on different devices (e.g. tablet, mobile)
      • errormessages – contains customized site specific html files to display exception messages (the files are grouped in folders by site)
      • Renderers - some renderers used by the base system
      • Schema
        • Aspects - container for Aspects
        • ContentTypes - container for Content Types
      • Settings – contains global Settings
      • SystemPlugins - resources of base system applications
      • WebRoot - container for system handlers/pages, with automatic redirection from ‘/’ path (see WebRoot Folder for details).
      • Workflows – container for workflows
    • Trash - container of deleted Content (Trash)

Content Repository and the type system

The sensenet Content Repository is built upon a metadata system with pre-defined base types and type inheritance support. Content stored in SNCR can have different types, but content can be of one type only at any one time. A content type defines the properties (fields) and behavior of content. Content type definitions are also stored as content in the repository. They are located in the /Root/System/Schema/ContentTypes folder. To sum it up, the SNCR relies on the type system that - from the storage perspective - defines the reusable set of fields for each content type. You can also add extra fields to a certain content (apart from the fields in its type) through aspects.

Metadata indexing for fast search and filtering

Content in the SNCR are indexed using the Lucene indexing and search library. The text of binary documents (Microsoft Word, Excel, Adobe PDF, etc) is extracted and can also be searched in SNCR. Lucene provides extremely fast query results even on big (over 10 million content) repositories.

Content access and url resolution

Every content in SNCR is identified by its unique Id and its Path. You cannot change a content id, but you can move a content to another folder and thus change its path. The tree structure of the SNCR makes it possible to use the path as a link to the content, and thus the individual content can be addressed by their root-relative or site-relative paths as URL links. For example a root-relative /Root/Sites/DefaultSite/My-folder/My-file.docx content can be addressed as My-folder/My-file.docx if your browser points to a url that is registered on the Default_Site.

Managing sensenet Content Repository

In an Content Management system the most frequently used operations are searching, reading and writing content in the content repository. Document libraries in workspaces, custom forms, pictures in image libraries are all stored and managed in the one and only big tree of sensenet Content Repository. If you want to have an overview of the whole tree structure (similarly to Windows Explorer or OSX Finder) you can use the administrative GUI of sensenet, the Content Explorer (this is available only if you have the WebPages component or the full sensenet 6.5 product installed).

Is something missing? See something that needs fixing? Propose a change here.