= Fedora View Blobs =
DOMS employs an overall atomistic data model. Atomistic data models are much more flexible than traditional compound data models, but they have one big (and largely unmet) challenge. When working with data objects you will frequently need to operate on a number of objects as if they were a common whole. The easiest usecase for this is the public dissemination of data. If the data that should go into one Dissemination Information Package is distributed over several objects, the system needs to understand this.
The DOMS team has laboured long and hard to find a nice way to model this in a Fedora context. This is their product.
== Views ==
A view is a way of combining objects in the DOMS into a domain-relevant group. It is a way of seeing a number of objects as related - as a whole.
Each view is centered around an data object, and a number of objects related to this object. The view is identified by the object it centered around, i.e. the PID of the view is the PID of the data object. All the other objects in the View are related to the center object by some chain of relations. Therein lies a crucial feature of this View system; '''Rather than having special relations between data objects to other objects in their view, some of the structural relations are annotated to be view relations.'''
Or rather, we list the relations that should be followed to find the objects in the view, rather than define view-relations. Actually, we annotate both relations to and from a given object as view relations.
The view nessesary for a proper public dissemination of the objects might not be the same as what is required for a useful GUI access, through. The way around this is to define multiple views on the same objects. Each named view has its own set of annotated relations to follow. In no way do they interact, and we can therefore have radically different ways of viewing the same data.
But the views of certain classes of object will tend to more useful than others. Each content model can declare itself to be a main content model for any named view. The exact semantic meaning of being a main view is defined by the systems using this view.
Named views so far:
* "GUI": The GUI view specify which objects should be opened as a combined whole, and which should be regarded as external to this whole. A whole opened in the GUI will always be centered around a object having a content model declaring itself to be main content model for the GUI view.
== The main view declaration ==
It is very simple for a content model to declare itself to be a main object for a named view. All it has to do is have a literal relation in the RELS-EXT datastream, by the name "isMainForNamedView", in the view namespace (see DomsNameSpacesAndSchemas), to the literal name of the view.
Add this relation to any content models that should describe main views for the GUI view.
{{{
GUI
}}}
== The VIEW datastream ==
Now we come to another crucial feature of this view system; '''Views are defined on the content model level.''' The content model describes how the view, from this class of objects, should be generated. Everything is defined in the classes of objects, never in the actual data objects. As such, it is easy to change and add views on a class-wide basis.
To facilitate this, the "VIEW" datastream in content models have been designated as Reserved and Required. The "VIEW" datastream is, basicaly, a sequence of named views, each with their designated relations.
<>
The schema for the VIEW datastream is as follows:
{{{
}}}
=== Multilevel Views ===
Of course, it is very preferable to be able to have deeply nested views. Achiving this is easy. Above we defined the annotated relations as marking which objects should belong to the view. What we really meant was which object-views should be included in the view.
The formal definition of the semantic meaning of the relations in the "VIEW" datastream is therefore: '''Each data object has a view, encompassing the object and the views of other directly related data objects'''. So, if the VIEW datastream in a object was
{{{
}}}
then the View of this object encompass the object itself, and the "GUI" View of any objects that the object has a "doms:hasFile" relation to and any object that has a "doms:isPartOfCollection" relation to this object.
The procedure to calculate the total view of a object is detailed in this bit of pseudo code. It basicly performs a depthfirst search of the objects. The order of the objects in the View does not carry any sort of meaning, and will be random.
{{{
Set