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