Background
At Leiden University, The Netherlands, we needed a way to add semantic data to dspace data.
One of the uses for this was to make it possible to change the order of the bitstreams as they are displayed in an easy way.
Another use in the future is to add an URI to a field in the metadata of an object.
How it works
This basic RDF implementation defines two database tables: one to hold the RDF triples and one to hold the RDF predicate. Then there are two associated java classes that implement the functionality.
The subject and object of a RDFtriple can be objects of the class DSpaceObject (so Bitstream, Bundle, Item, Collection, Community, Site, Group, EPerson) which can be linked together using a RDFpredicate.
Which DSpace version
The modifications were made to Dspace 1.3.2. This is also the version of DSpace where this functionality was tested extensively.
It should be easy to use this with another version of DSpace, because it is totally seperated from the DSpace code. Only if the implementation of DSpaceObject changes, then it may not work anymore.
How to install
This installation does not change any functionality, but it adds functionality potentially.
If you want to use it, write code that makes use of the classes descripted below, or implement the order of bitstreams.
Step 1: Add tables to the database
Download the file Database_schema_RDF_sql.mht and use it to add tables RDFpredicate and RDFtriple to the database
Step 2: Add java classes
- Download the file RDFtriple.java and place it in the directory src/nl/leidenuniv/dspace/rdf/
- Download the file RDFpredicate.java and place it in the directory src/nl/leidenuniv/dspace/rdf/
- Download the file RDFmanager.java and place it in the directory src/nl/leidenuniv/dspace/rdf/
- Download the file RDFvalue.java and place it in the directory src/nl/leidenuniv/dspace/rdf/
- Download the file RDFresource.java and place it in the directory src/nl/leidenuniv/dspace/rdf/
Step 3: build / install / restart
Do the stuff you normally do when deploying a new version of DSpace.
Future work
Besides implementing new functionality using this basic RDF implementation, there are two obvious omissions:
- a way to use a subject or an object that is not a dspace object
- related to this: use a plain text object
- an implementation of RDF containers like Bag, Seq and Alt. This maybe addressed in the future.
Contact me
If you need help, or have any comments, or you just want to inform me that you (are going to) use this, please contact me at schaik (at) library.leidenuniv.nl