Downloads
Download tar.gz
32.29 KB
MD5: 4dc3c54ac884bacb353474f4d94ce1dc
SHA-1: 8af8943a6f9a977f34e87d062ae9bf7d22c61512
SHA-256: 1a4a1beccf238d189292be70d135319f96c58f3e2dfa97c82efdff1c5c4c63e9
Download zip
42.58 KB
MD5: 2ad85d83f8fdc6e77aa15d77c4fd9621
SHA-1: 76fe110a301fdda096a320207bb545cbdb68f359
SHA-256: 28a25761eb5238e68363e0567811d986507cd2eef9714cb444184a824d7f9f8c
Release notes
Changes contributed by Austin Goudge at psycle dot com
Key Development Points
- Multiple row styles available: Auto Fields, Dublin Core, ILOX, LOM, LRE.
- Choosing the "Auto Fields" row style enables the same view to be used to output any of the available row styles. The row style that is output is determined by the metadataPrefix parameter to the OAI request.
- Drupal's own XML generating function was insufficient for processing tiered XML output for the likes of LOM. In response, we created the views_oai_pmh_xml_node class to handle nested XML generation.
- The metadata type definition array keys are able to represent tiered XML data by using the '/' character to separate XML tag names. The '@' character indicates that an attribute is required for the given element. E.g.:
-- this array key: 'a/b/c@lang'
-- will generate this XML: '' - XML attributes, such as language, are also defined in the metadata type definition array, using array keys formatted like this: '(attribute)oai_lom@language'.
- Values can be assigned to XML attributes using the Drupal-field-to-OAI-element mapping in the view.
- Support added for multiple-value Drupal fields for Views 2.
- Backward-compatability with previous version of OAI-PMH Views module
Additional Development Notes
- Only one display style available: OAI-PMH (auto).
- Display style is represented by a PHP object: views_oai_pmh_plugin_style_auto.
- views_oai_pmh_plugin_style_auto contains an array of "misc" style classes, which use the PHP object views_oai_pmh_plugin_style_misc. Each "misc" style class represents one of the available metadata types.
- views_oai_pmh_plugin_style_auto passes calls to its methods down to one of its "misc" style classes to handle. Which one is chosen depends on the metadata type requested.
- Row style is represented by a PHP object: views_oai_pmh_plugin_row_auto
- views_oai_pmh_plugin_row_auto contains an array of "misc" row classes, which use the PHP object views_oai_pmh_plugin_row_misc. Each "misc" row class represents one of the available metadata types.
- views_oai_pmh_plugin_row_auto passes calls to its methods down to one of its "misc" row classes to handle. Which one is chosen depends on the metadata type requested.
- The row styles are all defined in the same location: includes/views_oai_pmh_metadata_type_definitions.inc
- Each row style definition creates an object of type views_oai_pmh_metadata_type and adds it to a global array. Any part of the module code that requires metadata-specific information can look it up in the relevant globally-available object.
- The property $elements in views_oai_pmh_metadata_type contains the array that defines a metadata type.