1 //------------------------------------------------------------------------------ 2 // <auto-generated /> 3 // 4 // This file was automatically generated by SWIG (http://www.swig.org). 5 // Version 3.0.13 6 // 7 // Do not make changes to this file unless you know what you are doing--modify 8 // the SWIG interface file instead. 9 //------------------------------------------------------------------------------ 10 11 namespace Xapian { 12 13 public class Document : global::System.IDisposable { 14 private global::System.Runtime.InteropServices.HandleRef swigCPtr; 15 protected bool swigCMemOwn; 16 Document(global::System.IntPtr cPtr, bool cMemoryOwn)17 internal Document(global::System.IntPtr cPtr, bool cMemoryOwn) { 18 swigCMemOwn = cMemoryOwn; 19 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); 20 } 21 getCPtr(Document obj)22 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Document obj) { 23 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; 24 } 25 ~Document()26 ~Document() { 27 Dispose(); 28 } 29 Dispose()30 public virtual void Dispose() { 31 lock(this) { 32 if (swigCPtr.Handle != global::System.IntPtr.Zero) { 33 if (swigCMemOwn) { 34 swigCMemOwn = false; 35 XapianPINVOKE.delete_Document(swigCPtr); 36 } 37 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); 38 } 39 global::System.GC.SuppressFinalize(this); 40 } 41 } 42 Document()43 public Document() : this(XapianPINVOKE.new_Document(), true) { 44 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 45 } 46 GetValue(uint slot)47 public string GetValue(uint slot) { 48 string ret = XapianPINVOKE.Document_GetValue(swigCPtr, slot); 49 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 50 return ret; 51 } 52 AddValue(uint slot, string value)53 public void AddValue(uint slot, string value) { 54 XapianPINVOKE.Document_AddValue(swigCPtr, slot, value); 55 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 56 } 57 RemoveValue(uint slot)58 public void RemoveValue(uint slot) { 59 XapianPINVOKE.Document_RemoveValue(swigCPtr, slot); 60 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 61 } 62 ClearValues()63 public void ClearValues() { 64 XapianPINVOKE.Document_ClearValues(swigCPtr); 65 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 66 } 67 GetData()68 public string GetData() { 69 string ret = XapianPINVOKE.Document_GetData(swigCPtr); 70 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 71 return ret; 72 } 73 SetData(string data)74 public void SetData(string data) { 75 XapianPINVOKE.Document_SetData(swigCPtr, data); 76 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 77 } 78 AddPosting(string tname, uint tpos, uint wdfinc)79 public void AddPosting(string tname, uint tpos, uint wdfinc) { 80 XapianPINVOKE.Document_AddPosting__SWIG_0(swigCPtr, tname, tpos, wdfinc); 81 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 82 } 83 AddPosting(string tname, uint tpos)84 public void AddPosting(string tname, uint tpos) { 85 XapianPINVOKE.Document_AddPosting__SWIG_1(swigCPtr, tname, tpos); 86 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 87 } 88 AddTerm(string tname, uint wdfinc)89 public void AddTerm(string tname, uint wdfinc) { 90 XapianPINVOKE.Document_AddTerm__SWIG_0(swigCPtr, tname, wdfinc); 91 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 92 } 93 AddTerm(string tname)94 public void AddTerm(string tname) { 95 XapianPINVOKE.Document_AddTerm__SWIG_1(swigCPtr, tname); 96 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 97 } 98 AddBooleanTerm(string term)99 public void AddBooleanTerm(string term) { 100 XapianPINVOKE.Document_AddBooleanTerm(swigCPtr, term); 101 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 102 } 103 RemovePosting(string tname, uint tpos, uint wdfdec)104 public void RemovePosting(string tname, uint tpos, uint wdfdec) { 105 XapianPINVOKE.Document_RemovePosting__SWIG_0(swigCPtr, tname, tpos, wdfdec); 106 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 107 } 108 RemovePosting(string tname, uint tpos)109 public void RemovePosting(string tname, uint tpos) { 110 XapianPINVOKE.Document_RemovePosting__SWIG_1(swigCPtr, tname, tpos); 111 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 112 } 113 RemovePostings(string term, uint term_pos_first, uint term_pos_last, uint wdf_dec)114 public uint RemovePostings(string term, uint term_pos_first, uint term_pos_last, uint wdf_dec) { 115 uint ret = XapianPINVOKE.Document_RemovePostings__SWIG_0(swigCPtr, term, term_pos_first, term_pos_last, wdf_dec); 116 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 117 return ret; 118 } 119 RemovePostings(string term, uint term_pos_first, uint term_pos_last)120 public uint RemovePostings(string term, uint term_pos_first, uint term_pos_last) { 121 uint ret = XapianPINVOKE.Document_RemovePostings__SWIG_1(swigCPtr, term, term_pos_first, term_pos_last); 122 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 123 return ret; 124 } 125 RemoveTerm(string tname)126 public void RemoveTerm(string tname) { 127 XapianPINVOKE.Document_RemoveTerm(swigCPtr, tname); 128 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 129 } 130 ClearTerms()131 public void ClearTerms() { 132 XapianPINVOKE.Document_ClearTerms(swigCPtr); 133 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 134 } 135 TermListCount()136 public uint TermListCount() { 137 uint ret = XapianPINVOKE.Document_TermListCount(swigCPtr); 138 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 139 return ret; 140 } 141 TermListBegin()142 public TermIterator TermListBegin() { 143 TermIterator ret = new TermIterator(XapianPINVOKE.Document_TermListBegin(swigCPtr), true); 144 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 145 return ret; 146 } 147 TermListEnd()148 public TermIterator TermListEnd() { 149 TermIterator ret = new TermIterator(XapianPINVOKE.Document_TermListEnd(swigCPtr), true); 150 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 151 return ret; 152 } 153 ValuesCount()154 public uint ValuesCount() { 155 uint ret = XapianPINVOKE.Document_ValuesCount(swigCPtr); 156 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 157 return ret; 158 } 159 ValuesBegin()160 public ValueIterator ValuesBegin() { 161 ValueIterator ret = new ValueIterator(XapianPINVOKE.Document_ValuesBegin(swigCPtr), true); 162 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 163 return ret; 164 } 165 ValuesEnd()166 public ValueIterator ValuesEnd() { 167 ValueIterator ret = new ValueIterator(XapianPINVOKE.Document_ValuesEnd(swigCPtr), true); 168 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 169 return ret; 170 } 171 GetDocId()172 public uint GetDocId() { 173 uint ret = XapianPINVOKE.Document_GetDocId(swigCPtr); 174 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 175 return ret; 176 } 177 Serialise()178 public string Serialise() { 179 string ret = XapianPINVOKE.Document_Serialise(swigCPtr); 180 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 181 return ret; 182 } 183 Unserialise(string serialised)184 public static Document Unserialise(string serialised) { 185 Document ret = new Document(XapianPINVOKE.Document_Unserialise(serialised), true); 186 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 187 return ret; 188 } 189 GetDescription()190 public string GetDescription() { 191 string ret = XapianPINVOKE.Document_GetDescription(swigCPtr); 192 if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); 193 return ret; 194 } 195 196 } 197 198 } 199