-
Notifications
You must be signed in to change notification settings - Fork 15
Issues with uri mirroring
#Issues with uri mirroring - Introduction
URI mirroring allow developers to use URIs that don't belong to their namespace by translating them into a local namespace. For example it is possible to translate any URI of the form http://logd.tw.rpi.edu/source/data-gov/dataset/4383/*
into http://localhost/data/*
. In this way people can reuse the information and relations in the data in their own domain.
##Automatic CURIE creation
By default, LODSPeaKr will define two basic namespaces with their respective CURIEs. This namespaces will be used in settings.inc.php
as well as when obtaining results in queries:
-
local
is the original namespace, e.g.,http://logd.tw.rpi.edu/source/data-gov/dataset/4383/
-
base
is the namespace served in this particular installation of LODSPeaKr, e.g.,http://localhost/data/
In the current implementation, a URI as http://logd.tw.rpi.edu/source/data-gov/dataset/4383/foo
will be translated into local:foo
. However, if there are more segments divided by a slash, LODSPeaKr will create new CURIEs. For example http://logd.tw.rpi.edu/source/data-gov/dataset/4383/foo/bar/123/xyz
will be translated into local_foo_bar_123:xyz
.
For historical reasons, local
was used for the "main" namespace, which was usually thought to be served by the machine where LOSPeaKr was installed. This is certainly not the case in many use cases.
local
should be assigned to the namespaces where LODSPeaKr is installed, while other (remote
, mirror
) should be defined for the namespace that is being mirrored.
One problem occurs when the type of an instance is in the namespace used to publish. For example, the following configuration
$conf['ns']['base'] = 'http://alia/myapp/';
$conf['ns']['local'] = 'http://logd.tw.rpi.edu/source/data-gov/dataset/4383/';
will display base_vocab:State
. However, when creating a type component (using util/lodspk.sh), the developer needs to specify
utils/lodspk.sh create type local_vocab:State
Which is confusing for the developer.
The current data structure for results including a mirrored URI is
-
variable.value
: URI translated to the local namespace -
variable.curie
CURIE version ofvariable.value
-
variable.mirroredUri
: Original URI
A more comprehensive name for mirroredUri
can be developed, as well as include the CURIE version of it.