Skip to content

Enabling use of external data

Alvaro Graves edited this page Aug 5, 2013 · 8 revisions

Enabling use of external data

There are multiple situations where a user may want to publish data from http://foo.com/... in a different site, say http://bar.org/.... One problem found is that if the user wants to create a page with that information, the links will use the original namespace, thus making impossible to navigate in the second one.

Solution

For this case, LODSPeaKr converts every URI of the form http://foo.com/... to http://bar.org/... transparently. This conversion is only for displaying purposes, the queries uses the original namespaces. The machine readable representation (RDF/XML, Turtle, etc.) is not modified, except for the fact that LODSPeaKr adds two triples

<http://bar.org/data1> owl:sameAs <http://foo.com/data1> .
<http://bar.org/data1> con:preferredUri <http://foo.com/data1> .

Thus, the data is served in a different location but contains the URIs form the original source.

During installation process, the script will detect that you are using a namespace different from where LODSPeaKr is installed. If you have problems or don't see any effect you can make the changes manually:

  • In settings.inc.php turn $conf['use_external_uris'] = $conf['ns']['local']
  • Also, configure $conf['ns']['local'] as the original namespace (http://foo.com/)
  • Optionally, you can also create a new namespace, say $conf['ns']['bar'] = 'http://bar.org' that reflects the namespace where LODSPeaKr is installed. This will be useful when createing special URIs that uses CURIEs as parameters.

What is next

Clone this wiki locally