geonode.harvesting.harvesters.arcgis
Harvesters for ArcGIS based remote servers.
Attributes
Classes
Generic enumeration. |
|
Generic enumeration. |
|
Abstract base class with the methods that must be reimplemented |
|
Abstract base class with the methods that must be reimplemented |
|
Abstract base class with the methods that must be reimplemented |
|
Base class for harvesters. |
Functions
|
Parse the input url into the ArcGIS REST catalog URL and any service name. |
A factory for instantiating the correct extractor for the resource |
|
|
Module Contents
- class geonode.harvesting.harvesters.arcgis.ArcgisRestApiLayerType[source]
Bases:
enum.EnumGeneric enumeration.
Derive from this class to define new enumerations.
- class geonode.harvesting.harvesters.arcgis.ArcgisServiceType[source]
Bases:
enum.EnumGeneric enumeration.
Derive from this class to define new enumerations.
- geonode.harvesting.harvesters.arcgis.parse_remote_url(url: str) Tuple[str, str | None, str | None][source]
Parse the input url into the ArcGIS REST catalog URL and any service name.
- class geonode.harvesting.harvesters.arcgis.ArcgisServiceResourceExtractor(service, resource_name_filter: str | None = None)[source]
Bases:
abc.ABCAbstract base class with the methods that must be reimplemented in order to add support for additional ArcGIS REST services
- abstract get_num_resources() int[source]
Return the number of resources that can be extracted from the service.
- abstract list_resources() List[geonode.harvesting.harvesters.base.BriefRemoteResource][source]
Return a list of BriefRemoteResource with the resources exposed by the service
- abstract get_resource(harvestable_resource: geonode.harvesting.models.HarvestableResource) geonode.harvesting.harvesters.base.HarvestedResourceInfo[source]
Parse the remote resource into a HarvestedResourceInfo
- class geonode.harvesting.harvesters.arcgis.ArcgisMapServiceResourceExtractor(service: arcrest.MapService)[source]
Bases:
ArcgisServiceResourceExtractorAbstract base class with the methods that must be reimplemented in order to add support for additional ArcGIS REST services
- _cached_resources: List[geonode.harvesting.harvesters.base.BriefRemoteResource] | None[source]
- get_num_resources() int[source]
Return the number of resources that can be extracted from the service.
- list_resources() List[geonode.harvesting.harvesters.base.BriefRemoteResource][source]
Return a list of BriefRemoteResource with the resources exposed by the service
- get_resource(harvestable_resource: geonode.harvesting.models.HarvestableResource)[source]
Parse the remote resource into a HarvestedResourceInfo
- _extract_resources() List[geonode.harvesting.harvesters.base.BriefRemoteResource][source]
- _list_sub_layers(arc_layer: arcrest.MapLayer) List[geonode.harvesting.harvesters.base.BriefRemoteResource][source]
- _get_resource_descriptor(layer_representation: Dict, harvestable_resource: geonode.harvesting.models.HarvestableResource) geonode.harvesting.resourcedescriptor.RecordDescription[source]
- _parse_brief_layer(arc_layer: arcrest.MapLayer) geonode.harvesting.harvesters.base.BriefRemoteResource[source]
- class geonode.harvesting.harvesters.arcgis.ArcgisImageServiceResourceExtractor(service: arcrest.ImageService)[source]
Bases:
ArcgisServiceResourceExtractorAbstract base class with the methods that must be reimplemented in order to add support for additional ArcGIS REST services
- get_num_resources() int[source]
Return the number of resources that can be extracted from the service.
- list_resources() List[geonode.harvesting.harvesters.base.BriefRemoteResource][source]
Return a list of BriefRemoteResource with the resources exposed by the service
- get_resource(harvestable_resource: geonode.harvesting.models.HarvestableResource) geonode.harvesting.harvesters.base.HarvestedResourceInfo[source]
Parse the remote resource into a HarvestedResourceInfo
- _get_resource_descriptor(layer_representation: Dict, harvestable_resource: geonode.harvesting.models.HarvestableResource) geonode.harvesting.resourcedescriptor.RecordDescription[source]
- geonode.harvesting.harvesters.arcgis.get_resource_extractor(resource_unique_identifier: str) ArcgisServiceResourceExtractor | None[source]
A factory for instantiating the correct extractor for the resource
- class geonode.harvesting.harvesters.arcgis.ArcgisHarvesterWorker(remote_url: str, harvester_id: int, harvest_map_services: bool = True, harvest_image_services: bool = True, resource_name_filter: str | None = True, service_names_filter: List[str] | None = None)[source]
Bases:
geonode.harvesting.harvesters.base.BaseHarvesterWorkerBase class for harvesters.
This provides two relevant things:
An interface that all custom GeoNode harvesting classes must implement;
Default implementation for common functionality.
- _relevant_service_extractors: List[ArcgisMapServiceResourceExtractor | ArcgisImageServiceResourceExtractor] | None[source]
- property allows_copying_resources: bool[source]
Whether copying remote resources is implemented by this worker
- classmethod from_django_record(harvester: Harvester)[source]
Return a new instance of the worker from the django harvester
- classmethod get_extra_config_schema() Dict | None[source]
Return a jsonschema schema to be used to validate models.Harvester objects
- get_num_available_resources() int[source]
Return the number of available resources on the remote service.
If there is a problem retrieving the number of available resource, this method shall raise HarvestingException.
- list_resources(offset: int | None = 0) List[geonode.harvesting.harvesters.base.BriefRemoteResource][source]
Return a list of resources from the remote service.
If there is a problem listing resource, this method shall raise HarvestingException.
- check_availability(timeout_seconds: int | None = 5) bool[source]
Check whether the remote service is online
- get_geonode_resource_type(remote_resource_type: str) Type[source]
Return the GeoNode type that should be created from the remote resource type
- get_geonode_resource_defaults(harvested_info: geonode.harvesting.harvesters.base.HarvestedResourceInfo, harvestable_resource: geonode.harvesting.models.HarvestableResource) Dict[source]
Extract default values to be used by resource manager when updating a resource
- get_resource(harvestable_resource: geonode.harvesting.models.HarvestableResource) geonode.harvesting.harvesters.base.HarvestedResourceInfo | None[source]
Harvest a single resource from the remote service.
The return value is an instance of HarvestedResourceInfo. It stores an instance of RecordDescription and additionally whatever type is required by child classes to be able to customize resource creation/update on the local GeoNode. Note that the default implementation of update_geonode_resource() only needs the RecordDescription. The possibility to return additional information exists solely for extensibility purposes and can be left as None in the simple cases.
- _get_extractor_class(service_type: ArcgisServiceType) Type | None[source]
- _get_relevant_services() List[ArcgisMapServiceResourceExtractor | ArcgisImageServiceResourceExtractor][source]