2 * Copyright (c) 1995-2013, Index Datassss
4 * See the file LICENSE for details.
9 import org.yaz4j.exception.ZoomException;
16 static public void main(String[] args) {
17 System.out.println("Open connection to z3950.indexdata.dk:210/gils...");
18 Connection con = new Connection("z3950.indexdata.dk:210/gils", 0);
20 con.setSyntax("sutrs");
22 System.out.println("Search for 'utah'...");
23 ResultSet s = con.search(new PrefixQuery("@attr 1=4 utah"));
24 System.out.println("Retrieve all records..");
25 List<Record> all = s.getRecords(0, (int) s.getHitCount());
26 for (Record r : all) {
27 System.out.println(r.render());
29 System.out.println("Success");
30 } catch (ZoomException ze) {
31 System.out.println("Failure");