Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
buechereielektrik:unapi:readme [2010-01-10 23:17] – created rosenke | buechereielektrik:unapi:readme [2010-02-19 13:18] – Added information about format csv. strols | ||
---|---|---|---|
Line 1: | Line 1: | ||
<code - README> | <code - README> | ||
- | /* Copyright 2008 2009 Goetz Hatop */ | ||
- | /* Copyright 2009 2010 Stephan Rosenke < | ||
- | |||
=== About === | === About === | ||
- | This is am implementation of unAPI for OCLC PICA library systems (LBS) | ||
- | / | + | This is an implementation |
- | it under the terms of the GNU General Public License as published by | + | systems |
- | the Free Software Foundation, either version 3 of the License, or | + | |
- | (at your option) any later version. | + | |
- | This program | + | unAPI is a tiny RESTful HTTP-API for the few basic operations necessary |
- | but WITHOUT ANY WARRANTY; without even the implied warranty | + | to copy discrete, identified content from any kind of web application. |
- | | + | See < |
- | GNU General Public License | + | |
- | | + | === Copyright === |
- | | + | |
- | */ | + | Copyright 2008 2009 Goetz Hatop < |
+ | original version can be found at | ||
+ | < | ||
+ | |||
+ | Copyright 2009 2010 Stephan Rosenke < | ||
+ | < | ||
+ | |||
+ | === License === | ||
+ | |||
+ | This program is free software: you can redistribute it and/or modify | ||
+ | it under the terms of the GNU General Public License as published by | ||
+ | the Free Software Foundation, either version 3 of the License, or | ||
+ | (at your option) any later version. | ||
+ | |||
+ | This program 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 General Public License | ||
+ | for more details. | ||
+ | You should have received a copy of the GNU General Public License along | ||
+ | with this program. | ||
=== Installation === | === Installation === | ||
- | Edit unapi.php and set the opac variable to your local OCLC/PICA system. | + | PHP 5.2.0 with curl module is recommended, |
- | Put the script together | + | required. |
- | Your records identified by ppn will then be available via unapi. | + | If you want use the scripts with lower versions of PHP please check |
+ | the source for the string " | ||
- | Try out unClient.php to see an example on how to fetch data | + | Edit unAPI.inc.php and set the user-defineable variables. Put the |
- | delivered by the unapi.php server script. | + | script |
- | The unclient | + | identified by PPN (PICA Production Number) will then be available via |
- | so copy unclient.php and the PicaRecord.php script to a place on your | + | unAPI, for example: < |
- | web server | + | |
- | This needs not to be the same server where your unapi.php script lives. | + | |
- | === About unAPI: | + | Try out unClient.php to see an example on how to fetch data delivered |
+ | by the unAPI.php server script. | ||
+ | The unClient.php requires the unAPI.inc.php to be included, too. | ||
+ | Copy them to a place on your web server where this can be accomplished. | ||
+ | This need not to be the same server where your unAPI.php script lives. | ||
- | unAPI is a tiny HTTP API for the few basic operations necessary | + | unAPI.html is a simple form to submit PPNs and format to unAPI.php. |
- | discrete, identified content from any kind of web application. | + | Copy it to the same directory as unAPI.php. |
- | See http:// | + | |
- | === What is Pica LBS === | + | For Bibsonomy.php and Coins.php see below. |
- | OCLC/Pica distributes an integrated library system (ILS) named LBS | + | === What is PICA LBS === |
- | which presents its data for human beeings | + | |
- | called PSI. For automata, the bibliographic records are not really | + | OCLC PICA distributes an integrated library system (ILS) named LBS |
- | hidden but not available in a useful or standardized format. | + | which presents its data for human beings |
+ | PSI. For automata, the bibliographic records are not really hidden | ||
+ | but not available in a useful or standardized format. | ||
=== About this software | === About this software | ||
- | This PHP script utilisizes | + | The PHP scripts utilise |
- | comes with the LBS software to make bibliographic records available | + | comes with the LBS software to make bibliographic records available |
- | via the unAPI protocoll. It formats them as dublin core, in a xml format | + | via an unAPI. It formats them as dublin core, in a XML format, BibTeX, |
- | or as the plain pica data surrounded by a few tags. MARC is missed from the | + | JSON or some other formats (for a complete list, query the unAPI |
- | list of available formats but could be added if someone can figure out | + | without id- and format-parameter). MARC is missed from the list of |
- | how to map pica categories to marc records. | + | available formats but could be added if someone can figure out how |
+ | to map PICA categories to MARC records. | ||
+ | |||
+ | The PICA records are retrieved as categories, and all the art of | ||
+ | converting them to something like Dublin Core comes down to figure | ||
+ | out the meaning of the categories. | ||
+ | |||
+ | Internally, PICA+ categories and subfields of the record can be | ||
+ | accessed via a multi-dimensional hash (see functions getArray() and | ||
+ | getArrayNice() in unAPI.inc.php). | ||
+ | Mappings in getArrayNice(), | ||
+ | cataloguing rules and must possibly be adapted. | ||
+ | |||
+ | The program unAPI.php uses PHP curl - if available - to contact an OPAC | ||
+ | server and retrieve a bibliographic record identified by a PPN, which | ||
+ | is the basic identifier in the PICA world. | ||
+ | Which OPAC server to contact can be specified in the file unAPI.inc.php | ||
+ | by setting $opac_url. | ||
+ | |||
+ | To interpret the bibliographic data the class PicaRecord is used which | ||
+ | can be found in unAPI.inc.php. Adaptions to local cataloguing rules | ||
+ | should be made in this class. | ||
+ | |||
+ | Getting bibliographic records via a clean web interface is a necessary, | ||
+ | basic step for further processing the data for web based bibliographies | ||
+ | or application to enrich the records further. | ||
+ | For an example see < | ||
+ | < | ||
+ | german). | ||
+ | |||
+ | === Format csv === | ||
+ | |||
+ | Following data can be found in the columns: | ||
+ | 1. PPN | ||
+ | 2. Author | ||
+ | 3. Editor | ||
+ | 4. Title | ||
+ | 5. Publisher' | ||
+ | 6. Year | ||
+ | 7. ISBN 10 | ||
+ | 8. ISBN 13 | ||
+ | 9. ISSN | ||
+ | 10. Deutsche Nationalbibliothek number | ||
+ | 11. OCLC number | ||
+ | 12. foreign data identification number | ||
+ | 13. Zentrale Zeitschriften Datenbank ID | ||
+ | 14. Class in Regensburger Verbundsklassifikation | ||
+ | |||
+ | === Bibsonomy.php and Coins.php === | ||
- | Getting bibliographic records via a clean web interface is a necessary | + | Bibsonomy.php and Coins.php are two example scripts for using unAPI. |
- | basic step for further processing the data for e.g. web based | + | |
- | bibliographies or application to enrich the records further. | + | |
- | The PICA records do come as categories, and all the art of converting | + | For information about Bibsonomy, see < |
- | them to somethink like dublin core comes down to figure out the | + | Bibsonomy uses unAPI classes and functions |
- | meaning of the categories. | + | Bibsonomy supplying bibliographic data which is identified by a PPN. |
+ | In the OPAC web interface, only a link with the respective PPN must be | ||
+ | included. | ||
+ | For example '<a href=" | ||
- | The program unapi.php uses php curl to contact | + | For information about COinS, see < |
- | retrieve a bibliographic record identified by a ppn, which is the | + | Coins.php uses JavaScript inclusion mechanisms |
- | basic identifier in the PICA world. | + | COinS - only some JavaScript with the respective PPN is necessary. |
- | Which opac server to contact can be specified in the file unapi.php | + | For example |
- | by setting the $opac parameter. Its default value is 'localhost' | + | type=" |
- | that this script | + | |
- | If for some reason the opac server does not have a running apache | + | |
- | with php and curl available (it may be a production system), the | + | |
- | script | + | |
- | To interpret the bibliographic data the class PicaRecord is used which | + | === version of this document=== |
- | comes in its own file PicaRecord.php. | + | |
- | This class is the one which should be used to adapt to local | + | |
- | cataloging rules. | + | |
- | ----------------------------------------------------------------------- | + | 20100219: Added information about format csv. |
+ | 20100208: Added information for unAPI.html. | ||
+ | 20100127: Added link in copyright. | ||
+ | 20100126: Added explanation for PPN, some small corrections. | ||
+ | 20100113: Restructured document. | ||
</ | </ | ||