00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
#ifndef XAPIAN_INCLUDED_DOCUMENT_H
00027
#define XAPIAN_INCLUDED_DOCUMENT_H
00028
00029
#include <string>
00030
00031
#include <xapian/base.h>
00032
#include <xapian/types.h>
00033
00034
namespace Xapian {
00035
00036
class TermIterator;
00037
class ValueIterator;
00038
00040 class Document {
00041
public:
00042
class Internal;
00044 Xapian::Internal::RefCntPtr<Internal> internal;
00045
00050
explicit Document(Internal *internal_);
00051
00055
Document(
const Document &other);
00056
00060
void operator=(
const Document &other);
00061
00063
Document();
00064
00066
~Document();
00067
00069 std::string
get_value(Xapian::valueno value)
const;
00070
00074
void add_value(Xapian::valueno
valueno,
const std::string &value);
00075
00077
void remove_value(Xapian::valueno
valueno);
00078
00080
void clear_values();
00081
00087 std::string
get_data() const;
00088
00090
void set_data(const std::string &data);
00091
00106
void add_posting(const std::string & tname,
00107 Xapian::
termpos tpos,
00108 Xapian::
termcount wdfinc = 1);
00109
00119
void add_term(const std::string & tname, Xapian::
termcount wdfinc = 1);
00120
00126 void add_term_nopos(const std::string & term,
00127 Xapian::
termcount wdfinc = 1) {
00128
add_term(term, wdfinc);
00129 }
00130
00150
void remove_posting(
const std::string & tname,
00151 Xapian::termpos tpos,
00152 Xapian::termcount wdfdec = 1);
00153
00161
void remove_term(
const std::string & tname);
00162
00164
void clear_terms();
00165
00167 Xapian::termcount
termlist_count() const;
00168
00170
TermIterator termlist_begin() const;
00171
00173
TermIterator termlist_end() const;
00174
00176 Xapian::
termcount values_count() const;
00177
00179
ValueIterator values_begin() const;
00180
00182
ValueIterator values_end() const;
00183
00188 std::string get_description() const;
00189 };
00190
00191 }
00192
00193 #endif