Changes between Version 13 and Version 14 of extractSubtemplates
- Timestamp:
- May 3, 2012, 8:08:24 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
extractSubtemplates
v13 v14 11 11 == Overview == 12 12 13 With the addition of the XLink processing, fragment harvesting, subtemplate (= fragment with an id in the Metadata table of the !GeoNetwork database) support and tools for managing directories of subtemplates, !GeoNetwork can now begin to support reusable fragments of metadata linked into records. However many sites have metadata records with common fragments of metadata that they would like to extract into directories of subtemplates. This proposal adds a batch operation for admin users that will extract fragments from a selected set of records. Fragments are identified as follows: if the root element of the subtemplate has a uuid attribute, then this will be the uuid of the extracted subtemplate. If there is no uuid attribute on the root element of the subtemplate, then one is obtained by calculating the checksum of the text content of the fragment.13 With the addition of the XLink processing, fragment harvesting, subtemplate (= fragment with an id in the Metadata table of the !GeoNetwork database) support and tools for managing directories of subtemplates, !GeoNetwork can now begin to support reusable fragments of metadata linked into records. However many sites have metadata records with common fragments of metadata that they would like to extract into directories of subtemplates. This proposal adds a batch operation for admin users that will extract fragments from a selected set of records. Subtemplates are identified as follows: if the root element of the subtemplate has a uuid attribute, then this will be the uuid of the extracted subtemplate. If there is no uuid attribute on the root element of the subtemplate, then one is obtained by calculating the checksum of its text content. 14 14 15 15 === Proposal Type === … … 25 25 == Motivations == 26 26 27 Many sites have existing metadata records with common information eg. contact information in an ISO CI_ResponsibleParty element. With the addition of subtemplate support and maintenance functions to !GeoNetwork, it should be possible to extract these common fragments of metadataas subtemplates. This proposal describes a function that does this.27 Many sites have existing metadata records with common information eg. contact information in an ISO CI_ResponsibleParty element. With the addition of subtemplate support and maintenance functions to !GeoNetwork, it should be possible to extract these fragments of metadata, remove duplicates and store them as subtemplates. This proposal describes a function that does this. 28 28 29 29 == Proposal == … … 124 124 As mentioned above, subtemplates created from an extraction can be assigned a uuid from the uuid attribute on the root element of the subtemplate or if that doesn't exist, a uuid will be calculated using a sha1 checksum on the text content of the subtemplate. 125 125 126 The advantage of this procedure is that the records can be preprocessed using a batch XSLT operation in GeoNetwork that calculates a uuid and stores it as an attribute using rules appropriate to the site - eg. if extracting contact information as subtemplates, a site may decide that all fragments of contact information with the same organisation name should be linked to one subtemplate. To achieve this, a batch XSLT operation can be run before the subtemplate extraction to assign the same uuid to all fragments with the same organisation name.126 The advantage of this procedure is that the metadata records can be preprocessed using a batch XSLT operation in GeoNetwork that calculates a uuid and stores it as an attribute using rules appropriate to the site - eg. if extracting contact information as subtemplates, a site may decide that all fragments of contact information with the same organisation name should be linked to one subtemplate. To achieve this, a batch XSLT operation can be run before the subtemplate extraction to assign the same uuid to all CI_ResponsibleParty fragments with a common organisation name (eg. by calculating a checksum or by using a lookup table). 127 127 128 128 === Backwards Compatibility Issues ===