Holger Knublauch

Grid improvements

...@@ -1911,18 +1911,6 @@ app:ImageResourceViewer ...@@ -1911,18 +1911,6 @@ app:ImageResourceViewer
1911 ] 1911 ]
1912 ] . 1912 ] .
1913 1913
1914 -app:InstancesGrid
1915 - rdf:type ui:NodeClass ;
1916 - rdfs:comment "A grid displaying all instances of a class."^^xsd:string ;
1917 - rdfs:label "Instances grid"^^xsd:string ;
1918 - rdfs:subClassOf app:GridElements ;
1919 - spin:constraint
1920 - [ rdf:type spl:Argument ;
1921 - rdfs:comment "The class to display the instances of."^^xsd:string ;
1922 - spl:predicate arg:class ;
1923 - spl:valueType rdfs:Class
1924 - ] .
1925 -
1926 app:Label 1914 app:Label
1927 rdf:type ui:NodeClass ; 1915 rdf:type ui:NodeClass ;
1928 rdfs:label "Label"^^xsd:string ; 1916 rdfs:label "Label"^^xsd:string ;
...@@ -3849,6 +3837,13 @@ app:SearchForm ...@@ -3849,6 +3837,13 @@ app:SearchForm
3849 ] ; 3837 ] ;
3850 spin:constraint 3838 spin:constraint
3851 [ rdf:type spl:Argument ; 3839 [ rdf:type spl:Argument ;
3840 + rdfs:comment "The onSelect handler of the generated SearchResultsGrid."^^xsd:string ;
3841 + spl:optional "true"^^xsd:boolean ;
3842 + spl:predicate arg:onSelect ;
3843 + spl:valueType xsd:string
3844 + ] ;
3845 + spin:constraint
3846 + [ rdf:type spl:Argument ;
3852 rdfs:comment "An optional graph that contains the schema (needed to determine whether an instance has a class that is the subclass of the resource type)."^^xsd:string ; 3847 rdfs:comment "An optional graph that contains the schema (needed to determine whether an instance has a class that is the subclass of the resource type)."^^xsd:string ;
3853 spl:optional "true"^^xsd:boolean ; 3848 spl:optional "true"^^xsd:boolean ;
3854 spl:predicate arg:queryGraph ; 3849 spl:predicate arg:queryGraph ;
...@@ -3883,7 +3878,7 @@ app:SearchForm ...@@ -3883,7 +3878,7 @@ app:SearchForm
3883 ui:child 3878 ui:child
3884 [ rdf:type html:Form ; 3879 [ rdf:type html:Form ;
3885 html:class 3880 html:class
3886 - [ rdf:type fn:concat ; 3881 + [ rdf:type ui:concat ;
3887 sp:arg1 "appForm "^^xsd:string ; 3882 sp:arg1 "appForm "^^xsd:string ;
3888 sp:arg2 [ rdf:type sp:if ; 3883 sp:arg2 [ rdf:type sp:if ;
3889 sp:arg1 [ rdf:type sp:or ; 3884 sp:arg1 [ rdf:type sp:or ;
...@@ -3922,7 +3917,7 @@ app:SearchForm ...@@ -3922,7 +3917,7 @@ app:SearchForm
3922 html:name "type"^^xsd:string ; 3917 html:name "type"^^xsd:string ;
3923 html:type "hidden"^^xsd:string ; 3918 html:type "hidden"^^xsd:string ;
3924 html:value 3919 html:value
3925 - [ rdf:type fn:concat ; 3920 + [ rdf:type ui:concat ;
3926 sp:arg1 "<"^^xsd:string ; 3921 sp:arg1 "<"^^xsd:string ;
3927 sp:arg2 [ sp:varName "resourceType"^^xsd:string 3922 sp:arg2 [ sp:varName "resourceType"^^xsd:string
3928 ] ; 3923 ] ;
...@@ -3967,7 +3962,7 @@ app:SearchForm ...@@ -3967,7 +3962,7 @@ app:SearchForm
3967 ui:child 3962 ui:child
3968 [ rdf:type html:Input ; 3963 [ rdf:type html:Input ;
3969 html:name 3964 html:name
3970 - [ rdf:type fn:concat ; 3965 + [ rdf:type ui:concat ;
3971 sp:arg1 "keyProperty"^^xsd:string ; 3966 sp:arg1 "keyProperty"^^xsd:string ;
3972 sp:arg2 [ sp:varName "index"^^xsd:string 3967 sp:arg2 [ sp:varName "index"^^xsd:string
3973 ] 3968 ]
...@@ -4024,7 +4019,7 @@ app:SearchForm ...@@ -4024,7 +4019,7 @@ app:SearchForm
4024 ui:child 4019 ui:child
4025 [ rdf:type html:Input ; 4020 [ rdf:type html:Input ;
4026 html:onclick 4021 html:onclick
4027 - [ rdf:type fn:concat ; 4022 + [ rdf:type ui:concat ;
4028 sp:arg1 "appLoadSearchResultsGrid('"^^xsd:string ; 4023 sp:arg1 "appLoadSearchResultsGrid('"^^xsd:string ;
4029 sp:arg2 [ sp:varName "fid"^^xsd:string 4024 sp:arg2 [ sp:varName "fid"^^xsd:string
4030 ] ; 4025 ] ;
...@@ -4032,7 +4027,9 @@ app:SearchForm ...@@ -4032,7 +4027,9 @@ app:SearchForm
4032 sp:arg4 [ sp:varName "resultsId"^^xsd:string 4027 sp:arg4 [ sp:varName "resultsId"^^xsd:string
4033 ] ; 4028 ] ;
4034 sp:arg5 "', '"^^xsd:string ; 4029 sp:arg5 "', '"^^xsd:string ;
4035 - sp:arg6 [ rdf:type ui:currentQueryGraph 4030 + sp:arg6 [ rdf:type ui:escapeJSON ;
4031 + sp:arg1 [ sp:varName "onSelect"^^xsd:string
4032 + ]
4036 ] ; 4033 ] ;
4037 sp:arg7 "')"^^xsd:string 4034 sp:arg7 "')"^^xsd:string
4038 ] ; 4035 ] ;
...@@ -4040,6 +4037,18 @@ app:SearchForm ...@@ -4040,6 +4037,18 @@ app:SearchForm
4040 html:value "Search"^^xsd:string ; 4037 html:value "Search"^^xsd:string ;
4041 ui:childIndex 0 4038 ui:childIndex 0
4042 ] ; 4039 ] ;
4040 + ui:child
4041 + [ rdf:type ui:TextNode ;
4042 + ui:childIndex 1 ;
4043 + ui:text """ 
4044 +"""^^xsd:string
4045 + ] ;
4046 + ui:child
4047 + [ rdf:type html:Input ;
4048 + html:type "reset"^^xsd:string ;
4049 + html:value "Reset"^^xsd:string ;
4050 + ui:childIndex 2
4051 + ] ;
4043 ui:childIndex 6 4052 ui:childIndex 6
4044 ] ; 4053 ] ;
4045 ui:childIndex 0 ; 4054 ui:childIndex 0 ;
...@@ -4082,6 +4091,13 @@ app:SearchResultsGrid ...@@ -4082,6 +4091,13 @@ app:SearchResultsGrid
4082 rdfs:subClassOf app:GridElements ; 4091 rdfs:subClassOf app:GridElements ;
4083 spin:constraint 4092 spin:constraint
4084 [ rdf:type spl:Argument ; 4093 [ rdf:type spl:Argument ;
4094 + rdfs:comment "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."^^xsd:string ;
4095 + spl:optional "true"^^xsd:boolean ;
4096 + spl:predicate arg:onSelect ;
4097 + spl:valueType xsd:string
4098 + ] ;
4099 + spin:constraint
4100 + [ rdf:type spl:Argument ;
4085 rdfs:comment "A URL-encoded string of the parameters produced by a SearchForm."^^xsd:string ; 4101 rdfs:comment "A URL-encoded string of the parameters produced by a SearchForm."^^xsd:string ;
4086 spl:predicate arg:params ; 4102 spl:predicate arg:params ;
4087 spl:valueType xsd:string 4103 spl:valueType xsd:string
......
...@@ -123,11 +123,29 @@ function appInitDatePicker(id, altId) { ...@@ -123,11 +123,29 @@ function appInitDatePicker(id, altId) {
123 if(!altId) { 123 if(!altId) {
124 altId = 'new-' + id; 124 altId = 'new-' + id;
125 } 125 }
126 - $('#dateEditor' + id).datepicker({ 126 + var eid = '#dateEditor' + id;
127 + $(eid).datepicker({
127 altField: '#' + altId, 128 altField: '#' + altId,
128 altFormat: 'yy-mm-dd', 129 altFormat: 'yy-mm-dd',
129 dateFormat: 'yy-mm-dd', 130 dateFormat: 'yy-mm-dd',
130 }); 131 });
132 +
133 + // Work-around to bug: Make sure that hidden field is cleared if field is empty
134 + $(eid).change(function() {
135 + if('' == $(eid).val()) {
136 + $('#' + altId).val('');
137 + }
138 + });
139 +}
140 +
141 +
142 +/**
143 + * Replaces the content of a given jQuery element with a loading indicator
144 + * (spinning wheel).
145 + * @param e the jQuery element
146 + */
147 +function appInsertLoadingIndicator(e) {
148 + e.html('<div class="appLoadingIndicator" />');
131 } 149 }
132 150
133 151
...@@ -156,7 +174,7 @@ function appLoad(id, args) { ...@@ -156,7 +174,7 @@ function appLoad(id, args) {
156 var p = jQuery.param(c); 174 var p = jQuery.param(c);
157 url = p + "&" + base; 175 url = p + "&" + base;
158 } 176 }
159 - e.html('<div class="appLoadingIndicator" />'); 177 + appInsertLoadingIndicator(e);
160 e.load(uispinServlet, url); 178 e.load(uispinServlet, url);
161 } 179 }
162 180
...@@ -187,6 +205,7 @@ function appLoadForm(formId, mode, resourceURI, resourceTypeURI, queryGraphURI) ...@@ -187,6 +205,7 @@ function appLoadForm(formId, mode, resourceURI, resourceTypeURI, queryGraphURI)
187 if(queryGraphURI) { 205 if(queryGraphURI) {
188 data._base = '<' + queryGraphURI + '>'; 206 data._base = '<' + queryGraphURI + '>';
189 } 207 }
208 + appInsertLoadingIndicator($('#' + formId).parent());
190 $.get(uispinServlet, data, function(data) { 209 $.get(uispinServlet, data, function(data) {
191 $('#' + formId).parent().html(data); 210 $('#' + formId).parent().html(data);
192 }); 211 });
...@@ -199,16 +218,35 @@ function appLoadForm(formId, mode, resourceURI, resourceTypeURI, queryGraphURI) ...@@ -199,16 +218,35 @@ function appLoadForm(formId, mode, resourceURI, resourceTypeURI, queryGraphURI)
199 * a given id. Will replace the content of a given target element. 218 * a given id. Will replace the content of a given target element.
200 * @param formId the form id 219 * @param formId the form id
201 * @param targetId the target id 220 * @param targetId the target id
202 - * @returns false 221 + * @param onSelect the value for onSelect of the generated grid
203 */ 222 */
204 -function appLoadSearchResultsGrid(formId, targetId) { 223 +function appLoadSearchResultsGrid(formId, targetId, onSelect) {
205 var params = $('#' + formId).serialize(); 224 var params = $('#' + formId).serialize();
206 var escaped = '&params=' + escape(params); 225 var escaped = '&params=' + escape(params);
226 + if(onSelect) {
227 + escaped += '&onSelect=' + escape(onSelect);
228 + }
229 + appInsertLoadingIndicator($('#' + targetId));
207 $.get(uispinServlet + '?_viewClass=app:SearchResultsGrid&_snippet=true&' + 230 $.get(uispinServlet + '?_viewClass=app:SearchResultsGrid&_snippet=true&' +
208 params + escaped, function(data) { 231 params + escaped, function(data) {
209 $('#' + targetId).html(data); 232 $('#' + targetId).html(data);
210 }); 233 });
211 - return false; 234 +}
235 +
236 +
237 +/**
238 + * Loads a given ui:loadable with a given variable pre-bound to
239 + * a given URI resource.
240 + * This can be used as onSelect handler of tree and grid elements,
241 + * e.g. onSelect="appLoadWithResource('form', 'resource', resource)"
242 + * @param loadId the id of the ui:loadable
243 + * @param varName the name of the variable to set
244 + * @param resourceURI the URI of the resource
245 + */
246 +function appLoadWithResource(loadId, varName, resourceURI) {
247 + var params = {};
248 + params[varName] = '<' + resourceURI + '>';
249 + appLoad(loadId, params);
212 } 250 }
213 251
214 252
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
6 <div id="{= ?pagerId }" /> 6 <div id="{= ?pagerId }" />
7 <script> 7 <script>
8 $("#{= ?tableId }").jqGrid({ 8 $("#{= ?tableId }").jqGrid({
9 - <swon:NameValuePair arg:name="url" arg:value="{= fn:concat('getSearchResults?', ?params) }" />, 9 + <swon:NameValuePair arg:name="url" arg:value="getSearchResults?{= ?params }" />,
10 <swon:NameValuePair arg:name="datatype" arg:value="json" />, 10 <swon:NameValuePair arg:name="datatype" arg:value="json" />,
11 colNames:[ 11 colNames:[
12 <ui:if ui:condition="{= bound(?keyProperties) }"> 12 <ui:if ui:condition="{= bound(?keyProperties) }">
...@@ -48,11 +48,16 @@ ...@@ -48,11 +48,16 @@
48 } 48 }
49 </ui:else> 49 </ui:else>
50 ], 50 ],
51 + <ui:if ui:condition="{= bound(?onSelect) }">
52 + onSelectRow: function(resource) {
53 + {= ?onSelect }
54 + },
55 + </ui:if>
51 rowNum: 10, 56 rowNum: 10,
52 rowList:[5,10,20], 57 rowList:[5,10,20],
53 pager: '#{= ?pagerId }', 58 pager: '#{= ?pagerId }',
54 viewrecords: true, 59 viewrecords: true,
55 - sortorder: "desc", 60 + sortorder: "asc",
56 height: "100%", 61 height: "100%",
57 width: "100%" 62 width: "100%"
58 }).jqGrid('navGrid', '#{= ?pagerId }', { add:false, edit:false, del:false}); 63 }).jqGrid('navGrid', '#{= ?pagerId }', { add:false, edit:false, del:false});
......
1 +# baseURI: http://appschema.org/skapp
2 +# imports: http://appschema.org
3 +# imports: http://www.w3.org/2004/02/skos/core
4 +
5 +@prefix app: <http://appschema.org/> .
6 +@prefix arg: <http://spinrdf.org/arg#> .
7 +@prefix default: <http://uispin.org/default#> .
8 +@prefix html: <http://uispin.org/html#> .
9 +@prefix let: <http://uispin.org/let#> .
10 +@prefix letrs: <http://uispin.org/letrs#> .
11 +@prefix owl: <http://www.w3.org/2002/07/owl#> .
12 +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
13 +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
14 +@prefix skapp: <http://appschema.org/skapp#> .
15 +@prefix sp: <http://spinrdf.org/sp#> .
16 +@prefix spin: <http://spinrdf.org/spin#> .
17 +@prefix spl: <http://spinrdf.org/spl#> .
18 +@prefix ui: <http://uispin.org/ui#> .
19 +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
20 +
21 +app:skapp
22 + rdf:type owl:Ontology ;
23 + owl:imports <http://appschema.org> , <http://www.w3.org/2004/02/skos/core> ;
24 + owl:versionInfo "0.1.0"^^xsd:string .
25 +
26 +skapp:ConceptClassTreeDataProvider
27 + rdf:type app:QueryTreeDataProvider ;
28 + rdfs:label "Concept class tree data provider"^^xsd:string ;
29 + arg:childrenQuery
30 + [ rdf:type sp:Select ;
31 + sp:orderBy ([ sp:varName "label"^^xsd:string
32 + ]) ;
33 + sp:resultVariables ([ sp:varName "child"^^xsd:string
34 + ] [ sp:varName "label"^^xsd:string
35 + ] [ sp:varName "leaf"^^xsd:string
36 + ] [ sp:varName "icon"^^xsd:string
37 + ] [ sp:varName "type"^^xsd:string
38 + ]) ;
39 + sp:where ([ sp:object
40 + [ sp:varName "parent"^^xsd:string
41 + ] ;
42 + sp:predicate rdfs:subClassOf ;
43 + sp:subject
44 + [ sp:varName "child"^^xsd:string
45 + ]
46 + ] [ rdf:type sp:Bind ;
47 + sp:expression
48 + [ rdf:type sp:notExists ;
49 + sp:elements ([ sp:object
50 + [ sp:varName "child"^^xsd:string
51 + ] ;
52 + sp:predicate rdfs:subClassOf ;
53 + sp:subject
54 + [ sp:varName "grandChild"^^xsd:string
55 + ]
56 + ])
57 + ] ;
58 + sp:variable
59 + [ sp:varName "leaf"^^xsd:string
60 + ]
61 + ] [ rdf:type sp:Bind ;
62 + sp:expression
63 + [ rdf:type ui:label ;
64 + sp:arg1 [ sp:varName "child"^^xsd:string
65 + ]
66 + ] ;
67 + sp:variable
68 + [ sp:varName "label"^^xsd:string
69 + ]
70 + ] [ rdf:type sp:Bind ;
71 + sp:expression "appIconClass" ;
72 + sp:variable
73 + [ sp:varName "icon"^^xsd:string
74 + ]
75 + ] [ rdf:type sp:Bind ;
76 + sp:expression
77 + [ rdf:type spl:object ;
78 + sp:arg1 [ sp:varName "child"^^xsd:string
79 + ] ;
80 + sp:arg2 rdf:type
81 + ] ;
82 + sp:variable
83 + [ sp:varName "type"^^xsd:string
84 + ]
85 + ])
86 + ] ;
87 + arg:id [ sp:varName "id"^^xsd:string
88 + ] ;
89 + arg:rootsQuery
90 + [ rdf:type sp:Select ;
91 + sp:resultVariables ([ sp:varName "child"^^xsd:string
92 + ] [ sp:varName "label"^^xsd:string
93 + ] [ sp:varName "leaf"^^xsd:string
94 + ] [ sp:varName "icon"^^xsd:string
95 + ]) ;
96 + sp:where ([ rdf:type sp:Bind ;
97 + sp:expression <http://www.w3.org/2004/02/skos/core#Concept> ;
98 + sp:variable
99 + [ sp:varName "child"^^xsd:string
100 + ]
101 + ] [ rdf:type sp:Bind ;
102 + sp:expression "Any Concept" ;
103 + sp:variable
104 + [ sp:varName "label"^^xsd:string
105 + ]
106 + ] [ rdf:type sp:Bind ;
107 + sp:expression "false"^^xsd:boolean ;
108 + sp:variable
109 + [ sp:varName "leaf"^^xsd:string
110 + ]
111 + ] [ rdf:type sp:Bind ;
112 + sp:expression "appIconClass" ;
113 + sp:variable
114 + [ sp:varName "icon"^^xsd:string
115 + ]
116 + ])
117 + ] .
118 +
119 +skapp:ConceptSearchView
120 + rdf:type ui:NodeClass ;
121 + rdfs:comment "A vertical split pane with a search form on top and a search results grid at the bottom."^^xsd:string ;
122 + rdfs:label "Concept search view"^^xsd:string ;
123 + rdfs:subClassOf skapp:Elements ;
124 + ui:prototype
125 + [ rdf:type app:VSplitLayout ;
126 + arg:height "500px"^^xsd:string ;
127 + arg:topHeight "30%"^^xsd:string ;
128 + ui:child
129 + [ rdf:type app:VSplitLayout ;
130 + arg:height "300px"^^xsd:string ;
131 + ui:child
132 + [ rdf:type html:Div ;
133 + ui:child
134 + [ rdf:type app:Header ;
135 + arg:label "Concept Type"^^xsd:string ;
136 + ui:childIndex 0
137 + ] ;
138 + ui:child
139 + [ rdf:type app:Tree ;
140 + arg:dataProvider skapp:ConceptClassTreeDataProvider ;
141 + arg:id "classTree"^^xsd:string ;
142 + arg:onSelect "appLoadWithResource('searchFormDiv', 'resourceType', resource)"^^xsd:string ;
143 + ui:childIndex 1
144 + ] ;
145 + ui:childIndex 0
146 + ] ;
147 + ui:child
148 + [ rdf:type ui:loadable ;
149 + ui:child
150 + [ rdf:type app:SearchForm ;
151 + arg:formId "searchForm"^^xsd:string ;
152 + arg:noBorder "true"^^xsd:boolean ;
153 + arg:onSelect "appLoadWithResource('conceptForm', 'concept', resource)"^^xsd:string ;
154 + arg:resourceType
155 + [ rdf:type sp:coalesce ;
156 + sp:arg1 [ sp:varName "resourceType"^^xsd:string
157 + ] ;
158 + sp:arg2 <http://www.w3.org/2004/02/skos/core#Concept>
159 + ] ;
160 + arg:resultsId "results"^^xsd:string ;
161 + ui:childIndex 0
162 + ] ;
163 + ui:childIndex 1 ;
164 + ui:loadId "searchFormDiv"^^xsd:string
165 + ] ;
166 + ui:childIndex 0
167 + ] ;
168 + ui:child
169 + [ rdf:type html:Div ;
170 + ui:child
171 + [ rdf:type app:Header ;
172 + arg:label "Matching Concepts"^^xsd:string ;
173 + ui:childIndex 0
174 + ] ;
175 + ui:child
176 + [ rdf:type html:Div ;
177 + html:id "results"^^xsd:string ;
178 + ui:childIndex 1
179 + ] ;
180 + ui:childIndex 1
181 + ]
182 + ] .
183 +
184 +skapp:ConceptTreeBrowser
185 + rdf:type ui:NodeClass ;
186 + rdfs:comment "A horizontal split pane with a Concept tree on the left and a form for the selected concept on the right."^^xsd:string ;
187 + rdfs:label "Concept tree browser"^^xsd:string ;
188 + rdfs:subClassOf skapp:Elements ;
189 + ui:prototype
190 + [ rdf:type app:HSplitLayout ;
191 + arg:height "500px"^^xsd:string ;
192 + arg:leftWidth "30%"^^xsd:string ;
193 + ui:child
194 + [ rdf:type html:Div ;
195 + ui:child
196 + [ rdf:type app:Header ;
197 + arg:label "Concept Hierarchy"^^xsd:string ;
198 + ui:childIndex 0
199 + ] ;
200 + ui:child
201 + [ rdf:type app:Tree ;
202 + arg:dataProvider skapp:ConceptTreeDataProvider ;
203 + arg:id "conceptTree"^^xsd:string ;
204 + arg:onSelect "appLoadWithResource('conceptForm', 'concept', resource)"^^xsd:string ;
205 + ui:childIndex 1
206 + ] ;
207 + ui:childIndex 0
208 + ] ;
209 + ui:child
210 + [ rdf:type html:Div ;
211 + ui:child
212 + [ rdf:type ui:loadable ;
213 + ui:child
214 + [ rdf:type ui:if ;
215 + ui:child
216 + [ rdf:type app:ViewForm ;
217 + arg:resource
218 + [ sp:varName "concept"^^xsd:string
219 + ] ;
220 + ui:childIndex 0
221 + ] ;
222 + ui:childIndex 0 ;
223 + ui:condition
224 + [ rdf:type sp:bound ;
225 + sp:arg1 [ sp:varName "concept"^^xsd:string
226 + ]
227 + ]
228 + ] ;
229 + ui:child
230 + [ rdf:type ui:else ;
231 + ui:child
232 + [ rdf:type ui:TextNode ;
233 + ui:childIndex 0 ;
234 + ui:text """
235 + Please select a concept in the tree.
236 + """^^xsd:string
237 + ] ;
238 + ui:childIndex 1
239 + ] ;
240 + ui:childIndex 0 ;
241 + ui:loadId "conceptForm"^^xsd:string
242 + ] ;
243 + ui:childIndex 1
244 + ]
245 + ] .
246 +
247 +skapp:ConceptTreeDataProvider
248 + rdf:type app:QueryTreeDataProvider ;
249 + rdfs:comment "A data provider for a SKOS Concept tree, walking down skos:broader."^^xsd:string ;
250 + rdfs:label "Concept tree data provider"^^xsd:string ;
251 + arg:childrenQuery
252 + [ rdf:type sp:Select ;
253 + sp:orderBy ([ sp:varName "label"^^xsd:string
254 + ]) ;
255 + sp:resultVariables ([ sp:varName "child"^^xsd:string
256 + ] [ sp:varName "label"^^xsd:string
257 + ] [ sp:varName "leaf"^^xsd:string
258 + ] [ sp:varName "icon"^^xsd:string
259 + ] [ sp:varName "type"^^xsd:string
260 + ]) ;
261 + sp:where ([ sp:object
262 + [ sp:varName "parent"^^xsd:string
263 + ] ;
264 + sp:predicate <http://www.w3.org/2004/02/skos/core#broader> ;
265 + sp:subject
266 + [ sp:varName "child"^^xsd:string
267 + ]
268 + ] [ rdf:type sp:Bind ;
269 + sp:expression
270 + [ rdf:type sp:notExists ;
271 + sp:elements ([ sp:object
272 + [ sp:varName "child"^^xsd:string
273 + ] ;
274 + sp:predicate <http://www.w3.org/2004/02/skos/core#broader> ;
275 + sp:subject
276 + [ sp:varName "grandChild"^^xsd:string
277 + ]
278 + ])
279 + ] ;
280 + sp:variable
281 + [ sp:varName "leaf"^^xsd:string
282 + ]
283 + ] [ rdf:type sp:Bind ;
284 + sp:expression
285 + [ rdf:type ui:label ;
286 + sp:arg1 [ sp:varName "child"^^xsd:string
287 + ]
288 + ] ;
289 + sp:variable
290 + [ sp:varName "label"^^xsd:string
291 + ]
292 + ] [ rdf:type sp:Bind ;
293 + sp:expression "appIconConcept" ;
294 + sp:variable
295 + [ sp:varName "icon"^^xsd:string
296 + ]
297 + ] [ rdf:type sp:Bind ;
298 + sp:expression
299 + [ rdf:type spl:object ;
300 + sp:arg1 [ sp:varName "child"^^xsd:string
301 + ] ;
302 + sp:arg2 rdf:type
303 + ] ;
304 + sp:variable
305 + [ sp:varName "type"^^xsd:string
306 + ]
307 + ])
308 + ] ;
309 + arg:id [ sp:varName "id"^^xsd:string
310 + ] ;
311 + arg:rootsQuery
312 + [ rdf:type sp:Select ;
313 + sp:distinct "true"^^xsd:boolean ;
314 + sp:orderBy ([ sp:varName "label"^^xsd:string
315 + ]) ;
316 + sp:resultVariables ([ sp:varName "child"^^xsd:string
317 + ] [ sp:varName "label"^^xsd:string
318 + ] [ sp:varName "leaf"^^xsd:string
319 + ] [ sp:varName "icon"^^xsd:string
320 + ]) ;
321 + sp:where ([ rdf:type sp:TriplePath ;
322 + sp:object <http://www.w3.org/2004/02/skos/core#Concept> ;
323 + sp:path [ rdf:type sp:ModPath ;
324 + sp:modMax -2 ;
325 + sp:modMin 0 ;
326 + sp:subPath rdfs:subClassOf
327 + ] ;
328 + sp:subject
329 + [ sp:varName "type"^^xsd:string
330 + ]
331 + ] [ sp:object
332 + [ sp:varName "type"^^xsd:string
333 + ] ;
334 + sp:predicate rdf:type ;
335 + sp:subject
336 + [ sp:varName "child"^^xsd:string
337 + ]
338 + ] [ rdf:type sp:Filter ;
339 + sp:expression
340 + [ rdf:type sp:notExists ;
341 + sp:elements ([ sp:object
342 + [ sp:varName "parent"^^xsd:string
343 + ] ;
344 + sp:predicate <http://www.w3.org/2004/02/skos/core#broader> ;
345 + sp:subject
346 + [ sp:varName "child"^^xsd:string
347 + ]
348 + ])
349 + ]
350 + ] [ rdf:type sp:Bind ;
351 + sp:expression
352 + [ rdf:type sp:notExists ;
353 + sp:elements ([ sp:object
354 + [ sp:varName "child"^^xsd:string
355 + ] ;
356 + sp:predicate <http://www.w3.org/2004/02/skos/core#broader> ;
357 + sp:subject
358 + [ sp:varName "grandChild"^^xsd:string
359 + ]
360 + ])
361 + ] ;
362 + sp:variable
363 + [ sp:varName "leaf"^^xsd:string
364 + ]
365 + ] [ rdf:type sp:Bind ;
366 + sp:expression
367 + [ rdf:type ui:label ;
368 + sp:arg1 [ sp:varName "child"^^xsd:string
369 + ]
370 + ] ;
371 + sp:variable
372 + [ sp:varName "label"^^xsd:string
373 + ]
374 + ] [ rdf:type sp:Bind ;
375 + sp:expression "appIconConcept" ;
376 + sp:variable
377 + [ sp:varName "icon"^^xsd:string
378 + ]
379 + ])
380 + ] .
381 +
382 +skapp:Elements
383 + rdf:type ui:NodeClass ;
384 + rdfs:comment "Base class of SKOS related SWP elements."^^xsd:string ;
385 + rdfs:label "Elements"^^xsd:string ;
386 + rdfs:subClassOf ui:Element ;
387 + ui:abstract "true"^^xsd:boolean .
388 +
389 +skapp:SearchableConceptTreeBrowser
390 + rdf:type ui:NodeClass ;
391 + rdfs:comment "A horizontal split pane with a search view on the left and a ConceptTreeBrowser on the right."^^xsd:string ;
392 + rdfs:label "Searchable concept tree browser"^^xsd:string ;
393 + rdfs:subClassOf skapp:Elements ;
394 + ui:prototype
395 + [ rdf:type app:HSplitLayout ;
396 + arg:height "500px"^^xsd:string ;
397 + ui:child
398 + [ rdf:type skapp:ConceptSearchView ;
399 + ui:childIndex 0
400 + ] ;
401 + ui:child
402 + [ rdf:type skapp:ConceptTreeBrowser ;
403 + ui:childIndex 1
404 + ]
405 + ] .
...@@ -47,7 +47,7 @@ log:LogBrowser ...@@ -47,7 +47,7 @@ log:LogBrowser
47 [ rdf:type app:Tree ; 47 [ rdf:type app:Tree ;
48 arg:dataProvider log:LogEventClassTreeDataProvider ; 48 arg:dataProvider log:LogEventClassTreeDataProvider ;
49 arg:id "classTree"^^xsd:string ; 49 arg:id "classTree"^^xsd:string ;
50 - arg:onSelect "appLoad('form', {resourceType: '<' + resource + '>'})"^^xsd:string ; 50 + arg:onSelect "appLoadWithResource('form', 'resourceType', resource)"^^xsd:string ;
51 ui:childIndex 1 51 ui:childIndex 1
52 ] ; 52 ] ;
53 ui:childIndex 0 53 ui:childIndex 0
......