<%-- openisis - an open implementation of the ISIS database Version 0.8.x (microversion see file Version) Copyright (C) 2001-2002 by Erik Grziwotz, erik@openisis.org This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA This software is dedicated to the memory of Eckart Dietrich. This software is inspired by (but contains no code of) the iAPI Copyright (C) 2000 by Robert Janusz, rj@jezuici.krakow.pl. See iAPI.txt for what it contains. EOH --%><%@page import="org.openisis.*,java.io.IOException,java.util.*,java.net.URLEncoder" contentType="text/html; charset=iso-8859-1" %><%! static final String ID = "$Id: idm.jsp,v 1.4 2002/12/13 21:30:27 kripke Exp $"; static final String EMPTY = ""; static Db db; static String dberr = EMPTY; static String me = "idm"; static { try { String[] args = new String[] { "-v", "info", "-encoding", "Cp850" }; db = Db.open( "/var/db/idm/doku", args ); } catch (IOException e) { e.printStackTrace(); dberr = e.toString(); } }; static String NV ( String x ) { return null==x ? EMPTY : x; } static int ROWS = 10; // number of rows to show at once static int TERMS = 50; // number of terms to show at once static int[] tag = { 100, 101, 200, 201, 301, 302, 430, 435, 28, 450, 800, 18 }; static String[] t = { "Autor(en)", "author", // 100 "weitere Personen", "other contributors", // 101 "Körperschaft als Hrsg.", "corporate body as editor", // 200 "weitere Körperschaften", "other corporate bodies", // 201 "Titel ohne Autorennennung", "title (without indiv. author)", // 301 "Titel mit Autor", "title (with author)", // 302 "Erscheinungsvermerk", "publisher: name and place", // 430 "Erscheinungsjahr", "year of publication", // 435 "Erscheinungsland", "country of publication", // 28 "Ges.Titel/Ser.Titel/Bandnr.", "series title", // 450 "Schlagworte", "keywords", // 800 "Dokument Nr.", "no of document", // 18 // unused fields: "Universitätseinrichtung (10):", EMPTY, "Projekt (12):", EMPTY, "Erfassungsdatum (16):", EMPTY, "Dokumententyp (22):", EMPTY, "Physikalische Form (24):", EMPTY, "Sprache des Dokumentes (26):", EMPTY, "Physische Form (440):", EMPTY, "Quelle (Zeitschrift) (480):", EMPTY, "Quelle (Monographie) (490):", EMPTY, "ISBN (600):", EMPTY, "Abstract (900):", EMPTY, EMPTY, EMPTY, EMPTY, EMPTY, // 50: other texts "Dokumentations-Datenbank des IDM der Universität Bielefeld", "documentation database of the IDM at the university of Bielefeld", "Suchen", "search", "English", "Deutsch", //54 "?", "?", "weiter", "more", "allen Feldern", "all fields", //60 // the ops "und","and", "oder","or", "ohne","without", "zurücksetzen","reset", "Name","Surname",//70 "Vorname","Given name", "Institut","Institution", "Strasse","Street", "Ort","City", "Land","Country", // 80 "Postleitzahl","Zip code", "Bestellen", "order", "Abschicken", "Submit", "Einträge", "rows", "bis", "to", // 90 "von", "of", "für", "for", "Indexeinträge beginnend mit", "terms starting with ", "neue Suche", "new Query", // 100: hilfe "

Willkommen bei der Dokumentations-Datenbank des\n" +" IDM der Universität Bielefeld

\n" +" Sie können bis zu drei Suchbegriffe verknüpfen.\n" +" Jeder Suchbegriff kann auf ein Feld eingeschränkt werden.
\n" +" Die ?-Funktion zeigt Ihnen alle Suchbegriffe,\n" +" die mit dem Feldinhalt beginnen, ggf. auf mehreren Seiten.\n" +" Diese Werte können per Klick übernommen werden.

\n" +" Mit 'Suchen' wird die Anfrage ausgelöst.\n" +" Es werden jeweils "+ROWS+" Sätze angezeigt.

\n" +" Kopien von Titeln können gegen Kostenerstattung bestellt werden.
\n" +"

