This refers to the web interface. The code is located in the web/geonetwork/scripts/harvesting folder. Here, there is a subfolder for each harvesting type plus some classes for the main page. These are:
harvester.js: This is an abstract class that must be implemented by harvesting types. It defines some information retrieval methods (getType, getLabel, etc...) used to handle the harvesting type, plus one getUpdateRequest method used to build the XML request to insert or update entries.
harvester-model.js: Another abstract class that must be implemented by harvesting types. When creating the XML request, the only method substituteCommon takes care of adding common information like privileges and categories taken from the user interface.
harvester-view.js: This is an important abstract class that must be implemented by harvesting types. It takes care of many common aspects of the user interface. It provides methods to add group’s privileges, to select categories, to check data for validity and to set and get common data from the user interface.
model.js: Performs all XML requests to the server, handles errors and decode responses.
view.js: Handles all updates and changes on the main page.
util.js: just a couple of utility methods.
The harvesting package is located in src/org/fao/geonet/kernel/harvest. Here too, there is one subfolder for each harvesting type. The most important classes for the implementor are:
AbstractHarvester: This is the main class that a new harvesting type must extends. It takes care of all aspects like adding, updating, removing, starting, stopping of harvesting nodes. Some abstract methods must be implemented to properly tune the behaviour of a particular harvesting type.
AbstractParams: All harvesting parameters must be enclosed in a class that extends this abstract one. Doing so, all common parameters can be transparently handled by this abstract class.
All others are small utility classes used by harvesting types.
buttons.xsl: Defines all button present in the main page (activate, deactivate, run, remove, back, add, refresh), buttons present in the "add new harvesting" page (back and add) and at the bottom of the edit page (back and save).
client-error-tip.xsl: This stylesheet is used by the browser to build tooltips when an harvesting error occurred. It will show the error class, the message and the stacktrace.
client-node-row.xsl: This is also used by the browser to add one row to the list of harvesting nodes in the main page.
harvesting.xsl: This is the main stylesheet. It generates the HTML page of the main page and includes all panels from all the harvesting nodes.
In each subfolder, there are usually 4 files:
xxx.xsl: This is the server stylesheets who builds all panels for editing the parameters. XXX is the harvesting type. Usually, it has the following panels: site information, search criteria, options, privileges and categories.
client-search-row.xsl: Used in some harvesting types to generate the HTML for the search criteria panel.