The core model of UISPIN, a SPARQL-based user interface description framework. UISPIN can be used to describe how RDF resources should be rendered on the screen.
1.0.0
A SPIN function that has a UISPIN expression as its body. The body must be defined as ui:prototype. The result of the function is based on the string rendering of the evaluated prototype. The string will be cast into the declared spin:returnType (default: xsd:string). The result can be a URI resource of the spin:returnType is a (non-datatype) class such as rdfs:Resource. In a typical use case, any user-defined UISPIN class can be declared as ui:Function by simply also making it an instance of ui:Function, and declaring a spin:returnType.
Function
Style property
Metaclass of properties that represent a (CSS) style.
Child property
Metaclass for properties that represent a parent-child relationship between UI nodes. This can be used as marker so that editing tools can display child relationships in an ordered fashion.
Metaclass of properties that link a class with a view, e.g. ui:view. Can be used by user interface engines to distinguish views from other properties.
View property
Node class
Metaclass of ui:Node classes.
The condition of an ui:If element. Must evaluate to a literal with the lexical form "true".
condition
str
Can be used to specify DESC or ASC to be used in conjunction with ui:queryOrderBy.
query order by dir
snippet
add namespace
Adds a global namespace declaration for the given resource to the root element. Has no other side effects, i.e. it will not become an attribute in the target document.
message
update query
edit graph
query graph
The actual text in a ui:TextNode.
text
result set
Represents a SPARQL result set - typically derived from a SELECT query. Arguments of this property (or sub-property thereof) are executed in the context where they are declared.
The index of a child among its siblings, starting at 0.
Node
true
The base class of all user interface objects, i.e. objects that represent a visual area on the screen or represent scripts, events or any other part of a DOM-like model.
child index
index var
query limit
If present, any SPARQL SELECT query executed as part of the surrounding element will be executed with a LIMIT. This is typically paired with ui:queryOffset to implement paging through a larger result set.
priority
A priority value that can be assigned to ui:instanceViews and ui:views to fine tune the selection of views if multiple choices are present for a given class. A typical use case is the TUI library, which defines some default instanceViews for rdfs:Resource. Those default ones have a low priority (-10) so that they are only used if no other views are defined. By default, if no value is specified then the value is assumed to be 0.
error prototype
Can be used to link a ui:NodeClass with one or more views that can be used to check pre-conditions. If a view class is instantiated, then the engine will check for any defined ui:errorPrototypes for the types of the view, including the superclasses. If any of them returns a non-empty node, then that node will be inserted instead of the prototype.
A typical use case of this is security, so that certain pages are only visible if the current user has certain privileges. You can define an abstract base class that all your view classes inherit from. On that base class, define an error prototype that checks the pre-conditions. The error prototype might use ui:if and other control elements for its operational logic.
A comma-separated list of ids. Used by ui:ResourceView.
match ids
Indicates that elements of this type should not be instantiated directly. This is comparable to the notion of abstract classes in object-oriented languages like UML.
abstract
The name of a variable to use as ORDER BY in the SELECT queries of the surrounding element.
query order by
Can be used to point to a ui:Node. For example, ui:MoveNode uses this property.
node
servlet
commit
query offset
Must be used in conjunction with ui:queryLimit. If present, then any SELECT queries in the surrounding element will be executed with an extra OFFSET qualifier.
resource
Used by ui:ResourceView.
view
Abstract base class for all UISPIN elements, which are nodes that can contain other nodes. The child nodes are represented using ui:child. Children can be ordered using ui:childIndex.
Element
child
Points from a parent element to a child node.
The children of this panel.
true
Links a resource (instance) with an element that can be used to render the resource on the screen. Queries associated with the element can access the resource with the variable ?this.
An identifier of ui:Nodes. Can be attached to ui:views and ui:instanceViews to mark them as specific types (see ui:matchIds).
id
view name
edit graph id
into
format
head includes
Can point to one or more elements that will be inserted into the head section of the target document.
Can be used in conjunction with ui:name to specify a base URI that shall be used for a global page unless a different one has been specific in the servlet request.
default base URI
point id
A globally unique name to identify a view on a server. This is often used for global application pages, and may be used in conjunction with ui:defaultBaseURI.
name
send query graph
template
send edit graphs
var name
query
Represents a SPARQL SELECT query. Arguments of this property (or sub-properties thereof) are not evaluated immediately, but rather represent the query itself. These queries can be inserted into ui:resultSet properties for execution, e.g. ui:resultSet="{= ?query }".
system property
prototype
Links a UI class with a prototype instance of itself. This instance will be taken as template for any instance being created of the class.
The text of this comment.
A node representing a comment. Comments are ignored by the display engine, but are useful for documenting code or (temporarily) disabling certain sections without deleting them.
Comment node
let
true
Control element
"Abstract" base class for UISPIN control elements such as ui:ForEach and ui:If.
Deprecated for UISPIN 1.0: Use ui:group instead.
A marker that may be substituted by children that declare themselves to be extensions using ui:insert.
insertion point
The name of the extension point. Must be a unique string within the current context.
group
A basically "empty" element that simply inserts its children. Can be used to host let: assignments, or to otherwise group multiple children. In previous beta versions of UISPIN, this was called ui:let.
resourceView
Placeholder for the best suitable element to display a given resource. This will be inserted based on the link properties such as ui:view and ui:instanceView.
The resource to insert a view for.
Can be used to specify a preference of what kinds of views to render, if multiple are present. Will be compared against the ui:id of each view. Typical values are: "summary" (a short but informative display of about 1-5 rows) and "label" (a compact display occupying not more than 1 row). If left empty then it will be matched against views that have no id or the id "full".
true
Defines an else statement. Must have a matching ui:if element as previous sibling. If the if was false, then the children of this element will be inserted.
else
The string to escape.
Converts a given string to a JSON-friendly string that can be sent across the wire. In particular, this replaces ' with \' so that string literals can be put between matching ' braces.
escape JSON
Can be used to specify that a given graph (URI) shall be editable for the current user. This will wrap the named graph with a buffer so that any changes (updates) by this user will only be visible to him until they are committed or cancelled. This status will be propagated into any subsequent pages, if the links to those pages are created using ui:createLink.
true
set context
Changes the execution context of the children.
The new graph to run queries against. Any SPARQL queries in the children of this will have the new graph as their default graph.
true
true
An optional secondary ID to clarify what version of the editGraph shall be used.
update
The UPDATE query to execute. May access the variables of the current scope using <urn:x-var:varName>.
Executes a SPARQL UPDATE query on the server.
true
An optional commit message. If specified, and if the updated graph supports buffered editing, then the change will be committed to the underlying repository, with the specified log message.
A message to explain the error.
true
Throws an error that will (by default) be reported back as a failure to the client. This can be used to implement pre-condition checking in services such as Ajax call-backs.
Future versions of UISPIN will likely introduce ui:try and ui:catch as well.
throw
forEach
index
The name of an (optional) index variable that will be assigned with the current iteration index as an xsd:integer, starting at 0.
true
The result set to iterate over, typically defined by a SELECT query (or SPIN template).
A control element representing a "for" loop that iterates over all results of a given SPARQL SELECT query (or SPIN template) and repeatedly inserts the child element(s) for each iteration. The result variables will be visible to the child elements in the scope, e.g. in nested SPARQL expressions.
True to also include the currently editable graphs.
true
The format instruction to the servlet.
true
Creates a hyperlink to a named page on the UISPIN server. This element can take any number of arguments: they will be passed by their local name to the server. The resulting link will be bound to a variable with the name of the provided variable (ui:varName) in the child scope of this module.
true
See ui:setContext. Specifying a value will be similar to ui:sendQueryGraph, but with the specific query graph.
create link
uispin
true
The servlet part of the link (before ?). Can be set to "none" to suppress the servlet part.
true
See ui:setContext. Setting this will send the specified graph as "edit graph", similar to sendEditGraphs=true.
The snippet instruction to the servlet.
true
true
See ui:setContext. Setting this will send the specified graph id as part of the "edit graph", similar to sendEditGraphs=true.
true
The name of the link variable.
link
true
The name of the target page.
True to encode the current query graph so that the resulting page will use it as a starting point.
true
Can be used to group together multiple updates, so that they are treated as a single atomic operation.
transaction
unique id
Generates a string identifier that is unique for the life time of the UISPIN execution engine.
The name of the preference to get.
Gets a system preference set by the UISPIN execution environment. These are typically server-specific settings such as how to redirect hyperlinks, or Google API keys, that can be queried by UISPIN elements to adjust the page generation.
system preference
The URI of a named graph that is accessible at run time as a place to write temporary triples to. This can be used during the execution of a UISPIN document to keep track of status changes. Use ui:update, e.g. with INSERT INTO ui:tempGraph, to modify those triples. Use GRAPH ui:tempGraph { ... } in WHERE clauses to query this graph.
temp graph
view
class
name
The name of the view to find.
Can be used to find a view by its name (ui:name), e.g. to support quick navigation.
Find view by name
The URI of the named graph containing the triples of the UI view definitions. This named graph can be accessed in UISPIN queries using GRAPH ui:graph { ... } to query metadata associated with the current UISPIN node (?thisNode).
graph
encode node
The node to encode.
Creates a string representation of a given RDF node (?arg1), using qnames where possible.
if
The value that must be true.
Defines an if statement. If the ui:condition is "true", then the children of this element will be inserted.
instance view
Links a class with elements that can be used to display instances of that class. In those elements, the variable ?this points to the instance being displayed.
Makes it possible to query for the arguments of the current UISPIN element of a user-defined class. The argument on the left side must be an rdf:Property or a variable. The right side must be an unbound variable, that will contain the value of the argument at the current context node.
arg
The graph resource to cast.
Casts a given named graph resource to an encoded resource that instructs the engine to also include the owl:imports closure (and the system graph). In TopBraid, this adds a '+' as in <http://my.com/graph+>. Returns the original graph unchanged if it already has the additional encoding.
graph with imports
Encodes a given string so that it can be made part of a well-formed URL, e.g. in server callbacks.
The string or URI resource to encode.
encode URL
true
Functions
Abstract base class to group all instances of the ui:Function metaclass.
The name of the variable to hold the result set. Defaults to "rs".
true
rs
call
Invokes a SPIN template (ui:template) that has a SELECT query as its body, and binds the result set to the result variable (ui:varName, default: "rs"). All other arguments of this element will be used as arguments of the template.
The template to call.
Comma separated label list
Comma separated label list aggregator step function
result
label
0
,
A text node in a UISPIN document. Will be mapped to XML text nodes.
The text of this TextNode.
Text node
decode node
The id of the RDF node to decode.
Creates an RDF node from a string representation created with ui:encodeNode. This basically turns a qname back into a URI etc.
insert
graph without imports
The graph resource to cast.
Opposite of <ui:graphWithImports>.
Inserts an XML snippet by taking a string (ui:str) and inserting it verbatim into the DOM tree. The string may contain markup such as <br />. The engine will parse this string into a new XML document and then insert the resulting nodes into the current position.
A typical use case of this module is to compute strings with SPARQL functions, and then pass the resulting string as a bound variable into this module, using ui:str="{= ?text }".
The source code of the XML snippet to insert.
parse
label
Computes the display label for a given RDF node (literal or resource).
Body:
SELECT ?name
WHERE {
LET (?name := smf:name(?arg1)) .
}
The node to get the label of.