ui
type: Ontology
comment: 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.
imports: spra
version info: 1.0.0

Function
type: Class
comment: 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.
subclass of: Function
subclass of: Node class

Node class
type: Class
subclass of: Class
comment: Metaclass of ui:Node classes.

Style property
type: Class
subclass of: Property
comment: Metaclass of properties that represent a (CSS) style.

Child property
type: Class
comment: 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.
subclass of: Property

View property
type: Class
comment: 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.
subclass of: Property

condition
type: Property
comment: The condition of an ui:If element. Must evaluate to a literal with the lexical form "true".
sub property of: system property

system property
type: Property

str
type: Property
sub property of: system property

query order by dir
type: Property
range: string
comment: Can be used to specify DESC or ASC to be used in conjunction with ui:queryOrderBy.
sub property of: system property

snippet
type: Property
sub property of: system property

add namespace
type: Property
range: Resource
sub property of: system property
comment: 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
type: Property
sub property of: system property

update query
type: Property
sub property of: query
range: Update

edit graph
type: Property
sub property of: system property

query graph
type: Property
sub property of: system property

text
type: Property
comment: The actual text in a ui:TextNode.
sub property of: system property

result set
type: Property
sub property of: query
range: Select
comment: 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.

child index
type: Property
sub property of: system property
range: integer
comment: The index of a child among its siblings, starting at 0.
domain: Node
type: FunctionalProperty

Node
type: Node class
abstract: true
subclass of: Resource
comment: 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.

index var
type: Property
sub property of: system property
range: string

query limit
type: Property
sub property of: system property
comment: 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.
range: integer

priority
type: Property
sub property of: system property
comment: 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.
range: integer

error prototype
type: Property
range: Node
domain: Node class
comment: 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.
sub property of: system property

match ids
type: Property
range: string
comment: A comma-separated list of ids. Used by ui:ResourceView.
sub property of: system property

abstract
type: Property
sub property of: system property
range: boolean
comment: 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.
domain: Node class

query order by
type: Property
comment: The name of a variable to use as ORDER BY in the SELECT queries of the surrounding element.
sub property of: system property
range: string

node
type: Property
comment: Can be used to point to a ui:Node. For example, ui:MoveNode uses this property.
range: Node
sub property of: system property

servlet
type: Property
sub property of: system property

commit
type: Property
sub property of: system property

query offset
type: Property
sub property of: system property
comment: 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.
range: integer

resource
type: Property
sub property of: system property
range: Resource
comment: Used by ui:ResourceView.

view
type: Property
range: Element
domain: Resource
comment: 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.

Element
type: Node class
subclass of: Node
comment: 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.
constraint: Attribute
  predicate: child
  comment: The children of this panel.
  value type: Node
abstract: true

child
type: Child property
sub property of: system property
range: Node
comment: Points from a parent element to a child node.

id
type: Property
range: string
comment: An identifier of ui:Nodes. Can be attached to ui:views and ui:instanceViews to mark them as specific types (see ui:matchIds).
sub property of: system property

view name
type: Property
sub property of: system property

edit graph id
type: Property
sub property of: system property

into
type: Property
sub property of: system property

format
type: Property
sub property of: system property

head includes
type: Property
sub property of: system property
domain: Node class
range: Element
comment: Can point to one or more elements that will be inserted into the head section of the target document.

default base URI
type: Property
range: string
comment: 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.
sub property of: system property

point id
type: Property
sub property of: system property

name
type: Property
range: string
comment: 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.
sub property of: system property

send query graph
type: Property
sub property of: system property

template
type: Property
sub property of: system property

send edit graphs
type: Property
sub property of: system property

var name
type: Property
sub property of: system property
range: string

query
type: Property
sub property of: query
range: Select
comment: 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 }".

prototype
type: FunctionalProperty
range: Node
domain: Node class
comment: 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.
sub property of: system property
type: Property

Comment node
type: Node class
constraint: Argument
  value type: string
  comment: The text of this comment.
  predicate: comment
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.
subclass of: Node

