~ubuntu-branches/ubuntu/raring/kde-runtime/raring

« back to all changes in this revision

Viewing changes to nepomuk/kioslaves/tags/kio_tags.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-12-07 17:43:09 UTC
  • mfrom: (1.1.19)
  • Revision ID: package-import@ubuntu.com-20121207174309-21o5e6dsbo9judu8
Tags: 4:4.9.90-0ubuntu1
* New upstream beta release
* Update .install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
 
141
141
void TagsProtocol::listDir(const KUrl& url)
142
142
{
 
143
    kDebug() << url;
 
144
 
143
145
    QList<Tag> tags;
144
146
    QUrl fileUrl;
145
147
 
149
151
            return;
150
152
 
151
153
        case RootUrl: {
 
154
            kDebug() << "Root Url";
152
155
            QLatin1String query("select distinct ?r ?ident where { ?r a nao:Tag ; nao:identifier ?ident .}");
153
156
            Soprano::Model* model = ResourceManager::instance()->mainModel();
154
157
            Soprano::QueryResultIterator it = model->executeQuery( query, Soprano::Query::QueryLanguageSparqlNoInference );
169
172
 
170
173
        case TagUrl: {
171
174
            // Get the N3
 
175
            kDebug() << "Tag URL: " << tags;
172
176
            QStringList tagN3;
173
177
            QSet<QUrl> tagUris;
174
178
            foreach(const Tag& tag, tags) {
202
206
                    if( job->exec() ) {
203
207
                        uds = job->statResult();
204
208
                    }
 
209
                    else {
 
210
                        continue;
 
211
                    }
205
212
                }
206
213
 
207
214
                uds.insert( KIO::UDSEntry::UDS_NAME, encodeFileUrl(fileUrl) );
244
251
        }
245
252
 
246
253
        case FileUrl:
 
254
            kDebug() << "File URL : " << fileUrl;
247
255
            ForwardingSlaveBase::listDir( fileUrl );
248
256
            return;
249
257
    }
251
259
 
252
260
void TagsProtocol::stat(const KUrl& url)
253
261
{
 
262
    kDebug() << url;
 
263
 
254
264
    QList<Tag> tags;
255
265
    QUrl fileUrl;
256
266
 
311
321
 
312
322
void TagsProtocol::mkdir(const KUrl& url, int permissions)
313
323
{
 
324
    kDebug() << url;
 
325
 
314
326
    Q_UNUSED( permissions );
315
327
 
316
328
    QList<Tag> tags;
345
357
 
346
358
void TagsProtocol::copy(const KUrl& src, const KUrl& dest, int permissions, KIO::JobFlags flags)
347
359
{
 
360
    kDebug() << src << dest;
 
361
 
348
362
    if( src.scheme() == QLatin1String("file") ) {
349
363
        QList<Tag> tags;
350
364
        QUrl fileUrl;
394
408
 
395
409
void TagsProtocol::get(const KUrl& url)
396
410
{
 
411
    kDebug() << url;
 
412
 
397
413
    QList<Tag> tags;
398
414
    QUrl fileUrl;
399
415
 
426
442
 
427
443
void TagsProtocol::rename(const KUrl& src, const KUrl& dest, KIO::JobFlags flags)
428
444
{
 
445
    kDebug() << src << dest;
 
446
    if( src.isLocalFile() ) {
 
447
        error( KIO::ERR_CANNOT_DELETE_ORIGINAL, src.prettyUrl() );
 
448
        return;
 
449
    }
 
450
 
429
451
    QList<Tag> srcTags;
430
452
    QUrl fileUrl;
431
453
 
500
522
 
501
523
void Nepomuk2::TagsProtocol::mimetype(const KUrl& url)
502
524
{
 
525
    kDebug() << url;
 
526
 
503
527
    QList<Tag> tags;
504
528
    QUrl fileUrl;
505
529