RDF Mapping Language (RML)

RDF Mapping Language or RML is a specification for creating rules or mappings between different input data sources like XML, JSON, CSV, Relational Databases, and even other RDF triplestores through SPARQL to RDF triples.

RML itself is constructed using RDF so knowing how to write RDF (Turtle is usually easier to write and comprehend for RML maps) allows you to create mappings between the input data and your target RDF.

Source: http://rml.io/

Each rule is a TriplesMap class that contains

The bibcat.rml.processor submodule has a base RML Processor Processor


>>> import bibcat.rml.processor as processor
INFO:rdflib:RDFLib Version: 4.2.2
>>> processor.Processor
<class 'bibcat.rml.processor.Processor'>

This class is extended for specific kinds of data sub-classes like CSVRowProcessor for common-separated values data inputs such as spreadsheets


>>> processor.CSVRowProcessor
<class 'bibcat.rml.processor.CSVRowProcessor'>

A JSONProcessor for JSON data sources,


>>> processor.JSONProcessor
<class 'bibcat.rml.processor.JSONProcessor'>

A SPARQLProcessor for mapping RDF triples to RDF triples,


>>> processor.SPARQLProcessor
<class 'bibcat.rml.processor.SPARQLProcessor'>

And a XMLProcessor.


>>> processor.XMLProcessor
<class 'bibcat.rml.processor.XMLProcessor'>

In the first example will take the BIBFRAME RDF produced by the marc2bibframe2, create an instance of the SPARQLProcessor class to demonstrate the use of the RML Processor.

Original contented Copyrighted © 2017 by Jeremy Nelson and KnowledgeLinks under Creative Commons License, Source code repository licensed under the Apache 2 and available on Github.