File indexing completed on 2024-04-21 04:01:03

0001 /*
0002     This file is part of the syndication library
0003     SPDX-FileCopyrightText: 2006 Frank Osterfeld <osterfeld@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #ifndef SYNDICATION_RDF_RDFVOCAB_H
0009 #define SYNDICATION_RDF_RDFVOCAB_H
0010 
0011 #include <QSharedPointer>
0012 
0013 #include "../syndication_export.h"
0014 
0015 #include <memory>
0016 
0017 class QString;
0018 
0019 namespace Syndication
0020 {
0021 namespace RDF
0022 {
0023 class Property;
0024 typedef QSharedPointer<Property> PropertyPtr;
0025 class Resource;
0026 typedef QSharedPointer<Resource> ResourcePtr;
0027 
0028 /**
0029  * singleton holding RDF vocabulary, expressed as RDF.
0030  */
0031 class RDFVocab
0032 {
0033 public:
0034     /**
0035      * returns the singleton instance
0036      */
0037     static RDFVocab *self();
0038 
0039     /**
0040      * destructor
0041      */
0042     ~RDFVocab();
0043 
0044     /**
0045      * the RDF namespace, which is
0046      * http://www.w3.org/1999/02/22-rdf-syntax-ns#
0047      */
0048     QString namespaceURI();
0049 
0050     /**
0051      * the sequence type
0052      */
0053     ResourcePtr seq();
0054 
0055     /**
0056      * the rdf:type property (A rdf:type B means A is instance of B)
0057      */
0058     PropertyPtr type();
0059 
0060     /**
0061      * the rdf:li property, used for list items in RDF containers (like
0062      * rdf:seq)
0063      */
0064     PropertyPtr li();
0065 
0066 private:
0067     RDFVocab();
0068     Q_DISABLE_COPY(RDFVocab)
0069     class RDFVocabPrivate;
0070     std::unique_ptr<RDFVocabPrivate> const d;
0071 };
0072 
0073 } // namespace RDF
0074 } // namespace Syndication
0075 
0076 #endif // SYNDICATION_RDF_RDFVOCAB_H