Virtuoso Open-Source Wiki
Virtuoso Open-Source, OpenLink Data Spaces, and OpenLink Ajax Toolkit
Advanced Search
Help?
Location: / Dashboard / Main / VOSIndex / VirtuosoFacetsWebService / VirtTipsAndTricksCustomControlLabelsURI

Custom Controlling Virtuoso Labels for URI functionality

What is this?

A component of Virtuoso's DBMS hosted faceted browser engine for Linked Data that enhances UI by automagically relegating URIs to the @href attributes of an HTML anchor while using label property values for actual anchor text.

Why is this important?

The fundamental UI/UX goal of Linked Data oriented client solutions should always be to make URIs invisible without compromising their inherent power re. Web experience e.g., the ability to drill-down from an position on the WWW graph using click (de-reference) based follow-your-nose patterns.

URIs lie at the very core of that makes the Web and its Linked Data dimension tick. Unfortunately, they are also distracting to most end-users thereby compromising UI aesthetics.

How do I use this functionality?

First, lets understand the fundamental challenge. There are a number of annotation oriented attributes (or predicates) used in relations across databases, data spaces, and stores the exposed access to Linked Data. Unfortunately, there isn't a universally adopted attribute/predicate for 'labels', since everyone doesn't uniformly use rdfs:label when constructing Linked Data.

Virtuoso solves the problem at hand by enabling you to populate a named graph with rdfs:subPropertyOf and owl:equivalentProperty relations (triples) that map disparate annotation properties to Virtuoso's in-built virtrdf:label annotation property. Once in place, the aforementioned named graph is then used as the basis for an inference rule that's optionally available for use via SPARQL and/or the Faceted Browser.

Example

This is example is focuses on the in-built 'facets' named graph that is used by faceted browser engine.

Prerequisites

Make sure the following packages are installed:

Basic Steps

  1. Load for ex. http://www.w3.org/People/Berners-Lee/card by accessing:

    http://localhost:8890/about/html/http://www.w3.org/People/Berners-Lee/card





  2. View http://cname/describe/?url=http://www.w3.org/People/Berners-Lee/card%23i, so for ex.:

    http://localhost:8890/describe/?url=http://www.w3.org/People/Berners-Lee/card%23i

  3. As result the "About" value will be shown as URI:

    http://www.w3.org/People/Berners-Lee/card#i





  4. Next use SPARQL 1.1 Update Statement to populate the 'facets' named graph:

    SPARQL INSERT INTO GRAPH <facets> { <http://www.w3.org/2000/01/rdf-schema#label> rdfs:subPropertyOf virtrdf:label . <http://purl.org/dc/elements/1.1/title> rdfs:subPropertyOf virtrdf:label . <http://xmlns.com/foaf/0.1/name> rdfs:subPropertyOf virtrdf:label . <http://xmlns.com/foaf/0.1/nick> rdfs:subPropertyOf virtrdf:label . <http://www.geonames.org/ontology#name> rdfs:subPropertyOf virtrdf:label . } ; Query result: callret-0 ANY Insert into <facets>, 5 (or less) triples -- done No. of rows in result: 1

  5. Use the named graph above as the basis for an inference rule or simply issue this command whenever you've added new relations to the 'facets' named graph:

    rdfs_rule_set ('facets', 'facets');

    • Note: In situations where you have alternative named graphs (e.g. 'virtrdf-label') which the relations you seek in an alternative named graph, you can bring those to bear by issuing the following command:

      rdfs_rule_set('facets','virtrdf-label');

  6. View again http://cname/describe/?url=http://www.w3.org/People/Berners-Lee/card%23i, so for ex.:

    http://localhost:8890/describe/?url=http://www.w3.org/People/Berners-Lee/card%23i

  7. As result the "About" value will be shown as label:

    TimBL





Related

Powered By Virtuoso