3 import org.yaz4j.jni.SWIGTYPE_p_ZOOM_record_p;
4 import org.yaz4j.jni.yaz4jlib;
6 public class Record implements Cloneable {
8 private SWIGTYPE_p_ZOOM_record_p record;
9 private ResultSet rset;
10 private boolean disposed = false;
12 Record(SWIGTYPE_p_ZOOM_record_p record, ResultSet rset) {
17 protected Record(SWIGTYPE_p_ZOOM_record_p record) {
22 public void finalize() {
26 public byte[] get(String type) {
28 throw new NullPointerException("type cannot be null");
29 return yaz4jlib.ZOOM_record_get_bytes(record, type);
32 public String render() {
33 return new String(get("render"));
36 public byte[] getContent() {
40 public String getSyntax() {
41 return new String(get("syntax"));
44 public String getDatabase() {
45 return new String(get("database"));
49 public Object clone() {
50 SWIGTYPE_p_ZOOM_record_p clone = yaz4jlib.ZOOM_record_clone(record);
51 return new Record(clone);
56 //was cloned, need to dealloc?
58 yaz4jlib.ZOOM_record_destroy(record);