Differences between revisions 1 and 2
Revision 1 as of 2008-09-30 08:39:57
Size: 30
Editor: abr
Comment:
Revision 2 as of 2008-09-30 09:37:22
Size: 2237
Editor: abr
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

It is easily possible to create data objects from the definition in a content model, which was the basic strategy for the DOMS GUI. This strategy has one drawback, however. With just the information contained in the content models, almost no data can be automatically filled in. But for most data objects there are much data that could be filled automatically, based on the context. As a general solution to this problem, we introduced the concept of Object Prototypes (templates, stem-objects and so on).

A prototype is for all intents and purposes a normal data object. It has a special relation "doms-relations:isPrototypeFor" (see DomsNameSpaces) to a content model. This marks it as a prototype for this content model. There can be any number of prototypes for each content model, but each to them must have at least one. This one will be the blank object, ie. the object that could be automatically created from the content model.

A prototype object is not guaranteed to be valid in regards to the content models that describe it. It is guaranteed not to contain anything not allowed, but it might not contain everything required, as this should be filled in when the prototype is used. A prototype is therefore never in the STATE "published", but always in "intermediate". This prevents the validation services from marking the object as broken, and the dissemination services from publishing the object to the customers.

== Using a prototype ==

The way to create a new object via the prototype goes like this:
 1. Select the content model you wish to create a new object from
 1. Query the triple store for all objects having a "doms-relations:isPrototypeFor" relation to this content model
 1. Have the user select one of the found prototypes
 1. Load the object from Fedora.
 1. Change the PID so that when resaved it does not overwrite the prototype
 1. Remove the "doms-relations:isPrototype" relation from the object.
 1. Open the loaded+changed object in the GUI
 1. Have the user perform any other changes
 1. Ingest the object with the new PID.

So, the relations from the prototype will be copied into the new object, along with the content of any datastreams.

Fedora Object Prototypes

It is easily possible to create data objects from the definition in a content model, which was the basic strategy for the DOMS GUI. This strategy has one drawback, however. With just the information contained in the content models, almost no data can be automatically filled in. But for most data objects there are much data that could be filled automatically, based on the context. As a general solution to this problem, we introduced the concept of Object Prototypes (templates, stem-objects and so on).

A prototype is for all intents and purposes a normal data object. It has a special relation "doms-relations:isPrototypeFor" (see DomsNameSpaces) to a content model. This marks it as a prototype for this content model. There can be any number of prototypes for each content model, but each to them must have at least one. This one will be the blank object, ie. the object that could be automatically created from the content model.

A prototype object is not guaranteed to be valid in regards to the content models that describe it. It is guaranteed not to contain anything not allowed, but it might not contain everything required, as this should be filled in when the prototype is used. A prototype is therefore never in the STATE "published", but always in "intermediate". This prevents the validation services from marking the object as broken, and the dissemination services from publishing the object to the customers.

== Using a prototype ==

The way to create a new object via the prototype goes like this:

  1. Select the content model you wish to create a new object from
  2. Query the triple store for all objects having a "doms-relations:isPrototypeFor" relation to this content model
  3. Have the user select one of the found prototypes
  4. Load the object from Fedora.
  5. Change the PID so that when resaved it does not overwrite the prototype
  6. Remove the "doms-relations:isPrototype" relation from the object.
  7. Open the loaded+changed object in the GUI
  8. Have the user perform any other changes
  9. Ingest the object with the new PID.

So, the relations from the prototype will be copied into the new object, along with the content of any datastreams.

FedoraObjectTemplates (last edited 2010-03-17 13:12:47 by localhost)