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
00046
public:
00051
explicit Document(Internal *internal_);
00052
00056
Document(
const Document &other);
00057
00061
void operator=(
const Document &other);
00062
00064
Document();
00065
00067
~Document();
00068
00070 std::string
get_value(Xapian::valueno value)
const;
00071
00075
void add_value(Xapian::valueno
valueno,
const std::string &value);
00076
00078
void remove_value(Xapian::valueno
valueno);
00079
00081
void clear_values();
00082
00088 std::string
get_data() const;
00089
00091
void set_data(const std::string &data);
00092
00107
void add_posting(const std::string & tname,
00108 Xapian::
termpos tpos,
00109 Xapian::
termcount wdfinc = 1);
00110
00121
void add_term(const std::string & tname, Xapian::
termcount wdfinc = 1);
00122
00127 void add_term_nopos(const std::string & term,
00128 Xapian::
termcount wdfinc = 1) {
00129
add_term(term, wdfinc);
00130 }
00131
00151
void remove_posting(
const std::string & tname,
00152 Xapian::termpos tpos,
00153 Xapian::termcount wdfdec = 1);
00154
00162
void remove_term(
const std::string & tname);
00163
00165
void clear_terms();
00166
00168 Xapian::termcount
termlist_count() const;
00169
00171
TermIterator termlist_begin() const;
00172
00174
TermIterator termlist_end() const;
00175
00177 Xapian::
termcount values_count() const;
00178
00180
ValueIterator values_begin() const;
00181
00183
ValueIterator values_end() const;
00184
00189 std::string get_description() const;
00190 };
00191
00192 }
00193
00194 #endif