NAME

Data::RDF::RDFTool

DESCRIPTION

Manipulates RDF fluxus or files. Le coeur de la meule.

This is the swiss army knife for our RDF flux and files. We can easyly parse RDF flux, store it into files, and get many elements into this flux. We can also retrieve data from the files and use it for displaying the items of our library.

CONFIGURATION AND ENVIRONMENT

Plays with directory and $ENV{HOME}, so this ENV var should be fixed into the Microlibrary Kernel.

DEPENDENCIES

IO::Handle File
IO::File
XML::Simple
File::Basename
Encode::Encoder
Data::CURL::CurlRequester
View::WebDisplayer

SUBROUTINES / METHODS

store_rdf_flux()

Serialize RDF flux retrieved by the Curl Requester from Open Library. Books lists or books are possible but this must be specified as an argument. Should manage undesirable behaviours !!!

parse_RDF_file(OL_list_id)

Takes an OL list of books file id in argument from the Microlibrary Kernel. In addition with other subroutine, can get informations from RDF flux. For each book in the RDF list flux, extract informations about the book. Even display it (but should not)

get_list_element(flux, key)

Can get the value of any node in a flux <ol:key>value</ol:key>. Can get URI, name and description. Take the flux and a key as arguments.

get_books_number_inside_list(flux_to_parse)

Calculate number of "seeds" into our RDF flux. Take the flux as an argument.

get_book_request_url(flux, counter)

Get each seed-books URI when called from a loop. Takes the flux contenaing the books URIs and a counter as arguments.

get_book_element(element)

Dynamicaly asks for the element searched into a RDF book flux stored into a file. Possible values title, publisher, issued, language. Many other ones are available but are not implemented.

get_book_id

From an URI passed as an argument this subroutine returns the "basename" of the URI that is the book id. http://openlibrary.org/books/this->OL24647731M.rdf<-part

ARGUMENTS

$flux_to_store

The flux himself, directly comming from Open Library.

$flux_id

The book or list id that identifies this object. Be careful, it's very important to be in the good repository ('/database/books/' or '/database/lists/').

$list_or_book_selector

This is a flag used to tell wich kind of RDF flux we want to treat into the Data::RDF::RDFTool

BUGS AND LIMITATIONS

IO

Should manage undesirable behaviours just like no-file, no-directory, etc. when manipulate directory and files.

Conception

Surely a problem in conception of parse_RDF_file() and list / books treatment in the same subroutine.

Authors

If the book have many authors, the authors are stored into an array, not a hash. See https://bugs.launchpad.net/bibliothek-project/+bug/858280

AUTHOR

Self Shelf Swap - Simon Foutaiz - 2011-05-19

CURRENT MAINTAINER

    my ( $firstname = "seb", $lastname = "feugere", $provider = "gmail"); 
    print $firstname . "." . $lastname . "@" . $provider . "." .com;   

VERSION

This is version 0.01, well known as a Dime And A Shoestring

COPYRIGHT AND LICENSE

Copyright 2011 Self Shelf Swap.

This library is free software. You can redistribute it and/or modify it under the same terms as Perl himself.