OpenWGA 7.5 - OpenWGA Concepts and Features

Content Stores » Structure » Documents

Common properties

Documents are divided up intlo individual document types. The type of a document identifies the purpose it has in an OpenWGA content store. Possible purposes are for example containing content data, representing a node in the navigation hierarchy of a website or defining a type of content. The available document types are predefined and are explained in the following chapters.

The structure of all documents consists of fields. Fields consist of a type, a name which uniquely identifies the field on the document among all fields of that type and a value. The type of value varies widely. It can be a single plain value of string, number, date or boolean or even a list of those values.

There are four types of fields:

1. Metadata fields are fields that describe the current document and define its behaviours. The metadata fields that a document owns are predefined by their document type. So are the purposes of the individual fields and their possible values. In other words: Metadata field contain the technical data of a document.

Examples for metadata fields:
  • Field NAME on website area documents: Identifies the unique name of this area
  • Field OUTERLAYOUT on content type documents: Specifies the layout by which contents of this type are to be rendered

2. Items are fields only available to some document types. They contain the "real" content that OpenWGA should publish and manage, i.e. the data that the database stores. It is predefined which document types may have items - as only some types serve the purpose of storing this kind of data - but it is not predefined which items or how many items those documents should have. They can be completely individual in number, name and data type on each document.

Describing how items are defined is beyond this document, but it is generally so that the designer of an OpenWGA application decides which items are stored to which documents , and the contents of these items are normally either defined by the content author (for "real" content documents) or the browser user (for user profiles which also may have items).

3. File attachments  are special fields holding binary data. Like items they are regarded part of the "real" content that an OpenWGA content store contains. It is predefined which document types may have file attachments - as only some types serve the purpose of storing this kind of data - but it is not predefined which files or how many files a document should have. File attachments have a name like items which typically contains some file name though. As stated the data type is always binary data.

4. Content relations are custom point-to-point relations between content documents. Like items they are regarded part of the "real" content that an OpenWGA content store contains. Only content documents own content relations but it is not predefined what relations or how many relations a content document should have. Content relations have a name like items. They are more closely described on the "content document" type.

Every document also has a type specific access key. This key identifies the document uniquely among all other documents of the same type in the current database. The access key is automatically created from one or more metadata fields of the document (which is again predefined for each document type). For example: Website area definitions use the metadata field "name" as access key, as its purpose is to identify the area.

Together with a prefix that identifies the type of document the access key forms the document key. This is a key that uniquely identifies the document among all other documents in the current database. Doctype prefix and access key are divided by a slash:

doctype/accesskey


For example, a website are of name "home" has the following document key:

area/home