display.
-target amicus.nlc-bnc.ca/NL
-target melvyl.cdlib.org/cdl90
-target z3950.loc.gov:7090/voyager
-target library2.mcmaster.ca/MORRIS
-target info.library.mun.ca:2200/innopac
-target 137.122.27.60:210/innopac
-target z3950.rlg.org/BIB
-target 141.117.13.11:210/innopac
-target siris-libraries.si.edu
-target tpldynix.torontopubliclibrary.ca:210/server
-target sirsi.library.utoronto.ca:2200/UNICORN
+target amicus.nlc-bnc.ca/NL;National Libray of Canada
+target melvyl.cdlib.org/cdl90;MELVYL
+target z3950.loc.gov:7090/voyager;Library of Congress
+target library2.mcmaster.ca/MORRIS;McMaster University
+target info.library.mun.ca:2200/innopac;Memorial University
+target 137.122.27.60:210/innopac;University of Ottowa
+target z3950.rlg.org/BIB;RLG
+target 141.117.13.11:210/innopac;Ryerson University
+target tpldynix.torontopubliclibrary.ca:210/server;Toronto Public
+target sirsi.library.utoronto.ca:2200/UNICORN;University of Toronto
/*
- * $Id: http_command.c,v 1.25 2007-01-18 16:21:23 quinn Exp $
+ * $Id: http_command.c,v 1.26 2007-01-18 18:11:19 quinn Exp $
*/
#include <stdio.h>
for (i = 0; i < count && i < num && ht[i].hits > 0; i++)
{
wrbuf_puts(wrbuf, "\n<term>\n");
- wrbuf_printf(wrbuf, "<name>%s</name>\n", ht[i].id);
+ wrbuf_printf(wrbuf, "<name>%s</name>\n", ht[i].name);
wrbuf_printf(wrbuf, "<frequency>%d</frequency>\n", ht[i].hits);
wrbuf_printf(wrbuf, "<state>%s</state>\n", ht[i].state);
wrbuf_printf(wrbuf, "<diagnostic>%d</diagnostic>\n", ht[i].diagnostic);
static void write_subrecord(struct record *r, WRBUF w, struct conf_service *service)
{
- wrbuf_printf(w, "<location id=\"%s\">\n", r->client->database->url);
+ wrbuf_printf(w, "<location id=\"%s\" name=\"%s\">\n",
+ r->client->database->url,
+ r->client->database->name ? r->client->database->name : "");
write_metadata(w, service, r->metadata, 1);
wrbuf_puts(w, "</location>\n");
}
-/* $Id: pazpar2.c,v 1.43 2007-01-18 16:21:23 quinn Exp $ */
+/* $Id: pazpar2.c,v 1.44 2007-01-18 18:11:19 quinn Exp $ */
#include <stdlib.h>
#include <stdio.h>
while (fgets(line, 255, f))
{
char *url, *db;
+ char *name;
struct host *host;
struct database *database;
if (strncmp(line, "target ", 7))
continue;
+ line[strlen(line) - 1] = '\0';
+
+ if ((name = strchr(line, ';')))
+ *(name++) = '\0';
+
url = line + 7;
- url[strlen(url) - 1] = '\0';
- yaz_log(YLOG_DEBUG, "Target: %s", url);
if ((db = strchr(url, '/')))
*(db++) = '\0';
else
db = "Default";
+ yaz_log(YLOG_LOG, "Target: %s, '%s'", url, db);
for (host = hosts; host; host = host->next)
if (!strcmp(url, host->hostport))
break;
strcpy(database->url, url);
strcat(database->url, "/");
strcat(database->url, db);
+ if (name)
+ database->name = xstrdup(name);
+ else
+ database->name = 0;
database->databases = xmalloc(2 * sizeof(char *));
database->databases[0] = xstrdup(db);
*count = 0;
for (cl = se->clients; cl; cl = cl->next)
{
- strcpy(res[*count].id, cl->database->host->hostport);
+ res[*count].id = cl->database->url;
+ res[*count].name = cl->database->name;
res[*count].hits = cl->hits;
res[*count].records = cl->records;
res[*count].diagnostic = cl->diagnostic;
struct database {
struct host *host;
char *url;
+ char *name;
char **databases;
int errors;
struct conf_queryprofile *qprofile;
};
struct hitsbytarget {
- char id[256];
+ char *id;
+ char *name;
int hits;
int diagnostic;
int records;
-/* $Id: search.js,v 1.41 2007-01-18 17:42:39 quinn Exp $
+/* $Id: search.js,v 1.42 2007-01-18 18:11:19 quinn Exp $
* ---------------------------------------------------
* Javascript container
*/
{
var table = document.createElement('table');
var zurl = node.getAttribute('id');
- var tr = paint_details_tr('Source', document.createTextNode(zurl));
+ var name = node.getAttribute('name');
+ var tr;
+ if (name)
+ tr = paint_details_tr('Source', document.createTextNode(name));
+ else
+ tr = paint_details_tr('Source', document.createTextNode(zurl));
table.appendChild(tr);
paint_data_elements(table, node);
return table;