Description
David Cook
2013-04-23 01:42:03 UTC
Update: Jcamins has mentioned that it's actually possible to use the "Stage MARC records for import" tool for importing authorities as well starting from 3.10+ Created attachment 18001 [details] [review] Bug 10096 - Add a Z39.50 interface for authority searching This patch introduces a new Z39.50 interface for searching z39.50 compliant databases for MARC authority records. These databases aren't as common as their bibliographic equivalents, but they're out there and very useful. I have included info at the bottom of this messsage for sample authority databases you can try. To test this patch: 1) Set up Z39.50 client targets for authority databases. (I've included information at the bottom of this message for LibrariesAustralia's test server for authorities as well as instructions on how to use your Koha's z39.50 authority server as well. The Library of Congress also has authority databases available (unsure if these are test or prod), and you might have access to others through OCLC or RLIN. OCLC provides login credentials for their test databases. 2) Go to the Authorities module 3) Click on the new "Z39.50 search button" 4) Select your authoriy search targets from the list (N.B. bibliographic targets will also display. These are of no use to you.) 5) Do a search for an authority you would like using either the "Raw" input box or the more specific input boxes for names, subjects, subject sub divisions, or titles. (I like searching Name (personal): Eric on the LibrariesAustralia test DB.) 6) You should see a table listing the server, heading, authority type, and two other columns (MARC and a nameless column). "Authority type" is the type of authority it will become when imported in to Koha. In the Eric example, "PERSO_NAME". 7) Click on "MARC" next to the results of interest to review the MARC authority record. 8) When you're satisfied with a record, click on "Import". 9) The pop-up window will close and your original Koha window will change to the "Adding authority Personal Name" screen (in the Eric example). 10) All the relevant fields should be filled out for the record. Review them and make any changes as necessary. (N.B. The 001 will be cleared when saved, so if you have a use for the imported control number, move it to the 010, 016, or 035 as appropriate. If you have a default value for the 003, this will also likely be overwritten. Move it if necessary. The 005 will also be updated when saved, so do not worry about that.) 11) When you're satisfied, click save. 12) Presto! You've imported your first authority record via Z39.50! -- Here is the info for the LibrariesAustralia test Z39.50 authority database: Z39.50 server: LibrariesAustralia Authorities Hostname: z3950-test.librariesaustralia.nla.gov.au Port: 210 Database: AuthTraining Userid: ANLEZ Password: z39.50 Syntax: MARC21/USMARC Encoding: utf8 For testing purposes, you can also set up a Z39.50 client target, which points at your own Koha instance's Z39.50 authority server. To find the hostname, go to /etc/koha-conf.xml and find the value for the <listen id="authorityserver"> element. Depending on your configuration, this could be something like the following: unix:/zebra/koha/var/run/zebradb/authoritysocket (N.B. You might be using a different scheme than unix sockets...) To find the database, scroll down to the bottom of koha-conf.xml until you reach the <config> element. Within this, look for the value of the element <authorityserver>. It should probably be "authorities". To set up this Z39.50 client target in Koha... Z39.50 server: my koha authorities Hostname: unix:/zebra/koha/var/run/zebradb/authoritysocket Port: Database: authorities Userid: Password: Syntax: MARC21/USMARC (or whichever flavour you need) Encoding: utf8 While I have no doubt about the functionality of this feature (I think it works quite well), I'm sure that the code could benefit from closer scrutiny by eyes other than mine. My code is almost entirely based off of the Z39.50 bibliographic searching, so there might be some vestigial code that I missed which can be removed or perhaps just an optimization of the code that I have included. Ideally, in the future, it would be nice if the Bib-1 attributes used for searching could be configurable rather than hard-coded as they are at present. They attributes represent what works for LibrariesAustralia and are a best guess. There are more specific Bib-1 attributes out there for subjects (e.g. geographic terms, topical terms, etc.), but these weren't supported by LibrariesAustralia and they might not be supported by other major organizations like OCLC, so I did not include them. I'm open to changing that though. Jared also suggested using the QueryParser to allow the creation of configurable attributes/indexes, and this is something I would really be interested in doing in the future, since it would allow for different Z39.50 targets to use different Bib-1 attributes (which are often published by the target providers). As the QueryParser becomes more integrated into Koha, I would like it to become more a part of the external Z39.50 searches as well. I think it might supposed to be ModAuthorityInBatch not ModAuthInBatch in the ImportBreedingAuth sub... It never gets called, but worth fixing that mistake...I think this same typo might exist elsewhere in Koha as well... Looks like there's lots of trailing whitespace and a typo in ImportBreedingAuth where controlnumber should be control_number... Created attachment 18011 [details] [review] Bug 10096 - Add a Z39.50 interface for authority searching (2) This updated patch fixes the whitespace errors, SQL typo, incorrect sub reference, and changes the Bib-1 attributes a bit (adds 1002, renames the other name attributes, and changes 1006 to 3), so that the Z39.50 searches have a higher success/correspondence rate. I've also included some information about how to set up the Library of Congress Z39.50 client targets. Created attachment 18108 [details] [review] Bug 10096 [DB Follow-up] - Add a Z39.50 interface for authority searching This patch adds the "recordtype" column to the "z3950servers" table. The value in this column (biblio or authority) then controls whether the z3950 server shows up in a bibliographic search (through the Acq and Cataloguing modules) or in an authority search (through the Authorities module). I also edited the z3950 management console to show this value and allow users to edit it. The default value is "biblio", since the vast majority of z3950 targets will be bibliographic. However, there is an option to add/edit a z3950 target as a source of authority records. Test Plan: 1) Apply both patches 2) Run updatedatabase.pl (after setting your KOHA_CONF and PERL5 environmental variables) 3) Use the test plan from the 1st patch N.B. Make sure that your Z39.50 client target has a Record Type of Authority, otherwise it won't display when you're doing a Z3950 search for authorities. (In reply to comment #7) > Created attachment 18108 [details] [review] [review] > Bug 10096 [DB Follow-up] - Add a Z39.50 interface for authority searching > > This patch adds the "recordtype" column to the "z3950servers" table. > > The value in this column (biblio or authority) then controls whether > the z3950 server shows up in a bibliographic search (through the > Acq and Cataloguing modules) or in an authority search (through > the Authorities module). > > I also edited the z3950 management console to show this value > and allow users to edit it. The default value is "biblio", since > the vast majority of z3950 targets will be bibliographic. However, > there is an option to add/edit a z3950 target as a source of > authority records. > > Test Plan: > > 1) Apply both patches hmm, the 2nd patch does not apply to master (b74ac4a) ------------------------------------------- head$ git reset --hard origin/master HEAD is now at b74ac4a Bug 10307 - z39.50 server search tab shows z390.50 mason@xen1:~/g/head$ git bz attach 10096 Bug 10096 - Add a Z39.50 interface for authority searching (2) Apply? [yn] y Applying: Bug 10096 - Add a Z39.50 interface for authority searching Bug 10096 [DB Follow-up] - Add a Z39.50 interface for authority searching Apply? [yn] y Applying: Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching ------------------------------------------- Created attachment 18648 [details] [review] Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching This patch adds the "recordtype" column to the "z3950servers" table. The value in this column (biblio or authority) then controls whether the z3950 server shows up in a bibliographic search (through the Acq and Cataloguing modules) or in an authority search (through the Authorities module). I also edited the z3950 management console to show this value and allow users to edit it. The default value is "biblio", since the vast majority of z3950 targets will be bibliographic. However, there is an option to add/edit a z3950 target as a source of authority records. Test Plan: 1) Apply both patches 2) Run updatedatabase.pl (after setting your KOHA_CONF and PERL5 environmental variables) 3) Use the test plan from the 1st patch N.B. Make sure that your Z39.50 client target has a Record Type of Authority, otherwise it won't display when you're doing a Z3950 search for authorities. > > Test Plan:
> >
> > 1) Apply both patches
>
> hmm, the 2nd patch does not apply to master (b74ac4a)
>
i've uploaded a 2nd patch that does apply to master
Created attachment 18789 [details] [review] Bug 10096 - Add a Z39.50 interface for authority searching This patch introduces a new Z39.50 interface for searching z39.50 compliant databases for MARC authority records. These databases aren't as common as their bibliographic equivalents, but they're out there and very useful. I have included info at the bottom of this messsage for sample authority databases you can try. To test this patch: 1) Set up Z39.50 client targets for authority databases. (I've included information at the bottom of this message for LibrariesAustralia's test server for authorities as well as instructions on how to use your Koha's z39.50 authority server as well. The Library of Congress also has authority databases available (unsure if these are test or prod), and you might have access to others through OCLC or RLIN. OCLC provides login credentials for their test databases. 2) Go to the Authorities module 3) Click on the new "Z39.50 search button" 4) Select your authoriy search targets from the list (N.B. bibliographic targets will also display. These are of no use to you.) 5) Do a search for an authority you would like using either the "Raw" input box or the more specific input boxes for names, subjects, subject sub divisions, or titles. (I like searching Name (personal): Eric on the LibrariesAustralia test DB.) 6) You should see a table listing the server, heading, authority type, and two other columns (MARC and a nameless column). "Authority type" is the type of authority it will become when imported in to Koha. In the Eric example, "PERSO_NAME". 7) Click on "MARC" next to the results of interest to review the MARC authority record. 8) When you're satisfied with a record, click on "Import". 9) The pop-up window will close and your original Koha window will change to the "Adding authority Personal Name" screen (in the Eric example). 10) All the relevant fields should be filled out for the record. Review them and make any changes as necessary. (N.B. The 001 will be cleared when saved, so if you have a use for the imported control number, move it to the 010, 016, or 035 as appropriate. If you have a default value for the 003, this will also likely be overwritten. Move it if necessary. The 005 will also be updated when saved, so do not worry about that.) 11) When you're satisfied, click save. 12) Presto! You've imported your first authority record via Z39.50! -- Here is the info for the LibrariesAustralia test Z39.50 authority database: Z39.50 server: LibrariesAustralia Authorities Hostname: z3950-test.librariesaustralia.nla.gov.au Port: 210 Database: AuthTraining Userid: ANLEZ Password: z39.50 Syntax: MARC21/USMARC Encoding: utf8 - The U.S.A. Library of Congress also provides Z39.50 access to its Name and Subject Authorities (http://www.loc.gov/z3950/lcserver.html). Name Authority: Z39.50 server: Library of Congress Name Authority File Hostname: lx2.loc.gov Port: 210 Database: NAF Syntax: MARC21/USMARC Encoding: utf8 Subject Authority: Z39.50 server: Library of Congress Subject Authority File Hostname: lx2.loc.gov Port: 210 Database: SAF Syntax: MARC21/USMARC Encoding: utf8 (N.B. Both of these databases also include title authorities.) - For testing purposes, you can also set up a Z39.50 client target, which points at your own Koha instance's Z39.50 authority server. To find the hostname, go to /etc/koha-conf.xml and find the value for the <listen id="authorityserver"> element. Depending on your configuration, this could be something like the following: unix:/zebra/koha/var/run/zebradb/authoritysocket (N.B. You might be using a different scheme than unix sockets...) To find the database, scroll down to the bottom of koha-conf.xml until you reach the <config> element. Within this, look for the value of the element <authorityserver>. It should probably be "authorities". To set up this Z39.50 client target in Koha... Z39.50 server: my koha authorities Hostname: unix:/zebra/koha/var/run/zebradb/authoritysocket Port: Database: authorities Userid: Password: Syntax: MARC21/USMARC (or whichever flavour you need) Encoding: utf8 Signed-off-by: Mason James <mtj@kohaaloha.com> Created attachment 18790 [details] [review] Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching This patch adds the "recordtype" column to the "z3950servers" table. The value in this column (biblio or authority) then controls whether the z3950 server shows up in a bibliographic search (through the Acq and Cataloguing modules) or in an authority search (through the Authorities module). I also edited the z3950 management console to show this value and allow users to edit it. The default value is "biblio", since the vast majority of z3950 targets will be bibliographic. However, there is an option to add/edit a z3950 target as a source of authority records. Test Plan: 1) Apply both patches 2) Run updatedatabase.pl (after setting your KOHA_CONF and PERL5 environmental variables) 3) Use the test plan from the 1st patch N.B. Make sure that your Z39.50 client target has a Record Type of Authority, otherwise it won't display when you're doing a Z3950 search for authorities. Signed-off-by: Mason James <mtj@kohaaloha.com> Created attachment 18791 [details] [review] Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass QA (In reply to comment #13) > Created attachment 18791 [details] [review] [review] > Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass QA i've tested these 2 patches, and added a follow-up patch to fix various whitespace errors David, I am sorry, but the patch doesn't apply any longer, can you please provide a rebased patch? Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all y Applying: Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. (In reply to Katrin Fischer from comment #15) > David, I am sorry, but the patch doesn't apply any longer, can you please > provide a rebased patch? > > Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all y > Applying: Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority > searching > fatal: sha1 information is lacking or useless > (koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt). > Repository lacks necessary blobs to fall back on 3-way merge. > Cannot fall back to three-way merge. Alas, I think that's Mason's follow-up, so he'll need to provide the rebased version. I can rebase my original, but it would be unfortunate to have to lose/redo his follow-ups. Just noticed that I need to update the copyright on those new files to include at least a Parts Copyright for Prosentient Systems... Created attachment 19957 [details] [review] Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching This patch adds the "recordtype" column to the "z3950servers" table. The value in this column (biblio or authority) then controls whether the z3950 server shows up in a bibliographic search (through the Acq and Cataloguing modules) or in an authority search (through the Authorities module). I also edited the z3950 management console to show this value and allow users to edit it. The default value is "biblio", since the vast majority of z3950 targets will be bibliographic. However, there is an option to add/edit a z3950 target as a source of authority records. Test Plan: 1) Apply both patches 2) Run updatedatabase.pl (after setting your KOHA_CONF and PERL5 environmental variables) 3) Use the test plan from the 1st patch N.B. Make sure that your Z39.50 client target has a Record Type of Authority, otherwise it won't display when you're doing a Z3950 search for authorities. Signed-off-by: Mason James <mtj@kohaaloha.com> Created attachment 19958 [details] [review] Bug 10096 - Add a Z39.50 interface for authority searching This patch introduces a new Z39.50 interface for searching z39.50 compliant databases for MARC authority records. These databases aren't as common as their bibliographic equivalents, but they're out there and very useful. I have included info at the bottom of this messsage for sample authority databases you can try. To test this patch: 1) Set up Z39.50 client targets for authority databases. (I've included information at the bottom of this message for LibrariesAustralia's test server for authorities as well as instructions on how to use your Koha's z39.50 authority server as well. The Library of Congress also has authority databases available (unsure if these are test or prod), and you might have access to others through OCLC or RLIN. OCLC provides login credentials for their test databases. 2) Go to the Authorities module 3) Click on the new "Z39.50 search button" 4) Select your authoriy search targets from the list (N.B. bibliographic targets will also display. These are of no use to you.) 5) Do a search for an authority you would like using either the "Raw" input box or the more specific input boxes for names, subjects, subject sub divisions, or titles. (I like searching Name (personal): Eric on the LibrariesAustralia test DB.) 6) You should see a table listing the server, heading, authority type, and two other columns (MARC and a nameless column). "Authority type" is the type of authority it will become when imported in to Koha. In the Eric example, "PERSO_NAME". 7) Click on "MARC" next to the results of interest to review the MARC authority record. 8) When you're satisfied with a record, click on "Import". 9) The pop-up window will close and your original Koha window will change to the "Adding authority Personal Name" screen (in the Eric example). 10) All the relevant fields should be filled out for the record. Review them and make any changes as necessary. (N.B. The 001 will be cleared when saved, so if you have a use for the imported control number, move it to the 010, 016, or 035 as appropriate. If you have a default value for the 003, this will also likely be overwritten. Move it if necessary. The 005 will also be updated when saved, so do not worry about that.) 11) When you're satisfied, click save. 12) Presto! You've imported your first authority record via Z39.50! -- Here is the info for the LibrariesAustralia test Z39.50 authority database: Z39.50 server: LibrariesAustralia Authorities Hostname: z3950-test.librariesaustralia.nla.gov.au Port: 210 Database: AuthTraining Userid: ANLEZ Password: z39.50 Syntax: MARC21/USMARC Encoding: utf8 - The U.S.A. Library of Congress also provides Z39.50 access to its Name and Subject Authorities (http://www.loc.gov/z3950/lcserver.html). Name Authority: Z39.50 server: Library of Congress Name Authority File Hostname: lx2.loc.gov Port: 210 Database: NAF Syntax: MARC21/USMARC Encoding: utf8 Subject Authority: Z39.50 server: Library of Congress Subject Authority File Hostname: lx2.loc.gov Port: 210 Database: SAF Syntax: MARC21/USMARC Encoding: utf8 (N.B. Both of these databases also include title authorities.) - For testing purposes, you can also set up a Z39.50 client target, which points at your own Koha instance's Z39.50 authority server. To find the hostname, go to /etc/koha-conf.xml and find the value for the <listen id="authorityserver"> element. Depending on your configuration, this could be something like the following: unix:/zebra/koha/var/run/zebradb/authoritysocket (N.B. You might be using a different scheme than unix sockets...) To find the database, scroll down to the bottom of koha-conf.xml until you reach the <config> element. Within this, look for the value of the element <authorityserver>. It should probably be "authorities". To set up this Z39.50 client target in Koha... Z39.50 server: my koha authorities Hostname: unix:/zebra/koha/var/run/zebradb/authoritysocket Port: Database: authorities Userid: Password: Syntax: MARC21/USMARC (or whichever flavour you need) Encoding: utf8 Signed-off-by: Mason James <mtj@kohaaloha.com> Created attachment 19959 [details] [review] Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching This patch adds the "recordtype" column to the "z3950servers" table. The value in this column (biblio or authority) then controls whether the z3950 server shows up in a bibliographic search (through the Acq and Cataloguing modules) or in an authority search (through the Authorities module). I also edited the z3950 management console to show this value and allow users to edit it. The default value is "biblio", since the vast majority of z3950 targets will be bibliographic. However, there is an option to add/edit a z3950 target as a source of authority records. Test Plan: 1) Apply both patches 2) Run updatedatabase.pl (after setting your KOHA_CONF and PERL5 environmental variables) 3) Use the test plan from the 1st patch N.B. Make sure that your Z39.50 client target has a Record Type of Authority, otherwise it won't display when you're doing a Z3950 search for authorities. Signed-off-by: Mason James <mtj@kohaaloha.com> Created attachment 19960 [details] [review] Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass QA Hey Katrin! I've finally rebased these patches! (I feel like I've levelled up my vim and git skills...also this git bz interactive is wild!) Here is a more up-to-date test plan: 0) Run updatedatabase.pl (to add "recordtype" to the z3950servers table. 1) Set up Z39.50 client targets for authority databases. (I've included information at the bottom of this message for LibrariesAustralia's test server for authorities as well as instructions on how to use your Koha's z39.50 authority server as well. The Library of Congress also has authority databases available (unsure if these are test or prod), and you might have access to others through OCLC or RLIN. OCLC provides login credentials for their test databases. N.B. Make sure that your Z39.50 client target has a Record Type of Authority, otherwise it won't display when you're doing a Z3950 search for authorities. 2) Go to the Authorities module 3) Click on the new "Z39.50 search button" 4) Select your authority search targets from the list 5) Do a search for an authority you would like using either the "Keyword" input box or the more specific input boxes for names, subjects, subject sub divisions, or titles. (I like searching Author (personal): Eric on the LibrariesAustralia test DB.) 6) You should see a table listing the server, heading, authority type, and two other columns (MARC and a nameless column). "Authority type" is the type of authority it will become when imported in to Koha. In the Eric example, "PERSO_NAME". 7) Click on "MARC" next to the results of interest to review the MARC authority record. 8) When you're satisfied with a record, click on "Import". 9) The pop-up window will close and your original Koha window will change to the "Adding authority Personal Name" screen (in the Eric example). 10) All the relevant fields should be filled out for the record. Review them and make any changes as necessary. (N.B. The 001 will be cleared when saved, so if you have a use for the imported control number, move it to the 010, 016, or 035 as appropriate. If you have a default value for the 003, this will also likely be overwritten. Move it if necessary. The 005 will also be updated when saved, so do not worry about that.) 11) When you're satisfied, click save. 12) Presto! You've imported your first authority record via Z39.50! Hi David, some very first observations from reading the code and the QA script: The license on cataloguing/z3950_auth_search.pl is GPL2+ - maybe you could consider making it GPL3+? There are some .pl files with SQL statements in them - I think it would be nicer to move them out to an existing or new module. I know that most of it probably is kind of a preexisting problem stemming from how we handle bibliographic records. For the changes in Breeding.pm some unit tests should be provided. In your updatedatabase statement could you specify after which column the new column should be added (little pet peeve of mine I guess :) )? Oh, in Breeding.pm there are some left over TODOs and FIXMEs - maybe take a look at those again? (In reply to Katrin Fischer from comment #23) > Hi David, > > some very first observations from reading the code and the QA script: > > The license on cataloguing/z3950_auth_search.pl is GPL2+ - maybe you could > consider making it GPL3+? > > There are some .pl files with SQL statements in them - I think it would be > nicer to move them out to an existing or new module. I know that most of it > probably is kind of a preexisting problem stemming from how we handle > bibliographic records. > > For the changes in Breeding.pm some unit tests should be provided. > > In your updatedatabase statement could you specify after which column the > new column should be added (little pet peeve of mine I guess :) )? Hi Katrin: 1) Sure. I've changed the license on cataloguing/z3950_auth_search.pl to GPL3+. 2) It is a pre-existing problem, so perhaps a separate bug should be opened instead for removing SQL from the .pl files and putting them in an existing or new module? (It's funny that we removed the defunct Z39.50 module since it wasn't being used and now it seems that we could use a new Z39.50 module :P). That'll actually be quite a large re-write, I think. 3) As for the unit tests...I can't think of any way to really create a unit test for this, since "Z3950SearchAuth" is too tightly tied to the template and an actual logged in user. The same goes for the regular "Z3950Search". There should probably be a better separation of code and template with the Z3950 searching, but that also seems like a pre-existing problem. I just copied the code and made it work for authorities instead of bibliographic records. I imagine fixing that would also be better as a separate bug. 4) Fixed updatedatabase to specify an "AFTER" column (as well as removing MySQL backticks). 5) I've removed the FIXMEs and TODOs from the parts of Breeding.pm that I've added. (They weren't "real" FIXMEs.) Created attachment 20927 [details] [review] Bug 10096 - [FOLLOW-UP] QA Improvements 0) Run updatedatabase.pl (to add "recordtype" to the z3950servers table. 1) Set up Z39.50 client targets for authority databases. (I've included information at the bottom of this message for LibrariesAustralia's test server for authorities as well as instructions on how to use your Koha's z39.50 authority server as well. The Library of Congress also has authority databases available (unsure if these are test or prod), and you might have access to others through OCLC or RLIN. OCLC provides login credentials for their test databases. N.B. Make sure that your Z39.50 client target has a Record Type of Authority, otherwise it won't display when you're doing a Z3950 search for authorities. 2) Go to the Authorities module 3) Click on the new "Z39.50 search button" 4) Select your authority search targets from the list 5) Do a search for an authority you would like using either the "Keyword" input box or the more specific input boxes for names, subjects, subject sub divisions, or titles. (I like searching Author (personal): Eric on the LibrariesAustralia test DB.) 6) You should see a table listing the server, heading, authority type, and two other columns (MARC and a nameless column). "Authority type" is the type of authority it will become when imported in to Koha. In the Eric example, "PERSO_NAME". 7) Click on "MARC" next to the results of interest to review the MARC authority record. 8) When you're satisfied with a record, click on "Import". 9) The pop-up window will close and your original Koha window will change to the "Adding authority Personal Name" screen (in the Eric example). 10) All the relevant fields should be filled out for the record. Review them and make any changes as necessary. (N.B. The 001 will be cleared when saved, so if you have a use for the imported control number, move it to the 010, 016, or 035 as appropriate. If you have a default value for the 003, this will also likely be overwritten. Move it if necessary. The 005 will also be updated when saved, so do not worry about that.) 11) When you're satisfied, click save. 12) Presto! You've imported your first authority record via Z39.50! Created attachment 20928 [details] [review] Bug 10096 - Add a Z39.50 interface for authority searching This patch introduces a new Z39.50 interface for searching z39.50 compliant databases for MARC authority records. These databases aren't as common as their bibliographic equivalents, but they're out there and very useful. I have included info at the bottom of this messsage for sample authority databases you can try. To test this patch: 1) Set up Z39.50 client targets for authority databases. (I've included information at the bottom of this message for LibrariesAustralia's test server for authorities as well as instructions on how to use your Koha's z39.50 authority server as well. The Library of Congress also has authority databases available (unsure if these are test or prod), and you might have access to others through OCLC or RLIN. OCLC provides login credentials for their test databases. 2) Go to the Authorities module 3) Click on the new "Z39.50 search button" 4) Select your authoriy search targets from the list (N.B. bibliographic targets will also display. These are of no use to you.) 5) Do a search for an authority you would like using either the "Raw" input box or the more specific input boxes for names, subjects, subject sub divisions, or titles. (I like searching Name (personal): Eric on the LibrariesAustralia test DB.) 6) You should see a table listing the server, heading, authority type, and two other columns (MARC and a nameless column). "Authority type" is the type of authority it will become when imported in to Koha. In the Eric example, "PERSO_NAME". 7) Click on "MARC" next to the results of interest to review the MARC authority record. 8) When you're satisfied with a record, click on "Import". 9) The pop-up window will close and your original Koha window will change to the "Adding authority Personal Name" screen (in the Eric example). 10) All the relevant fields should be filled out for the record. Review them and make any changes as necessary. (N.B. The 001 will be cleared when saved, so if you have a use for the imported control number, move it to the 010, 016, or 035 as appropriate. If you have a default value for the 003, this will also likely be overwritten. Move it if necessary. The 005 will also be updated when saved, so do not worry about that.) 11) When you're satisfied, click save. 12) Presto! You've imported your first authority record via Z39.50! -- Here is the info for the LibrariesAustralia test Z39.50 authority database: Z39.50 server: LibrariesAustralia Authorities Hostname: z3950-test.librariesaustralia.nla.gov.au Port: 210 Database: AuthTraining Userid: ANLEZ Password: z39.50 Syntax: MARC21/USMARC Encoding: utf8 - The U.S.A. Library of Congress also provides Z39.50 access to its Name and Subject Authorities (http://www.loc.gov/z3950/lcserver.html). Name Authority: Z39.50 server: Library of Congress Name Authority File Hostname: lx2.loc.gov Port: 210 Database: NAF Syntax: MARC21/USMARC Encoding: utf8 Subject Authority: Z39.50 server: Library of Congress Subject Authority File Hostname: lx2.loc.gov Port: 210 Database: SAF Syntax: MARC21/USMARC Encoding: utf8 (N.B. Both of these databases also include title authorities.) - For testing purposes, you can also set up a Z39.50 client target, which points at your own Koha instance's Z39.50 authority server. To find the hostname, go to /etc/koha-conf.xml and find the value for the <listen id="authorityserver"> element. Depending on your configuration, this could be something like the following: unix:/zebra/koha/var/run/zebradb/authoritysocket (N.B. You might be using a different scheme than unix sockets...) To find the database, scroll down to the bottom of koha-conf.xml until you reach the <config> element. Within this, look for the value of the element <authorityserver>. It should probably be "authorities". To set up this Z39.50 client target in Koha... Z39.50 server: my koha authorities Hostname: unix:/zebra/koha/var/run/zebradb/authoritysocket Port: Database: authorities Userid: Password: Syntax: MARC21/USMARC (or whichever flavour you need) Encoding: utf8 Signed-off-by: Mason James <mtj@kohaaloha.com> Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching This patch adds the "recordtype" column to the "z3950servers" table. The value in this column (biblio or authority) then controls whether the z3950 server shows up in a bibliographic search (through the Acq and Cataloguing modules) or in an authority search (through the Authorities module). I also edited the z3950 management console to show this value and allow users to edit it. The default value is "biblio", since the vast majority of z3950 targets will be bibliographic. However, there is an option to add/edit a z3950 target as a source of authority records. Test Plan: 1) Apply both patches 2) Run updatedatabase.pl (after setting your KOHA_CONF and PERL5 environmental variables) 3) Use the test plan from the 1st patch N.B. Make sure that your Z39.50 client target has a Record Type of Authority, otherwise it won't display when you're doing a Z3950 search for authorities. Signed-off-by: Mason James <mtj@kohaaloha.com> Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass QA Created attachment 20929 [details] [review] Bug 10096 - [FOLLOW-UP] QA Improvements 0) Run updatedatabase.pl (to add "recordtype" to the z3950servers table. 1) Set up Z39.50 client targets for authority databases. (I've included information at the bottom of this message for LibrariesAustralia's test server for authorities as well as instructions on how to use your Koha's z39.50 authority server as well. The Library of Congress also has authority databases available (unsure if these are test or prod), and you might have access to others through OCLC or RLIN. OCLC provides login credentials for their test databases. N.B. Make sure that your Z39.50 client target has a Record Type of Authority, otherwise it won't display when you're doing a Z3950 search for authorities. 2) Go to the Authorities module 3) Click on the new "Z39.50 search button" 4) Select your authority search targets from the list 5) Do a search for an authority you would like using either the "Keyword" input box or the more specific input boxes for names, subjects, subject sub divisions, or titles. (I like searching Author (personal): Eric on the LibrariesAustralia test DB.) 6) You should see a table listing the server, heading, authority type, and two other columns (MARC and a nameless column). "Authority type" is the type of authority it will become when imported in to Koha. In the Eric example, "PERSO_NAME". 7) Click on "MARC" next to the results of interest to review the MARC authority record. 8) When you're satisfied with a record, click on "Import". 9) The pop-up window will close and your original Koha window will change to the "Adding authority Personal Name" screen (in the Eric example). 10) All the relevant fields should be filled out for the record. Review them and make any changes as necessary. (N.B. The 001 will be cleared when saved, so if you have a use for the imported control number, move it to the 010, 016, or 035 as appropriate. If you have a default value for the 003, this will also likely be overwritten. Move it if necessary. The 005 will also be updated when saved, so do not worry about that.) 11) When you're satisfied, click save. 12) Presto! You've imported your first authority record via Z39.50! Created attachment 21611 [details] [review] Bug 10096 - Add a Z39.50 interface for authority searching This patch introduces a new Z39.50 interface for searching z39.50 compliant databases for MARC authority records. These databases aren't as common as their bibliographic equivalents, but they're out there and very useful. I have included info at the bottom of this messsage for sample authority databases you can try. To test this patch: 1) Set up Z39.50 client targets for authority databases. (I've included information at the bottom of this message for LibrariesAustralia's test server for authorities as well as instructions on how to use your Koha's z39.50 authority server as well. The Library of Congress also has authority databases available (unsure if these are test or prod), and you might have access to others through OCLC or RLIN. OCLC provides login credentials for their test databases. 2) Go to the Authorities module 3) Click on the new "Z39.50 search button" 4) Select your authoriy search targets from the list (N.B. bibliographic targets will also display. These are of no use to you.) 5) Do a search for an authority you would like using either the "Raw" input box or the more specific input boxes for names, subjects, subject sub divisions, or titles. (I like searching Name (personal): Eric on the LibrariesAustralia test DB.) 6) You should see a table listing the server, heading, authority type, and two other columns (MARC and a nameless column). "Authority type" is the type of authority it will become when imported in to Koha. In the Eric example, "PERSO_NAME". 7) Click on "MARC" next to the results of interest to review the MARC authority record. 8) When you're satisfied with a record, click on "Import". 9) The pop-up window will close and your original Koha window will change to the "Adding authority Personal Name" screen (in the Eric example). 10) All the relevant fields should be filled out for the record. Review them and make any changes as necessary. (N.B. The 001 will be cleared when saved, so if you have a use for the imported control number, move it to the 010, 016, or 035 as appropriate. If you have a default value for the 003, this will also likely be overwritten. Move it if necessary. The 005 will also be updated when saved, so do not worry about that.) 11) When you're satisfied, click save. 12) Presto! You've imported your first authority record via Z39.50! -- Here is the info for the LibrariesAustralia test Z39.50 authority database: Z39.50 server: LibrariesAustralia Authorities Hostname: z3950-test.librariesaustralia.nla.gov.au Port: 210 Database: AuthTraining Userid: ANLEZ Password: z39.50 Syntax: MARC21/USMARC Encoding: utf8 - The U.S.A. Library of Congress also provides Z39.50 access to its Name and Subject Authorities (http://www.loc.gov/z3950/lcserver.html). Name Authority: Z39.50 server: Library of Congress Name Authority File Hostname: lx2.loc.gov Port: 210 Database: NAF Syntax: MARC21/USMARC Encoding: utf8 Subject Authority: Z39.50 server: Library of Congress Subject Authority File Hostname: lx2.loc.gov Port: 210 Database: SAF Syntax: MARC21/USMARC Encoding: utf8 (N.B. Both of these databases also include title authorities.) - For testing purposes, you can also set up a Z39.50 client target, which points at your own Koha instance's Z39.50 authority server. To find the hostname, go to /etc/koha-conf.xml and find the value for the <listen id="authorityserver"> element. Depending on your configuration, this could be something like the following: unix:/zebra/koha/var/run/zebradb/authoritysocket (N.B. You might be using a different scheme than unix sockets...) To find the database, scroll down to the bottom of koha-conf.xml until you reach the <config> element. Within this, look for the value of the element <authorityserver>. It should probably be "authorities". To set up this Z39.50 client target in Koha... Z39.50 server: my koha authorities Hostname: unix:/zebra/koha/var/run/zebradb/authoritysocket Port: Database: authorities Userid: Password: Syntax: MARC21/USMARC (or whichever flavour you need) Encoding: utf8 Signed-off-by: Mason James <mtj@kohaaloha.com> Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching This patch adds the "recordtype" column to the "z3950servers" table. The value in this column (biblio or authority) then controls whether the z3950 server shows up in a bibliographic search (through the Acq and Cataloguing modules) or in an authority search (through the Authorities module). I also edited the z3950 management console to show this value and allow users to edit it. The default value is "biblio", since the vast majority of z3950 targets will be bibliographic. However, there is an option to add/edit a z3950 target as a source of authority records. Test Plan: 1) Apply both patches 2) Run updatedatabase.pl (after setting your KOHA_CONF and PERL5 environmental variables) 3) Use the test plan from the 1st patch N.B. Make sure that your Z39.50 client target has a Record Type of Authority, otherwise it won't display when you're doing a Z3950 search for authorities. Signed-off-by: Mason James <mtj@kohaaloha.com> Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass QA Created attachment 21612 [details] [review] Bug 10096 - [FOLLOW-UP] QA Improvements 0) Run updatedatabase.pl (to add "recordtype" to the z3950servers table. 1) Set up Z39.50 client targets for authority databases. (I've included information at the bottom of this message for LibrariesAustralia's test server for authorities as well as instructions on how to use your Koha's z39.50 authority server as well. The Library of Congress also has authority databases available (unsure if these are test or prod), and you might have access to others through OCLC or RLIN. OCLC provides login credentials for their test databases. N.B. Make sure that your Z39.50 client target has a Record Type of Authority, otherwise it won't display when you're doing a Z3950 search for authorities. 2) Go to the Authorities module 3) Click on the new "Z39.50 search button" 4) Select your authority search targets from the list 5) Do a search for an authority you would like using either the "Keyword" input box or the more specific input boxes for names, subjects, subject sub divisions, or titles. (I like searching Author (personal): Eric on the LibrariesAustralia test DB.) 6) You should see a table listing the server, heading, authority type, and two other columns (MARC and a nameless column). "Authority type" is the type of authority it will become when imported in to Koha. In the Eric example, "PERSO_NAME". 7) Click on "MARC" next to the results of interest to review the MARC authority record. 8) When you're satisfied with a record, click on "Import". 9) The pop-up window will close and your original Koha window will change to the "Adding authority Personal Name" screen (in the Eric example). 10) All the relevant fields should be filled out for the record. Review them and make any changes as necessary. (N.B. The 001 will be cleared when saved, so if you have a use for the imported control number, move it to the 010, 016, or 035 as appropriate. If you have a default value for the 003, this will also likely be overwritten. Move it if necessary. The 005 will also be updated when saved, so do not worry about that.) 11) When you're satisfied, click save. 12) Presto! You've imported your first authority record via Z39.50! Rebased and fixed some tabs the QA script was complaining about. Created attachment 21762 [details] [review] Bug 10096 - Add a Z39.50 interface for authority searching This patch introduces a new Z39.50 interface for searching z39.50 compliant databases for MARC authority records. These databases aren't as common as their bibliographic equivalents, but they're out there and very useful. I have included info at the bottom of this messsage for sample authority databases you can try. To test this patch: 1) Set up Z39.50 client targets for authority databases. (I've included information at the bottom of this message for LibrariesAustralia's test server for authorities as well as instructions on how to use your Koha's z39.50 authority server as well. The Library of Congress also has authority databases available (unsure if these are test or prod), and you might have access to others through OCLC or RLIN. OCLC provides login credentials for their test databases. 2) Go to the Authorities module 3) Click on the new "Z39.50 search button" 4) Select your authoriy search targets from the list (N.B. bibliographic targets will also display. These are of no use to you.) 5) Do a search for an authority you would like using either the "Raw" input box or the more specific input boxes for names, subjects, subject sub divisions, or titles. (I like searching Name (personal): Eric on the LibrariesAustralia test DB.) 6) You should see a table listing the server, heading, authority type, and two other columns (MARC and a nameless column). "Authority type" is the type of authority it will become when imported in to Koha. In the Eric example, "PERSO_NAME". 7) Click on "MARC" next to the results of interest to review the MARC authority record. 8) When you're satisfied with a record, click on "Import". 9) The pop-up window will close and your original Koha window will change to the "Adding authority Personal Name" screen (in the Eric example). 10) All the relevant fields should be filled out for the record. Review them and make any changes as necessary. (N.B. The 001 will be cleared when saved, so if you have a use for the imported control number, move it to the 010, 016, or 035 as appropriate. If you have a default value for the 003, this will also likely be overwritten. Move it if necessary. The 005 will also be updated when saved, so do not worry about that.) 11) When you're satisfied, click save. 12) Presto! You've imported your first authority record via Z39.50! -- Here is the info for the LibrariesAustralia test Z39.50 authority database: Z39.50 server: LibrariesAustralia Authorities Hostname: z3950-test.librariesaustralia.nla.gov.au Port: 210 Database: AuthTraining Userid: ANLEZ Password: z39.50 Syntax: MARC21/USMARC Encoding: utf8 - The U.S.A. Library of Congress also provides Z39.50 access to its Name and Subject Authorities (http://www.loc.gov/z3950/lcserver.html). Name Authority: Z39.50 server: Library of Congress Name Authority File Hostname: lx2.loc.gov Port: 210 Database: NAF Syntax: MARC21/USMARC Encoding: utf8 Subject Authority: Z39.50 server: Library of Congress Subject Authority File Hostname: lx2.loc.gov Port: 210 Database: SAF Syntax: MARC21/USMARC Encoding: utf8 (N.B. Both of these databases also include title authorities.) - For testing purposes, you can also set up a Z39.50 client target, which points at your own Koha instance's Z39.50 authority server. To find the hostname, go to /etc/koha-conf.xml and find the value for the <listen id="authorityserver"> element. Depending on your configuration, this could be something like the following: unix:/zebra/koha/var/run/zebradb/authoritysocket (N.B. You might be using a different scheme than unix sockets...) To find the database, scroll down to the bottom of koha-conf.xml until you reach the <config> element. Within this, look for the value of the element <authorityserver>. It should probably be "authorities". To set up this Z39.50 client target in Koha... Z39.50 server: my koha authorities Hostname: unix:/zebra/koha/var/run/zebradb/authoritysocket Port: Database: authorities Userid: Password: Syntax: MARC21/USMARC (or whichever flavour you need) Encoding: utf8 Signed-off-by: Mason James <mtj@kohaaloha.com> Bug 10096 [FOLLOW-UP] - Add a z39.50 interface for authority searching This patch adds the "recordtype" column to the "z3950servers" table. The value in this column (biblio or authority) then controls whether the z3950 server shows up in a bibliographic search (through the Acq and Cataloguing modules) or in an authority search (through the Authorities module). I also edited the z3950 management console to show this value and allow users to edit it. The default value is "biblio", since the vast majority of z3950 targets will be bibliographic. However, there is an option to add/edit a z3950 target as a source of authority records. Test Plan: 1) Apply both patches 2) Run updatedatabase.pl (after setting your KOHA_CONF and PERL5 environmental variables) 3) Use the test plan from the 1st patch N.B. Make sure that your Z39.50 client target has a Record Type of Authority, otherwise it won't display when you're doing a Z3950 search for authorities. Signed-off-by: Mason James <mtj@kohaaloha.com> Bug 10096 [FOLLOW-UP] - fix tabs/whitespace errors to pass QA Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 21763 [details] [review] Bug 10096 - [FOLLOW-UP] QA Improvements 0) Run updatedatabase.pl (to add "recordtype" to the z3950servers table. 1) Set up Z39.50 client targets for authority databases. (I've included information at the bottom of this message for LibrariesAustralia's test server for authorities as well as instructions on how to use your Koha's z39.50 authority server as well. The Library of Congress also has authority databases available (unsure if these are test or prod), and you might have access to others through OCLC or RLIN. OCLC provides login credentials for their test databases. N.B. Make sure that your Z39.50 client target has a Record Type of Authority, otherwise it won't display when you're doing a Z3950 search for authorities. 2) Go to the Authorities module 3) Click on the new "Z39.50 search button" 4) Select your authority search targets from the list 5) Do a search for an authority you would like using either the "Keyword" input box or the more specific input boxes for names, subjects, subject sub divisions, or titles. (I like searching Author (personal): Eric on the LibrariesAustralia test DB.) 6) You should see a table listing the server, heading, authority type, and two other columns (MARC and a nameless column). "Authority type" is the type of authority it will become when imported in to Koha. In the Eric example, "PERSO_NAME". 7) Click on "MARC" next to the results of interest to review the MARC authority record. 8) When you're satisfied with a record, click on "Import". 9) The pop-up window will close and your original Koha window will change to the "Adding authority Personal Name" screen (in the Eric example). 10) All the relevant fields should be filled out for the record. Review them and make any changes as necessary. (N.B. The 001 will be cleared when saved, so if you have a use for the imported control number, move it to the 010, 016, or 035 as appropriate. If you have a default value for the 003, this will also likely be overwritten. Move it if necessary. The 005 will also be updated when saved, so do not worry about that.) 11) When you're satisfied, click save. 12) Presto! You've imported your first authority record via Z39.50! Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master. Thanks, David! But also note bug 10998, as the code duplication introduced by this patch concerns me -- not to the point of not pushing the feature, but were it earlier in the 3.14 cycle, I would have asked for some refactoring before this got in. |