Welcome to X2R
This is the wiki of the X2R project. It aims to provide a unified platform for integrating diverse data sources in an RDF store.
Right now X2R can extract data from relational, XML and LDAP databases, transform them to RDF and load the RDF into an RDF database.
We have released the 0.0.3 version of X2R. It is an early pre-alpha release so pretty much everything may change.
- binary distribution: http://fivo.cyf-kr.edu.pl/maven/pl/edu/agh/x2r/x2r-core/0.0.4/x2r-core-0.0.4-bin.zip
- source distribution: http://fivo.cyf-kr.edu.pl/maven/pl/edu/agh/x2r/x2r-core/0.0.4/x2r-core-0.0.4-src.zip
- javadocs: http://fivo.cyf-kr.edu.pl/maven/pl/edu/agh/x2r/x2r-core/0.0.4/javadoc
You can also use x2r-core in your maven application by adding a following dependency the "<dependencies>" section of your pom.xml file:
<dependency> <groupId>pl.edu.agh.x2r</groupId> <artifactId>x2r-core</artifactId> <version>0.0.4</version> </dependency>
You will also need to add our maven repository to the "<repositories>" section of your pom.xml
<repository> <id>fivo-repo</id> <url>http://fivo.cyf-kr.edu.pl/maven</url> </repository>
From the user point of view, X2R can be understood as a set of implementations of the DataSourceAdapter (javadoc) interface. Right now there are three of them:
Each of them has a single method:
DumpReport dump(DataSourceConfiguration dataSourceConfiguration, String mapping, RepositoryConnection target, URI targetContext);
Basically you pass in the configuration of the data source (a glorified hashmap), the string with the turtle serialization of the mapping file, and the connection to the target repository, where the result RDF triples are to be placed. In return you'll get a report (the DumpReport object) about how well did everything go. The wiki pages about each of the adapters: (LdapAdapter, RelationalDataSourceAdapter and XMLAdapter) contain more information about what constitutes the configuration and the mapping.
Apart from that there is also the StreamingXMLAdapter, which uses the same mapping language as the XMLAdapter, but allows you to convert XML data supplied as an input stream.
The way to use X2R, is:
- Download the binary distribution, place the x2r-core-<version>.jar and all the jars from the lib folder on your classpath OR, add a maven dependency as described above.
- Create an instance of the required data source adapter (e.g. DataSourceAdapter adapter = new RelationalDataSourceAdapter()
- Read the required wiki page: (LdapAdapter, RelationalDataSourceAdapter and XMLAdapter)
- Create a proper instance of the DataSourceConfiguration and the mapping String
- Make sure that the sesame repository where you want your target data to appear is initialized properly (OR use the X2RJenaWrapper in order to have the data placed in a Jena Model)
- Call the dump() method
- Enjoy your RDF data