Suchtipps

\n" +" Für Prefixsuche beenden Sie den Begriff mit * oder $.
\n" +" Die Suche wird auf jeweils 1000 Treffer eingeschränkt.\n" +" Bei sehr häufigen Suchbegriffen, etwa 'a$', gibt es in jedem Satz\n" +" mehrere Treffer, sodass weniger als 1000 Sätze gefunden werden.
\n" +" \n" +" Eine engere Suche, etwa durch Einschränkung auf ein Feld,\n" +" kann in einem solchen Fall u.U. mehr Sätze finden!
\n" +" Verwenden Sie bei mehreren Begriffen den präzisesten zuerst.
\n" +" \n" +"

Cookies

\n" +" Die Funktion ist stark beeinträchtigt,\n" +" falls Sie das Session-Cookie ablehnen.
\n" +" Ein Session-Cookie wird nicht auf Ihrer Festplatte gespeichert,\n" +" sondern verschwindet beim Schließen des Browsers.\n" +" \n" , // 101: help "

welcome to the documentation database of the" +" IDM at the university of Bielefeld

" +" Up to three search terms may be combined.\n" +" Each term can be restricted to a specific database field.
\n" +" Use the ? beneath a field to display all entries in the index\n" +" starting with the currently entered term.\n" +" Click them for use in your query.

\n" +" The 'search' button starts the query.\n" +" Up to "+ROWS+" records are displayed at once.

\n" +" You can order copies of each article for a nominal fee.
\n" +"

search tips

\n" +" Use a trailing * or $ to search by prefix.
\n" +" The query will be restricted to 1000 hits.\n" +" Very frequent terms like 'a$' will have several hits within\n" +" each record, giving less than 1000 records total.
\n" +" Restricting the query, e.g. by choosing a database field,\n" +" may thus find more records!
\n" +" When combining multiple terms, use the most specific one first\n" +" for best results.
\n" +" \n" +"

Cookies

\n" +" This page will not work properly,\n" +" if you do not accept the session cookie.
\n" +" This is not stored on your hard disc,\n" +" but deleted after you quit your browser.\n" , "entfernen", "remove", "E-Mail", "e mail", "Telefon", "phone", "bitte füllen Sie die markierten Felder aus", "please fill in all marked fields", // 110 "Ihre Bestellung wurde abgeschickt. Vielen Dank", "Your order has been submitted. Thank you", "Ihre Bestellung konnte leider nicht abgeschickt werden." +" Bitte versuchen Sie es später", "Your order could not be submitted. Please try again later", }; static final String[] ORDER = { "Xlastname", "firstname", "institution", "Xstreet", "Xcity", "country", "Xzip", "mail", "phone", }; static final int[] ORDERT = { 70,72,74,76, 78,80,82,104,106 }; // check button value independet of language used static boolean chkbutton ( int n, String param ) { return t[n].equals( param ) || t[n+1].equals( param ); } static int chkint ( int min, int max, int def, String param ) { if ( null != param ) try { int j = Integer.parseInt(param); if ( min <= j && j <= max ) return j; } catch (Exception e) { } return def; } static final int OP_AND = 0; static final int OP_OR = 1; static final int OP_NOT = 2; static final char[] OP = { '*', '+', '^' }; static final String ORDERMAIL = "idmdoku@openisis.org"; static final String[] MAILHEADERS = { Mail.TO, ORDERMAIL, Mail.FROM, "Online-Katalog ", Mail.SUBJECT, "online Bestellung", }; static final int LINES = 3; static class Ses { int l; // lang, 0 or 1 int off = 0; int rows = ROWS; int view; // last seen view int idx; // field to save index into int msec; // String qry; int[] set; int len; // form content: String[] t = new String[LINES]; String[] o = new String[ORDER.length]; // order data int[] f = new int[LINES]; // 0 or 1+index of selected tag int[] op = new int[LINES]; Iterator i; String term = EMPTY; ArrayList orders; public Ses () { for ( int i=0; i<% Ses s; try { s = (Ses) session.getAttribute( me ); } catch ( Exception e ) { s = null; } if ( null == s ) session.setAttribute( me, s = new Ses() ); int task = DO_HELP; String order = null; // figure out, what to do String wants = request.getParameter( "do" ); if ( chkbutton( 52, wants ) ) task = DO_QUERY; else if ( chkbutton( 54, wants ) ) task = DO_LANG; else if ( "order".equals( wants ) ) task = DO_ORDER; else if ( chkbutton( 86, wants ) ) task = DO_ORDERS; else if ( "more".equals( wants ) ) task = DO_INDEXN; else if ( "new".equals( wants ) ) task = DO_BLANK; else if ( null != request.getParameter( "off" ) ) task = DO_QUERYN; else // check "index" buttons i0, i1 ... for ( int i=0; i" ) .append(t[112+s.l]) .append( "\n\n" ) .toString(); task = DO_ORDER; } } s.view = VW_ORDER; } int maxrow = s.off + s.rows; if ( maxrow >= s.len ) maxrow = s.len; %> <%=t[50+s.l]%>
service Universität Bielefeld
=================================================
 <%=t[50+s.l]%>
