This project was initiated by members of the VRA Core Oversight Committee. The goal of the project is to develop an RDF Ontology for the VRA Core 4 data model.
We have developed a draft ontology and have created an XSLT stylesheet that can convert existing VRA Core 4 compliant XML data into RDF/XML. We encourage people to try out the stylesheet and review the ontology. Your feedback will help us refine both the stylesheet as well as the ontology.
This project also includes a Python application, "vra2rdf", which applies the XSLT stylesheet to VRA XML sources to produce serialized RDF.
The vra2rdf Python application applies the XSLT transformation stylesheet to a VRA XML source, producing a range of RDF serializations.
To run the application on your system, you will need to have Python installed (preferably 2.7.XX but 3.XX should also work). The application depends on having three Python modules available: LXML, RDFLIB and RDFLIB-JSONld. These should be installed by running the setup.py install script described below.
In addition, some Python setup instructions for Mac and Windows systems are provided below.
sudo easy_install pip
sudo pip install rdflib
sudo pip install rdflib-jsonld
sudo pip install lxml
Download Python 2.7 (https://www.python.org/downloads/windows/). Pip is already packaged with the install.
Set Python Path for Windows
From the DOS command prompt install rdflib package
pip install rdflib
From the DOS command prompt install rdflib-jsonld
pip install rdflib-jsonld
From the DOS command prompt install lxml
pip install lxml
Clone this GitHub project
Run the setup.py installation to include Python dependencies
python setup.py install
Run the vra2rdf transformation using these parameters.
vra2rdf -i <inputfile> -s <RDF serialization>
Sample VRA XML input files are in data/sample/xml/.
For example, this will serialize the sample VRA XML in record1.xml as RDF JSON-LD:
vra2rdf -i data/sample/xml/record1.xml -s json-ld
Supported RDF serialization parameters are: