Data::RDF::RDFTool::get_book_element() : bug when many authors

Bug #858280 reported by Smonff on 2011-09-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
shurf.pl
Medium
Smonff

Bug Description

2011 - 09- 07
------------------
Got the reply from OL team. We would have the same problem with the JSON API.
We have to :
    * get the work matching with the book (see bellow the OL team reply)

We should change the way we manage lists.
This is not really a bug, but the way that Open Library's API returns the requests.
We must get the 'work' to get the author, this is the standard way to do it...

Pushed to V0.03

2011 - 09 -30
--------------------
Patched...

Asks for support to OL Team (Case #968). Waiting...

Solutions could be :
    * make a JSON-Tool or...
    * go searching the author into the 'work', not the 'edition'

2011 - 09 -30
--------------------
We now catch the situation and display a "many authors" message. In fact it is not the real cause of the bug cause there is books causing this problem, but with only one author (e.g. http://openlibrary.org/books/OL24643972M). The probleme is that the API gives a strange RDF flux :

<rdf:Description rdf:about="http://openlibrary.org/books/OL24643972M">
  <!-- authors -->
  <bibo:authorList rdf:parseType="Collection">
  </bibo:authorList>
  <!-- bibliographic description -->
    <dcterms:title>Shells Linux et Unix par la pratique</dcterms:title>
    <dcterms:publisher>Eyrolles</dcterms:publisher>
    <rdvocab:placeOfPublication>Paris, France</rdvocab:placeOfPublication>
    <dcterms:issued>2008</dcterms:issued>
    <dcterms:extent>261</dcterms:extent>
    <bibo:isbn13>9782212122732</bibo:isbn13>

2011 - 08
-----------------------

This method is called into parse_RDF_file().

We don't know how to treat the many author bug for a book who has got more than one author.
Because of this bug, when dispaying data, author name is remplaced by the year of publication...

for V0.2 in get_book_element(), if the book have many authors, the authors are stored into an array, not into hashes ( e.g. : OL8567763M.rdf", "OL7361700M", etc.). Perl ref() function allows to know which type of var is in use, see http://www.perlmonks.org/?node=ref

Got a similar problem with the publishers...

I also imagine maybe make an AuthorRequester to get all informations about an author but I don't remenber why ?

Related branches

Smonff (smonff) on 2011-09-24
summary: - Data::RDF::RDFTool parse_RDF_file() : bug when many authors
+ Data::RDF::RDFTool::get_book_element() : bug when many authors
description: updated
Smonff (smonff) on 2011-09-24
description: updated
Smonff (smonff) on 2011-09-30
Changed in bibliothek-project:
status: New → In Progress
importance: Wishlist → Medium
Smonff (smonff) on 2011-09-30
description: updated
description: updated
Smonff (smonff) wrote :

Mesage sends to OL team for this bug.

Hi,

We use your RESTful API in an under-development web-app, to get RDF streams about lists and books. I encounter a problem that I can't understand.

Some books are well 'linked' to an author, but it don't appear into the RDF flux that is returned by the OL's API. Here's an exemple with http://openlibrary.org/books/OL24606600M.rdf :

 <rdf:Description rdf:about="http://openlibrary.org/books/OL24606600M">
        <!-- authors -->
        <bibo:authorList rdf:parseType="Collection">
            [ NOTHING HERE :( ]
        </bibo:authorList>
</rdf:Description>

First I was thinking this was only concerning books with many authors ( like this one http://openlibrary.org/books/OL24643980M.rdf).
But you can see that it happens also with mono-author books ( http://openlibrary.org/books/OL24643972M ).

Same problem for this books with JSON.

I notice that this usually happens for books with many authors.

That it is possible to get the author using the 'work' URI and not the 'book' URI :
http://openlibrary.org/works/OL15727608W.rdf -> authors :)
http://openlibrary.org/books/OL24643980M -> no authors :(
... but I would like to use the book one !

Can you help me ?

Thank you very much if you can answer to us.

Sébastien Feugère

description: updated
Smonff (smonff) on 2011-09-30
description: updated
Smonff (smonff) wrote :

Message replied by the OL team

Anand Chitipothu replied:

Hi Sébastien,

Open Library has the author info only at the works. The edition pages display the author info taken from the work.

The JSON API and RDF API just gives the contents of edition/work objects in JSON/RDF. So you need to get the work objects to get the author info.

Earlier Open Library had the author info at edition-level, but that moved to work pages when works were introduced. Some edition objects still have the old authors field and that adds to the confusion.

Ideally the edition RDF should include the authors from work, but that is not done yet.

The only solution, I can think of as of now is to get the work url from edition and get the author info from work url.

I hope this helps.

Anand
Open Library

Smonff (smonff) wrote :

We should change the way we manage lists.
This is not really a bug, but the way that Open Library's API returns the requests.
We must get the 'work' to get the author, this is the standard way to do it...

description: updated
Changed in bibliothek-project:
milestone: v0.02 → v0.03
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers