3 import org.yaz4j.jni.SWIGTYPE_p_ZOOM_scanset_p;
4 import org.yaz4j.jni.SWIGTYPE_p_int;
5 import org.yaz4j.jni.SWIGTYPE_p_size_t;
6 import org.yaz4j.jni.yaz4jlib;
10 private SWIGTYPE_p_ZOOM_scanset_p scanSet = null;
11 private Connection connection;
12 private boolean disposed = false;
14 ScanSet(SWIGTYPE_p_ZOOM_scanset_p scanSet, Connection connection) {
15 this.connection = connection;
16 this.scanSet = scanSet;
19 public void finalize() {
23 public ScanTerm get(long index) {
24 SWIGTYPE_p_size_t occ = yaz4jlib.new_size_tp();
25 SWIGTYPE_p_size_t length = yaz4jlib.new_size_tp();
26 String term = yaz4jlib.ZOOM_scanset_term(scanSet, (long) index, occ, length);
27 long occurences = yaz4jlib.size_tp_value(occ);
28 yaz4jlib.delete_size_tp(occ);
29 yaz4jlib.delete_size_tp(length);
30 return new ScanTerm(term, occurences);
33 public long getSize() {
34 return yaz4jlib.ZOOM_scanset_size(scanSet);
37 public void dispose() {
39 yaz4jlib.ZOOM_scanset_destroy(scanSet);