Hi mates!
After importing people from Pittsburgh to my Drupal site (thanks linclark), I'm currently trying to do the following in order to develop a project. I need my site to show info about any book my users may ask for.
First tried to import only resource name, abstract, label and author:
SELECT * WHERE {
?book rdf:type dbpedia-owl:Book;
dbpedia-owl:abstract ?abstract;
dbpedia-owl:author ?author;
rdfs:label ?book_name.
FILTER (lang(?abstract) = "en")
}
ORDER BY ?book_nameViews' live preview often doesn't work at all (it only shows the query). When it does, only a tiny portion of the results is shown (it shows books starting with quotes, numbers and letter 'a'). I can view other results playing with LIMIT and OFFSET clauses, so I guess the problem is my query being so big. Saved a PHP Array display for the view, configured the Feed Importer and tried to import data. Took a little time and resulted in a "There is no new content." message.
Well, don't worry, I don't really need all that bunch of data being stored in my db. It would be better to store the info under user request, or not even storing anything at all. What about setting some site/book/by/title/% path? Yeah, let's define SPARQL: book_name as an argument!
An error occurred at http://localhost/drupal/admin/build/views/ajax/add-item/libros_view_feed....
Error Description:
Fatal error: Cannot use string offset as an array in /opt/lampp/htdocs/drupal/includes/form.inc on line 990Despite the error, when I refresh the page, SPARQL: book_name appears as an argument (can't click on it to configure, though, same error). If I give an argument to the live preview, the query issued seems correct:
SELECT * WHERE
?book rdf:type dbpedia-owl:Book;
dbpedia-owl:abstract ?abstract;
dbpedia-owl:author ?author;
rdfs:label ?book_name.FILTER regex(?book_name, "The Fellowship of the Ring")
FILTER (lang(?abstract) = "en")
ORDER BY ?book_nameDon't know where the '{' & '}' went away, I think they are there but not showing correctly (first try' query didn't show them either). Last tried removing the abstract lang filter, so query ended up as
SELECT * WHERE
?book rdf:type dbpedia-owl:Book;
dbpedia-owl:abstract ?abstract;
dbpedia-owl:author ?author;
rdfs:label ?book_name.FILTER regex(?book_name, "The Fellowship of the Ring")
ORDER BY ?book_namebut didn't work.
Any ideas regarding importing all books -OR- using arguments to build the SPARQL query?
Thanks in advance, you are saving my life!
P.S.: sorry about any mistake I may have done, I'm not English-native.
Comments
Glad to hear that the videos
Glad to hear that the videos helped and that you're getting a chance to play :)
Generally, this thing would be filed as a support request on the SPARQL Views issue queue at http://drupal.org/project/issues/sparql_views?status=All&categories=All
I just got back from China (where the Web conference I was attending had a startling lack of Internet access), but will hopefully have a chance tomorrow to look at the issues in the queue and this one.
If you want to post this as
If you want to post this as an issue in the issue queue, I can work with you to make sure it works. I think one problem may be related to an issue I solved recently.
Oh sorry, I totally forgot I
Oh sorry, I totally forgot I had posted here. Saw the arguments issue, and I'm currently working on it. Thanks and please accept my apologies!
No need to apologize :) Be
No need to apologize :) Be sure to let me know if you have any other problems with the module. Cheers!