<docbook><section><title>VirtTipsAndTricksCustomControlLabelsURI</title><title>Custom Controlling Virtuoso Labels for URI functionality</title>Custom Controlling Virtuoso Labels for URI functionality
<bridgehead class="http://www.w3.org/1999/xhtml:h2">What is this?</bridgehead>
 A component of Virtuoso&#39;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.<bridgehead class="http://www.w3.org/1999/xhtml:h2">Why is this important?</bridgehead>
 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.<para>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.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">How do I use this functionality?</bridgehead>
 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&#39;t a universally adopted attribute/predicate for &#39;labels&#39;, since everyone doesn&#39;t uniformly use rdfs:label when constructing Linked Data.<para>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&#39;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&#39;s optionally available for use via SPARQL and/or the Faceted Browser.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">Example</bridgehead>
<para>This is example is focuses on the in-built &#39;facets&#39; named graph that is used by faceted browser engine.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h4"> Prerequisites</bridgehead>
<para> Make sure the following packages are installed:</para>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="https://virtuoso.openlinksw.com/download/">Cartridges</ulink> </listitem>
<listitem><ulink url="https://virtuoso.openlinksw.com/download/">Virtuoso Faceted Browser</ulink></listitem>
</itemizedlist><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h4"> Basic Steps</bridgehead>
<orderedlist spacing="compact"><listitem>Load for ex.
 <ulink url="http://www.w3.org/People/Berners-Lee/card">http://www.w3.org/People/Berners-Lee/card</ulink> by accessing: <programlisting>http://localhost:8890/about/html/http://www.w3.org/People/Berners-Lee/card
</programlisting><figure><graphic fileref="VirtTipsAndTricksCustomControlLabelsURI/lb0.png" /></figure> </listitem>
<listitem>View <ulink url="http://cname/describe/?url=http://www.w3.org/People/Berners-Lee/card%23i,">http://cname/describe/?url=http://www.w3.org/People/Berners-Lee/card%23i,</ulink> so for ex.: <programlisting>http://localhost:8890/describe/?url=http://www.w3.org/People/Berners-Lee/card%23i
</programlisting></listitem>
<listitem>As result the &quot;About&quot; value will be shown as URI: <programlisting>http://www.w3.org/People/Berners-Lee/card#i  
</programlisting><figure><graphic fileref="VirtTipsAndTricksCustomControlLabelsURI/lb1.png" /></figure> </listitem>
<listitem>Next use SPARQL 1.1 Update Statement to populate the &#39;facets&#39; named graph: <programlisting>SPARQL INSERT INTO GRAPH &lt;facets&gt; 
  {
    &lt;http://www.w3.org/2000/01/rdf-schema#label&gt;  rdfs:subPropertyOf  virtrdf:label  .
    &lt;http://purl.org/dc/elements/1.1/title&gt;       rdfs:subPropertyOf  virtrdf:label  .
    &lt;http://xmlns.com/foaf/0.1/name&gt;              rdfs:subPropertyOf  virtrdf:label  .
    &lt;http://xmlns.com/foaf/0.1/nick&gt;              rdfs:subPropertyOf  virtrdf:label  .
    &lt;http://www.geonames.org/ontology#name&gt;       rdfs:subPropertyOf  virtrdf:label  .
  }
;

Query result:

callret-0
ANY
 Insert into &lt;facets&gt;, 5 (or less) triples -- done
No. of rows in result: 1 

</programlisting></listitem>
<listitem>Use the named graph above as the basis for an inference rule or simply issue this command whenever you&#39;ve added new relations to the &#39;facets&#39; named graph: <programlisting>rdfs_rule_set (&#39;facets&#39;, &#39;facets&#39;);
</programlisting><itemizedlist mark="bullet" spacing="compact"><listitem>Note: In situations where you have alternative named graphs (e.g.
 &#39;virtrdf-label&#39;) which the relations you seek in an alternative named graph, you can bring those to bear by issuing the following command: <programlisting>rdfs_rule_set(&#39;facets&#39;,&#39;virtrdf-label&#39;);
</programlisting></listitem>
</itemizedlist></listitem>
<listitem>View again <ulink url="http://cname/describe/?url=http://www.w3.org/People/Berners-Lee/card%23i,">http://cname/describe/?url=http://www.w3.org/People/Berners-Lee/card%23i,</ulink> so for ex.: <programlisting>http://localhost:8890/describe/?url=http://www.w3.org/People/Berners-Lee/card%23i
</programlisting></listitem>
<listitem>As result the &quot;About&quot; value will be shown as label: <programlisting>TimBL 
</programlisting><figure><graphic fileref="VirtTipsAndTricksCustomControlLabelsURI/lb2.png" /></figure></listitem>
</orderedlist><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem>Facets Web Service: <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtuosoFacetsWebService">Virtuoso Facets Web Service</ulink> </listitem>
</itemizedlist></listitem>
<listitem>Linked Data: <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtuosoFacetsViewsLinkedData">Faceted Views over Large-Scale Linked Data</ulink> </listitem>
</itemizedlist></listitem>
<listitem>Facet Browser Installation and configuration: <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtFacetBrowserInstallConfig">Virtuoso Facet Browser Installation and configuration</ulink> </listitem>
</itemizedlist></listitem>
<listitem>Facet APIs: <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtFacetBrowserAPIs">Virtuoso APIs for FCT REST services</ulink> </listitem>
<listitem><ulink url="VirtFacetBrowserAPIsFCTEXEC"><span style="color: red">
      UNKNOWN tag:
      http://www.w3.org/1999/xhtml:nowikifct_exec</span> API Example</ulink> </listitem>
</itemizedlist></listitem>
<listitem>Pivot Viewer and CXML: <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSparqlCxmlFacetPivotBridge#AncSparqlCxmlFacetPivotBridge">Facet Pivot Bridge -  A bridge to PivotViewer from Virtuoso&#39;s Faceted query service for RDF</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSparqlCxml#AncFacetTypeAutoDetection">Auto-Detection of Facet Type</ulink> </listitem>
</itemizedlist></listitem>
<listitem>Tutorials: <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtuosoLODSampleTutorial">Faceted Browsing Sample using LOD Cloud Cache data space</ulink> </listitem>
<listitem><ulink url="VirtuosoFacetsWebServiceSOAPExample">SOAP Facets Example</ulink> </listitem>
<listitem><ulink url="VirtFacetBrowserInstallConfigQueried">Querying The Facet Browser Web Service endpoint</ulink> </listitem>
<listitem><ulink url="VirtFCTFeatureQueries">Virtuoso Facet Browser Featured Queries</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtVisualizeWithPivotViewer#GenFCT">Visualizing Your Data With PivotViewer Using The Facet Browser</ulink> </listitem>
<listitem><ulink url="VirtuosoFacetsWebServiceCustmExamples">Facets Web Service: Examples for customizing different types</ulink> </listitem>
<listitem><ulink url="VirtuosoFacetsWebServiceChoiceExample">Facets Web Service: Choice of Labels Example</ulink> </listitem>
</itemizedlist></listitem>
<listitem>Downloads: <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="http://shop.openlinksw.com/license_generator/virtuoso-download/">Latest Virtuoso</ulink> </listitem>
<listitem><ulink url="https://virtuoso.openlinksw.com/download/">Virtuoso Facet Browser VAD package</ulink></listitem>
</itemizedlist></listitem>
</itemizedlist></section></docbook>