We have recently moved to Prism 3 – and as part of this wanted to setup SFX to link to the new catalogue.

The first thing to do is the edit the TargetParser. This needs to be done via a ssh connection. The parser is located (for us) at [sfxinstance]/lib/Parsers/TargetParser/TALIS/PRISM.pm
before doing anything else take a backup of PRISM.pm:
cp -p PRISM.pm PRISMOLD.pm

I edited the file as follows, however it is formatted much more nicely at http://pastebin.com/rBQwLjwY

# Version: $Id: PRISM.pm,v 1.1 2004/09/10 19:08:51 am_3 Exp $
package Parsers::TargetParser::TALIS::PRISM;
use base qw(Parsers::TargetParser);
use     URI;

sub     getHolding {
        my ($this,$ctx_obj) = @_;
        my $issn         = $ctx_obj->ISSN();
        my $isbn         = $ctx_obj->ISBN();
        my $journalTitle = $ctx_obj->journalTitle();
        my $abbrevTitle  = $ctx_obj->{‘@abbrevTitle’}->[0];
        my $bookTitle    = $ctx_obj->bookTitle();
        my $aulast       = $ctx_obj->{‘@authLast’}->[0];
        my $base_url     = $ctx_obj->parse_param(‘url’);

        $isbn =~ s/-//g;

        if (length $issn) {
            $url=$base_url . “items/?query=$issn” . ‘&facet[0]=displayascollection%3A”Periodicals”‘;
            #$url=$base_url . “items/?query=$issn”; #doesn’t restrict to journals, safer option.
        }
        elsif (length $isbn) {
            $url=$base_url . “items/?query=$isbn”;
        }
        elsif (length $journalTitle) {
            #title search, restricted to periodical.
            $url=$base_url . “items/?query=title%3A$journalTitle” . ‘&facet[0]=displayascollection%3A”Periodicals”‘;
        }
        elsif (length $abbrevTitle) {
            $url=$base_url . “items/?query=$abbrevTitle”;
        }
        elsif (length $bookTitle) {
            $url=$base_url . “items/?query=$bookTitle”;
                if (length ($bookTitle) && length ($aulast)) {
                        # if we have a book title and author last name but no isbn
                        # search for title: foo author:bar restrict to format books
                        my $authortitle = “title%3A” . $bookTitle . “+author%3A” . $aulast;
                        #$url=$base_url . “items/?query=$authortitle”;
                        $url=$base_url . “items/?query=$authortitle” . ‘&facet[0]=displayasrecordtype%3A”bks”‘;
                }
        }
        return $url;
}

1;

This is similar to the previous Prism 2 parser. The differences are the urls created in the second half of the file. 

Most incoming links from SFX will have an ISSN so the first rule will apply. You have a choice of which url to use. The default one – enabled here – will do a keyword search for the issn but restrict to format periodical. This will avoid other results which so happen to contain a number identical to the ISSN for the given journal, however this runs the risk of not finding an item if the Catalogue record has not accurately recorded it as a periodical – if your catalogue is anything like ours then there will likely be some older records like this.

You may wish to tweak the other rules. If no ISSN can be found (which is quite unlikely, SFX has a good knowledge-base) it will perform a title search, restricted to periodicals. If you prefer something simpler you could just use:
$url=$base_url . “items/?query=$journalTitle” to do a keyword search for the title. 
Finally, if SFX has a book with an author and title and no ISBN (again, quite rare in my experience) it will do a search along time lines of: “title: a dictionary of Shakespeare sources author: Gillespie” restricted to format: books. You could, for example, delete the whole inner if statement to just do a keyword search for the books title if there is no ISBN.

Step 2; the second part is to update the url of your Prism instance.
Go to the SFX admin interface and then to Linking Parameters and search for ‘prism’. click on E for edit, and replace the url with your Prism 3 homepage, including the trailing slash, e.g. for us it is http://prism.talis.com/sussex-ac/

Sfxprism

Here are some examples, click on the last entry “Holdings in University of Sussex Catalogue:
Searching for a Journal

Another Journal

Searching for a book with ISBN:

Searching for a book with a title and author but no ISBN provided.

I’m interested in any comments or suggest improvements.

5 Comments

  1. _philjohn

    Hi Chris,You could make a small tweak to improve matching where a title is present but targetting the “title” index, like so:$url=$base_url . “items/?query=title:\”$bookTitle\””;(another alternative, if you want to use looser matching is to use () instead of “” surrounding the title).You can also target the isbn: index when an ISBN is present. There isn’t an ISSN index, but that’s something we could add fairly easily if it would be helpful.Kind regards,Phil.

  2. _philjohn

    One more thing – you’ll need to remove the trailing / after items as this will give you a 404 (we follow REST principles, so items is used as the access point for the entire collection of items, a slash should only follow it when then followed by an identifier, e.g. items/12345).Kind regards,Phil.

  3. _philjohn

    Whoops, should have checked before I posted – it won’t give you a 404, but it’s probably best to remove the trailing / as this is the supported URI.Regards,Phil.

  4. Chris Keene

    Thanks PhilDidn’t know about the ISBN index. Useful.So this will link to just a book title, which will search for a title, and with the search in double quotes.http://sfxhostedeu.exlibrisgroup.com/44SUS?ctx_enc=info%3Aofi%2Fenc%3AUTF-8&c…This will link to a book with an ISBN, which will now do an ISBN: searchhttp://sfxhostedeu.exlibrisgroup.com/44SUS?url_ver=Z39.88-2004&ctx_ver=Z39.88…:ofi/enc:UTF-8&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rft.object_id=1000000000804507&sfx.request_id=3698515&sfx.ctx_obj_item=0And this is a book search using author/title – with no ISBN. I’ve left the author field without quotes as it is more likely to be differently formatted http://prism.talis.com/sussex-ac/items/?query=title%3A%22clinical%20medicine%…[0]=displayasrecordtype%3A%22bks%22PS need to investigate why posterous did not alert me to these comments!Thanks again

  5. Chris Keene

    Let me try those links againSo this will link to just a book title, which will search for a title, and with the search in double quotes.http://sn.im/24m2015This will link to a book with an ISBN, which will now do an ISBN: searchhttp://sn.im/24m1zhrAnd this is a book search using author/title – with no ISBN. I’ve left the author field without quotes as it is more likely to be differently formatted http://sn.im/24m1yxq

Leave a Reply