A .NET standard implementation of a RDB to Semantic Graph mapping API.
Part of CONVERT component for web and graph parent side project ws-projects.
A relational database to graph mapping API. Mapping relational database data from a provided interface and mapping rules to generate a graph output dataset.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See the prerequisties and deployment notes below on how to use the project on a development environment.
- GraphLoom.Core - .NET Standard 2.0
- GraphLoom test - .NET Framework 4.7.2
- Nuget for package handling.
Clone the repository with cmd (or terminal) with Git installed.
cd <install directory of choice>
git clone https://github.com/jiefenn8/dotnet-graphloom.git
using GraphLoom.Mapper;
using GraphLoom.Mapper.RDF;
using GraphLoom.Mapper.RDF.R2RML;
using System;
using VDS.RDF;
using VDS.RDF.Writing;
namespace ExampleApp1
{
public class Program
{
//Example using GraphLoom to convert inputsource to RDF.
public static void Main(string[] args)
{
//Parse the r2rml document into a r2rml map.
R2RMLParser r2rmlParser = new R2RMLParser();
R2RMLMap r2rmlMap = r2rmlParser.Parse("my_r2rml_doc.ttl", new Uri("http://www.mydomainname.com/ns#"));
//Provide own inputsource implementation with r2rml map.
IInputSource inputSource = new YourIInputSourceImplementation();
IGraphMapper rdfMapper = RDFMapperFactory.CreateDefaultRDFMapper();
IGenericGraph result = rdfMapper.MapToGraph(inputSource, r2rmlMap);
//Manipulate result or write to DB store or File.
//Writing to file using dotNetRDF API.
IGraph vdsGraph = (IGraph)result;
vdsGraph.SaveToFile("my_rdf_result.nt", new NTriplesWriter());
}
}
}
Add R2RML implementation.Initial mvp implement done.- Add graph output to graph-db(like Neo4J) support.
- Add RML implementation (JSON, CSV and XML data source).
- Add Label Property Graph implementation.
This project is licensed under the Apache License - see the LICENSE file for details