colrev.package_manager.package_base_classes.SearchSourcePackageBaseClass¶
- class SearchSourcePackageBaseClass(*, source_operation, settings=None)[source]¶
Bases:
ABC
The base class for SearchSource packages
The following cli commands call specific methods of a SearchSource package:
colrev search --add package_name
-> callspackage.add_endpoint()
colrev search
-> callssearch
operation -> callspackage.search()
colrev load
-> callsload
operation -> callspackage.load()
colrev prep
-> callsprep
operation -> callspackage.prep()
Methods
Add the SearchSource as an endpoint.
Ensure that the SearchSource is append-only.
Heuristic to identify which SearchSource a search file belongs to.
Load records from the SearchSource.
Retrieve masterdata from the SearchSource.
Run the custom source-prep operation.
Run a search of the SearchSource.
Attributes
ci_supported
settings_class
source_identifier
search_types
heuristic_status
search_source
- abstract classmethod add_endpoint(operation, params)[source]¶
Add the SearchSource as an endpoint.
- Return type:
- classmethod ensure_append_only(filename)[source]¶
Ensure that the SearchSource is append-only.
- Return type:
bool
- abstract classmethod heuristic(filename, data)[source]¶
Heuristic to identify which SearchSource a search file belongs to.
- Return type:
dict
- abstract classmethod load(*, filename, logger)[source]¶
Load records from the SearchSource.
- Return type:
dict