0.1.0 A library of reusable components for SWP-based applications. Includes elements to insert forms, trees, grids etc. Object viewer class Node editor class Object widget row class Subject editor class Mode The class of the various modes that a form can be in, e.g. editing, viewing. Each Mode holds pointers to the relevant subclasses that shall be inserted. Object widget class Metaclass of the various object widget types. Form class Metaclass for the various kinds of forms. Object facet class Subject widget row class Subject facet class Subject viewer class Subject widget class form id children query no border old element id form class Links a mode with a form class. initial value west size id class label property row index target id on loaded is single function load immediately Select {?expression} with weight {?weight} true The weight of the widget if the expression is true. A boolean expression that delivers true to accept the associated widget type for the given input variables. Weighted expression subject widget weight draggable mode name callback object widget weight An expression that computes the suitability of an ObjectWidget for a given object (?object) at a given predicate (?predicate) and type class (?subjectType) and range (?range). The larger the number the better. Returning unbound or false means not suitable, and returning true means a weight of 1. This expression is called if a node and a predicate/subject type combination is present. south size key properties -9 Links a class with an rdf:List of properties that deliver the values that shall be displayed as columns if the user searches for instances of the class, or its sub-classes. object widget row class on select tree roots template east size top height form object predicate selection template The SPIN template that delivers the predicates that shall be displayed on a (default) form in this mode. For example, in editing mode this will include all suitable predicates, while in viewing mode this may only include the used predicates for the given subject. data provider range hide in modes property term col widths load id uid label width type selectable expression object results id filter function view roots query label used Internal system property used by some algorithm(s) to mark that certain properties have been used on a form. width object type editing subject mode name north size mode names tabular root editable mode label tree path template toggle function call cache height value params tree children template object widget class datatype child script query graph hide if empty weight search single form subject predicate selection template The SPIN template that delivers the predicates that shall be displayed on a (default) form in this mode. For example, in editing mode this will include all suitable predicates, while in viewing mode this may only include the used predicates for the given subject. parent type predicates resource type code is single constant object widget row class size left width system property 0 label 0 swa-header-label swa-header The label to insert. 6 text/javascript lib/jquery/js/jquery.jqGrid.min.js 10 text/javascript lib/jquery/js/jquery.jstree.js 11 text/javascript lib/swa/js/swa.js 4 text/javascript lib/jquery/js/jquery-ui.js 8 text/javascript lib/jquery/js/jquery.hotkeys.js 9 text/javascript lib/jquery/js/jquery.layout.js 2 text/css stylesheet lib/jquery/css/ui.jqgrid.css 3 text/javascript lib/jquery/js/jquery.js 7 text/javascript lib/jquery/js/jquery.cookie.js 0 text/css stylesheet lib/swa/css/swa.css 1 text/css stylesheet lib/jquery/css/smoothness/jquery-ui.css 5 text/javascript lib/jquery/js/i18n/grid.locale-en.js true Elements Abstract superclass of all SWA elements. Makes sure that certain required head includes (JavaScript and CSS files) are present. Header Displays the title area of a panel on the screen - typically a black bar with a label on it. 2 true 0 true nothing selected true object 1 false 0 false nothing selected false object 0 uid new- 4 object 1 0 subject predicate 5 and range 4 subject 3 at 2 predicate 1 ERROR: No ObjectEditor found for 0 class 0 class 0 uid subject predicate object subject predicate object subject predicate object The uid used to identify the triple. true The object to display or edit. true true -5 label 0 -9 true The subject resource of the form or widget. May be left empty in which case the subjectType will be used. -9 The predicate. Form elements Object elements Abstract superclass for all elements that take a subject/predicate combination and then display or edit the objects. Object widget A component representing a single RDF node. Depending on the mode, this may for example be an ObjectViewer or ObjectEditor. Object editor Inserts an editor for a given object, with different behavior depending on the type of object or the context. Boolean editor A combo box with options empty, true, and false. predicate none uid value subject subject 1 0 object 3 at 2 predicate 1 ERROR: No SubjectFacet found for 0 class 0 class 0 uid subject predicate object subject predicate The uid used to identify the triple. true The subject being displayed. The predicate. The object (usually the resource of the surrounding form). Subject elements Subject widget Subject facet Resource subject facet * 2 range range The datatype or class. resource oneOf oneOf 0 -2 item item oneOf items Given an rdfs:Datatype or enumerated class, returns the members of the owl:oneOf enumeration. 0 rs index 0 item 2 1 item radio name none selected object item 0 index 0 0 range predicate subject uid new- Radio buttons editor Datatype enum radio buttons editor 0 range object uid new- subject predicate 2 object range range Resource editor The default Editor for resources, consisting of a combo-box with auto-complete. loadId resource 0 0 nothing The uid of the link element - this can be used to learn more about the neighborhood of the link. The URI resource to link to. Functions Create link functions Abstract superclass for functions that take a URI resource and produce a JavaScript snippet that acts like a hyperlink for it. All link creation by widgets should run through one of those functions. If no function is called directly, then swa:createLink should be used which will find the most suitable link function for the given context. For example, hyperlinks on a view form should replace the view form with a form for the selected resource. The form sets a context variable 'createLinkFunction' that points to a function that will replace the whole form after an ajax request. create no link A dummy function that returns nothing, suppressing any links. createLinkFunction 0 resource 0 resource loadId div- The ui:loadId of the ui:loadable that will be placed around the dialog. true Dialog elements Abstract superclass for dialog-related elements. Resource view dialog A dialog that shows the default view of a given resource. This needs to be inserted into the document and will remain initially invisible. The JavaScript call swa.openResourceViewDialog() must be called with the provided loadId and the URI of a resource. 5 }) }); 5 4 southSize south 3 northSize north 2 eastSize east 1 westSize west $(document).ready(function() { $('body').layout({ defaults: { applyDefaultStyles: true } 0 5 4 4 3 3 2 2 1 1 0 0 html, body { height: 100%; margin: 0; } 0 true true The pixel size of the west panel. true The pixel size of the south panel. true The pixel size of the north panel. true The pixel size of the east panel. Layout elements Abstract border layout Full screen border layout A convenience wrapper around the jQuery UI Layout. Makes it possible to define complex screen layouts with components in the west, east, north, south and center, and possibly with sliders between them. The BorderLayout can take up to 5 children, each of which must declare one the following HTML classes: "ui-layout-west", "ui-layout-east", "ui-layout-north", "ui-layout-south" or "ui-layout-center". This element is provided as a convenience only, and possibly only for quick demos etc. For serious applications you may want to rather use jQuery UI Layout directly because it gives you more options. -5 label 0 template 0 0 0 value ?0 ?0 path ?0 ?1 ?1 ?1 value 0 0 rs root node dataProvider template template true The root resource to stop at. The node resource to start traversal at. 1 treeChildrenTemplate 0 rs 0 id id 1 id 0 treeRootsTemplate 0 rs 0 root id true A subclass of swa:TreeRootsTemplates that delivers the roots of the tree. Will be bypassed if the tree itself defined an arg:rootResource. This SPIN template is called with the variable ?node pre-bound to a node in the tree and ?root possibly pointing to a root resource. The template must return a single result variable containing a path from a root to that node. See spif:shortestObjectsPath for a default implementation. The path must be a space-separated string concatenation of URIs. The subclass of swa:TreeChildrenTemplates that delivers the children of a given parent node. Tree elements Tree data provider Instances of this class are used as server callbacks to drive an swa:Tree. A TreeDataProvider is backed by two SELECT queries - one to get the roots, and one to get the children of a given node. Optionally, a root resource can be supplied to overload the default root(s). Another operation that trees must support is finding an expansion path from a root to a given node. To support this, each TreeDataProvider points to a SPIN template that delivers a path. This typically uses the spif:shortestObjectsPath function. The TreeDataProvider that contains the pathExpression needed to walk to the root. Tree shortest path callback An element building a JSON array with URIs based on spif:shortestObjectsPath. Called using uispin?_viewClass=swa:TreeShortestPathCallback&_format=json&subject=...&dataProvider=... 0 text uid regex subject predicate range range 1 0 predicate 5 and range 4 3 at 2 predicate 1 ERROR: No ObjectFacet found for 0 class 0 class 0 uid predicate predicate Object facet An object widget representing a facet on a search form. String facet Form selector true The resource on the form. true An optional form id for the new forms. The name of the mode. true The subject type. A component that takes a modeName and inserts a Form depending on the formClass associated with the given mode. This class is meant to be called from the outside through the servlet, e.g. to switch the mode of an existing form. modeName mode 0 resourceType resource noBorder formId true Forwarded into the generated form. 0 2 0 ) 2 object 1  ( 0 swa-lang langFlags 1 0 object Language code: object swa-lang-img object 0 swa-shifted-label 1 0 object object 1 ] 6 object 5 , 4 predicate 3 , 2 subject 1 [Error: no ObjectViewer found for 0 class 0 class 0 subject predicate object subject predicate object swa-object-widget Object viewer A read-only widget displaying a single object. Lang literal viewer A node viewer for literal values that carry a language tag, displaying the literal's text and either a language code or a flag of the country associated with the language. By default this is showing the language code, but flags can be activated by setting the context variable "langFlags" to true. 0 object swa-shifted-label object URI resource viewer object 0 swa-shifted-label object Literal viewer A node viewer for literal values, displaying the literal's text. 0 domain subject uid new- predicate object subject subject 1 0 object 3 at 2 predicate 1 ERROR: No SubjectEditor found for 0 class 0 class 0 uid subject predicate object subject predicate object Subject editor Resource subject editor link ') uid ', ' ', ' resource swa.reloadForm(' link create replace view form link A CreateLinkFunction that can be installed by a form to make sure that all hyperlinks on that form get redirected to replace the form itself, and not reload the whole document. 1 object text uid new- 0 uid datatype subject predicate object object 1 object range range range Text field editor A single-line text editor for literals. This is the default widget for all literals with a weight of 0. object swa-image 2 object object Image resource viewer The default viewer for URI resources that appear to be images, judged by their file extension. Text area editor A multi-line text area to enter string literals. 2 text 6 uid max 1  -  0 0 text 6 uid min 5 range range Numeric range facet 3 ') uid swa.initDatePicker(' 2 hidden uid new- uid new- 1 object text 10 uid dateEditor 0 uid 5 object 3 range Date editor predicate uid value range range URI resource facet :  predicate The predicate to display Widget label Inserts a jsTree component into the current page. The jsTree object will get the provided id. The TreeDataProvider that is used in the callbacks to fetch the root and child nodes. true JavaScript code that shall be called if a node has been selected in the tree. In this code, the variable 'resource' points to the URI of the selected resource. The variable 'node' holds the selected low-level tree node. dataProvider true true json , 10 text/javascript onSelect 8 " 2 onSelect 1 " 0 onLoaded 5 " 2 onLoaded 1 " 0 , 7 $().ready(function() { swa.initTree(" 0 9 false 0 ", 4 6 false 0 ", " 2 ); }); 12 true draggable 11 id 1 link 3 1 0 root dataProvider id cache root true tree The id of the HTML element to generate for the tree. true true If true then the tree acts as drag source, i.e. users can drag resources from the tree to other elements that act as drag targets. Tree true A root node that can overload the default root of the data provider. For example, swa:ClassTreeDataProvider starts at rdfs:Resource by default - set arg:root to owl:Thing to start there instead. true Set to true if the tree shall cache its requests. This should only be done for read-only static data. true An optional JavaScript snippet that is to be executed after the tree has loaded its roots. , 4 ").jqGrid({ datatype: "local", data: 2 pagerId 7 ', viewrecords: true, sortorder: "desc", height: "100%" }).jqGrid('navGrid', '# 8 pagerId 9 rowNum: 10, rowList:[5,10,20], pager: '# 6 5 ], 4 , rs 3 } 2 1 colIndex resultSet name { 0 ], colModel:[ 2 , rs 1 ' 2 colIndex resultSet 1 ' 0 colNames:[ 0 resultSet ', { add: false, edit: false, del: false}); 10 3 resultSet $("# 0 tableId 1 2 1 pagerId 0 tableId The SPARQL ResultSet to display. true Grid elements Result Set Grid A tabular component to display the results of an existing SPARQL result set. This does not do lazy loading but constructs a static data table from all entries in the result set. Use this only for small data sets. The class to return the instances of. type 0 -2 class instance type label instance instance label label Sorted instances Enum facet The results id. A JavaScript expression that produces the URI of the resource type. When used in a Tree, this would be 'resource', while in other cases it might be a static URI string. true The schema graph. The id of the element to replace. True to set the noBorder flag. nb none , true noBorder result ', ' resourceTypeCode swa.loadSearchForm(' ', , ' oldElementId ' ', ' resultsId nb queryGraph ) true Create call functions Abstract base class for functions that produce a JavaScript call, e.g. to be used as event handlers. create load search form call * 3 range range 0 0 rs index 1 0 item 0 item radio none selected item object 0 item 0 radio range name predicate subject uid new- true Abstract enum drop down editor Datatype enum drop down editor The name of the mode to get. modeName mode modeName mode mode by name Gets the swa:Mode with a given name. * 3 range range 0 0 rs index 1 0 item 0 item radio none selected item object 0 item 0 radio range name predicate uid value Abstract enum drop down facet Resource enum drop down facet tree root 6 Min', 'min 2 swa.initDatePicker(' 0 uid 3 '); 8 uid 5 Max', 'max 6 '); swa.initDatePicker(' 4 uid 7 uid 1 5 hidden uid datatype uid datatype 4 hidden uid max uid max 3 hidden uid min uid min 2 object text 10 Max uid dateEditor 1  -  0 0 object text 10 Min uid dateEditor 5 range range range Date range facet 0 subject swa-shifted-label subject class 0 subject predicate object subject predicate object swa-object-widget Subject viewer URI resource subject viewer 1 resourceType onSelect labelProperty cache   letter 0 0 letter 0 ') letter swa.openIndexLetterDialog('swaIndexLetterDialog', ' javascript:void(0) swa-index The type of instances to index. The JavaScript code that will be called if the user has selected a resource. The variable resource will point to the URI of the selected resource. The label property, e.g. rdfs:label or skos:prefLabel. true True to activate caching for the letter dialogs. true Index elements Index Displays a list of hyperlinks A B C ... Z * where each letter opens a dialog with all resources starting with that letter. object label 0 swa-shifted-label object BNode viewer 0 colWidth ?0 ?0 colWidths ?0 ?1 ?1 , ?1 colWidth index 0 0 index col 0 colWidth width: swa-layout-td none width width: width swa-layout-table true The total width of this layout component, e.g. "600px". A comma-separated list of width style values for each column, in CSS notation. For example "25%,25%,50%" will create three columns, with the third column covering 50% of the available width. Column layout A container that arranges its children into one or more column. The relative widths of each column must be specified using a comma-separated list (arg:colWidths). The immediate children of this element will be used as columns from left to right. * 2 range range Datatype enum drop down facet 0 1 uid predicate 0 predicate - hidden uid facet uid swa-widget-span subject predicate object true The subject to display. Subject widget row Subject facet row subject predicate o subject predicate subjectType subjectType subject predicate predicate true true The subject. Predicate selection templates Abstract base class for templates that can be used to select which predicates shall appear on a form, based on a subject or a subject type from the context. Suitable object predicates for subject Finds all "suitable" predicates for a given subject and/or subject type, looking at domains but also the existing values. true An optional graph that contains the schema (needed to determine whether an instance has a class that is the subclass of the resource type). true If set to true, the form will have a drop down selection in the top where users can switch to a subclass of the resource type. true The onSelect handler of the generated SearchResultsGrid. search mode 3 loadImmediately 3 0 handler 0 2 Reset button ') lid swa.reloadSearchForm('   1 0 Search button handler ") onSelect ', " resultsId ', ' fid swa.loadSearchResultsGrid(' swa-form-footer lid 2 resourceType resourceType 0 create new tab link Creates a link that opens the resource in a new tab or window. createLinkFunction 0 typeSelectable suppressRDFType 0 0 > resourceType < hidden type fid kp 3 kp keyProperty keyProperty index 0 0 keyProperty hidden index keyProperty 2 hidden schema 4 search,* 0 swa-form-body 0 resourceType swa-form-border false noBorder noBorder swa-form off 1 queryGraph queryGraph hidden _base true ui-layout-content typeSelectable 1 0 resourceType lid 0 resourceType none typeSelectable typeSelectable Search formId formId The subject type to display. Search form true If set to true this will execute the search immediately when the widget is created. The id of a div that shall contain the results grid when the user hits Search. true The id that shall be used for the new form. The system will generate a unique new id if left blank. true true True to suppress the border around the form. This can be useful if the surrounding container (SplitPane) already has a border. Form Base class for the various types of forms, depending on the mode. 0 1 uid predicate 0 predicate hidden uid facet uid swa-widget-span subject predicate object true The object node. Object widget row Superclass for the containers of an ObjectWidget together with a toolbar (to the right). Object facet row A mode in which forms are displaying search fields, e.g. a range slider for numeric values and a text field for regex string matching. true search Search mode is search mode Checks whether the SWP engine is currently in search mode, i.e. has the swa:mode set to swa:SearchMode. * 3 range range Resource enum drop down editor * 6 range range Resource enum radio buttons editor node root label node leaf child node icon swa-icon-class node label leaf icon true The node to return as single root - this is bound by the tree if the tree has a dedicated arg:root. Otherwise the node is created by the WHERE clause. Tree templates Base class for SELECT templates that are used to populate trees. There are two kinds of queries: a) to find all root nodes b) to find the children of a given parent node. All SELECT queries in subclass of this must return the following result variables: SELECT ?node ?label ?leaf ?icon - ?node: the resource behind the node, e.g. an owl:Class or skos:Concept - ?label (optional): the label for the resource - if not used, the system will call ui:label(?node) - ?leaf: true means no children, i.e. the node cannot be expanded - ?icon (optional): CSS class for the icon Tree roots templates Abstract superclass for queries that can deliver the roots of a tree. Class tree roots path root node path true An optional root resource to stop traversal at. The node to start traversal at. Tree path templates An abstract superclass for SPIN templates used by TreeDataProviders to find a path from a node to a root. Class tree path node parent node leaf child node label node icon swa-icon-class node label leaf icon label The parent node to get the children of. true Tree children templates Class tree children A template that delivers all (named) subclasses of a given parent class, using rdfs:subClassOf. Class tree data provider A data provider for a class tree starting at rdfs:Resource. tree data provider 1 0 rs 0 0 rs 1 0 true subject predicate label 0 0 label 0 swa-sub-title swa-objects-group ?0 rs ?0 ?1 ?1 0 ?1 ?0 predicate thisParent predicate subject predicate filterFunction filterFunction predicate rootView The root view. 0 -2 view view predicate view type 0 * subject predicate function function true true True to use a fixed labelWidth so that all objects show up in a tabular alignment. true 160px The label width, defaults to 160px. Set to "inline" to have the preferred width, i.e. it will occupy exactly the needed space. true A label, overriding the default label. true An optional comma-separated list of mode names (e.g. "edit", "search", "view") enumerating those views in which this widget shall be hidden. true True to suppress this if the given subject has no value for the given predicate. Has no effect if we are not in view mode. Abstract object Objects A two-columned structure with a label on the left and zero or more objects on the right. type * true Object Inserts a widget for a single value of a given predicate at the given subject. This element should only be used if the property doesn't have a max cardinality of 1 anyway, to overload the default behavior. type predicate predicates of objects Gets all arg:predicates associated with swa:Object or swa:Objects underneath a given root view. predicate thisParent predicate 0 thisParent subject The subject resource to display. true An optional filter function that takes a predicate and a subject as arguments and returns true for all predicates that should be displayed. If no function is specified then all "other" predicates will be shown. true The title label. Object group elements Objects placeholder Inserts Objects for all "other" properties for the given subject. This includes all properties that are not mentioned explicitly through other swa:Objects elements on the surrounding element tree. A filter function can be provided to further exclude certain properties that shouldn't be visible at all. 0 * false true True to set labels to a fixed width so that all subjects appear in a tabular layout. true 160px The label width, defaults to 160px. Set to "inline" to have the preferred width, i.e. it will occupy exactly the needed space. true A label, overriding the default label. Abstract subject Subjects 0 2 0 * swa-labeled-objects-body-td 1 0 predicate error- swa-error-indicator swa-icon swa-labeled-objects-icons-td 0 0 0 predicate predicate label label swa-shifted-label none labelWidth width: labelWidth none swa-labeled-objects-tabular-label tabular swa-labeled-objects-label-td swa-labeled-objects-tr swa-labeled-objects-table Labeled subjects true thisParent subject false false hideIfEmpty subject 0 body 1 label 0 0 label 0 swa-sub-title swa-objects-group The subject resource to display. true True to hide the whole group if the subject has no value for any property in it. Enumerated objects group A container around a finite list of swa:Objects elements - not computed through a filter function but explicitly enumerated. Can be used in conjunction with swa:ObjectsPlaceholder. The view (usually instance of swa:ObjectsEnum). The subject to check. view predicate subject predicate any subject has object from enum Checks if a given subject has at least one object for any of the swa:Objects under the given root element. subject 0 0 2 1 ', { resourceType: newType }); }); 6 loadId 5 ').val() + '>'; swa.load(' 4 id 3 ').change(function() { var newType = '<' + $('# 2 id 1 $('# 0 0 class 0 -2 resourceType label class label class label true 0 0 label 0 class none selected class resourceType id off -typeSelect loadId swa-labeled-objects-body-td 1 0 swa-icon swa-labeled-objects-icons-td 0 0 Search for Type padding-top: 2px swa-labeled-objects-label-td swa-labeled-objects-tabular-label swa-labeled-objects-tr swa-labeled-objects-table swa-search-form-type-switch predicate 0 1 1 edit,* 0 resource 0 resource edit,* 0 swa-form-body resource 0 0 hidden resourceType fid swa-form off object ?0 type mode predicate result createLinkFunction noBNodes class subClass resourceType keyProperties keyProperty colName keyProperty 0 rs 0 0 rs 1 0 true subject predicate label 0 0 label 0 swa-sub-title swa-objects-group ?0 predicates ?0 ?1 ?1 0 ?1 ?0 predicate subject predicate filterFunction filterFunction predicate The resource to display. A result set (e.g., SPARQL SELECT query) that delivers the predicates in this group. true An optional filter function that takes a predicate and a subject as arguments and returns true for all predicates that should be displayed. Objects group link resource uid resource createLinkFunction createLinkFunction createLinkFunction value label object editing 0 edit mode 0 objectType The property to get the object of. subject rs predicate predicate no predicate object 0 * uid noBNodes subject subject no object object none predicate predicate uid swa-widget-row datatype no object object no predicate object 0 no object object Object viewer row view editable 2 0 3 Cancel button visibility: hidden ') fid swa.switchToViewForm(' -cancelButton fid   2 1 Save Changes button visibility: hidden ') fid swa.submitForm(' -saveButton fid 0 Edit button ') fid swa.switchToEditForm(' -editButton fid swa-form-footer -loadable fid 1 1 view mode 0 0 0 resource view,* 0 swa-form-body fid swa-form ui-layout-content 0 ) resource   ( resource formId true The resource to display. true The id of the form if this is in edit mode. true True to add an option to allow the user to switch the form to edit mode. View form A form displaying details of a given resource. The form displays a header on top, with label and type of the resource. If arg:editable is set to true, the form will have a button at the bottom to switch it to edit mode. subject predicate object subject true The object (the main resource on the form). Subject predicate selection templates Used subject predicates subject predicate o predicate predicate true Used object predicates 0 0 * uid predicate no predicate object uid no object object swa-widget-row subject Subject viewer row false View mode mode 2 Properties predicate subject keyProperties 0 0 1 0 ") uid swa.deleteRow(" javascript:void(0) swa-icon ui-icon ui-icon-closethick swa-object-row-button-td 0 1 * 0 * swa-object-row-main-td uid swa-object-editor-row-table widgetClass type widgetClass w w expression weight 0 w object expression resourceType predicate range The predicate of the editor. predicate datatype 0 datatype hidden uid datatype- The uid identifying the associated editor. The datatype to send to the server for new values of this widget. true Hidden fields Object editor hidden datatype field 1 rs The node to get the widget type for. keyProperties The root class for the search form. object result predicate none object The ui:loadId of the body of the form. } 13 , " }, 10 12 "state" : "closed" 0 index :: 6 }, "attr" : { "id": " 4 " 2 node 5 7 { "data" : { "title" : " 0 icon 3 " 2 icon 1 , "icon" : " 0 1 node label 1 ", "resource" : " 8 leaf 11 "children" : [] 0 resultSet node 9 1 1 resource rs Properties 0 resource rs Annotations resource 1 0 script 0 baseURI uid predicate mode expression subject tableId 1 keyProperties 7 , colName 0 ' 2 colName 1 ' 0 8 'Resource' 0 onSelect 13 }, 2 onSelect 1 onSelectRow: function(resource) { 0 ', sortorder: 'asc', viewrecords: true }).jqGrid('navGrid', '# 16 , colNames:[ 6 ], 12 autowidth: true, height: 'auto', rowNum: 10, rowList:[5,10,20], pager: '# 14 $("# 0 3 params getSearchResults? url keyProperties 10 , keyProperties keyProperty keyProperty index 0 } 2 1 index _ keyProperty name { 0 pagerId 15 11 { name : 'label', width: 400 } 0 ], colModel:[ 9 5 json datatype 2 ").jqGrid({ 2 pagerId 17 , 4 ', { add: false, del: false, edit: false, search: false }); 18 1 pagerId 0 tableId type The type of resources being edited. A URL-encoded string of the parameters produced by a SearchForm. true JavaScript code that shall be executed if the user selects a row in the grid. In this JavaScript code, the variable resource contains the URI of the selected resource. Search results grid Instances of this class can be created as a result of a user pressing the Search button on a SearchForm. The search button collects the parameters (form field values) and the grid allows users to browse through the matching resources based in a lazy loading manner. object resource modeName mode modeName mode modeName true Search form type switch If the given resource type has at least one subclass, then this will display a drop down box where the user can select a class. This will reload the ui:loadable (form body) with the selected type. Future versions may also display a button that opens a tree dialog. link link 0 0 0 resource link uid javascript:void(0) swa-link cache w 0 rs 0 0 0 subject predicate swa-object-row script none true True to allow at most one value. widgetPrototype resourceType predicate link 0 0 swa-widget-initializer 0 w 2 0 1 0 true widgetPrototype 0 0 subject predicate swa-object-row display: none pid 0 ) true single ', pid swa.addRow(' javascript:void(0) swa-add-row-button none display: none subject predicate single swa-add-button-div 1 0 0 predicate swa-object-row subject 0 The subject to get the values of. The predicate to get the objects of. subject subject predicate object object object Sorted objects 0 rs 1 0 0 subject predicate object swa-object-row ?0 ?1 ?1 term ?1 ?0 ?2 ?2 resource ?2 ?3 ?3 label ?3 weight labelProperty &lang0= _base= &facet0= letter &type= &_cache= &regex0=%5E ') ', ' resource swa.navigateTo(' objectType expression result subject predicate filterFunction filterFunction ?0 predicate initialValue widgetClass 0 predicate object object subject true suppressRDFType predicate key properties functor widgetClass w widgetClass type 0 swa-object-row id resource weight 0 rs resource Incoming References id true True to allow at most one value. Objects body 0 1 0 resource resource The URI resource to link to. Link Creates a hyperlink to switch the current view to a given resource. This element should be used to create all hyperlinks in SWA applications, because this single place provides greater flexibility to make adjustments to the links. In particular, the semantics of what should happen if the user clicks on a link may be different for each application or even within different parts of a single application: in some cases the application may want to replace a form on the screen, while in other cases the selected resource should be opened in a modal dialog. The SPIN function swa:createLink is used to define the link. If this function retuns nothing, then no link is displayed, but rather an swa:Label. rs The class to start traversal at. keyProperties class keyProperties get key properties Gets the key properties of a given class, by walking up the superclasses until it finds a class with declared swa:classKeyProperties. predicate 0 * 0 0 0 swa-object-row The property holding the label information, e.g. skos:prefLabel. 2 swa-labeled-objects-body-td size } 4 size 3 : { size: 2 name 1 , 0 true true The size value. The name of the pane, e.g. "west". Border layout options A helper to BorderLayout to conveniently set JavaScript options. 1 predicate predicate subject 0 0 * Subject editor row 1 0 0 1 0 ") uid swa.deleteRow(" javascript:void(0) swa-icon ui-icon ui-icon-closethick swa-object-row-button-td 0 1 * 0 * swa-object-row-main-td uid swa-object-editor-row-table object predicate subject predicate object subject 0 0 * Object editor row edit Edit&nbsp; Edit mode error- subject subject countryCode 0 swa-error-indicator swa-icon predicate object countryCode lang 1 swa-labeled-objects-icons-td The type of the main resource on the form. The predicate of the editor. predicate displayId predicate subject true The subject. initialValue predicate id 0 swa-auto-complete label subject editor class Find the best suitable SubjectEditor for a given object/predicate. May return nothing, e.g. for blank nodes. predicate 1 1 ') link displayId swa.initAutoComplete(' onSelect ', ' id ', ' ', ' -field pid hideInModes baseURI link label 0 0 label 0 swa-sub-title false single hideInModes 0 ) ', swa.addRow(' javascript:void(0) swa-add-row-button [ 0 subject predicate subject predicate anyObject subject true hideIfEmpty hideIfEmpty 0 rs 0 0 rs 1 0 true predicate object swa-objects-group predicate The predicate to get the objects of. 1 0 true widgetPrototype 0 0 predicate object swa-object-row display: none pid The object to get the values of. result .gif countryCode lib/swa/css/images/flags/ range none object subject predicate object subject subject subject Sorted subjects The subject type. subject true Form body Base class for the body element of forms. Subclasses of this are meant to be inserted into Forms, and should be associated as ui:instanceView with domain classes. true The range of the predicate at the subjectType. true True to activate caching for the dialogs. subjectType 1 predicate hidden uid path- swa-editor-hidden-field subject The predicate. object 2 0 object hidden uid old- swa-editor-hidden-field 0 hidden uid resource- swa-editor-hidden-field The unique id of this group. true The object node. Object editor hidden fields Inserts the hidden fields needed to link the server with a widget. Note that the fields have a marker class swa-editor-hidden-field that is used by delete row operations. The object to get the widget type for. currentModeName The query to execute. modeName node label 0 swa-label The RDF node to display the label of. Label ] 2 true The subject. true The view to get the root of. parent 0 -2 view another parent parent root view Walks up the child hierarchy of SWP nodes in the ui:graph until it finds no further parent for the provided view. A comma-separated list of name of the modes to match against. 0 none display: none single swa-add-button-div 2 labelWidth predicate 0 The JavaScript that will be called. true Index letter dialog A dialog that displays a sorted list of all resources starting with a given letter. swaIndexLetterDialog letter 0 0 0 resourceType ;swa.closeDialog('swaIndexLetterDialog'); onSelect letter div-swaIndexLetterDialog cache display: none The type of instances to display. predicate labelWidth none width: range 1 0 swa-object-row 0 0 0 predicate object Subjects body The type that the widget class must have, e.g. swa:NodeEditorClass subject 2 0 subject hidden uid old- swa-editor-hidden-field predicate none swa-labeled-objects-tabular-label tabular result index 1 object swa-labeled-objects-label-td The string to convert. subjectType subjectType subject range none index :: result remove unique id Takes a string and removes everything after the :: (including the :: itself). This is needed to de-code tree node ids. The id of the HTML input element. The language tag to get the image for. lang image Gets the URL to an image for a given language tag (either 2 or 5 letter encoding). The predicate of the editor. best object widget class Walks through all ObjectWidget classes of a given type (?type) that declare an objectWidgetWeight and returns the ObjectWidget class that has the highest weight for a given node (?node), predicate (?predicate), resource type (?resourceType) and local range (?range). All arguments are optional, but not all will be empty. If the resourceType and predicate are known, then also the ?range will be bound. widgetClass weight 0 0 0 label swa-shifted-label subject predicate objectType The node to get the widget type for. modeNames create default link The default CreateLinkFunction - it simply navigates to the resource with a call of the UISPIN servlet. 0 1 toolBar 0 swa-right swa-form-header-toolbar 0 label 0 0 label 0 swa-left swa-header-label swa-top swa-header ?0 1 2 rs Properties 1 rs Property Axioms 0 rs Annotations resource 0 resource 0 swa-title resource Property form body The default view for rdf:Property, with widget groups for Annotation Properties, Property Axioms and Other Properties. ?1 ?1 0 ?0 ?1 ?0 predicates predicate true The subject. The predicate of the editor. best node viewer Walks through all NodeWidgets of a given type (?type) that declare a nodeWidgetWeight and returns the widget class that has the highest weight for a given node, predicate and subject. A result set (e.g., SPARQL SELECT query) that delivers the predicates in this group. subjectType range predicate object : 1 The predicate of the editor. best subject viewer Walks through all SubjectWidgets of a given type (?type) that declare a subjectWidgetWeight and returns the widget class that has the highest weight for a given objectType, predicate and subject. ?1 The rdf:type of the matching resources. Will also include subclasses of that type. , best object facet class Find the best suitable ObjectFacet for a given predicate and resourceType combination. May return nothing, e.g. for blank nodes. is view mode Checks whether the SWP engine is currently in view mode, i.e. has the swa:mode set to swa:ViewMode. true A JavaScript snippet that shall be executed when the user selects a resource. ?1 ?0 ?1 true The object. true The initial resource to place into the text field. - 2 0 0 swa-title Resource form body The default view for rdfs:Resource, with widget groups for Annotation Properties and Other Properties. uid path- true modeName ?0 currentModeName contains current mode name Checks whether a given string of comma-separate mode names contains the name of the current mode. For example, swa:containsCurrentMode("search,edit") will return true if the current mode is "edit". mode Gets the current swa:Mode from the context variable "mode". 1 hidden swa-editor-hidden-field object 0 hidden type label resource true The type of resource to get matching instances of. The start of the name as entered by the user. true Auto complete elements Auto complete callback Internally used by the AutoComplete widget to fetch the matching resources. true true json label 0 swa-property-label true The node of the existing value. result mode property Gets a property associated with the current mode. true The subject. 1 1 rs Class Axioms 0 rs Annotations resource The predicate of the editor. node editor class Find the best suitable NodeEditor for a given node, predicate, subject, subjectType combination. May return nothing, e.g. for blank nodes. Auto complete Inserts a text field that automatically suggests matching resources as the user starts typing. 0 0 0 0 swa-labeled-objects-tr swa-labeled-objects-table true true True to only allow at most one object for this component. Labeled objects The label to display. The property to display. uid The resource to display. 0 hidden resource- swa-editor-hidden-field The unique id of this group. 0 resource 0 swa-title resource Class form body The default view for rdfs:Class, with widget groups for Annotation Properties, Class Axioms and Other Properties. The object to get the widget type for. The type that the widget class must have, e.g. swa:NodeEditorClass Walks through all SubjectWidget classes of a given type (?type) that declare a subjectWidgetWeight and returns the widget class that has the highest weight for a given node (?node), predicate (?predicate), subject type (?subjectType) and local range (?range). All arguments are optional, but not all will be empty. If the subjectType and predicate are known, then also the ?range will be bound. true The subject value. best subject widget class The predicate. true An optional filter function that takes a predicate, subject and subjectType as arguments and returns true for all predicates that should be displayed. true The title label. true The subject node. The script that initializes this widget. Widget initializer Property label The label used to display the name of the property on a form, consisting of the property's label and a column. Should also be used to display properties elsewhere to have a central implementation that could be overloaded etc. Subject editor hidden fields Inserts the hidden fields needed to link the server with a widget. Note that the fields have a marker class swa.editorHiddenField that is used by delete row operations. is edit mode Checks whether the SWP engine is currently in edit mode, i.e. has the swa:mode set to swa:EditMode. best node facet class Find the best suitable SubjectFacet for a given predicate, object combination. May return nothing, e.g. for blank nodes. create link Creates a line of JavaScript code that can be inserted into an HTML document to produce a hyper link. The implementation of this function is very flexible and can be replaced depending on the context. The function checks if the context variable "createLinkFunction" points to another SPIN function. If so, then it calls that SPIN function with the given resource and uid arguments. Otherwise, it falls back to the built-in swa:createDefaultLink function that calls swa.navigateTo. If you want to replace the default behavior, create your own subclass of swa:CreateLinkFunctions, and then use ui:setContext to activate this link function for the contained elements. true The label to put upfront, e.g. "Edit ". Form header Subjects group Tree data provider helper