Setting up harvesting with your neighbour
Steps:
1- setup the harvesting from another node
2- add the required logo for the other node
3- initial harvest and check
In this exercise you will configure Geonetwork opensource to harvest metadata from another node, in this case from your neighbour :-)
Currently harvesting is preconfigured in the main configuration file of GeoNetwork. Harvesting follows the same principles as regular searches, including the advanced search criteria. You can define search parameters for one or more searches in the same node. You can also provide a username and password in case you have such an account that could provide access to otherwise invisible data.
Harvesting is performed automatically at intervals you configured for each node to be harvested. It uses a UUID, a globaly unique identifier, to avoid the harvesting of duplicate metadata and to improve harvesting performance. On each harvesting cycle, your node will query the remote node according to your search criteria and retrieve a list of metadata UUID's and the timestamp set when the metadata was last updated. Only those metadata that are not stored locally or that were updated since the previous cycle will than be retrieved in full.
Now open the config.xml file located in the \web\WEB-INF folder with a text or an XML editor. Browse down until you find the commented Harvesting section (around line 140). Remove the comments or copy the whole section and past it just under the commented section to keep an empty reference set.
Change the section to harvest from your neighbour, e.g.:
<schedule name="geonetwork sync" class=".schedules.MetadataSync" when="60 sec"> <!-- Cycle of update in hours (hour), minutes (min) and seconds (sec) -->
<param name="sites">
<site name="geonetwork"> <!-- Servlet name of remote node -->
<general>
<host>my_neighbours_pc</host>
<port>8080</port>
<language>en</language>
<username>OCHA_user</username> <!-- This field can be left empty to perform guest searches -->
<password>ocha2xuser</password>
</general>
<services>
<login>xml.user.login</login>
<logout>xml.user.logout</logout>
<search>xml.search</search>
<get>xml.metadata.get</get>
</services>
<search>
<extended>off</extended> <!-- These fields define the search parameters -->
<help>off</help>
<relation>equal</relation>
<any /> <!-- This field is the free text search field -->
<remote>off</remote>
<region/>
<paper>off</paper>
<siteId>geonetwork-fao</siteId> <!-- This is the unique site ID of the node information should be retrieved from. Can be used to set up trees of nodes -->
</search>
<search> <!-- By repeating the search blocks, you can define multiple searches -->
<extended>off</extended>
<help>off</help>
<relation>equal</relation>
<any />
<remote>off</remote>
<region/>
<paper>off</paper>
<siteId>geonetwork-wfp</siteId>
</search>
<group id="1"> <!-- These blocks define the groups and their privileges to be set for the harvested metadata -->
<privilege>view</privilege> <!-- Members of group 1 can see the metadata -->
<privilege>download</privilege> <!-- Members can download related resources -->
<privilege>dynamic</privilege> <!-- Members can see interactive resources -->
</group>
<group id="2">
<privilege>view</privilege>
<privilege>download</privilege>
</group>
</site>
</param>
</schedule>