let
type: Node class
subclass of: Control element
comment: Deprecated for UISPIN 1.0: Use ui:group instead.
type: DeprecatedClass

Control element
type: Node class
abstract: true
subclass of: Element
comment: "Abstract" base class for UISPIN control elements such as ui:ForEach and ui:If.

insertion point
type: Node class
comment: A marker that may be substituted by children that declare themselves to be extensions using ui:insert.
subclass of: Control element
constraint: Argument
  predicate: point id
  comment: The name of the extension point. Must be a unique string within the current context.
  value type: string

group
type: Node class
subclass of: Control element
comment: 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
type: Node class
comment: 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.
constraint: Argument
  predicate: resource
  value type: Resource
  comment: The resource to insert a view for.
subclass of: Control element
constraint: Argument
  comment: 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".
  value type: string
  optional: true
  predicate: match ids

else
type: Node class
comment: 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.
subclass of: Control element

escape JSON
type: Function
return type: string
constraint: Argument
  value type: string
  comment: The string to escape.
  predicate: arg1
comment: 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.
subclass of: StringFunctions

set context
type: Node class
constraint: Argument
  value type: Resource
  comment: 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.
  optional: true
  predicate: edit graph
subclass of: Control element
comment: Changes the execution context of the children.
constraint: Argument
  comment: The new graph to run queries against. Any SPARQL queries in the children of this will have the new graph as their default graph.
  predicate: query graph
  optional: true
  value type: Resource
constraint: Argument
  predicate: edit graph id
  optional: true
  comment: An optional secondary ID to clarify what version of the editGraph shall be used.
  value type: string

update
type: Node class
subclass of: Control element
constraint: Argument
  predicate: update query
  comment: The UPDATE query to execute. May access the variables of the current scope using <urn:x-var:varName>.
  value type: Update
comment: Executes a SPARQL UPDATE query on the server.
constraint: Argument
  predicate: commit
  optional: true
  comment: 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.
  value type: string

throw
type: Node class
constraint: Argument
  value type: string
  comment: A message to explain the error.
  optional: true
  predicate: message
comment: 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.
subclass of: Control element

forEach
type: Node class
subclass of: Control element
constraint: Argument
  default value: index
  predicate: index var
  comment: The name of an (optional) index variable that will be assigned with the current iteration index as an xsd:integer, starting at 0.
  optional: true
  value type: string
constraint: Argument
  value type: Select
  predicate: result set
  comment: The result set to iterate over, typically defined by a SELECT query (or SPIN template).
comment: 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.

create link
type: Node class
constraint: Argument
  value type: boolean
  comment: True to also include the currently editable graphs.
  optional: true
  predicate: send edit graphs
constraint: Argument
  value type: string
  comment: The format instruction to the servlet.
  optional: true
  predicate: format
comment: 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.
constraint: Argument
  predicate: query graph
  optional: true
  comment: See ui:setContext. Specifying a value will be similar to ui:sendQueryGraph, but with the specific query graph.
  value type: Ontology
constraint: Argument
  predicate: servlet
  default value: uispin
  optional: true
  comment: The servlet part of the link (before ?). Can be set to "none" to suppress the servlet part.
  value type: string
subclass of: Control element
constraint: Argument
  predicate: edit graph
  optional: true
  comment: See ui:setContext. Setting this will send the specified graph as "edit graph", similar to sendEditGraphs=true.
  value type: Ontology
constraint: Argument
  value type: string
  comment: The snippet instruction to the servlet.
  optional: true
  predicate: snippet
constraint: Argument
  predicate: edit graph id
  optional: true
  comment: See ui:setContext. Setting this will send the specified graph id as part of the "edit graph", similar to sendEditGraphs=true.
  value type: string
constraint: Argument
  optional: true
  value type: string
  comment: The name of the link variable.
  default value: link
  predicate: var name
constraint: Argument
  optional: true
  predicate: view name
  comment: The name of the target page.
  value type: string
constraint: Argument
  value type: boolean
  comment: True to encode the current query graph so that the resulting page will use it as a starting point.
  optional: true
  predicate: send query graph

