In your opinion, what is the best java RDFa parser?

Advantages and disadvantages of each...

Thanks, Celso.

asked 15 Aug '10, 19:37

Celsowm's gravatar image

accept rate: 0%

my choose is java-rda used in my project http://code.google.com/p/autometa/

(22 Jan '12, 15:06) Celsowm Celsowm's gravatar image

According to Google (http://www.google.com/#q=best+java+rdfa): java-rdfa.

I agree. :-)

java-rdfa can be used from jena. Simply invoke:


Which will hook the two readers in to jena, then you will be able to:

model.read(url, "XHTML"); // xml parsing

model.read(other, "HTML"); // html parsing

-- http://github.com/shellac/java-rdfa


answered 16 Aug '10, 07:50

castagna's gravatar image

accept rate: 27%

edited 16 Aug '10, 07:56

and Any23? (http://developers.any23.org/)

(16 Aug '10, 16:10) Celsowm Celsowm's gravatar image

Any23 uses an XSLT transformation, see: http://code.google.com/p/any23/source/browse/trunk/any23-core/src/main/java/org/deri/any23/extractor/rdfa/RDFaExtractor.java

(16 Aug '10, 16:40) castagna castagna's gravatar image

in my project i am using OWLAPI, have a "simple" way to use java-rdfa?

(16 Aug '10, 16:54) Celsowm Celsowm's gravatar image

In that case you'd need to create a sink (http://www.rootdev.net/maven/projects/java-rdfa/apidocs/net/rootdev/javardfa/StatementSink.html) that passed the triples to http://owlapi.sourceforge.net/javadoc/uk/ac/manchester/cs/owl/owlapi/turtle/parser/OWLRDFConsumerAdapter.html. Trivial, but requires a little plumbing.

(18 Aug '10, 09:13) Comment Bot Comment%20Bot's gravatar image

:( !!!! ... do you have a "complete" example using Jena?

(18 Aug '10, 21:20) Celsowm Celsowm's gravatar image

Another Java implementation available now. Semargl project includes RDFa parser which fully supports all related W3C specifications and optional processing features. Atm it provides integration with Jena, Sesame, Clerezza and supports Android and GAE.

disclosure: I'm the maintainer of the project.


answered 20 Dec '12, 17:28

Lev%20Khomich's gravatar image

Lev Khomich
accept rate: 0%

TopBraid Composer has a RDFa parser as well as a fully functional editor. See http://composing-the-semantic-web.blogspot.com/2007/01/topbraid-is-now-also-rdfa-editor.html.


answered 16 Aug '10, 13:49

scotthenninger's gravatar image

scotthenninger ♦
accept rate: 17%

edited 16 Aug '10, 16:20

The Jena GRDDL Reader can also be used to process RDFa.

Model m = createMemModel();
RDFReader r = m.getReader("GRDDL");
r.setProperty("grddl.rdfa", "true");
r.read(m,  "http://www.w3.org/2001/sw/grddl-wg/td/hCardFabien-RDFa.html");

The example is taken from http://rdfa.info/2007/05/25/jena-supports-rdfa/.

The GRDDL reader uses Saxon, so I assume the extraction is done via XSLT. This may be a downside, as it might not be as fast as a native RDFa parser and you pull another dependency (Saxon) into your software. A plus is, that it can be hooked into the standard Jena AP easily, without explicitly using non-standard Jena calls.


answered 17 Aug '10, 08:21

Bastian%20Spanneberg's gravatar image

Bastian Span...
accept rate: 21%

edited 17 Aug '10, 08:27

Yes, the extraction is done via XSLT, and, yes, this is a downside. It's probably not as fast as java-rdfa (which can as easily hooked up into the standard Jena APIs).

(17 Aug '10, 19:04) castagna castagna's gravatar image

I don't see it as a downside necessarily. A precompiled XSLT script may well outperform a bad native implementation.

(19 Aug '10, 11:04) Bastian Span... Bastian%20Spanneberg's gravatar image

[http://code.google.com/p/rdfa-core-java/][1] passes nearly all RDFa 1.1 compatibility tests. Explanations for failing tests have been documented. Compatibility tests have been included as a Jena based unit test.

[1]: http://code.google.com/p/rdfa-core-java/ rdfa-core-java


answered 25 Mar '11, 12:12

Sami%20Korhonen's gravatar image

Sami Korhonen
accept rate: 0%

edited 04 Apr '11, 20:17

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 15 Aug '10, 19:37

Seen: 4,213 times

Last updated: 20 Dec '12, 17:28