geonetwork/core-geonetwork — pull request #336 by ByronCinNZ (2014-01-06 00:22:31+00:00)
Title: 2.10.x

The OGC WxS harvester currently lacks the capability to populate a template record. This enhancement adds that capability. This modification allows the administrator to select template records for the selected schema to be populated with the harvested information. The process used is a modified “update-children-from-parent” approach. This modification has been applied to the following schemas: ISO19139, ANZLIC, MCP, and MCP-1.4.

Files Modified:
Java class files modified are:
java/org/fao/geonet/kernel/harvest/harvester/ogcwxs/Harvester.java
java/org/fao/geonet/kernel/harvest/harvester/ogcwxs/OgcWxSHarvester.java
java/org/fao/geonet/kernel/harvest/harvester/ogcwxs/OgcWxSParams.java
Files modified to capture templates in the user interface are:
Javacript:
webapp/scripts/harvesting/ogcwxs/model.js
webapp/scripts/harvesting/ogcwxs/ogcwxs.js
webapp/scripts/harvesting/ogcwxs/view.js
XML:
webapp/xsl/harvesting/ogcwxs/ogcwxs.xsl
webapp/xsl/xml/harvesting/ogcwxs.xsl
Files added for transformation of output in iso19139:
WEB-INF/data/config/schema_plugins/iso19139/convert/OGCWxSGetCapabilitiesto19119/mergeTemplate.xsl
These changes were duplicated in each of the other 19139 profiles covered by this contract - anzlic, mcp, and mcp-1.4 by copying the directory iso19139/convert/OGCWxSGetCapabilitiesto19119 to each of the corresponding plugin schema directories and modifying according to each schema (primarilly tag names, namespaces and metadataStandardName values).
Existing mcp files supporting Sensor Observation Services were not modified. (See note above.)
Plugin schema source files from GitHub have been modified to support the added functionality.

Observations:
SOS harvesting files (xslt) in schema plugins for MCP do not appear to be updated for latest GeoNetwork versions. Likely these will crash if used. The references to resp-party.xsl and ref-system.xsl appear out of date with recent revisions. Unknown if there are further issues.

Notes on possible improvements:
Two new variables were created - templateLayer and templateService. It would be more consistent to use the same names as are used in Thredds harvester for template records (atomicMetadataTemplate, collectionMetadataTemplate). This is unlikely to change the number of current modifications significantly.
Modification of xml.harvesting.info to retrieve the values of templateLayer and templateService to preserve the currently selected template records when editing the harvesting regime. (Could be accomplished more easily if Mod 1 above is done.)
Use the same method as Thredds and WFS harvesting to retrieve the template records for the schema and thereby replace the current custom function.