1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
|
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.3.0
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package org.xapian;
public class MSet {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected MSet(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(MSet obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected static long swigRelease(MSet obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}
@SuppressWarnings({"deprecation", "removal"})
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
XapianJNI.delete_MSet(swigCPtr);
}
swigCPtr = 0;
}
}
public MSet() {
this(XapianJNI.new_MSet(), true);
}
public int convertToPercent(double weight) {
return XapianJNI.MSet_convertToPercent__SWIG_0(swigCPtr, this, weight);
}
public int convertToPercent(MSetIterator it) {
return XapianJNI.MSet_convertToPercent__SWIG_1(swigCPtr, this, MSetIterator.getCPtr(it), it);
}
public long getTermFreq(String term) {
return XapianJNI.MSet_getTermFreq(swigCPtr, this, term);
}
public double getTermWeight(String term) {
return XapianJNI.MSet_getTermWeight(swigCPtr, this, term);
}
public long getFirstItem() {
return XapianJNI.MSet_getFirstItem(swigCPtr, this);
}
public long getMatchesLowerBound() {
return XapianJNI.MSet_getMatchesLowerBound(swigCPtr, this);
}
public long getMatchesEstimated() {
return XapianJNI.MSet_getMatchesEstimated(swigCPtr, this);
}
public long getMatchesUpperBound() {
return XapianJNI.MSet_getMatchesUpperBound(swigCPtr, this);
}
public long getUncollapsedMatchesLowerBound() {
return XapianJNI.MSet_getUncollapsedMatchesLowerBound(swigCPtr, this);
}
public long getUncollapsedMatchesEstimated() {
return XapianJNI.MSet_getUncollapsedMatchesEstimated(swigCPtr, this);
}
public long getUncollapsedMatchesUpperBound() {
return XapianJNI.MSet_getUncollapsedMatchesUpperBound(swigCPtr, this);
}
public double getMaxAttained() {
return XapianJNI.MSet_getMaxAttained(swigCPtr, this);
}
public double getMaxPossible() {
return XapianJNI.MSet_getMaxPossible(swigCPtr, this);
}
public String snippet(String text, long length, Stem stemmer, long flags, String hi_start, String hi_end, String omit) {
return XapianJNI.MSet_snippet__SWIG_0(swigCPtr, this, text, length, Stem.getCPtr(stemmer), stemmer, flags, hi_start, hi_end, omit);
}
public String snippet(String text, long length, Stem stemmer, long flags, String hi_start, String hi_end) {
return XapianJNI.MSet_snippet__SWIG_1(swigCPtr, this, text, length, Stem.getCPtr(stemmer), stemmer, flags, hi_start, hi_end);
}
public String snippet(String text, long length, Stem stemmer, long flags, String hi_start) {
return XapianJNI.MSet_snippet__SWIG_2(swigCPtr, this, text, length, Stem.getCPtr(stemmer), stemmer, flags, hi_start);
}
public String snippet(String text, long length, Stem stemmer, long flags) {
return XapianJNI.MSet_snippet__SWIG_3(swigCPtr, this, text, length, Stem.getCPtr(stemmer), stemmer, flags);
}
public String snippet(String text, long length, Stem stemmer) {
return XapianJNI.MSet_snippet__SWIG_4(swigCPtr, this, text, length, Stem.getCPtr(stemmer), stemmer);
}
public String snippet(String text, long length) {
return XapianJNI.MSet_snippet__SWIG_5(swigCPtr, this, text, length);
}
public String snippet(String text) {
return XapianJNI.MSet_snippet__SWIG_6(swigCPtr, this, text);
}
public void fetch(MSetIterator begin, MSetIterator end) {
XapianJNI.MSet_fetch__SWIG_0(swigCPtr, this, MSetIterator.getCPtr(begin), begin, MSetIterator.getCPtr(end), end);
}
public void fetch(MSetIterator item) {
XapianJNI.MSet_fetch__SWIG_1(swigCPtr, this, MSetIterator.getCPtr(item), item);
}
public void fetch() {
XapianJNI.MSet_fetch__SWIG_2(swigCPtr, this);
}
public long size() {
return XapianJNI.MSet_size(swigCPtr, this);
}
public boolean empty() {
return XapianJNI.MSet_empty(swigCPtr, this);
}
public MSetIterator begin() {
return new MSetIterator(XapianJNI.MSet_begin(swigCPtr, this), true);
}
public MSetIterator end() {
return new MSetIterator(XapianJNI.MSet_end(swigCPtr, this), true);
}
public MSetIterator getElement(long i) {
return new MSetIterator(XapianJNI.MSet_getElement(swigCPtr, this, i), true);
}
public MSetIterator back() {
return new MSetIterator(XapianJNI.MSet_back(swigCPtr, this), true);
}
public String toString() {
return XapianJNI.MSet_toString(swigCPtr, this);
}
public long getDocId(long i) {
return XapianJNI.MSet_getDocId(swigCPtr, this, i);
}
public Document getDocument(long i) {
return new Document(XapianJNI.MSet_getDocument(swigCPtr, this, i), true);
}
public MSetIterator getHit(long i) {
return new MSetIterator(XapianJNI.MSet_getHit(swigCPtr, this, i), true);
}
public int getDocumentPercentage(long i) {
return XapianJNI.MSet_getDocumentPercentage(swigCPtr, this, i);
}
public final static int SNIPPET_BACKGROUND_MODEL = XapianJNI.MSet_SNIPPET_BACKGROUND_MODEL_get();
public final static int SNIPPET_EXHAUSTIVE = XapianJNI.MSet_SNIPPET_EXHAUSTIVE_get();
public final static int SNIPPET_EMPTY_WITHOUT_MATCH = XapianJNI.MSet_SNIPPET_EMPTY_WITHOUT_MATCH_get();
public final static int SNIPPET_NGRAMS = XapianJNI.MSet_SNIPPET_NGRAMS_get();
public final static int SNIPPET_CJK_NGRAM = XapianJNI.MSet_SNIPPET_CJK_NGRAM_get();
}
|