Class: QgsAbstractLayerMetadataProvider

class qgis.core.QgsAbstractLayerMetadataProvider

Bases: sip.wrapper

Layer metadata provider backend interface.

New in version 3.28:

Methods

id

Returns the id of the layer metadata provider implementation, usually the name of the data provider but it may be another unique identifier.

search

Searches for metadata optionally filtering by search string and geographic extent.

id(self) str

Returns the id of the layer metadata provider implementation, usually the name of the data provider but it may be another unique identifier.

Return type:

str

search(self, searchContext: QgsMetadataSearchContext, searchString: str = '', geographicExtent: QgsRectangle = QgsRectangle(), feedback: QgsFeedback = None) QgsLayerMetadataSearchResults

Searches for metadata optionally filtering by search string and geographic extent.

Parameters:
  • searchContext (QgsMetadataSearchContext) – context for the metadata search.

  • searchString (str = '') – defines a filter to limit the results to the records where the search string appears in the “identifier”, “title” or “abstract” metadata fields, a case-insensitive comparison is used for the match.

  • geographicExtent (QgsRectangle = QgsRectangle()) – defines a filter where the spatial extent matches the given extent in EPSG:4326

  • feedback (QgsFeedback = None) – can be used to monitor and control the search process.

Return type:

QgsLayerMetadataSearchResults

Returns:

a QgsLayerMetadataSearchResult object with a list of metadata and errors