Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As described in the documentation of the configuration file [dspace-source]/dspace/config/modules/rdf.cfg the constant-data-*.ttl files can be used to add static RDF to the converted data. The data is written in Turtle, but if you change the file suffix (and the path to find the files in  rdf.cfg) you can use any other RDF serialization you like to. E.g. you can add a link to the public readable SPARQL endpoint, a link to the repository homepage or add a triple to every community or collection defining it is an entity of a specific type like a bibo:collection. The content of the file [dspace-source]/dspace/config/modules/rdf/constant-data-general.ttl will be added to every DSpaceObject that is converted. The content of the file [dspace-source]/dspace/config/modules/rdf/constant-data-community.ttl to every community, the content of the file [dspace-source]/dspace/config/modules/rdf/constant-data-collection.ttl to every collection and the content of the file [dspace-source]/dspace/config/modules/rdf/constant-data-item.ttl to every Item. You can use the file [dspace-source]/dspace/config/modules/rdf/constant-data-site.ttl to specify data representing the hole repository.

[dspace-source]/dspace/config/modules/rdf/metadata-rdf-mapping.ttl

This file should contain several meta data mappings. A meta data mapping defines how to map a specific meta data field within DSpace to a triple that will be added to the converted data. The MetadataConverterPlugin uses these meta data mappings to convert the meta data of a item into rdf. For every meta data field and value it looks if any of the specified mappings matches. If it does it creates the specified triple and adds it to the converted data. In the file you'll find a lot of examples on how to define such a mapping.

For every mapping a meta data field name has to be specified, g.e. dc.title, dc.identifier.uri. In addition you can specify a condition that is matched against the field's value. The condition is specified as regular expression (using the syntax of the java class java.util.regex.Pattern). If a condition is defined the mapping will be used only on fields those values will be matched by the regex defined as condition.

The triple to create by a mapping is specified using reified RDF statements. The DSpace Metadata RDF Mapping Vocabulary defines some placeholders that can be used. The most important placeholder is dm:DSpaceObjectIRI which is replaced by the URI used to identify the entity currently converted in RDF. That means if a specific Item is converted the URI used to address this Item in RDF will be used instead of dm:DSpaceObjectIRI. There are three placeholders that allow to reuse the value of a meta data field. dm:DSpaceValue will be replace by the value as it is. dm:LiteralGenerator allows to specify a regex and replacement string for it (see the syntax of the java classes java.util.regex.pattern and java.util.regex.matcher) and creates a Literal out of the field value using the regex and the replacement string. dm:ResourceGenerator does the same as dm:LiteralGenerator but it generates a http(s) URI that is used in place. So you can use the resource generator to generate URIs containing modified field values (e.g. to link to classifications). If you know regular expressions and turtle, the syntax should be quite self explaining.

[dspace-source]/dspace/config/modules/rdf/fuseki-assembler.ttl

This is a configuration for the triple store Fuseki of the Apache Jena project. You can find more information on the configuration it provides in the section Install a Triple Store above.

Maintenance

 

 

...