Virtuoso and LODRefine – more vicious than virtuous pair (part 2)

First…

there was a big black hole (BBH). And then it got bigger. Seriously. At this point in my life I realized that more I learn more is there to learn.

Failure is success if we live to learn from it.
(Malcolm Forbes and me)

Second…

Chewing through the virtuoso documentation made me realize that using /sparql endpoint for updating graphs (i.e. inserting triples into it) is not  a particularly good idea. One has to have some security, right? I said to the SPARQL user that it has the right to return error on any non-SELECT demand. I found out that there are three possibilities of securing your virtuoso endpoint:

There is good news…

Implementing  digest authentication into LODRefine was easy peasy (after I found the right library that is). I used Apache HTTP Client for this:


...
import org.apache.http.client.params.AuthPolicy;
import org.apache.http.NameValuePair;
import org.apache.http.auth.AuthScope;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.auth.UsernamePasswordCredentials;
...
...
...
  DefaultHttpClient client = new DefaultHttpClient();
  client.getCredentialsProvider().setCredentials(
	new AuthScope(endpoint.getHost(),endpoint.getPort()),
		      new UsernamePasswordCredentials(properties.get("username"), properties.get("password"))
		     );
  client.getParams().setParameter(AuthPNames.PROXY_AUTH_PREF, AuthPolicy.DIGEST);
  HttpPost httpPost = new HttpPost(endpoint.toURI());  try {
        List  nvps = new ArrayList ();
        nvps.add(new BasicNameValuePair("query", query));
        httpPost.setEntity(new UrlEncodedFormEntity(nvps));
        HttpResponse response = client.execute(httpPost);
        ...
      }
  ...
  ...

Nice and simple, if only the virtuoso endpoint you are trying to use supports this kind of authentication – if it does, it is accessible at /sparql-auth. I had to enable it on my local virtuoso instance. I also created a new user with SPARQL UPDATE rights. For more details see Virtuoso guide.

… and there is oh-not-so-good news …

In LOD2 we decided to use WebID authentication. This will definitely not be a walk in the park. You’ll have to wait for part 3 to see, whether I survived this dangerous endeavor.

Avoiding danger is no safer in the long run than outright exposure. The fearful are caught as often as the bold. Especially if they don’t run fast enough.
(Hellen Keller and me)

Identity problem

Who’s afraid of spider(s)? I am.

SpiderNotSpider

Maybe you’ll notice, maybe you won’t. This thingy was made digitally — ok, background was scanned, everything else was made on computer. I even made a special font today (out of my handwriting), but it sucks. Have to make another one. You wonder why? I wanted to post something, but the scanner is not available at the moment, so … this was the only reasonable solution … or not to publish anything, which would be even more reasonable :lol:

New dawn, new life, new comics? Are you serious?

A weird person: “I would like to introduce you Mateja, who is a workaholic, but will soon get a new life. Everybody?”
Everybody: “Hello, Mateja”
Mateja: “Hello, Everybody!”
A weird person again: “See Mateja? It’s not that hard.”

After this totally inappropriate intro it is time for me to tell you the truth. Are you ready? Ok, here it comes.

I love comics. I love Savage chickens and author’s witty way of making me laugh. But this is not all. There is more. I hate sitting all day behind a computer and writing stupid PhD. Now I said it. It’s out, it is alive and kicking screaming! I decided to have at least 1% of fun while doing it and draw a comic, similar to my favourite chickens. Wait! Wait! Before you jump to conclusions and start criticizing me… the only thing in common is/will be the paper, well … post-it notes, on which both comics are/will be drawn.

That’s more or less everything I wanted to say. Here’s my yellow-shallow-not-so-mellow attempt to make my self laugh. Maybe even one… or two of you as well. New dawn, new life, new comics? Definitely.

Bad_News_Monday

One more thing: please be gentle while criticizing. I ain’t professional cartoonist nor humorist. Just an ordinary girl with leaky anger management module. :mrgrin:

Edit: Make my day in 270px :)