This documentation refers to an earlier version of Islandora. https://wiki.duraspace.org/display/ISLANDORA/Start is current.

Islandora makes available a number of Content Model Objects in Islandora Solution Packs. However, you may wish to modify these Content Models, or create your own in order to address particular types of content, or to create custom transformations of your data on ingest. Most of the time, you will customize or write a content model to modify behaviour when users view content, or to mofiy what happens to an object when it is ingested into the repository. Islandora Content Models extend Fedora’s Content Model Architecture (CMA), by adding an ISLANDORACM stream. 

When you write a Custom Islandora Content Model Object, you are writing an ISLANDORACM stream that calls PHP code that you have written and placed in the plugins directory within the Islandora module. Then, from the ISLANDORACM stream, you call the code to be executed when a user ingests a new object into a collection. This is possible because, in the Islandora module, there are methods that will parse the XML of your ISLANDORACM stream looking for the following elements:

  • The <display_in_fieldset> element determines how objects are displayed when a user accesses the object view.
  • The <ingest_rules> element defines how objects identified by specific DSID's are managed. For instance, a PDF content model may tell the module to create a thumbnail and ingest that thumbnail as an additional Datastream along with the actual PDF Datastream.

For example:

<display_in_fieldset>

<datastream id="OBJ">
<method>
<file>plugins/qt_viewer.inc</file>
<class_name>ShowQtStreamsInFieldSets</class_name>
<method_name>showQt</method_name>
</method>
</datastream>

<datastream id="QDC">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showQdc</method_name>
</method>
</datastream>

</display_in_fieldset>

Remember: Once you have created a new Islandora Content Model, the COLLECTION_POLICY Datastream of a Collection Object must be modified to reference your new Content Model Object.

  • No labels