1
1
/************************************************************************
2
2
* This file has been generated automatically from *
3
3
* *
4
- * src/core/metadata/qgsmetadatabase.h *
4
+ * src/core/metadata/qgsabstractmetadatabase.h *
5
5
* *
6
6
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7
7
************************************************************************/
10
10
11
11
12
12
13
- class QgsMetadataBase
13
+ class QgsAbstractMetadataBase
14
14
{
15
15
%Docstring
16
- A base class for metadata stores.
16
+ An abstract base class for metadata stores.
17
17
18
- QgsMetadataBase is the base class for handling storage and management of the metadata
18
+ QgsAbstractMetadataBase is the base class for handling storage and management of the metadata
19
19
for various map related assets. This class is an internal QGIS format with a common
20
20
metadata structure. It is subclassed by layer and project specific metadata classes,
21
- QgsLayerMetadata and QgsProjectMetadata.
21
+ such as QgsLayerMetadata and QgsProjectMetadata.
22
22
23
23
The metadata store is designed to be compatible with the Dublin Core metadata
24
24
specifications, and will be expanded to allow compatibility with ISO specifications
25
25
in future releases. However, the QGIS internal schema does not represent a superset
26
26
of all existing metadata schemas and accordingly conversion from specific
27
- metadata formats to QgsMetadataBase may result in a loss of information.
27
+ metadata formats to QgsAbstractMetadataBase may result in a loss of information.
28
28
29
29
This class is designed to follow the specifications detailed in
30
30
the schema definition available at resources/qgis-resource-metadata.xsd
31
31
within the QGIS source code.
32
32
33
- Metadata can be validated through the use of QgsMetadataBaseValidator
33
+ Metadata can be validated through the use of QgsAbstractMetadataBaseValidator
34
34
subclasses. E.g. validating against the native QGIS metadata schema can be performed
35
35
using QgsNativeMetadataValidator.
36
36
37
37
.. versionadded:: 3.2
38
38
%End
39
39
40
40
%TypeHeaderCode
41
- #include "qgsmetadatabase .h"
41
+ #include "qgsabstractmetadatabase .h"
42
42
%End
43
43
public:
44
44
45
+
45
46
typedef QMap< QString, QStringList > KeywordMap;
46
47
47
48
struct Address
@@ -64,7 +65,7 @@ Constructor for Address.
64
65
65
66
QString country;
66
67
67
- bool operator==( const QgsMetadataBase ::Address &other ) const;
68
+ bool operator==( const QgsAbstractMetadataBase ::Address &other ) const;
68
69
};
69
70
70
71
struct Contact
@@ -81,7 +82,7 @@ Constructor for Contact.
81
82
82
83
QString position;
83
84
84
- QList< QgsMetadataBase ::Address > addresses;
85
+ QList< QgsAbstractMetadataBase ::Address > addresses;
85
86
86
87
QString voice;
87
88
@@ -91,10 +92,10 @@ Constructor for Contact.
91
92
92
93
QString role;
93
94
94
- bool operator==( const QgsMetadataBase ::Contact &other ) const;
95
+ bool operator==( const QgsAbstractMetadataBase ::Contact &other ) const;
95
96
};
96
97
97
- typedef QList< QgsMetadataBase ::Contact > ContactList;
98
+ typedef QList< QgsAbstractMetadataBase ::Contact > ContactList;
98
99
99
100
100
101
struct Link
@@ -119,17 +120,12 @@ Constructor for Link.
119
120
120
121
QString size;
121
122
122
- bool operator==( const QgsMetadataBase ::Link &other ) const;
123
+ bool operator==( const QgsAbstractMetadataBase ::Link &other ) const;
123
124
};
124
125
125
- typedef QList< QgsMetadataBase ::Link > LinkList;
126
+ typedef QList< QgsAbstractMetadataBase ::Link > LinkList;
126
127
127
- QgsMetadataBase();
128
- %Docstring
129
- Constructor for QgsMetadataBase.
130
- %End
131
-
132
- virtual ~QgsMetadataBase();
128
+ virtual ~QgsAbstractMetadataBase();
133
129
134
130
QString identifier() const;
135
131
%Docstring
@@ -250,7 +246,7 @@ Adds a single history ``text`` to the end of the existing history list.
250
246
.. seealso:: :py:func:`setHistory`
251
247
%End
252
248
253
- KeywordMap keywords() const;
249
+ QgsAbstractMetadataBase:: KeywordMap keywords() const;
254
250
%Docstring
255
251
Returns the keywords map, which is a set of descriptive keywords associated with the resource.
256
252
@@ -264,7 +260,7 @@ associated with keyword list.
264
260
.. seealso:: :py:func:`keywordVocabularies`
265
261
%End
266
262
267
- void setKeywords( const KeywordMap &keywords );
263
+ void setKeywords( const QgsAbstractMetadataBase:: KeywordMap &keywords );
268
264
%Docstring
269
265
Sets the ``keywords`` map, which is a set of descriptive keywords associated with the resource.
270
266
@@ -338,14 +334,14 @@ Categories are stored using a special vocabulary 'gmd:topicCategory' in keywords
338
334
.. seealso:: :py:func:`keywords`
339
335
%End
340
336
341
- QgsMetadataBase ::ContactList contacts() const;
337
+ QgsAbstractMetadataBase ::ContactList contacts() const;
342
338
%Docstring
343
339
Returns a list of contact persons or entities associated with the resource.
344
340
345
341
.. seealso:: :py:func:`setContacts`
346
342
%End
347
343
348
- void setContacts( const QgsMetadataBase ::ContactList &contacts );
344
+ void setContacts( const QgsAbstractMetadataBase ::ContactList &contacts );
349
345
%Docstring
350
346
Sets the list of ``contacts`` or entities associated with the resource. Any existing contacts
351
347
will be replaced.
@@ -355,7 +351,7 @@ will be replaced.
355
351
.. seealso:: :py:func:`addContact`
356
352
%End
357
353
358
- void addContact( const QgsMetadataBase ::Contact &contact );
354
+ void addContact( const QgsAbstractMetadataBase ::Contact &contact );
359
355
%Docstring
360
356
Adds an individual ``contact`` to the existing contacts.
361
357
@@ -364,14 +360,14 @@ Adds an individual ``contact`` to the existing contacts.
364
360
.. seealso:: :py:func:`setContacts`
365
361
%End
366
362
367
- QgsMetadataBase ::LinkList links() const;
363
+ QgsAbstractMetadataBase ::LinkList links() const;
368
364
%Docstring
369
365
Returns a list of online resources associated with the resource.
370
366
371
367
.. seealso:: :py:func:`setLinks`
372
368
%End
373
369
374
- void setLinks( const QgsMetadataBase ::LinkList &links );
370
+ void setLinks( const QgsAbstractMetadataBase ::LinkList &links );
375
371
%Docstring
376
372
Sets the list of online resources associated with the resource. Any existing links
377
373
will be replaced.
@@ -381,7 +377,7 @@ will be replaced.
381
377
.. seealso:: :py:func:`addLink`
382
378
%End
383
379
384
- void addLink( const QgsMetadataBase ::Link &link );
380
+ void addLink( const QgsAbstractMetadataBase ::Link &link );
385
381
%Docstring
386
382
Adds an individual ``link`` to the existing links.
387
383
@@ -390,43 +386,65 @@ Adds an individual ``link`` to the existing links.
390
386
.. seealso:: :py:func:`setLinks`
391
387
%End
392
388
393
- bool readMetadataXml( const QDomElement &metadataElement );
389
+ virtual bool readMetadataXml( const QDomElement &metadataElement );
394
390
%Docstring
395
- Sets state from Dom document
391
+ Sets state from DOM document.
396
392
397
- :param metadataElement: The Dom element corresponding to ``resourceMetadata'' tag
393
+ :param metadataElement: The DOM element corresponding to ``resourceMetadata'' tag
398
394
399
395
:return: true if successful
396
+
397
+ Subclasses which override this method should take care to also call the base
398
+ class method in order to read common metadata properties.
400
399
%End
401
400
402
- bool writeMetadataXml( QDomElement &metadataElement, QDomDocument &document ) const;
401
+ virtual bool writeMetadataXml( QDomElement &metadataElement, QDomDocument &document ) const;
403
402
%Docstring
404
- Stores state in Dom node
403
+ Stores state in a DOM node.
405
404
406
- :param metadataElement: is a Dom element corresponding to ``resourceMetadata'' tag
407
- :param document: is a the dom document being written
405
+ :param metadataElement: is a DOM element corresponding to ``resourceMetadata'' tag
406
+ :param document: is a the DOM document being written
408
407
409
408
:return: true if successful
410
- %End
411
409
412
- bool operator==( const QgsMetadataBase &metadataOther ) const;
410
+ Subclasses which override this method should take care to also call the base
411
+ class method in order to write common metadata properties.
412
+ %End
413
413
414
414
protected:
415
415
416
+ QgsAbstractMetadataBase();
417
+ %Docstring
418
+ Constructor for QgsAbstractMetadataBase.
419
+
420
+ QgsAbstractMetadataBase cannot be instantiated directly, it must be subclassed.
421
+ %End
422
+
423
+
416
424
417
425
418
426
419
427
420
428
421
429
422
430
431
+ bool equals( const QgsAbstractMetadataBase &other ) const;
432
+ %Docstring
433
+ Tests whether the common metadata fields in this object are equal to ``other``.
434
+
435
+ Subclasses should utilise this method from their equality operators to test
436
+ equality of base class members.
437
+
438
+ .. versionadded:: 3.2
439
+ %End
440
+
423
441
};
424
442
425
443
426
444
/************************************************************************
427
445
* This file has been generated automatically from *
428
446
* *
429
- * src/core/metadata/qgsmetadatabase.h *
447
+ * src/core/metadata/qgsabstractmetadatabase.h *
430
448
* *
431
449
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
432
450
************************************************************************/
0 commit comments