You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current harvesting implementation is able to extract relevant metadata from a remote GeoNode server. However, it is not yet capable of generating local GeoNode resources with the extracted metadata. This is to be implemented by interacting with the new GeoNode resource manager, which is being introduced via GNIP#89, as per:
Briefly, the idea is that a harvester worker shall request that the resource manager creates a new local GeoNode resource and provide it with the relevant metadata (and data too, but we will get there after this).
Harvesting workflow
On the harvesting side, the business logic is something like:
harvesting.tasks.harvesting_dispatcher() is called by the celery beat scheduler (or on-demand by the user) - this triggers a call to harvesting.tasks._harvest_resource()
_harvest_resource() instantiates the relevant harvester worker and calls its get_resource() and update_geonode_resource() methods sequentially:
get_resource() extracts metadata from the remote service
update_geonode_resource() takes that extracted metadata and creates a local GeoNode resource
This issue only deals with the implementation of the update_geonode_resource() method - the other parts of the workflow are already implemented.
Goal
Finish the implementation of the geonode.harvesting.harvesters.base.BaseHarvesterWorker.update_geonode_resource()
method.
The default implementation of this update_geonode_resource() method shall receive an instance of RecordDescription and a harvesting_session_id as input parameters and then proceed to:
Ask the GeoNode resource manager to create or update the relevant GeoNode resource. It shall provide the resource manager with the required details which will come from both the input RecordDescription and additional properties on the related models.Harvester (like the default resource access permissions, the default owner, etc)
Add additional information to the harvesting session
Child classes are free to either reuse this default implementation or reimplement the method if they require more complex behavior.
Examples:
The default GeoNode harvester worker does not need any additional functionality. Therefore it shall use the base implementation.
The PDN harvester worker (for Nexus project), shall need to populate custom DB tables with the information extracted from the remote service.
NOTES:
At this point it is not clear how we will signal to the resource manager that a certain resource should be bound to the harvester
Please submit this work as a PR against the harvesting_configuration branch on the ricardogsilva/geonode repo - that branch is currently being used for a PR on the initial harvesting functionality
The current harvesting implementation is able to extract relevant metadata from a remote GeoNode server. However, it is not yet capable of generating local GeoNode resources with the extracted metadata. This is to be implemented by interacting with the new GeoNode resource manager, which is being introduced via GNIP#89, as per:
GeoNode/geonode#7664
Briefly, the idea is that a harvester worker shall request that the resource manager creates a new local GeoNode resource and provide it with the relevant metadata (and data too, but we will get there after this).
Harvesting workflow
On the harvesting side, the business logic is something like:
harvesting.tasks.harvesting_dispatcher()
is called by the celery beat scheduler (or on-demand by the user) - this triggers a call toharvesting.tasks._harvest_resource()
_harvest_resource()
instantiates the relevant harvester worker and calls itsget_resource()
andupdate_geonode_resource()
methods sequentially:get_resource()
extracts metadata from the remote serviceupdate_geonode_resource()
takes that extracted metadata and creates a local GeoNode resourceThis issue only deals with the implementation of the
update_geonode_resource()
method - the other parts of the workflow are already implemented.Goal
Finish the implementation of the
geonode.harvesting.harvesters.base.BaseHarvesterWorker.update_geonode_resource()
method.
The default implementation of this
update_geonode_resource()
method shall receive an instance ofRecordDescription
and aharvesting_session_id
as input parameters and then proceed to:Ask the GeoNode resource manager to create or update the relevant GeoNode resource. It shall provide the resource manager with the required details which will come from both the input
RecordDescription
and additional properties on the relatedmodels.Harvester
(like the default resource access permissions, the default owner, etc)Add additional information to the harvesting session
Child classes are free to either reuse this default implementation or reimplement the method if they require more complex behavior.
Examples:
NOTES:
harvesting_configuration
branch on thericardogsilva/geonode
repo - that branch is currently being used for a PR on the initial harvesting functionalityRelated to #176
The text was updated successfully, but these errors were encountered: