Is there a java library to bind XML (LOM) to XML+RDF?

Go To StackoverFlow.com

1

For an educational project, I need some code (if exists) that transform XML files (specifically LOM metadata, but just xml is fine) to XML+RDF.

I need that because I'm using a RDF store (4store) to query the triples and make searches faster.

I read that with XSLT it's possible to transform any xml to another xml, so if you know there is an actual class, library or code, please tell me.

Thank you all.

2012-04-03 19:30
by po5i
Don't know why you got a down vote on this question without a comment. +1 anywa - William Greenly 2012-04-04 11:06


0

My advice would be to use a software library to transform the XML to RDF/XML since the mapping may not be straightforward and RDF/XML has different XML semantics.

There a loads of different RDF API's for different technology stacks including

dotNetRDF, Jena, Sesame, ARC, Redland

http://semanticweb.org/wiki/Tools

You also need to define how the LOM metadata should be serialised into RDF. There is a good article here:

http://www.downes.ca/xml/rss_lom.htm

2012-04-04 11:23
by William Greenly


0

Answer my own question..

I'm using a binding of key/value for the LOM file. So, this part of the metadata:

    <general>
    <identifier xmlns="http://ltsc.ieee.org/xsd/LOM">
       <catalog>oai</catalog>
       <entry>oai:archiplanet.org:ap_44629</entry>
    </identifier>

catalog and entry will going to be converted like this:

s = the URI of my graph, it contains my filename or identifier.

p = "lom.general.identifier.catalog"

v = "oai"

,,,,,,

s = the URI of my graph, it contains my filename or identifier.

p = "lom.general.identifier.entry"

v = "oai:archiplanet.org:ap_44629"

An so, it generates all the triples for the RDF file. I think this approach will help in order to make queries about specific values or properties.

2013-06-12 05:37
by po5i


0

IEEE LOM is not straightforward structure. It contains hierarchical taxonomy which should be taken into account when you are mapping. Here you can find an instruction on how you can map each IEEE LOM element as RDF, if this is your case.

Regarding the conversion, you can use the XML java library to read the XML files and create the final RDF/XML file using Jena according to the ontology I mentioned. The lom ontology is available at here

2015-12-10 18:50
by Enayat Rajabi