3 import org.yaz4j.jni.SWIGTYPE_p_ZOOM_scanset_p;
4 import org.yaz4j.jni.SWIGTYPE_p_size_t;
5 import org.yaz4j.jni.yaz4jlib;
9 private Connection conn;
10 private SWIGTYPE_p_ZOOM_scanset_p scanSet;
11 private boolean disposed = false;
13 ScanSet(SWIGTYPE_p_ZOOM_scanset_p scanSet, Connection conn) {
14 this.scanSet = scanSet;
18 public void finalize() {
22 public ScanTerm get(long index) {
23 SWIGTYPE_p_size_t occ = yaz4jlib.new_size_tp();
24 SWIGTYPE_p_size_t length = yaz4jlib.new_size_tp();
25 String term = yaz4jlib.ZOOM_scanset_term(scanSet, (long) index, occ, length);
26 long occurences = yaz4jlib.size_tp_value(occ);
27 yaz4jlib.delete_size_tp(occ);
28 yaz4jlib.delete_size_tp(length);
29 return new ScanTerm(term, occurences);
32 public long getSize() {
33 return yaz4jlib.ZOOM_scanset_size(scanSet);
38 yaz4jlib.ZOOM_scanset_destroy(scanSet);