transaction
type: Node class
comment: Can be used to group together multiple updates, so that they are treated as a single atomic operation.
subclass of: Control element

unique id
type: Function
subclass of: StringFunctions
comment: Generates a string identifier that is unique for the life time of the UISPIN execution engine.
return type: string

system preference
type: Function
return type: string
constraint: Argument
  predicate: arg1
  comment: The name of the preference to get.
  value type: string
comment: 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.
subclass of: StringFunctions

temp graph
comment: 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.

Find view by name
type: SelectTemplate
body: Select
  where:
    object:
      var name: name
    predicate: name
  where:
    predicate: type
constraint: Argument
  value type: string
  comment: The name of the view to find.
  predicate: name
comment: Can be used to find a view by its name (ui:name), e.g. to support quick navigation.
subclass of: SelectTemplates

var name: view

var name: class

graph
comment: 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).

encode node
type: Function
constraint: Argument
  comment: The node to encode.
  predicate: arg1
subclass of: StringFunctions
comment: Creates a string representation of a given RDF node (?arg1), using qnames where possible.
return type: string

if
type: Node class
constraint: Argument
  comment: The value that must be true.
  predicate: condition
subclass of: Control element
comment: Defines an if statement. If the ui:condition is "true", then the children of this element will be inserted.

instance view
type: View property
domain: Class
range: Element
comment: 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.

arg
type: MagicProperty
comment: 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.
return type: Node
sub property of: system property
subclass of: MagicProperties

graph with imports
type: Function
subclass of: OntologyFunctions
constraint: Argument
  value type: Resource
  comment: The graph resource to cast.
  predicate: arg1
comment: 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.
return type: Resource

encode URL
type: Function
comment: Encodes a given string so that it can be made part of a well-formed URL, e.g. in server callbacks.
constraint: Argument
  predicate: arg1
  comment: The string or URI resource to encode.
subclass of: StringFunctions
return type: string

Functions
type: Function
abstract: true
subclass of: Functions
comment: Abstract base class to group all instances of the ui:Function metaclass.

call
type: Node class
constraint: Argument
  value type: string
  comment: The name of the variable to hold the result set. Defaults to "rs".
  optional: true
  default value: rs
  predicate: var name
subclass of: Control element
comment: 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.
constraint: Argument
  predicate: template
  comment: The template to call.
  value type: SelectTemplate

Comma separated label list
type: Aggregator
step function: Comma separated label list aggregator step function

Comma separated label list aggregator step function
type: Function
body: Select
  where: Let
    expression: label
      arg1: arg2
  where: Let
    expression: if
      arg1: gt
        arg1: string-length
        arg2: 0
      arg2: concat
        arg2: ,
        arg1: arg1
return type: string
subclass of: AggregatorStepFunctions

var name: result

var name: label

Text node
type: Node class
comment: A text node in a UISPIN document. Will be mapped to XML text nodes.
subclass of: Node
constraint: Argument
  predicate: text
  comment: The text of this TextNode.
  value type: string

decode node
type: Function
constraint: Argument
  comment: The id of the RDF node to decode.
  predicate: arg1
  value type: string
subclass of: StringFunctions
comment: Creates an RDF node from a string representation created with ui:encodeNode. This basically turns a qname back into a URI etc.

insert
type: Node class
subclass of: Control element

graph without imports
type: Function
subclass of: OntologyFunctions
constraint: Argument
  predicate: arg1
  comment: The graph resource to cast.
  value type: Resource
return type: Resource
comment: Opposite of <ui:graphWithImports>.

parse
type: Node class
comment: 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 . 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 }".
subclass of: Control element
constraint: Argument
  value type: string
  comment: The source code of the XML snippet to insert.
  predicate: str

label
type: Function
subclass of: StringFunctions
comment: Computes the display label for a given RDF node (literal or resource). Body: SELECT ?name WHERE { LET (?name := smf:name(?arg1)) . }
return type: string
constraint: Argument
  comment: The node to get the label of.
  predicate: arg1