forked from weso/YASHE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.js
39 lines (27 loc) · 734 Bytes
/
home.js
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
//get the ShEx examples
var rdfBookEx,wikiEx,japanEx
var exSelector = document.getElementById('exSelector')
//Parse Shapes
$.get('./doc/examples/rdfBookEx.txt', function(data) {
rdfBookEx = data
}, 'text');
$.get('./doc/examples/wikidataEx.txt', function(data) {
wikiEx = data
}, 'text');
$.get('./doc/examples/japanEx.txt', function(data) {
japanEx = data
}, 'text');
//Examples Listener
exSelector.addEventListener('change', function(e) {
switch(exSelector.value){
case "rdf":
yashe.setValue(rdfBookEx)
break
case "wiki":
yashe.setValue(wikiEx)
break
case "japan":
yashe.setValue(japanEx)
break
}
})