An updated version of the JZKit Proxy server (With an example configuration exposing a number of SOLR backends as a z3950 target) is available for download Here
Since the initial test at the Bath CRIG barcamp we've improved the error handling and diagnostics, improved the mapping of Z3950 database names, made the attribute mapping more configurable (The out out the box sample config is pretty much Bath profile level 1 OK), improved the structure==year mappings for date search and done some pretty hefty load testing which revealed a thread leak in certain situations (It's fixed now).
Please download, play and get in touch with any questions / comments.
Ian.
Sunday, 13 July 2008
New version of JZkit Proxy Server
Posted by Ibbo at 10:35
Labels: Announcement, SOLR, Z3950
Subscribe to:
Post Comments (Atom)
2 Comments:
How do I Unblock MySpace?FoxyProxy Firefox proxy add ons Proxies tools on internet Surf Free and Hiding your Electronic Identity Unblock every website with latest website
Hello, my name is luis gomez, i'm the responsable for z3950's client development, i want to thank you for your time and will for help us.
I've already revised de code, i looked some test source code:
/*Test source code */
public void testLOC2() throws Exception {
app_context = new ClassPathXmlApplicationContext(
"spring/applicationContext.xml");
Z3950ServiceFactory factory = new Z3950ServiceFactory("z3950.loc.gov",
7090);
factory.setApplicationContext(app_context);
factory.setDefaultRecordSyntax("usmarc");
factory.setDefaultElementSetName("F");
factory.getRecordArchetypes().put("Default", "usmarc::F");
factory.getRecordArchetypes().put("FullDisplay", "usmarc::F");
factory.getRecordArchetypes().put("BriefDisplay", "usmarc::B");
factory.getRecordArchetypes().put("Holdings", "usmarc::F");
IRQuery query = new IRQuery();
query.collections = new Vector();
query.collections.add("Voyager");
query.query = new org.jzkit.search.util.QueryModel.PrefixString.PrefixString(
"@attrset bib-1 @attr 1=4 \"brain\"");
Z3950QueryModel zqm = Type1QueryModelBuilder.buildFrom(app_context,
query.query, "utf-8");
Searchable s = factory.newSearchable();
s.setApplicationContext(app_context);
IRResultSet result = s.evaluate(query);
result.waitForStatus(IRResultSetStatus.COMPLETE
| IRResultSetStatus.FAILURE, 0);
Enumeration e = new org.jzkit.search.util.ResultSet.ReadAheadEnumeration(
result, new ArchetypeRecordFormatSpecification("Default"));
for (int i = 0; ((e.hasMoreElements()) && (i < 60)); i++) {
System.err.println("Processing result " + i);
InformationFragment f = (InformationFragment) e.nextElement();
System.err.println(f.getOriginalObject());
}
}
/*Test source code */
This works perfectly, but i don't understand the InformationFragment structure, i want transform the InformationFragment object to a format that i can manipulate, xml wold be my first choice, but i can't find the api methods for do this
i revised some jzkt2 documentation, i finded this:
InformationFragment f2[] = ifs.getFragment(10,10);
// Make sure we can call getDocument
System.out.println("Test 4 : Get document");
org.w3c.dom.Document d = f2[2].getDocument();
I looked for getDocument() method on InformationFragment on jzkit 3 version (at least the source version3 that i have at my pc), i couldn't find something similar for xml approach from InformationFragment objetcs.
I wold know how can extract the data from
Enumeration e = new org.jzkit.search.util.ResultSet.ReadAheadEnumeration(
result, new ArchetypeRecordFormatSpecification("Default"));
Any suggestiongs will be very appreciated
regards
Post a Comment