appExamples.ttl
45.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
# baseURI: http://appschema.org/examples/appExamples
# imports: http://appschema.org
# imports: http://qudt.org/vocab/unit
# imports: http://topbraid.org/examples/kennedys
# imports: http://topbraid.org/examples/tq
# imports: http://uispin.org/uix
@prefix : <http://appschema.org/examples/appExamples#> .
@prefix app: <http://appschema.org/> .
@prefix arg: <http://spinrdf.org/arg#> .
@prefix ex: <http://example.org/file1#> .
@prefix fn: <http://www.w3.org/2005/xpath-functions#> .
@prefix html: <http://uispin.org/html#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix ui: <http://uispin.org/ui#> .
@prefix uix: <http://uispin.org/uix#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
app:DatatypeEnumRadioButtonsEditor
app:objectWidgetWeight
[ rdf:type app:WeightedExpression ;
app:expression
[ rdf:type sp:eq ;
sp:arg1 [ sp:varName "predicate"^^xsd:string
] ;
sp:arg2 ex:enumLocal
] ;
app:weight 6
] .
app:ResourceEnumDropDownEditor
app:objectWidgetWeight
[ rdf:type app:WeightedExpression ;
app:expression
[ rdf:type sp:eq ;
sp:arg1 [ sp:varName "predicate"^^xsd:string
] ;
sp:arg2 ex:color
] ;
app:weight 7
] .
<http://appschema.org/examples/appExamples>
rdf:type owl:Ontology ;
owl:imports <http://appschema.org> , <http://qudt.org/vocab/unit> , <http://topbraid.org/examples/kennedys> , <http://topbraid.org/examples/tq> , <http://uispin.org/uix> ;
owl:versionInfo "Created with TopBraid Composer"^^xsd:string .
:AutoCompleteExample
rdf:type uix:Example ;
rdfs:comment "The AutoComplete component is a text field that displays a drop down list with suggestions when you start typing. It can be filtered to only allow users to enter the names of instances of a given class, or its subclasses."^^xsd:string ;
rdfs:label "app:AutoComplete: Enter instance names for a given class"^^xsd:string ;
rdfs:subClassOf :ComponentExamples ;
ui:prototype
[ rdf:type html:Div ;
ui:child
[ rdf:type html:Span ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "Select a Person (e.g. start typing 'r'): "^^xsd:string
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type app:AutoComplete ;
arg:id [ rdf:type ui:uniqueId
] ;
arg:type <http://schema.org/Person> ;
ui:childIndex 1
]
] ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:ColumnLayoutExample
rdf:type uix:Example ;
rdfs:label "Column layout example"^^xsd:string ;
rdfs:subClassOf :LayoutExamples ;
ui:prototype
[ rdf:type html:Div ;
ui:child
[ rdf:type html:H3 ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "Three columns, covering the whole width"^^xsd:string
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type app:ColumnLayout ;
arg:colWidths "25%,25%,50%"^^xsd:string ;
arg:width "100%"^^xsd:string ;
ui:child
[ rdf:type html:Span ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "First Column"^^xsd:string
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type html:Span ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "Second Column"^^xsd:string
] ;
ui:childIndex 1
] ;
ui:child
[ rdf:type html:Span ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "Third Column"^^xsd:string
] ;
ui:childIndex 2
] ;
ui:childIndex 1
]
] ;
uix:level 2 ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:ComponentExamples
rdf:type uix:Example ;
rdfs:label "Component examples"^^xsd:string ;
rdfs:subClassOf uix:Examples ;
uix:level 10 .
:EditFormConstraintViolationsExample
rdf:type uix:Example ;
rdfs:comment "The rectangle class has a constraint attached to it to ensure that totalHeight cannot be negative. This is reported on submit."^^xsd:string ;
rdfs:label "app:EditForm constraint violations example"^^xsd:string ;
rdfs:subClassOf :EditFormExamples ;
ui:prototype
[ rdf:type app:EditForm ;
arg:resourceType ex:Rectangle
] ;
uix:level 20 ;
uix:queryGraph <http://appschema.org/examples/appExamples> .
:EditFormExamples
rdf:type uix:Example ;
rdfs:label "Edit form examples"^^xsd:string ;
rdfs:subClassOf uix:Examples ;
uix:level 30 .
:EditFormNewInstanceWithCustomizedLayoutExample
rdf:type uix:Example ;
rdfs:label "app:EditForm of a new instance with a customized layout example"^^xsd:string ;
rdfs:subClassOf :EditFormExamples ;
ui:prototype
[ rdf:type app:EditForm ;
arg:resourceType <http://schema.org/EducationEvent>
] ;
uix:level 10 ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:EditFormNewInstanceWithGenericLayoutExample
rdf:type uix:Example ;
rdfs:label "app:EditForm of a new instance with a generic layout example"^^xsd:string ;
rdfs:subClassOf :EditFormExamples ;
ui:prototype
[ rdf:type app:CustomEditForm ;
arg:resourceType <http://schema.org/Person>
] ;
uix:level 8 ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:EditModeExample
rdf:type uix:Example ;
rdfs:comment "If the context mode is switched to 'edit', then a NodeWidget is turned into a NodeEditor."^^xsd:string ;
rdfs:label "app:EditMode example"^^xsd:string ;
rdfs:subClassOf :EditFormExamples ;
ui:prototype
[ rdf:type html:Div ;
ui:child
[ rdf:type html:Div ;
ui:child
[ rdf:type html:Span ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "In default (view) mode: "^^xsd:string
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type app:ObjectWidget ;
arg:object "Hello World"^^xsd:string ;
ui:childIndex 1
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type ui:setContext ;
ui:child
[ rdf:type html:Span ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "Now in edit mode: "^^xsd:string
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type app:ObjectWidget ;
arg:object "Hello World"^^xsd:string ;
ui:childIndex 1
] ;
ui:childIndex 1 ;
ui:varName "mode"^^xsd:string ;
ui:varValue "edit"^^xsd:string
]
] ;
uix:level 0 ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:EditSubjectsExample
rdf:type uix:Example ;
rdfs:label "app:EditForm with subjects example"^^xsd:string ;
rdfs:subClassOf :EditFormExamples ;
ui:prototype
[ rdf:type app:EditForm ;
arg:resource ex:MyRectangle
] ;
uix:level 21 ;
uix:queryGraph <http://appschema.org/examples/appExamples> .
:EnumerationEditorExamples
rdf:type uix:Example ;
rdfs:label "Enumeration editor examples"^^xsd:string ;
rdfs:subClassOf :EditFormExamples ;
ui:prototype
[ rdf:type app:EditForm ;
arg:resource ex:MyThing
] ;
uix:level 2 ;
uix:queryGraph <http://appschema.org/examples/appExamples> .
:ExplorerLayoutExample
rdf:type uix:Example ;
rdfs:label "Explorer layout example"^^xsd:string ;
rdfs:subClassOf :LayoutExamples ;
ui:prototype
[ rdf:type app:ExplorerLayout ;
arg:height "300px"^^xsd:string ;
ui:child
[ rdf:type ui:insert ;
ui:child
[ rdf:type app:Tree ;
arg:dataProvider app:ClassTreeDataProvider ;
arg:id "10"^^xsd:string ;
arg:onSelect "appLoadEditForm('formHolder', resource)"^^xsd:string ;
ui:childIndex 0
] ;
ui:childIndex 0 ;
ui:into "west"^^xsd:string
] ;
ui:child
[ rdf:type ui:insert ;
ui:child
[ rdf:type html:Div ;
html:id "formHolder"^^xsd:string ;
ui:child
[ rdf:type html:Span ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "Please select a class"^^xsd:string
] ;
ui:childIndex 0
] ;
ui:childIndex 0
] ;
ui:childIndex 1 ;
ui:into "center"^^xsd:string
]
] ;
uix:level 8 ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:LayoutExamples
rdf:type uix:Example ;
rdfs:label "Layout examples"^^xsd:string ;
rdfs:subClassOf uix:Examples ;
uix:level 80 .
:New_1
ex:totalHeight "-10"^^<http://qudt.org/vocab/unit#Centimeter> ;
ex:totalWidth "-10"^^<http://qudt.org/vocab/unit#Centimeter> .
:New_2
ex:totalHeight "-10"^^<http://qudt.org/vocab/unit#Centimeter> ;
ex:totalWidth "-10"^^<http://qudt.org/vocab/unit#Centimeter> .
:ObjectEditorExamples
rdf:type uix:Example ;
rdfs:comment "ObjectEditors are picked automatically if an ObjectWidget is used in EditMode."^^xsd:string ;
rdfs:label "app:ObjectEditor examples"^^xsd:string ;
rdfs:subClassOf :EditFormExamples ;
ui:prototype
[ rdf:type html:Table ;
ui:child
[ rdf:type html:Tr ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "BooleanEditor: "^^xsd:string
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type app:ObjectEditor ;
arg:object
[ rdf:type sp:ne ;
sp:arg1 0 ;
sp:arg2 1
] ;
ui:childIndex 0
] ;
ui:childIndex 1
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type html:Tr ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "DateEditor: "^^xsd:string
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type app:ObjectEditor ;
arg:object
[ rdf:type spl:object ;
sp:arg1 <http://topbraid.org/examples/tq#HolgerKnublauch> ;
sp:arg2 <http://schema.org/birthDate>
] ;
arg:uid "10"^^xsd:string ;
ui:childIndex 0
] ;
ui:childIndex 1
] ;
ui:childIndex 1
] ;
ui:child
[ rdf:type html:Tr ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "ResourceEditor: "^^xsd:string
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type app:ObjectEditor ;
arg:object
[ rdf:type spl:object ;
sp:arg1 <http://topbraid.org/examples/tq#HolgerKnublauch> ;
sp:arg2 <http://schema.org/colleagues>
] ;
arg:predicate <http://schema.org/colleagues> ;
arg:uid "11"^^xsd:string ;
ui:childIndex 0
] ;
ui:childIndex 1
] ;
ui:childIndex 2
] ;
ui:child
[ rdf:type html:Tr ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "TextFieldEditor: "^^xsd:string
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type app:ObjectEditor ;
arg:object "Hello"^^xsd:string ;
ui:childIndex 0
] ;
ui:childIndex 1
] ;
ui:childIndex 3
]
] ;
uix:level 1 ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:ObjectViewerExamples
rdf:type uix:Example ;
rdfs:comment "The element app:ObjectWidget takes an RDF node (literal or resource) as argument and will by default be mapped to a suitable subclass of ObjectViewer, depending on the type of node."^^xsd:string ;
rdfs:label "app:ObjectViewer examples"^^xsd:string ;
rdfs:subClassOf :ViewFormExamples ;
ui:prototype
[ rdf:type html:Table ;
ui:child
[ rdf:type html:Tr ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "LiteralViewer: "^^xsd:string
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type app:ObjectWidget ;
arg:object "Ralph Hodgson"^^xsd:string ;
ui:childIndex 0
] ;
ui:childIndex 1
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type html:Tr ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "ImageViewer: "^^xsd:string
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type app:ObjectWidget ;
arg:object
[ rdf:type spl:object ;
sp:arg1 <http://topbraid.org/examples/tq#RalphHodgson> ;
sp:arg2 <http://schema.org/image>
] ;
ui:childIndex 0
] ;
ui:childIndex 1
] ;
ui:childIndex 1
] ;
ui:child
[ rdf:type html:Tr ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "URIResourceViewer: "^^xsd:string
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type app:ObjectWidget ;
arg:object
[ rdf:type spl:object ;
sp:arg1 <http://topbraid.org/examples/tq#RalphHodgson> ;
sp:arg2 rdf:type
] ;
ui:childIndex 0
] ;
ui:childIndex 1
] ;
ui:childIndex 2
]
] ;
uix:level 1 ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:ObjectViewerWithCustomizedLabel
rdf:type uix:Example ;
rdfs:comment "The class of the object (schema:Company, subclass of schema:Thing) has a customized label, and this is used automatically instead of the default label."^^xsd:string ;
rdfs:label "app:ObjectViewer with customized label example"^^xsd:string ;
rdfs:subClassOf :ViewFormExamples ;
ui:prototype
[ rdf:type html:Table ;
ui:child
[ rdf:type html:Tr ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "URIResourceViewer: "^^xsd:string
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type html:Td ;
ui:child
[ rdf:type app:ObjectWidget ;
arg:object
[ rdf:type spl:object ;
sp:arg1 <http://topbraid.org/examples/tq#RalphHodgson> ;
sp:arg2 <http://schema.org/worksFor>
] ;
ui:childIndex 0
] ;
ui:childIndex 1
] ;
ui:childIndex 0
]
] ;
uix:level 2 ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:ResourceFormBodyExample
rdf:type uix:Example ;
rdfs:comment "The class rdfs:Resource defines a default ui:instanceView that displays all properties of the subject, grouped by annotation and other properties."^^xsd:string ;
rdfs:label "app:ResourceFormBody: the default view for all resources"^^xsd:string ;
rdfs:subClassOf :ViewFormExamples ;
ui:prototype
[ rdf:type ui:resourceView ;
ui:resource <http://topbraid.org/examples/tq#Australia>
] ;
uix:level 4 ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:ResultSetGridExample
rdf:type uix:Example ;
rdfs:label "app:ResultSetGrid example"^^xsd:string ;
rdfs:subClassOf :ComponentExamples ;
ui:prototype
[ rdf:type app:ResultSetGrid ;
ui:resultSet
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "name"^^xsd:string
] [ sp:varName "birthDay"^^xsd:string
] [ sp:varName "company"^^xsd:string
]) ;
sp:where ([ sp:object <http://schema.org/Person> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "person"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spl:object ;
sp:arg1 [ sp:varName "person"^^xsd:string
] ;
sp:arg2 <http://schema.org/birthDate>
] ;
sp:variable
[ sp:varName "birthDay"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type spl:object ;
sp:arg1 [ sp:varName "person"^^xsd:string
] ;
sp:arg2 <http://schema.org/worksFor>
] ;
sp:variable
[ sp:varName "company"^^xsd:string
]
] [ rdf:type sp:Bind ;
sp:expression
[ rdf:type ui:label ;
sp:arg1 [ sp:varName "person"^^xsd:string
]
] ;
sp:variable
[ sp:varName "name"^^xsd:string
]
])
]
] ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:SearchFormExamples
rdf:type uix:Example ;
rdfs:label "Search form examples"^^xsd:string ;
rdfs:subClassOf uix:Examples ;
uix:level 40 .
:SearchFormKennedysExample
rdf:type uix:Example ;
rdfs:label "Search form Kennedys example"^^xsd:string ;
rdfs:subClassOf :SearchFormExamples ;
ui:prototype
[ rdf:type app:ExplorerLayout ;
arg:height "300px"^^xsd:string ;
ui:child
[ rdf:type ui:insert ;
ui:child
[ rdf:type app:SearchForm ;
arg:resourceType "kennedys:Person"^^xsd:string ;
arg:resultsId "results"^^xsd:string ;
ui:childIndex 0
] ;
ui:childIndex 0 ;
ui:into "west"^^xsd:string
] ;
ui:child
[ rdf:type ui:insert ;
ui:child
[ rdf:type html:Div ;
html:id "results"^^xsd:string ;
ui:childIndex 0
] ;
ui:childIndex 1 ;
ui:into "center"^^xsd:string
]
] ;
uix:level 1 ;
uix:queryGraph <http://topbraid.org/examples/kennedys> .
:SearchFormWithSubject
rdf:type uix:Example ;
rdfs:label "app:SearchForm with subject search example"^^xsd:string ;
rdfs:subClassOf :SearchFormExamples ;
ui:prototype
[ rdf:type app:ExplorerLayout ;
arg:height "300px"^^xsd:string ;
ui:child
[ rdf:type ui:insert ;
ui:child
[ rdf:type app:SearchForm ;
arg:resourceType ex:Rectangle ;
arg:resultsId "results"^^xsd:string ;
ui:childIndex 0
] ;
ui:childIndex 0 ;
ui:into "west"^^xsd:string
] ;
ui:child
[ rdf:type ui:insert ;
ui:child
[ rdf:type html:Div ;
html:id "results"^^xsd:string ;
ui:childIndex 0
] ;
ui:childIndex 1 ;
ui:into "center"^^xsd:string
]
] ;
uix:level 1 ;
uix:queryGraph <http://appschema.org/examples/appExamples> .
:SwitchableViewFormExample
rdf:type uix:Example ;
rdfs:comment "The switchable forms can be toggled between view and edit mode."^^xsd:string ;
rdfs:label "app:ViewForm that can be switched to edit mode example"^^xsd:string ;
rdfs:subClassOf :EditFormExamples ;
ui:prototype
[ rdf:type app:ViewForm ;
arg:resource <http://topbraid.org/examples/tq#SemanticTechnologyTraining>
] ;
uix:level 11 ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:TreeExample
rdf:type uix:Example ;
rdfs:label "app:Tree example"^^xsd:string ;
rdfs:subClassOf :ComponentExamples ;
ui:prototype
[ rdf:type app:Tree ;
arg:dataProvider app:ClassTreeDataProvider ;
arg:id "10"^^xsd:string ;
arg:onSelect "alert('Selected: ' + resource);"^^xsd:string
] ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:UnitPropertyLabel
rdf:type ui:NodeClass ;
rdfs:label "Unit property label"^^xsd:string ;
rdfs:subClassOf app:PropertyLabel ;
ui:overrides app:PropertyLabel ;
ui:prototype
[ rdf:type html:Span ;
html:class "appPropertyLabel"^^xsd:string ;
<http://uispin.org/let#unit>
[ rdf:type :getPropertyUnit ;
arg:property
[ sp:varName "property"^^xsd:string
]
] ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text [ sp:varName "label"^^xsd:string
]
] ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 1 ;
ui:text [ rdf:type sp:if ;
sp:arg1 [ rdf:type sp:bound ;
sp:arg1 [ sp:varName "unit"^^xsd:string
]
] ;
sp:arg2 [ rdf:type fn:concat ;
sp:arg1 " (" ;
sp:arg2 [ rdf:type spl:object ;
sp:arg1 [ sp:varName "unit"^^xsd:string
] ;
sp:arg2 <http://qudt.org/schema/qudt#symbol>
] ;
sp:arg3 ")"
] ;
sp:arg3 ""
]
] ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 2 ;
ui:text ":"^^xsd:string
]
] .
:VSplitLayoutExample
rdf:type uix:Example ;
rdfs:label "VSplit layout example"^^xsd:string ;
rdfs:subClassOf :LayoutExamples ;
ui:prototype
[ rdf:type app:VSplitLayout ;
arg:height "400px"^^xsd:string ;
arg:topHeight "30%"^^xsd:string ;
ui:child
[ rdf:type app:Tree ;
arg:dataProvider app:ClassTreeDataProvider ;
arg:id "topTree"^^xsd:string ;
ui:childIndex 0
] ;
ui:child
[ rdf:type app:Tree ;
arg:dataProvider app:ClassTreeDataProvider ;
arg:id "bottomTree"^^xsd:string ;
ui:childIndex 1
]
] ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:ViewFormExamples
rdf:type uix:Example ;
rdfs:label "View form examples"^^xsd:string ;
rdfs:subClassOf uix:Examples ;
uix:level 20 .
:ViewFormWithCustomWidgetsExample
rdf:type uix:Example ;
rdfs:label "app:ViewForm with custom widgets example"^^xsd:string ;
rdfs:subClassOf :ViewFormExamples ;
ui:prototype
[ rdf:type app:ViewForm ;
arg:resource <http://topbraid.org/examples/tq#HolgerKnublauch>
] ;
uix:level 8 ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:ViewFormWithCustomizedLayoutExample
rdf:type uix:Example ;
rdfs:label "app:ViewForm with a customized layout"^^xsd:string ;
rdfs:subClassOf :ViewFormExamples ;
ui:prototype
[ rdf:type app:ViewForm ;
arg:resource <http://topbraid.org/examples/tq#SemanticTechnologyTraining>
] ;
uix:level 10 ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:ViewFormWithGenericLayoutExample
rdf:type uix:Example ;
rdfs:label "app:ViewForm with generic layout"^^xsd:string ;
rdfs:subClassOf :ViewFormExamples ;
ui:prototype
[ rdf:type app:ViewForm ;
arg:resource <http://topbraid.org/examples/tq#Australia>
] ;
uix:level 6 ;
uix:queryGraph <http://topbraid.org/examples/tq> .
:ViewFormWithOverloadedPropertyLabel
rdf:type uix:Example ;
rdfs:comment "SWP's ui:override mechanism can be used to replace the implementation of any user-defined element. In this example, an element class UnitPropertyLabel overrides PropertyLabel. In addition to the default behavior, it also checks if the range of the property is a qudt:Unit, and - if yes - prints the unit's symbol behind the property name."^^xsd:string ;
rdfs:label "app:ViewForm with overloaded property label"^^xsd:string ;
rdfs:subClassOf :ViewFormExamples ;
ui:prototype
[ rdf:type ui:resourceView ;
ui:resource ex:MyRectangle
] ;
uix:level 12 ;
uix:queryGraph <http://appschema.org/examples/appExamples> .
:getPropertyUnit
rdf:type spin:Function ;
rdfs:comment "Gets the unit of a property, if the range of it is an instance of qudt:Unit."^^xsd:string ;
rdfs:label "get property unit"^^xsd:string ;
rdfs:subClassOf spin:Functions ;
spin:body
[ rdf:type sp:Select ;
sp:resultVariables ([ sp:varName "range"^^xsd:string
]) ;
sp:where ([ sp:object
[ sp:varName "range"^^xsd:string
] ;
sp:predicate rdfs:range ;
sp:subject
[ sp:varName "property"^^xsd:string
]
] [ rdf:type sp:Filter ;
sp:expression
[ rdf:type spl:instanceOf ;
sp:arg1 [ sp:varName "range"^^xsd:string
] ;
sp:arg2 <http://qudt.org/schema/qudt#Unit>
]
])
] ;
spin:constraint
[ rdf:type spl:Argument ;
rdfs:comment "The property to get the unit of."^^xsd:string ;
spl:predicate arg:property ;
spl:valueType rdf:Property
] ;
spin:returnType <http://qudt.org/schema/qudt#Unit> .
ex:Color
rdf:type owl:Class ;
rdfs:label "Color"^^xsd:string ;
rdfs:subClassOf owl:Thing ;
owl:oneOf (ex:red ex:green ex:blue ex:purple ex:deepPurple) .
ex:MyEnumDatatype
rdf:type rdfs:Datatype ;
rdfs:label "My enum datatype"^^xsd:string ;
owl:oneOf ("15"^^xsd:int "30"^^xsd:int "45"^^xsd:int) .
ex:MyRectangle
rdf:type ex:Rectangle ;
rdfs:label "My rectangle"^^xsd:string ;
ex:totalHeight "40"^^<http://qudt.org/vocab/unit#Centimeter> ;
ex:totalWidth "42"^^<http://qudt.org/vocab/unit#Centimeter> .
ex:MyThing
rdf:type ex:Thing ;
rdfs:label "My thing"^^xsd:string ;
ex:color ex:purple ;
ex:enumLocal "45"^^xsd:int ;
ex:enumProperty owl:Nothing ;
ex:enumRange 1 .
ex:Rectangle
rdf:type owl:Class ;
rdfs:label "Rectangle"^^xsd:string ;
rdfs:subClassOf owl:Thing ;
spin:constraint
[ rdf:type sp:Construct ;
sp:templates ([ sp:object spin:ConstraintViolation ;
sp:predicate rdf:type ;
sp:subject _:b1
] [ sp:object ex:totalHeight ;
sp:predicate spin:violationPath ;
sp:subject _:b1
] [ sp:object spin:_this ;
sp:predicate spin:violationRoot ;
sp:subject _:b1
] [ sp:object "Total height must not be negative" ;
sp:predicate rdfs:label ;
sp:subject _:b1
]) ;
sp:where ([ rdf:type sp:Filter ;
sp:expression
[ rdf:type sp:lt ;
sp:arg1 [ rdf:type xsd:float ;
sp:arg1 [ rdf:type spl:object ;
sp:arg1 spin:_this ;
sp:arg2 ex:totalHeight
]
] ;
sp:arg2 0
]
])
] ;
ui:instanceView
[ rdf:type html:Div ;
ui:child
[ rdf:type app:Object ;
arg:predicate rdfs:label ;
arg:subject spin:_this ;
ui:childIndex 0
] ;
ui:child
[ rdf:type app:Object ;
arg:predicate ex:totalWidth ;
arg:subject spin:_this ;
ui:childIndex 1
] ;
ui:child
[ rdf:type app:Object ;
arg:predicate ex:totalHeight ;
arg:subject spin:_this ;
ui:childIndex 2
] ;
ui:child
[ rdf:type html:H3 ;
ui:child
[ rdf:type ui:TextNode ;
ui:childIndex 0 ;
ui:text "References"^^xsd:string
] ;
ui:childIndex 3
] ;
ui:child
[ rdf:type app:Subjects ;
arg:object spin:_this ;
arg:predicate ex:contains ;
ui:childIndex 4
]
] .
ex:Rectangle_1
rdf:type ex:Rectangle ;
rdfs:label "Rectangle 1"^^xsd:string ;
ex:contains ex:MyRectangle ;
ex:totalHeight "10"^^<http://qudt.org/vocab/unit#Centimeter> ;
ex:totalWidth "-20"^^<http://qudt.org/vocab/unit#Centimeter> .
ex:Rectangle_2
rdf:type ex:Rectangle ;
rdfs:label "Rectangle 2"^^xsd:string ;
ex:contains ex:MyRectangle .
ex:Thing
rdf:type owl:Class ;
rdfs:label "Thing"^^xsd:string ;
rdfs:subClassOf owl:Thing ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:allValuesFrom ex:MyEnumDatatype ;
owl:onProperty ex:enumLocal
] ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:maxCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty ex:enumProperty
] .
ex:blue
rdf:type ex:Color ;
rdfs:label "blue"^^xsd:string .
ex:color
rdf:type owl:FunctionalProperty , owl:ObjectProperty ;
rdfs:domain ex:Thing ;
rdfs:label "color"^^xsd:string ;
rdfs:range ex:Color .
ex:contains
rdf:type owl:ObjectProperty ;
rdfs:domain ex:Rectangle ;
rdfs:label "contains"^^xsd:string ;
rdfs:range ex:Rectangle .
ex:deepPurple
rdf:type ex:Color ;
rdfs:label "deep purple"^^xsd:string .
ex:enumLocal
rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
rdfs:domain ex:Thing ;
rdfs:label "enum local"^^xsd:string .
ex:enumProperty
rdf:type owl:ObjectProperty ;
rdfs:domain ex:Thing ;
rdfs:label "enum property"^^xsd:string ;
rdfs:range
[ rdf:type owl:Class ;
owl:oneOf (owl:Thing owl:Nothing ex:Rectangle)
] .
ex:enumRange
rdf:type owl:DatatypeProperty , owl:FunctionalProperty ;
rdfs:domain ex:Thing ;
rdfs:label "enum range"^^xsd:string ;
rdfs:range
[ rdf:type rdfs:Datatype ;
owl:oneOf (1 2 3)
] .
ex:green
rdf:type ex:Color ;
rdfs:label "green"^^xsd:string .
ex:purple
rdf:type ex:Color ;
rdfs:label "purple"^^xsd:string .
ex:red
rdf:type ex:Color ;
rdfs:label "red"^^xsd:string .
ex:totalHeight
rdf:type owl:DatatypeProperty ;
rdfs:domain ex:Rectangle ;
rdfs:label "total height"^^xsd:string ;
rdfs:range <http://qudt.org/vocab/unit#Centimeter> .
ex:totalWidth
rdf:type owl:DatatypeProperty ;
rdfs:domain ex:Rectangle ;
rdfs:label "total width"^^xsd:string ;
rdfs:range <http://qudt.org/vocab/unit#Centimeter> .
<http://qudt.org/schema/qudt#Unit>
rdfs:subClassOf rdfs:Datatype .