This is an utility tool to convert metadata of a Maven repository into RDF, using Turtle (*.ttl), N3 or RDF/XML (*.rdf) serialization formats.
Turtle is an extension of the N-Triples test case format that carefully takes the most useful and appropriate things from Notation 3 (a.k.a. N3) keeping the syntax describing only RDF graphs.
For the sake of curiosity, this tool generates a file of ~130 MBytes (~10 MBytes gzipped) containing ~1.3 million triples in ~5 minutes when run against the whole Maven repository.
How do I get the source code?
You need a Subversion client. Type svn in your shell and see if you have one already installed. If not, go to the Subversion web site and get one.
Then type
svn co http://simile.mit.edu/repository/RDFizers/pom2rdf/
the source code will be fetched and downloaded to the ./pom2rdf directory.
How do I build it?
This RDFizer requires two things for you to build it:
- a Java Virtual Machine installed on your machine (version 1.4 or greater). Type 'java -version' at your shell prompt to know what version you have. If you don't have it, go to http://www.java.com and download it.
- Apache Maven installed (version 2.0 or greater). Type 'mvn -version' at your shell prompt to know what version you have. If maven is not installed, go to http://maven.apache.org/ and download it. Don't panic, the installation is really fast and simple.
NOTE: Maven will download the required libraries when you build the software, so make sure that you're connected to the internet when you build the software. You can be offline to run it later on, though.
Once you're set (and you have the maven command 'mvn' in your path), go to your command shell and type:
mvn package
this will download the required libraries, compile, package and prepare the copy the required dependencies in the ./target directory.
How do I run it?
If you want to mirror the Maven2 repository or a part of it you can use:
rsync -avz rsync://mirrors.ibiblio.org/maven2/jetty/* /tmp/ibiblio/jetty/ rsync -avz rsync://mirrors.ibiblio.org/maven2/* /tmp/ibiblio/
Now you are ready to launch it, and you can do it by typing
(unix) ./pom2rdf [/tmp/ibiblio/] [filename] [ttl|n3|xml] (win32) .\pom2rdf.bat [/tmp/ibiblio/] [filename] [ttl|n3|xml]
at the command line.
Examples:
(unix) ./pom2rdf /tmp/ibiblio/ maven-dataset.ttl ttl (unix) ./pom2rdf /tmp/ibiblio/ maven-dataset.n3 n3 (unix) ./pom2rdf /tmp/ibiblio/ maven-dataset.rdf xml
Credits
This software was created and is maintained by the Simile Project and in particular:
- Paolo Castagna

