2
Copyright (C) 2007-2010 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 StrigiIndexWriter : public Strigi::IndexWriter
38
StrigiIndexWriter( IndexFeeder* );
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 Strigi::AnalysisResult* );
59
void addText( const Strigi::AnalysisResult*, const char* text, int32_t length );
60
void addValue( const Strigi::AnalysisResult*, const Strigi::RegisteredField* field,
61
const std::string& value );
62
void addValue( const Strigi::AnalysisResult*, const Strigi::RegisteredField* field,
63
const unsigned char* data, uint32_t size );
64
void addValue( const Strigi::AnalysisResult*, const Strigi::RegisteredField* field,
66
void addValue( const Strigi::AnalysisResult*, const Strigi::RegisteredField* field,
68
void addValue( const Strigi::AnalysisResult*, const Strigi::RegisteredField* field,
70
void addTriplet( const std::string& subject,
71
const std::string& predicate, const std::string& object );
72
void addValue( const Strigi::AnalysisResult*, const Strigi::RegisteredField* field,
73
const std::string& name, const std::string& value );
74
void finishAnalysis( const Strigi::AnalysisResult* );
77
QUrl determineFolderResourceUri( const KUrl& fileUrl );
84
uint qHash( const std::string& s );