15 Sep MP-Anything Introduction
Introduction
MP-Anything 3.x format was designed as the data interchange format between Hubert CMS/publishing system and external applications. Its goal was to express the complexity of the Hubert CMS database structures in the easy to read and use JSON form. In this documentation we will use some terms related to the structure of FRED database, so it is important to read the Overview of the Hubert CMS features document first to be able to fully understand it.
MP-Anything format was built with usage in the NoSQL databases in mind. That’s why it flattens the relational structure of FRED database to the shallow JSON documents containing all necessary information. So for each root record in the FRED database we produce JSON document file with the following structure:
Top level node is the record node containing the unique id of the document and grouping all other elements. Unique id is produced as the name of the root schema and unique id of the root schema record. So when the root schema is tv-event and the root record id is 123456, unique id of the document will be tv-content_123456.
Below top level record node, there is a collection consisting of the root record (always present and always first) and all extensions to this record. All of them are presented in the unified form of FRED schema records.
FRED schema record structure
FRED schema record consists of:
- technical attributes – several technical attributes like id, external id, date of creation/modification etc.
- fields – all field values of the schema (if the export is full) or the values of the mapper fields (if the export is mapper-based)
- workflow states – states of different workflows for the record.
- photo preselections – information about the photos selected to various selections for the record.
- rubrics – information about the rubric selections record has been chosen to.
- links – (see below) – the list of links to the record.
- typologies – information about the type of the record in multi-level hierarchy (if applicable).
- histories – history of occurence of the record.
- attachments – list of attached files (photos, videos, etc.)
Depending on the export option chosen, fields section can be divided into languages (for multilanguage content) or flattened to the single language, used in the context defined in the export definition.
Links node
Links node demands some more explanation. Within this node the whole recursive structure of the records’ relations can be found:
To avoid the deeply nested JSON structure (which is more difficult to handle and query by NoSQL databases) the link structure is flattened to the array of link sections. Name of the section is created as concatenation of the link names, divided with underscore.
For example: if we have link named link1 and this link has another link called link2 (so the linking is: record->link1->link2), the resulting section name will be: link1_link2
Each link section consists of the array of corresponding FRED schema objects.
Configuration files
Contents of the file in MP-Anything format have to be fully readable without referencing Hubert/FRED configuration. Because of this fact, along with the files in MP-Anything format also set of configuration files is exported. They are not neccessary for the simple MP-Anything interpretation but may come handy when some additional information about the configuration is needed. Because of performance reasons (and because of file size) it wouldn’t be wise to embed them into main MP-Anything file to form fully self-contained solution.
Sorry, the comment form is closed at this time.