UISPIN - TUI Library

Version 0.5.0, March 25, 2010

Authors:
Holger Knublauch <holger@topquadrant.com>

Abstract

This document describes the main features of the UISPIN TUI component library. UISPIN is an RDF-based language for describing user interfaces. Among others, UISPIN makes it easy to develop new kinds of user interface components. The UISPIN TUI library includes very reusable UISPIN components for rendering RDF resources and literals.

Status of This Document

Work in progress, first beta release: March 2010

This document is part of the UISPIN Specification.


Table of Contents

1 Introduction

UISPIN makes it easy to develop new components that can be used like HTML tags in a document. Those components may comprise of a complex snippet of HTML and other XML-based languages such as SVG. UISPIN components can be published on the web, where they are identified by their URI.

The TUI namespace presented in this document is a collection of highly generic UISPIN components that can act as a starting point for developing web renderings of semantic web data. Among others, TUI contains simple default renderings of resources as a hyperlink, and a standard form-like display of resources together with all their property values.

Note that the TUI namespace is still under active development and may change without notice. Having said this, if you are reasonably open to innovation, we encourage you to reuse the TUI components whenever it makes sense, so that you can benefit from future improvements. Another benefit of reusing the standard TUI components is that in the future there might be different rendering engines for UISPIN, e.g. that take certain higher-level components such as tui:ObjectPathWidget and render them as rich Flex components. If the UISPIN community agrees on some shared higher-level components, then implementing optimized, native renderings becomes easier.

2 The TUI Components

The following sub-sections provide the documentation of each TUI component.

2.1 tui:Label

Displays an arbitrary RDF node. If the node is a resource, then this will use the configured resource display with id="label" (e.g., the tui:Link). Literals will be rendered as a simple text node.

Arguments

tui:node: The RDF node to display.

Prototype

<ui:let>
    <ui:if ui:condition="{= isLiteral(?node) }">
        <span class="tuiLabel">{= ?node }</span>
    </ui:if>
    <ui:if ui:condition="{= isIRI(?node) || isBlank(?node) }">
        <ui:resourceView ui:matchIds="label" ui:resource="{= ?node }"/>
    </ui:if>
</ui:let>
A simple hyperlink to a resource, using the display label of the resource as text.

Arguments

tui:node (rdfs:Resource): The resource to display.

Prototype

<span class="tuiLink">
    <a href="{= ?node }">{= ui:label(?node) }</a>
</span>

2.3 tui:ObjectPathWidget

A tabular widget with two columns: the property name on the left, and the values of the property at a given subject to the right.

Arguments

tui:predicate (rdf:Property): The predicate to get the values of.
tui:subject (rdfs:Resource): The subject to display the values of.

Prototype

<ui:let>
    <tui:PathWidget tui:path="{= ?predicate }" ui:resultSet="{#
            SELECT ?object
            WHERE {
                ?subject ?predicate ?object .
            }
            ORDER BY (ui:label(?object)) }"/>
</ui:let>

2.4 tui:ObjectPathWidgetGroup

A collection of tui:ObjectPathWidgets on a given subject (tui:subject) where the properties are selected by a SELECT query (tui:predicateSet).

Arguments

tui:predicateSet (sp:Select): A SELECT query delivering the predicates to display.
tui:subject (rdfs:Resource): The subject of the widgets.

Prototype

<ui:forEach ui:resultSet="{#
        SELECT ?predicate
        WHERE {
            ( ?predicateSet 0 ) spr:colCells ?predicate .
        } }">
    <tui:ObjectPathWidget tui:predicate="{= ?predicate }" tui:subject="{= ?subject }"/>
</ui:forEach>

2.5 tui:PathWidget

A table with two columns: The name of the property (path) on the left, and the values on the right. The table is driven by a SPARQL SELECT query (ui:resultSet).

Arguments

tui:icon (rdfs:Resource): [Optional] The URL to an (optional) icon to display to the left of the path name.
tui:path (rdf:Property): The property to display the values of.
ui:resultSet (sp:Select): The SELECT query getting the values.

Prototype

<table>
    <tr>
        <td class="tuiWidgetLabelCell">
            <ui:if ui:condition="{= bound(?icon) }">
                <img src="{= xsd:string(?icon) }"/>
            </ui:if>
            <tui:Link tui:node="{= ?path }"/>
        </td>
        <td class="tuiWidgetValuesCell">
            <table>
                <ui:forEach ui:resultSet="{#
                        SELECT ?value
                        WHERE {
                            ( ?resultSet 0 ) spr:colCells ?value .
                        } }">
                    <tr>
                        <td class="tuiWidgetValueCell">
                            <tui:Label tui:node="{= ?value }"/>
                        </td>
                    </tr>
                </ui:forEach>
            </table>
        </td>
    </tr>
</table>

2.6 tui:SubjectPathWidget

A tabular widget with two columns: the property name on the left, and the incoming references via a given property at a given object to the right.

Arguments

tui:object (rdfs:Resource): The object to display the values of.
tui:predicate (rdf:Property): The predicate to get the values of.

Prototype

<ui:let>
    <tui:PathWidget tui:icon="&lt;http://uispin.org/icons/SubjectPath.gif&gt;" tui:path="{= ?predicate }" ui:resultSet="{#
            SELECT ?subject
            WHERE {
                ?subject ?predicate ?object .
                FILTER isIRI(?subject) .
            }
            ORDER BY (ui:label(?subject)) }"/>
</ui:let>

2.7 tui:SubjectPathWidgetGroup

A collection of tui:SubjectPathWidgets on a given object (tui:object) where the properties are selected by a SELECT query (tui:predicateSet).

Arguments

tui:object (rdfs:Resource): The object of the widgets.
tui:predicateSet (sp:Select): A SELECT query delivering the predicates to display.

Prototype

<ui:forEach ui:resultSet="{#
        SELECT ?predicate
        WHERE {
            ( ?predicateSet 0 ) spr:colCells ?predicate .
        } }">
    <tui:SubjectPathWidget tui:object="{= ?object }" tui:predicate="{= ?predicate }"/>
</ui:forEach>

Appendix: Reference

The URL of the UISPIN TUI library is http://uispin.org/tui