Class: QgsAbstractMetadataBaseValidator

class qgis.core.QgsAbstractMetadataBaseValidator

Bases: sip.wrapper

Abstract base class for metadata validators.

Methods

validate

Validates a metadata object, and returns True if the metadata is considered valid.

class ValidationResult(section: str, note: str, identifier: Any = None)

Bases: sip.wrapper

Constructor for ValidationResult.

QgsAbstractMetadataBaseValidator.ValidationResult(QgsAbstractMetadataBaseValidator.ValidationResult)

Parameters
  • section (str) –

  • note (str) –

  • identifier (Any = None) –

identifier
note
section
validate(self, metadata: QgsAbstractMetadataBase) → Tuple[bool, List[QgsAbstractMetadataBaseValidator.ValidationResult]]

Validates a metadata object, and returns True if the metadata is considered valid. If validation fails, the results list will be filled with a list of items describing why the validation failed and what needs to be rectified to fix the metadata.

Parameters

metadata (QgsAbstractMetadataBase) –

Return type

Tuple[bool, List[QgsAbstractMetadataBaseValidator.ValidationResult]]