Holger Knublauch

EPIM log search progress

...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
9 @prefix html: <http://uispin.org/html#> . 9 @prefix html: <http://uispin.org/html#> .
10 @prefix let: <http://uispin.org/let#> . 10 @prefix let: <http://uispin.org/let#> .
11 @prefix letrs: <http://uispin.org/letrs#> . 11 @prefix letrs: <http://uispin.org/letrs#> .
12 +@prefix list: <http://jena.hpl.hp.com/ARQ/list#> .
12 @prefix owl: <http://www.w3.org/2002/07/owl#> . 13 @prefix owl: <http://www.w3.org/2002/07/owl#> .
13 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . 14 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
14 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . 15 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
...@@ -1324,7 +1325,6 @@ app:FormHeader ...@@ -1324,7 +1325,6 @@ app:FormHeader
1324 ui:prototype 1325 ui:prototype
1325 [ rdf:type html:Div ; 1326 [ rdf:type html:Div ;
1326 html:class "appHeader"^^xsd:string ; 1327 html:class "appHeader"^^xsd:string ;
1327 - html:id "content"^^xsd:string ;
1328 let:type 1328 let:type
1329 [ rdf:type app:resourceType ; 1329 [ rdf:type app:resourceType ;
1330 arg:resource 1330 arg:resource
...@@ -3685,6 +3685,13 @@ app:SearchForm ...@@ -3685,6 +3685,13 @@ app:SearchForm
3685 ] ; 3685 ] ;
3686 spin:constraint 3686 spin:constraint
3687 [ rdf:type spl:Argument ; 3687 [ rdf:type spl:Argument ;
3688 + 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 ;
3689 + spl:optional "true"^^xsd:boolean ;
3690 + spl:predicate arg:queryGraph ;
3691 + spl:valueType owl:Ontology
3692 + ] ;
3693 + spin:constraint
3694 + [ rdf:type spl:Argument ;
3688 rdfs:comment "The subject type to display."^^xsd:string ; 3695 rdfs:comment "The subject type to display."^^xsd:string ;
3689 spl:predicate arg:resourceType ; 3696 spl:predicate arg:resourceType ;
3690 spl:valueType rdfs:Class 3697 spl:valueType rdfs:Class
...@@ -3758,6 +3765,36 @@ app:SearchForm ...@@ -3758,6 +3765,36 @@ app:SearchForm
3758 ui:childIndex 1 3765 ui:childIndex 1
3759 ] ; 3766 ] ;
3760 ui:child 3767 ui:child
3768 + [ rdf:type html:Input ;
3769 + html:name "_base"^^xsd:string ;
3770 + html:type "hidden"^^xsd:string ;
3771 + html:value
3772 + [ rdf:type ui:encodeNode ;
3773 + sp:arg1 [ rdf:type sp:if ;
3774 + sp:arg1 [ rdf:type sp:bound ;
3775 + sp:arg1 [ sp:varName "queryGraph"^^xsd:string
3776 + ]
3777 + ] ;
3778 + sp:arg2 [ sp:varName "queryGraph"^^xsd:string
3779 + ] ;
3780 + sp:arg3 [ rdf:type ui:currentQueryGraph
3781 + ]
3782 + ]
3783 + ] ;
3784 + ui:childIndex 2
3785 + ] ;
3786 + ui:child
3787 + [ rdf:type html:Input ;
3788 + html:name "schema"^^xsd:string ;
3789 + html:type "hidden"^^xsd:string ;
3790 + html:value
3791 + [ rdf:type ui:encodeNode ;
3792 + sp:arg1 [ rdf:type ui:currentQueryGraph
3793 + ]
3794 + ] ;
3795 + ui:childIndex 3
3796 + ] ;
3797 + ui:child
3761 [ rdf:type ui:if ; 3798 [ rdf:type ui:if ;
3762 ui:child 3799 ui:child
3763 [ rdf:type ui:forEach ; 3800 [ rdf:type ui:forEach ;
...@@ -3784,19 +3821,10 @@ app:SearchForm ...@@ -3784,19 +3821,10 @@ app:SearchForm
3784 sp:resultVariables ([ sp:varName "keyProperty"^^xsd:string 3821 sp:resultVariables ([ sp:varName "keyProperty"^^xsd:string
3785 ]) ; 3822 ]) ;
3786 sp:where ([ rdf:type sp:NamedGraph ; 3823 sp:where ([ rdf:type sp:NamedGraph ;
3787 - sp:elements ([ rdf:type sp:TriplePath ; 3824 + sp:elements ([ sp:object
3788 - sp:object
3789 [ sp:varName "keyProperty"^^xsd:string 3825 [ sp:varName "keyProperty"^^xsd:string
3790 ] ; 3826 ] ;
3791 - sp:path [ rdf:type sp:SeqPath ; 3827 + sp:predicate list:member ;
3792 - sp:path1
3793 - [ rdf:type sp:ModPath ;
3794 - sp:modMax -2 ;
3795 - sp:modMin 0 ;
3796 - sp:subPath rdf:rest
3797 - ] ;
3798 - sp:path2 rdf:first
3799 - ] ;
3800 sp:subject 3828 sp:subject
3801 [ sp:varName "kp"^^xsd:string 3829 [ sp:varName "kp"^^xsd:string
3802 ] 3830 ]
...@@ -3805,7 +3833,7 @@ app:SearchForm ...@@ -3805,7 +3833,7 @@ app:SearchForm
3805 ]) 3833 ])
3806 ] 3834 ]
3807 ] ; 3835 ] ;
3808 - ui:childIndex 2 ; 3836 + ui:childIndex 4 ;
3809 ui:condition 3837 ui:condition
3810 [ rdf:type sp:bound ; 3838 [ rdf:type sp:bound ;
3811 sp:arg1 [ sp:varName "kp"^^xsd:string 3839 sp:arg1 [ sp:varName "kp"^^xsd:string
...@@ -3822,7 +3850,7 @@ app:SearchForm ...@@ -3822,7 +3850,7 @@ app:SearchForm
3822 [ rdf:type app:resourceType 3850 [ rdf:type app:resourceType
3823 ] 3851 ]
3824 ] ; 3852 ] ;
3825 - ui:childIndex 3 3853 + ui:childIndex 5
3826 ] ; 3854 ] ;
3827 ui:child 3855 ui:child
3828 [ rdf:type html:Div ; 3856 [ rdf:type html:Div ;
...@@ -3846,7 +3874,7 @@ app:SearchForm ...@@ -3846,7 +3874,7 @@ app:SearchForm
3846 html:value "Search"^^xsd:string ; 3874 html:value "Search"^^xsd:string ;
3847 ui:childIndex 0 3875 ui:childIndex 0
3848 ] ; 3876 ] ;
3849 - ui:childIndex 4 3877 + ui:childIndex 6
3850 ] ; 3878 ] ;
3851 ui:childIndex 0 ; 3879 ui:childIndex 0 ;
3852 ui:varName "createLinkFunction"^^xsd:string ; 3880 ui:varName "createLinkFunction"^^xsd:string ;
...@@ -6279,9 +6307,13 @@ app:createLoadSearchFormCall ...@@ -6279,9 +6307,13 @@ app:createLoadSearchFormCall
6279 [ rdf:type fn:concat ; 6307 [ rdf:type fn:concat ;
6280 sp:arg1 "appLoadSearchForm('" ; 6308 sp:arg1 "appLoadSearchForm('" ;
6281 sp:arg10 6309 sp:arg10
6310 + [ rdf:type ui:currentQueryGraph
6311 + ] ;
6312 + sp:arg11 "'" ;
6313 + sp:arg12
6282 [ sp:varName "nb"^^xsd:string 6314 [ sp:varName "nb"^^xsd:string
6283 ] ; 6315 ] ;
6284 - sp:arg11 ")" ; 6316 + sp:arg13 ")" ;
6285 sp:arg2 [ sp:varName "oldElementId"^^xsd:string 6317 sp:arg2 [ sp:varName "oldElementId"^^xsd:string
6286 ] ; 6318 ] ;
6287 sp:arg3 "', '" ; 6319 sp:arg3 "', '" ;
...@@ -6291,9 +6323,9 @@ app:createLoadSearchFormCall ...@@ -6291,9 +6323,9 @@ app:createLoadSearchFormCall
6291 sp:arg6 [ sp:varName "resourceTypeCode"^^xsd:string 6323 sp:arg6 [ sp:varName "resourceTypeCode"^^xsd:string
6292 ] ; 6324 ] ;
6293 sp:arg7 ", '" ; 6325 sp:arg7 ", '" ;
6294 - sp:arg8 [ rdf:type ui:currentQueryGraph 6326 + sp:arg8 [ sp:varName "queryGraph"^^xsd:string
6295 ] ; 6327 ] ;
6296 - sp:arg9 "'" 6328 + sp:arg9 "', '"
6297 ] ; 6329 ] ;
6298 sp:varName "result"^^xsd:string 6330 sp:varName "result"^^xsd:string
6299 ]) ; 6331 ]) ;
...@@ -6325,6 +6357,13 @@ app:createLoadSearchFormCall ...@@ -6325,6 +6357,13 @@ app:createLoadSearchFormCall
6325 ] ; 6357 ] ;
6326 spin:constraint 6358 spin:constraint
6327 [ rdf:type spl:Argument ; 6359 [ rdf:type spl:Argument ;
6360 + rdfs:comment "The schema graph."^^xsd:string ;
6361 + spl:optional "true"^^xsd:boolean ;
6362 + spl:predicate arg:queryGraph ;
6363 + spl:valueType owl:Ontology
6364 + ] ;
6365 + spin:constraint
6366 + [ rdf:type spl:Argument ;
6328 rdfs:comment "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."^^xsd:string ; 6367 rdfs:comment "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."^^xsd:string ;
6329 spl:predicate arg:resourceTypeCode ; 6368 spl:predicate arg:resourceTypeCode ;
6330 spl:valueType xsd:string 6369 spl:valueType xsd:string
...@@ -6853,6 +6892,11 @@ arg:property ...@@ -6853,6 +6892,11 @@ arg:property
6853 rdfs:label "property"^^xsd:string ; 6892 rdfs:label "property"^^xsd:string ;
6854 rdfs:subPropertyOf sp:arg . 6893 rdfs:subPropertyOf sp:arg .
6855 6894
6895 +arg:queryGraph
6896 + rdf:type rdf:Property ;
6897 + rdfs:label "query graph"^^xsd:string ;
6898 + rdfs:subPropertyOf sp:arg .
6899 +
6856 arg:range 6900 arg:range
6857 rdf:type rdf:Property ; 6901 rdf:type rdf:Property ;
6858 rdfs:label "range"^^xsd:string ; 6902 rdfs:label "range"^^xsd:string ;
......
...@@ -148,8 +148,8 @@ a:active.appFormHeaderLink { ...@@ -148,8 +148,8 @@ a:active.appFormHeaderLink {
148 background-color: darkGray; 148 background-color: darkGray;
149 color: white; 149 color: white;
150 padding-left: 4px; 150 padding-left: 4px;
151 - padding-top: 1px; 151 + padding-top: 2px;
152 - padding-bottom: 1px; 152 + padding-bottom: 2px;
153 padding-right: 4px; 153 padding-right: 4px;
154 } 154 }
155 155
......
...@@ -185,17 +185,19 @@ function appLoadEditForm(parentId, resourceType) { ...@@ -185,17 +185,19 @@ function appLoadEditForm(parentId, resourceType) {
185 * @param oldElementId the id of the element to replace - this will be the id of the new form. 185 * @param oldElementId the id of the element to replace - this will be the id of the new form.
186 * @param resultsId the id of the element to display the search results 186 * @param resultsId the id of the element to display the search results
187 * @param resourceTypeURI the type of resources to search for 187 * @param resourceTypeURI the type of resources to search for
188 - * @param queryGraphURI the query graph URI 188 + * @param queryGraphURI the (instance) query graph URI
189 + * @param schemaGraphURI the URI of the schema graph
189 * @param noBorder (optional) to suppress the border 190 * @param noBorder (optional) to suppress the border
190 */ 191 */
191 -function appLoadSearchForm(oldElementId, resultsId, resourceTypeURI, queryGraphURI, noBorder) { 192 +function appLoadSearchForm(oldElementId, resultsId, resourceTypeURI, queryGraphURI, schemaGraphURI, noBorder) {
192 var data = { 193 var data = {
193 - formId: oldElementId, 194 + formId : oldElementId,
194 - resourceType: '<' + resourceTypeURI + '>', 195 + resourceType : '<' + resourceTypeURI + '>',
195 - resultsId: resultsId, 196 + resultsId : resultsId,
196 - _base : '<' + queryGraphURI + '>', 197 + queryGraph : '<' + queryGraphURI + '>',
197 - _viewClass: 'app:SearchForm', 198 + _base : '<' + schemaGraphURI + '>',
198 - _snippet: true 199 + _viewClass : 'app:SearchForm',
200 + _snippet : true
199 }; 201 };
200 if(noBorder) { 202 if(noBorder) {
201 data.noBorder = true; 203 data.noBorder = true;
...@@ -211,15 +213,13 @@ function appLoadSearchForm(oldElementId, resultsId, resourceTypeURI, queryGraphU ...@@ -211,15 +213,13 @@ function appLoadSearchForm(oldElementId, resultsId, resourceTypeURI, queryGraphU
211 * a given id. Will replace the content of a given target element. 213 * a given id. Will replace the content of a given target element.
212 * @param formId the form id 214 * @param formId the form id
213 * @param targetId the target id 215 * @param targetId the target id
214 - * @param queryGraphURI the current query graph
215 * @returns false 216 * @returns false
216 */ 217 */
217 -function appLoadSearchResultsGrid(formId, targetId, queryGraphURI) { 218 +function appLoadSearchResultsGrid(formId, targetId) {
218 var params = $('#' + formId).serialize(); 219 var params = $('#' + formId).serialize();
219 var escaped = '&params=' + escape(params); 220 var escaped = '&params=' + escape(params);
220 $.get(uispinServlet + '?_viewClass=app:SearchResultsGrid&_snippet=true&' + 221 $.get(uispinServlet + '?_viewClass=app:SearchResultsGrid&_snippet=true&' +
221 - '_base=' + escape('<' + queryGraphURI + '>') + 222 + params + escaped, function(data) {
222 - '&' + params + escaped, function(data) {
223 $('#' + targetId).html(data); 223 $('#' + targetId).html(data);
224 }); 224 });
225 return false; 225 return false;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
14 SELECT ?colName 14 SELECT ?colName
15 WHERE { 15 WHERE {
16 GRAPH ui:graph { 16 GRAPH ui:graph {
17 - ?keyProperties (rdf:rest*)/rdf:first ?keyProperty . 17 + ?keyProperties list:member ?keyProperty .
18 BIND (spif:titleCase(ui:label(?keyProperty)) AS ?colName) . 18 BIND (spif:titleCase(ui:label(?keyProperty)) AS ?colName) .
19 } 19 }
20 } 20 }
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
32 SELECT ?varName 32 SELECT ?varName
33 WHERE { 33 WHERE {
34 GRAPH ui:graph { 34 GRAPH ui:graph {
35 - ?keyProperties (rdf:rest*)/rdf:first ?property . 35 + ?keyProperties list:member ?property .
36 BIND (app:keyPropertyVarName(?property) AS ?varName) . 36 BIND (app:keyPropertyVarName(?property) AS ?varName) .
37 } 37 }
38 } 38 }
......
1 -# baseURI: http://www.reportinghub.no/examples/system/exampleLogEvents 1 +# baseURI: http://www.reportinghub.no/graph/logging
2 # imports: http://www.reportinghub.no/system/schema/logging 2 # imports: http://www.reportinghub.no/system/schema/logging
3 3
4 -@prefix : <http://www.reportinghub.no/examples/system/exampleLogEvents#> . 4 +@prefix : <http://www.reportinghub.no/graph/logging#> .
5 @prefix dcterms: <http://purl.org/dc/terms/> . 5 @prefix dcterms: <http://purl.org/dc/terms/> .
6 @prefix log: <http://www.reportinghub.no/system/schema/logging#> . 6 @prefix log: <http://www.reportinghub.no/system/schema/logging#> .
7 @prefix owl: <http://www.w3.org/2002/07/owl#> . 7 @prefix owl: <http://www.w3.org/2002/07/owl#> .
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
11 @prefix sioc: <http://rdfs.org/sioc/ns#> . 11 @prefix sioc: <http://rdfs.org/sioc/ns#> .
12 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . 12 @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
13 13
14 -<http://www.reportinghub.no/examples/system/exampleLogEvents> 14 +<http://www.reportinghub.no/graph/logging>
15 rdf:type owl:Ontology ; 15 rdf:type owl:Ontology ;
16 owl:imports <http://www.reportinghub.no/system/schema/logging> ; 16 owl:imports <http://www.reportinghub.no/system/schema/logging> ;
17 owl:versionInfo "Created with TopBraid Composer"^^xsd:string . 17 owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
......
...@@ -22,27 +22,27 @@ ...@@ -22,27 +22,27 @@
22 log:LogBrowser 22 log:LogBrowser
23 rdf:type ui:NodeClass ; 23 rdf:type ui:NodeClass ;
24 rdfs:comment "A complex element with a tree of log event classes in the upper left corner, a search form in the upper center area, and a grid of results in the main center area."^^xsd:string ; 24 rdfs:comment "A complex element with a tree of log event classes in the upper left corner, a search form in the upper center area, and a grid of results in the main center area."^^xsd:string ;
25 - rdfs:label "Log browser"^^xsd:string ; 25 + rdfs:label "Log Browser"^^xsd:string ;
26 rdfs:subClassOf ui:Element ; 26 rdfs:subClassOf ui:Element ;
27 ui:prototype 27 ui:prototype
28 [ rdf:type html:Div ; 28 [ rdf:type html:Div ;
29 - html:style "width:950px"^^xsd:string ; 29 + html:style "width:900px"^^xsd:string ;
30 ui:child 30 ui:child
31 [ rdf:type app:VSplitLayout ; 31 [ rdf:type app:VSplitLayout ;
32 arg:height "500px"^^xsd:string ; 32 arg:height "500px"^^xsd:string ;
33 arg:topHeight "30%"^^xsd:string ; 33 arg:topHeight "30%"^^xsd:string ;
34 ui:child 34 ui:child
35 - [ rdf:type app:HSplitLayout ; 35 + [ rdf:type ui:setContext ;
36 - arg:height "200px"^^xsd:string ;
37 ui:child 36 ui:child
38 - [ rdf:type html:Div ; 37 + [ rdf:type app:HSplitLayout ;
38 + arg:height "200px"^^xsd:string ;
39 ui:child 39 ui:child
40 - [ rdf:type app:Header ; 40 + [ rdf:type html:Div ;
41 - arg:label "Event Type"^^xsd:string ; 41 + ui:child
42 - ui:childIndex 0 42 + [ rdf:type app:Header ;
43 - ] ; 43 + arg:label "Event Type"^^xsd:string ;
44 - ui:child 44 + ui:childIndex 0
45 - [ rdf:type ui:setContext ; 45 + ] ;
46 ui:child 46 ui:child
47 [ rdf:type app:Tree ; 47 [ rdf:type app:Tree ;
48 arg:dataProvider log:LogEventClassTreeDataProvider ; 48 arg:dataProvider log:LogEventClassTreeDataProvider ;
...@@ -51,31 +51,33 @@ log:LogBrowser ...@@ -51,31 +51,33 @@ log:LogBrowser
51 [ rdf:type app:createLoadSearchFormCall ; 51 [ rdf:type app:createLoadSearchFormCall ;
52 arg:noBorder "true"^^xsd:boolean ; 52 arg:noBorder "true"^^xsd:boolean ;
53 arg:oldElementId "searchForm" ; 53 arg:oldElementId "searchForm" ;
54 + arg:queryGraph <http://www.reportinghub.no/graph/logging> ;
54 arg:resourceTypeCode 55 arg:resourceTypeCode
55 "resource" ; 56 "resource" ;
56 arg:resultsId "results" 57 arg:resultsId "results"
57 ] ; 58 ] ;
58 - ui:childIndex 0 59 + ui:childIndex 1
59 ] ; 60 ] ;
60 - ui:childIndex 1 ; 61 + ui:childIndex 0
61 - ui:queryGraph <http://www.reportinghub.no/system/schema/logging>
62 ] ; 62 ] ;
63 - ui:childIndex 0
64 - ] ;
65 - ui:child
66 - [ rdf:type html:Div ;
67 - html:id "formHolder"^^xsd:string ;
68 ui:child 63 ui:child
69 - [ rdf:type app:SearchForm ; 64 + [ rdf:type html:Div ;
70 - arg:formId "searchForm"^^xsd:string ; 65 + html:id "formHolder"^^xsd:string ;
71 - arg:noBorder "true"^^xsd:boolean ; 66 + ui:child
72 - arg:resourceType log:LogEvent ; 67 + [ rdf:type app:SearchForm ;
73 - arg:resultsId "results"^^xsd:string ; 68 + arg:formId "searchForm"^^xsd:string ;
74 - ui:childIndex 0 69 + arg:noBorder "true"^^xsd:boolean ;
70 + arg:queryGraph <http://www.reportinghub.no/graph/logging> ;
71 + arg:resourceType log:LogEvent ;
72 + arg:resultsId "results"^^xsd:string ;
73 + ui:childIndex 0
74 + ] ;
75 + ui:childIndex 1
75 ] ; 76 ] ;
76 - ui:childIndex 1 77 + ui:childIndex 0
77 ] ; 78 ] ;
78 - ui:childIndex 0 79 + ui:childIndex 0 ;
80 + ui:queryGraph <http://www.reportinghub.no/system/schema/logging>
79 ] ; 81 ] ;
80 ui:child 82 ui:child
81 [ rdf:type html:Div ; 83 [ rdf:type html:Div ;
......