• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.8.3 API Reference
  • KDE Home
  • Contact Us
 

syndication/rdf

dublincorevocab.cpp
00001 /*
00002  * This file is part of the syndication library
00003  *
00004  * Copyright (C) 2006 Frank Osterfeld <osterfeld@kde.org>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public License
00017  * along with this library; see the file COPYING.LIB.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
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 = QLatin1String("http://purl.org/dc/elements/1.1/");
00065     
00066     d->namespaceURI = ns;
00067     
00068     d->contributor = PropertyPtr( new Property(ns + QLatin1String("contributor")) );
00069     d->coverage = PropertyPtr( new Property(ns + QLatin1String("coverage")) );
00070     d->creator = PropertyPtr( new Property(ns + QLatin1String("creator")) );
00071     d->date = PropertyPtr( new Property(ns + QLatin1String("date")) );
00072     d->description = PropertyPtr( new Property(ns + QLatin1String("description")) );
00073     d->format = PropertyPtr( new Property(ns + QLatin1String("format")) );
00074     d->identifier = PropertyPtr( new Property(ns + QLatin1String("identifier")) );
00075     d->language = PropertyPtr( new Property(ns + QLatin1String("language")) );
00076     d->publisher = PropertyPtr( new Property(ns + QLatin1String("publisher")) );
00077     d->relation = PropertyPtr( new Property(ns + QLatin1String("relation")) );
00078     d->rights = PropertyPtr( new Property(ns + QLatin1String("rights")) );
00079     d->source = PropertyPtr( new Property(ns + QLatin1String("source")) );
00080     d->subject = PropertyPtr( new Property(ns + QLatin1String("subject")) );
00081     d->title = PropertyPtr( new Property(ns + QLatin1String("title")) );
00082     d->type = PropertyPtr( new Property(ns + QLatin1String("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 } // namespace RDF
00182 } // namespace Syndication
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 22:17:52 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

syndication/rdf

Skip menu "syndication/rdf"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List

kdepimlibs-4.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal