A Faceted Browser over SPARQL Endpoints

I have recently been working on (yet another?) faceted browser over RDF data… more precisely RDF data loaded in a SPARQL endpoint that support COUNT and GROUP BY queries. I have successfully used it against Fuseki, Talis platform(tested against http://api.talis.com/stores/bbc-backstage/services/sparql) and Virtuoso (tested against http://dbpedia.org/sparql)

Main characteristics:

  1. Configurable: most aspects of the browser is configurable through two JSON files (configuration.json and facets.json). This includes basic templating & styling ability. To change the style, add a facet or browse a completely different data; just edit the json files accordingly and reload the page
  2. No preprocessing required: as all request are standard SPARQL queries… nothing is required a priori neither on the publisher nor on the consumer end
  3. Facets are defined as triple patterns (see example) therefore facets values don’t need to be necessarily directly associated with the items browsed i.e. they can be a few hops of the browsed items

see the screenshot below to get a feeling of the browser…

If you have used Google Refine before, the resemblance is probably clear. Indeed, I am reusing the JavaScript and CSS code that makes the facets part of Google Refine (they are gratefully under New BSD License.. how much I love open source!!!)

Having it running

The code is shared on github. grab it, deploy it to a Java application server and then play with the configuration files  (a number of examples are provided with the source)

Outlook and //TODO

The most exciting part to me (thanks to the Google Refine inspiration) is that all the needed knowledge about the endpoint and the facets are maintained as JSON on the client side and communicated with the server upon each request. If a user somehow update this configuration and submit to the server, she can customise her view (as an example I added a change button to each facet which allow the user to change only the facet she sees… potentially an add facet button can be added)

Additionally, a list of issues and features to add is on the github repository.

comments/feedback are very warmly welcomed 🙂

 

Update 19/03/2012:  support for fulltext search facets added. Currently supports Virtuoso and standard SPARQL (using regex). See example

Advertisements

15 Comments on “A Faceted Browser over SPARQL Endpoints”

  1. BG says:

    Hi. I have deployed your app out of the box to a glassfish app server. However when I go to http://localhost:8080/WebContent I get a “Working” screen but nothing ever appears. I had to modify your .json file a bit since some of the URIs were not valid anymore. Everything else has been left as is.

    {
    “endpoint_url”: “http://hangover.mitre.org:8890/isparql”,
    “graph”:”http://data.example.com/test”,
    “main_resource_selector”: “a “,
    “namespaces”: [
    [
    “dcat”,
    “http://www.w3.org/ns/dcat#”
    ],
    [
    “rdf”,
    “http://www.w3.org/2000/01/rdf-schema#”
    ],
    ],
    “template”: ” ”
    }

    Any suggestions?

  2. BG says:

    Actually I did find where I had an extra comma in the .json file. So now I get the following errors.

    395 SEVERE HttpException: HttpException: 406 Not Acceptable: HttpException: 406 Not Acceptable at com.hp.hpl.j… (details) javax.enterprise.system.std.com.sun.enterprise.server.logging May 22, 2012 09:21:28.491 _ThreadID=74;_ThreadName=Thread-2;

    394 SEVERE Exception in thread “org.deri.rdf.browser.facet.RdfListFacet@41341e7″(details) javax.enterprise.system.std.com.sun.enterprise.server.logging May 22, 2012 09:21:28.491 _ThreadID=74;_ThreadName=Thread-2;

    393 SEVERE HttpException: HttpException: 406 Not Acceptable: HttpException: 406 Not Acceptable at com.hp.hpl.j… (details) javax.enterprise.system.std.com.sun.enterprise.server.logging May 22, 2012 09:21:28.487 _ThreadID=73;_ThreadName=Thread-2;

    392 SEVERE Exception in thread “org.deri.rdf.browser.facet.RdfListFacet@1d6b6e76″(details) javax.enterprise.system.std.com.sun.enterprise.server.logging May 22, 2012 09:21:28.487 _ThreadID=73;_ThreadName=Thread-2;

    391 SEVERE HttpException: HttpException: 406 Not Acceptable: HttpException: 406 Not Acceptable at com.hp.hpl.j… (details) javax.enterprise.system.std.com.sun.enterprise.server.logging May 22, 2012 09:21:28.473 _ThreadID=72;_ThreadName=Thread-2;

  3. sheeeer says:

    main_resource_selector in config.json should be a “predicata object ” pair. you only have “a” in your config.json file. you should add the class of the resources to be browsed e.g.
    “main_resource_selector” : ” a <http://xmlns.com/foaf/0.1/Person > .”

    • BG says:

      1) Can you tell me if what I have now is correct?
      2) If it is can you explain why I am getting a 406 Http Exception?

      Thanks

      {
      “endpoint_url”: “http://hangover.mitre.org:8890/isparql”,
      “graph”:”http://data.example.com/test”,
      “main_resource_selector”: “a .”,
      “namespaces”: [
      [
      “dcat”,
      “http://www.w3.org/ns/dcat#”
      ],
      [
      “rdf”,
      “http://www.w3.org/2000/01/rdf-schema#”
      ]
      ],
      “template”: ” ”
      }

      • BG says:

        Sorry.. My copy/paste did not copy/paste properly. What I currently have is the following.
        Essentially I want to get what you have working and then I can make changes to reflect my ontology.

        {
        “endpoint_url”: “http://hangover.mitre.org:8890/isparql”,
        “graph”:”http://data.example.com/test”,
        “main_resource_selector”: “a “,
        “namespaces”: [
        [
        “dcat”,
        “http://www.w3.org/ns/dcat#”
        ],
        [
        “rdf”,
        “http://www.w3.org/2000/01/rdf-schema#”
        ]
        ],
        “template”: ” ”
        }

      • BG says:

        Turns out my copy/paste work just fine. Just that wordpress is stripping out some on the main_resource_selector line.

        “main_resource_selector”: “a “,

      • BG says:

        Appears wordpress does not want me to copy/paste. But my main_resource_selector line looks just like the one you copied in with the quotes around it.

      • sheeeer says:

        I think it has to do with the SPARQL endpoint. What SPARQL endpoint are you using?
        It’d be better and tractable if you open an issue at: https://github.com/fadmaa/RDF-faceted-browser/issues

  4. BG says:

    1) Ok. will open an issue.
    2) I am using Virtuoso.
    3) Does your application have a name?

  5. Till says:

    Hi, what is the license of your code? Seems great I am afraid of even looking at the code 😉

  6. Is there a demo running somewhere? All the links in the post open a JSon configuration file. Thanks 🙂

  7. ilango g says:

    Hi
    I am trying to test your application. However I get “Failed To Connect to remote server” and then I see an empty page that says: undefined matching item”. To the top left of the page I see a button called “add facet”. Okay, one of my guesses is that: localhost:3030/test/sparql needs to be set up?
    What else am I missing?

  8. Yo!

    Not quite in this issue maybe,
    but I wish to ask. Can anyone suggest a good board game?
    Wants something new and fun. Thanks for the assistance.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s