Skip to content

Interconnecting iQvoc

Marc Jansing edited this page Dec 11, 2014 · 25 revisions

Starting with 4.3.0, iQvoc offers federated access to other remote iQvoc-based endpoints.

In order to search in remote iQvoc instances you need to configure their URIs. This can be done in instance configuration (/config):

Screenshot

Remote Search

Finds concepts in other instances of iQvoc.

The configured endpoints are listed on the search page as additional sources:

Screenshot

Search results on remote instances are listed below local results:

Screenshot

Federated Concept Mappings

iQvoc supports federated concept mappings to remote ontologies and autocompletes concept labels from remote iQvoc servers when assigning concept mappings. Concept mappings could be assigned in concepts edit view. Please note that a concept currently have to be published before you can assign mapping properties.

Example

We want to express that fishing is a narrow kind of conpetition hobbies. We create a mapping relation from local concept fishing to <http://iqvoc.instance2/conpetition_hobbies>.

Animation

This fact leads to the following rdf statements (turtle syntax):

@prefix : <http://iqvoc.instance1/>.
@prefix skos: <http://www.w3.org/2004/02/skos/core#>.

:fishing skos:narrowMatch <http://iqvoc.instance2/conpetition_hobbies>.

Reverse Matches

iQvoc is able to automatically create reverse mapping relations (backlinks) if you link to things in other iQvoc instances. The remote iQvoc instance tries to find a reverse mapping property by the given match class. Currently the following match classes are supported:

Match class Reverse Mapping Property
CloseMatch CloseMatch
ExactMatch ExactMatch
RelatedMatch RelatedMatch
BroaderMatch NarrowerMatch
NarrowerMatch BroaderMatch

Let's take a look back to our example. Accourding to SKOS semantics, it's possible to infer that competition hobbies is a broad kind of fishing. The resulting triple will be added automatically to iQvoc-based remote ontologies so you don't have to define it manually.

@prefix : <http://iqvoc.instance2/>.
@prefix skos: <http://www.w3.org/2004/02/skos/core#>.

:competition_hobbies skos:broadMatch <http://iqvoc.instance1/fishing>.

Asynchronous job processing

After saving a concept with assigned concept mappings, iQvoc creates a asynchronous job for each concept mapping and shows a info message:

Screenshot

Job processing is handled by delayed_job. Use rake jobs:workoff to process jobs in a one-off way or rake jobs:work to spawn a continuous job worker watching for new jobs. The info messages will disappear after successful job execution. Otherwise the info message will show an error.

Error handling

There are a number of errors which could occur during job execution (e.g. remote iQvoc instance is unreachable). These errors are shown next to affected job.

Screenshot

The reverse match api respond with the following status codes:

Status-Code Error Description
200 mapping_added Concept mapping successful added
200 mapping_removed Concept mapping successful removed
400 parameter_missing Incomplete request. Origin, Uri or Match-class missing
400 unknown_relation Couldn't find mapping relation (on remove)
400 unknown_match Couldn't determine reverse match class
400 no_referer No referer provided (Authentication error).
403 unknown_referer Unknown referer provided (Authentication error)
403 in_processing Target concept is in draft mode.
404 resource_not_found Requested concept could not be found
408 timeout_error Server timed out waiting for the request
409 mapping_exists Concept mapping already exist
500 server_error An internal error occured
503 connection_failed Server is (currently) unavailable