• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Nepomuk-Core

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk-core
  • services
  • fileindexer
  • indexer
indexer.h
Go to the documentation of this file.
1 /*
2  This file is part of the Nepomuk KDE project.
3  Copyright (C) 2010 Sebastian Trueg <trueg@kde.org>
4  Copyright (C) 2011 Vishesh Handa <handa.vish@gmail.com>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) version 3, or any
10  later version accepted by the membership of KDE e.V. (or its
11  successor approved by the membership of KDE e.V.), which shall
12  act as a proxy defined in Section 6 of version 3 of the license.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #ifndef _NEPOMUK_STRIG_INDEXER_H_
24 #define _NEPOMUK_STRIG_INDEXER_H_
25 
26 #include <QtCore/QObject>
27 #include <QtCore/QStringList>
28 #include <KUrl>
29 
30 namespace Nepomuk2 {
31 
32  class Resource;
33  class ExtractorPluginManager;
34  class SimpleResourceGraph;
35 
36  class Indexer : public QObject
37  {
38  Q_OBJECT
39 
40  public:
44  Indexer( QObject* parent = 0 );
45 
49  ~Indexer();
50 
58  bool indexFile( const KUrl& url );
59 
65  Nepomuk2::SimpleResourceGraph indexFileGraph( const QUrl& url );
66 
67  QString lastError() const;
68 
69  private:
70  QString m_lastError;
71  ExtractorPluginManager* m_extractorManager;
72 
73  void updateIndexingLevel( const QUrl& uri, int level );
74 
79  void setNiePlainTextContent( const QUrl& uri, QString& plainText );
80 
81  bool clearIndexingData( const QUrl& url );
82  bool simpleIndex( const QUrl& url, QUrl* uri, QString* mimetype );
83  bool fileIndex( const QUrl& uri, const QUrl& url, const QString& mimeType );
84  };
85 }
86 
87 #endif
QObject
Nepomuk2::SimpleResourceGraph
Definition: simpleresourcegraph.h:48
Nepomuk2::Indexer
The one entry point to indexing files.
Definition: indexer.h:36
Nepomuk2::Indexer::Indexer
Indexer(QObject *parent=0)
Create a new indexer.
Definition: indexer.cpp:56
Nepomuk2::Indexer::lastError
QString lastError() const
Definition: indexer.cpp:216
Nepomuk2::Indexer::indexFileGraph
Nepomuk2::SimpleResourceGraph indexFileGraph(const QUrl &url)
Extracts the SimpleResourceGraph of the local file or folder and returns it.
Definition: indexer.cpp:195
Nepomuk2::Indexer::indexFile
bool indexFile(const KUrl &url)
Index a single local file or folder (files in a folder will not be indexed recursively).
Definition: indexer.cpp:67
Nepomuk2::Indexer::~Indexer
~Indexer()
Destructor.
Definition: indexer.cpp:62
Nepomuk2::ExtractorPluginManager
Definition: extractorpluginmanager.h:30
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk-Core

Skip menu "Nepomuk-Core"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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