From: Jakub Skoczen Date: Thu, 18 Feb 2010 13:22:51 +0000 (+0100) Subject: Remove from toolkit. X-Git-Tag: v1.1~6 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=f7639c0624c94ed3bdab0f5a2c2aa3802fcb8fa6;p=yaz4j-moved-to-github.git Remove from toolkit. --- diff --git a/src/main/java/org/yaz4j/Yaz4jMain.java b/src/main/java/org/yaz4j/Yaz4jMain.java deleted file mode 100644 index dbe711c..0000000 --- a/src/main/java/org/yaz4j/Yaz4jMain.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.yaz4j; - -import java.io.UnsupportedEncodingException; -import java.io.IOException; -import org.yaz4j.exception.ZoomException; - -public class Yaz4jMain { - // java -cp ./bin: -Djava.library.path=./libyaz4j org.yaz4j.Yaz4jMain - - public static void main(String[] args) throws UnsupportedEncodingException, IOException { - Connection conn = new Connection("talisbase.talis.com", 210); - try { - conn.setDatabaseName("unionm21"); - conn.setUsername("fred"); - conn.setPassword("apple"); - conn.setSyntax("USMarc"); // USMarc, Sutrs, XML, opac, UKMarc - - ResultSet results = conn.search("@attr 1=4 \"pottering\"", Connection.QueryType.PrefixQuery); - - long resultsSize = results.getSize(); - System.out.println("Found " + resultsSize + " records"); - - for (int i = 0; i < resultsSize; i++) { - Record record = results.getRecord(i); - System.out.write(record.getContent()); - } - } catch (ZoomException ze) { - System.out.println(ze.getMessage()); - ze.printStackTrace(); - } finally { - conn.close(); - } - } -}