<% if ( DO_ORDER == task ) { %> <% for ( int i=0; i <% } for(int i=0;i <% } %>
<%=lbl%> <%=req%>
<%=Field.html(o[0])%> <%=Field.html(o[1])%>  (<%=t[102+s.l]%>)
-------------------------------------------------
<% } else { %> <% for ( int l=0; l <% } // for lines %>
<% if ( 0 < l ) for ( int o=0; o value="<%=o%>"/> <%=t[62+2*o+s.l] %> <% } // for ops %> in
-------------------------------------------------
<%-- rows at once --%> <% } // query form if ( VW_QUERY == s.view && 0 < s.len ) { if ( 0 < s.off ) { int boff = s.off-s.rows; if ( boff < 0 ) boff = 0; %>    <<<%=t[88+s.l]%> <%=boff+1%> <%=t[90+s.l]%> <%=boff+s.rows%> <% } if ( maxrow < s.len ) { int nmax = maxrow+s.rows; if ( nmax > s.len ) nmax = s.len; %>    <%=t[88+s.l]%> <%=maxrow+1%> <%=t[90+s.l]%> <%=nmax%>>> <% } } %>   <%=t[98+s.l]%>

<% switch ( s.view ) { default: case VW_HELP: %> <%=t[100+s.l]%> <% break; case VW_QUERY: if ( 0 == s.len ) { %> 0 <%=t[88+s.l]%> <%=t[94+s.l]%> '<%=s.qry%>' <% } else { %>

<%=t[88+s.l]%> <%=s.off+1%> <%=t[90+s.l]%> <%=maxrow%> <%=t[92+s.l]%> <%=s.len%> <%=t[94+s.l]%> '<%=s.qry%>'

<%-- start output --%> <% for ( int i=s.off; i <% for ( int j=0; j") ); } String ti = r.v("",301,Db.MDL, 0, 0,""); if ( null == ti || 0 == ti.length() ) ti = r.v("",302,Db.MDL, 0, 0,""); String link = me+"?do=order" + "&id=" + URLEncoder.encode( r.v("",18,Db.MDL, 0, 0,"") ) + "&ti=" + URLEncoder.encode( ti ); %> <% } %>

"+t[2*j+s.l] +"", null, // cond,repeated prefix tag[j], Db.MDL|Db.PS|Db.HTI, 0, 0, // tag and mode, len, off ";
","
>> <%=t[84+s.l]%>
<% } break; // case VW_QUERY case VW_INDEX: %>

<%=t[96+s.l]%> '<%=Field.html(s.term)%>'

<% if ( null == s.i || ! s.i.hasNext() ) { } else { int i = TERMS; while ( 0 < i-- && s.i.hasNext() ) { String ix = (String)s.i.next(); if ( 0 == ix.length() ) continue; String u = URLEncoder.encode( ix ); %> <%=Field.html(ix)%>
<% } if ( 0 > i ) { // more %>

>> <%=t[58+s.l]%>

<% } else s.i = null; } break; // case VW_INDEX case VW_ORDER: %>
<%= order %>
<% } // switch %>