Skip to content

Downloads

marco-brandizi edited this page Jun 9, 2025 · 52 revisions

rdf2pg Tools Donwloads

rdf2neo

rdf2graphml

Including rdf2pg tools in your project

We use Maven and we have our own repository for Maven artifacts. So, to use our tools programmatically you can point to them in your POM this way:

<pom>
...
	<!-- For rdf2neo -->
	<dependency>
		<groupId>uk.ac.rothamsted.kg</groupId>
		<artifactId>rdf2neo</artifactId>
		<version>SEE POM AT https://github.com/Rothamsted/rdf2pg/blob/master/rdf2neo/pom.xml</version>
	</dependency>

	<!-- For rdf2graphml -->
	<dependency>
		<groupId>uk.ac.rothamsted.kg</groupId>
		<artifactId>rdf2graphml</artifactId>
		<version>SEE POM AT https://github.com/Rothamsted/rdf2pg/blob/master/rdf2graphml/pom.xml</version>
	</dependency>
...
	<repositories>
	  <repository>
	  	<!-- Where the artifacts above are -->
			<id>knetminer-repo</id>
			<name>Knetminer Unified Repository</name>
			<url>https://knetminer.com/artifactory/repository/maven-public</url>
			<snapshots><enabled>true</enabled></snapshots>
			<releases><enabled>true</enabled></releases>
			  </repository>
	</repositories>	

The entry point to start a conversion (like the command line tools do) is MultiConfigPGMaker#getSpringInstance(). For instance, in order get an instance of the Neo4j converter, you should include the rdf2neo in your project/classpath, and then:

try ( MultiConfigNeo4jLoader mloader = MultiConfigNeo4jLoader.getSpringInstance ( 
  <config XML path>, MultiConfigNeo4jLoader.class );
)
{
  mloader.load ( <TDB path> );
}		

Where the XML configuration defines the RDF-to-PG mapping and other, target-depending aspects (eg, the Neo4j connection coordinates), and the TDB path is the RDF input (as a Jena TDB database).

See here for details on the framework architecture.

Clone this wiki locally