2
Copyright (C) 2007-2009 Sebastian Trueg <trueg@kde.org>
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU General Public License as
6
published by the Free Software Foundation; either version 2 of
7
the License, or (at your option) any later version.
9
This library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
Library General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this library; see the file COPYING. If not, write to
16
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17
Boston, MA 02110-1301, USA.
20
#ifndef _STRIGI_NEPOMUK_INDEX_WRITER_H_
21
#define _STRIGI_NEPOMUK_INDEX_WRITER_H_
23
#include <strigi/indexwriter.h>
24
#include <strigi/analysisresult.h>
25
#include <strigi/analyzerconfiguration.h>
35
class NepomukIndexWriter : public Strigi::IndexWriter
38
NepomukIndexWriter( Soprano::Model* );
39
~NepomukIndexWriter();
44
* Delete the entries with the given paths from the index.
46
* @param entries the paths of the files that should be deleted
48
void deleteEntries( const std::vector<std::string>& entries );
51
* Delete all indexed documents from the index.
53
void deleteAllEntries();
55
void initWriterData( const Strigi::FieldRegister& );
56
void releaseWriterData( const Strigi::FieldRegister& );
58
void startAnalysis( const AnalysisResult* );
59
void addText( const AnalysisResult*, const char* text, int32_t length );
60
void addValue( const AnalysisResult*, const RegisteredField* field,
61
const std::string& value );
62
void addValue( const AnalysisResult*, const RegisteredField* field,
63
const unsigned char* data, uint32_t size );
64
void addValue( const AnalysisResult*, const RegisteredField* field,
66
void addValue( const AnalysisResult*, const RegisteredField* field,
68
void addValue( const AnalysisResult*, const RegisteredField* field,
70
void addTriplet( const std::string& subject,
71
const std::string& predicate, const std::string& object );
72
void addValue( const AnalysisResult*, const RegisteredField* field,
73
const std::string& name, const std::string& value );
74
void finishAnalysis( const AnalysisResult* );
78
* \param uri The resource URI. Can be empty if \p url is not.
79
* \param url The file URL. Can be empty if \p uri is not.
81
void removeIndexedData( const KUrl& uri, const KUrl& url );
83
QUrl determineFolderResourceUri( const KUrl& fileUrl );
90
uint qHash( const std::string& s );