00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include "dublincorevocab.h"
00024 #include "property.h"
00025
00026 #include <QtCore/QCoreApplication>
00027 #include <QtCore/QString>
00028
00029 namespace Syndication {
00030 namespace RDF {
00031
00032 class DublinCoreVocab::DublinCoreVocabPrivate
00033 {
00034 public:
00035
00036 QString namespaceURI;
00037 PropertyPtr contributor;
00038 PropertyPtr coverage;
00039 PropertyPtr creator;
00040 PropertyPtr date;
00041 PropertyPtr description;
00042 PropertyPtr format;
00043 PropertyPtr identifier;
00044 PropertyPtr language;
00045 PropertyPtr publisher;
00046 PropertyPtr relation;
00047 PropertyPtr rights;
00048 PropertyPtr source;
00049 PropertyPtr subject;
00050 PropertyPtr title;
00051 PropertyPtr type;
00052
00053 static DublinCoreVocab *sSelf;
00054 static void cleanupDublinCoreVocab()
00055 {
00056 delete sSelf;
00057 sSelf = 0;
00058 }
00059 };
00060 DublinCoreVocab *DublinCoreVocab::DublinCoreVocabPrivate::sSelf = 0;
00061
00062 DublinCoreVocab::DublinCoreVocab() : d(new DublinCoreVocabPrivate)
00063 {
00064 QString ns = QString::fromUtf8("http://purl.org/dc/elements/1.1/");
00065
00066 d->namespaceURI = ns;
00067
00068 d->contributor = PropertyPtr( new Property(ns + QString::fromUtf8("contributor")) );
00069 d->coverage = PropertyPtr( new Property(ns + QString::fromUtf8("coverage")) );
00070 d->creator = PropertyPtr( new Property(ns + QString::fromUtf8("creator")) );
00071 d->date = PropertyPtr( new Property(ns + QString::fromUtf8("date")) );
00072 d->description = PropertyPtr( new Property(ns + QString::fromUtf8("description")) );
00073 d->format = PropertyPtr( new Property(ns + QString::fromUtf8("format")) );
00074 d->identifier = PropertyPtr( new Property(ns + QString::fromUtf8("identifier")) );
00075 d->language = PropertyPtr( new Property(ns + QString::fromUtf8("language")) );
00076 d->publisher = PropertyPtr( new Property(ns + QString::fromUtf8("publisher")) );
00077 d->relation = PropertyPtr( new Property(ns + QString::fromUtf8("relation")) );
00078 d->rights = PropertyPtr( new Property(ns + QString::fromUtf8("rights")) );
00079 d->source = PropertyPtr( new Property(ns + QString::fromUtf8("source")) );
00080 d->subject = PropertyPtr( new Property(ns + QString::fromUtf8("subject")) );
00081 d->title = PropertyPtr( new Property(ns + QString::fromUtf8("title")) );
00082 d->type = PropertyPtr( new Property(ns + QString::fromUtf8("type")) );
00083
00084 }
00085
00086 DublinCoreVocab::~DublinCoreVocab()
00087 {
00088 delete d;
00089 }
00090
00091 DublinCoreVocab* DublinCoreVocab::self()
00092 {
00093 static DublinCoreVocabPrivate p;
00094 if(!p.sSelf) {
00095 p.sSelf = new DublinCoreVocab;
00096 qAddPostRoutine(DublinCoreVocabPrivate::cleanupDublinCoreVocab);
00097 }
00098 return p.sSelf;
00099 }
00100
00101 const QString& DublinCoreVocab::namespaceURI() const
00102 {
00103 return d->namespaceURI;
00104 }
00105
00106 PropertyPtr DublinCoreVocab::contributor() const
00107 {
00108 return d->contributor;
00109 }
00110
00111 PropertyPtr DublinCoreVocab::creator() const
00112 {
00113 return d->creator;
00114 }
00115
00116 PropertyPtr DublinCoreVocab::coverage() const
00117 {
00118 return d->coverage;
00119 }
00120
00121 PropertyPtr DublinCoreVocab::date() const
00122 {
00123 return d->date;
00124 }
00125
00126 PropertyPtr DublinCoreVocab::description() const
00127 {
00128 return d->description;
00129 }
00130
00131 PropertyPtr DublinCoreVocab::format() const
00132 {
00133 return d->format;
00134 }
00135
00136 PropertyPtr DublinCoreVocab::identifier() const
00137 {
00138 return d->identifier;
00139 }
00140
00141 PropertyPtr DublinCoreVocab::language() const
00142 {
00143 return d->language;
00144 }
00145
00146 PropertyPtr DublinCoreVocab::publisher() const
00147 {
00148 return d->publisher;
00149 }
00150
00151 PropertyPtr DublinCoreVocab::relation() const
00152 {
00153 return d->relation;
00154 }
00155
00156 PropertyPtr DublinCoreVocab::rights() const
00157 {
00158 return d->rights;
00159 }
00160
00161 PropertyPtr DublinCoreVocab::source() const
00162 {
00163 return d->source;
00164 }
00165
00166 PropertyPtr DublinCoreVocab::subject() const
00167 {
00168 return d->subject;
00169 }
00170
00171 PropertyPtr DublinCoreVocab::title() const
00172 {
00173 return d->title;
00174 }
00175
00176 PropertyPtr DublinCoreVocab::type() const
00177 {
00178 return d->type;
00179 }
00180
00181 }
00182 }