File indexing completed on 2024-05-12 15:59:16

0001 /*
0002  *  SPDX-FileCopyrightText: 2007 Cyrille Berger <cberger@cberger.net>
0003  *
0004  *  SPDX-License-Identifier: LGPL-2.1-or-later
0005  */
0006 
0007 #ifndef _KIS_META_DATA_SCHEMA_H_
0008 #define _KIS_META_DATA_SCHEMA_H_
0009 
0010 #include <kritametadata_export.h>
0011 #include <kis_debug.h>
0012 
0013 class QString;
0014 
0015 namespace KisMetaData
0016 {
0017 
0018 class SchemaRegistry;
0019 class TypeInfo;
0020 
0021 class KRITAMETADATA_EXPORT Schema
0022 {
0023     friend class SchemaRegistry;
0024 
0025 public:
0026 
0027     virtual ~Schema();
0028 
0029     static const QString TIFFSchemaUri;
0030     static const QString EXIFSchemaUri;
0031     static const QString DublinCoreSchemaUri;
0032     static const QString XMPSchemaUri;
0033     static const QString XMPRightsSchemaUri;
0034     static const QString XMPMediaManagementUri;
0035     static const QString MakerNoteSchemaUri;
0036     static const QString IPTCSchemaUri;
0037     static const QString PhotoshopSchemaUri;
0038 private:
0039     Schema();
0040     Schema(const QString & _uri, const QString & _ns);
0041 public:
0042     /**
0043      * @return the \ref TypeInfo associated with a given a property ( @p _propertyName ).
0044      */
0045     const TypeInfo* propertyType(const QString& _propertyName) const;
0046     /**
0047      * @return the \ref TypeInfo describing a given structure of that scheam
0048      */
0049     const TypeInfo* structure(const QString& _structureName) const;
0050 public:
0051     QString uri() const;
0052     QString prefix() const;
0053     QString generateQualifiedName(const QString &) const;
0054 private:
0055     struct Private;
0056     Private* const d;
0057 };
0058 
0059 }
0060 
0061 KRITAMETADATA_EXPORT QDebug operator<<(QDebug debug, const KisMetaData::Schema &c);
0062 
0063 #endif