Appendix B. Import from and export to RDF format

[Note]Note

This appendix described configuration files used for import and export bibliographic description. It is dedicated to dLibra administrators.

RDF - Resource Description Framework is a format for specifying properties of a given subject. RDF format is used in dLibra to specify metadata (bibliographic description). In this case the subject is an element (e.g. publication) and the properties are specified as attributes' values. More about RDF format can be found here.

B.1. RDF configuration files

There are two RDF format configuration files:

  • rdfImport.properties - configuration file which is used when importing metadata from RDF files to dLibra attributes' values.

  • namespaces.properties - namespaces configuration file - namespaces are commonly used in the XML technology which RDF is based on.

Both files are properties files, so in each line there is a key and its value separated by the equals character (=), e.g.

wlasnosc=wartosc wlasnosci
wlasnosc2=wartosc wlasnosci 2

B.1.1. namespaces.properties file

namespaces.properties is used for:

  • shortcut specification for namespaces. These shortcuts are used in rdfImport.properties file.

  • dLibra. namespace specification which is used when importing and exporting metadata. The namespace is the value of systemURL key.

Examplary namespace.properties file:

systemURL=http://dlibra.psnc.pl/
dc=http://purl.org/dc/elements/1.1/
wbc=http://www.wbc.poznan.pl/

In this file library namespace is defined as “http://dlibra.psnc.pl/”, the shortcut for Dublin Core 1.1 (http://purl.org/dc/elements/1.1/) schema is “dc”, and the shortcut for Wielkopolska Biblioteka Cyfrowa (http://www.wbc.poznan.pl/) is “wbc”. Library namespace will be used for export to RDF, for example:

<?xml version="1.0"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dlibra_avs="http://dlibra.psnc.pl/">
  <rdf:Description rdf:about="http://dlibra.psnc.pl/publication/376">
    <dlibra_avs:Title xml:lang="pl">Przykładowa publikacja</dlibra_avs:Title>
    <dlibra_avs:Author xml:lang="pl">Jan Kowalski</dlibra_avs:Author>
    <dlibra_avs:Format xml:lang="en">text/plain</dlibra_avs:Format>
    <dlibra_avs:Format xml:lang="pl">text/plain</dlibra_avs:Format>
  </rdf:Description>
</rdf:RDF>

Above file describes publication in the library namespace which is “http://dlibra.psnc.pl/” (systemURL key in the namespaces.properties file.

B.1.2. rdfImport.properties file

In the rdfImport.properties file we define which attributes from imported namespace correspond to which attributes in the dLibra system. Examplary import file:

Title=dc:title;wbc:Title 
1Access=dc:rights;wbc:Rights 
2MimeType=wbc:Format 
3
1

This line means that to attribute which has “TitlerdfName values from “title” of “dc” schema and “Title” of “wbc” schema will be added.

2

This line means that to attribute which has “AccessrdfName values from “rights” of “dc” schema and “Rights” of “wbc” will be added.

3

This line means that to attribute which has “MimeTyperdfName value from “Format” of “wbc” schema will be added.

Please notice that in rdfImport.properties file shortcuts defined in namespaces.properties file are used.