You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val namedIri ="${interpreter.settings.progPrefix}staticTable"
28
+
val namedIri = interpreter.streamManager.getStaticNamedIri()
29
+
30
+
// parse sources from comma-separated string sources
31
+
val sourcesLit = interpreter.eval(sources, stackFrame)
32
+
if (sourcesLit.tag !=STRINGTYPE) {
33
+
throwException("The sources parameter in pushStatic statement must be a string literal")
34
+
}
35
+
val sourcesStr = sourcesLit.literal.removeSurrounding("\"")
36
+
val sourcesList = sourcesStr.split(",")
37
+
val sourcesMap = hashMapOf(
38
+
"heap" to false,
39
+
"staticTable" to false,
40
+
"vocabularyFile" to false,
41
+
"externalOntology" to false,
42
+
"urlOntology" to false,
43
+
"fmos" to false
44
+
)
45
+
for (s in sourcesList) {
46
+
val trimmed = s.trim()
47
+
if (sourcesMap.containsKey(trimmed)) {
48
+
sourcesMap[trimmed] =true
49
+
} else {
50
+
throwException("Unknown source '$trimmed' in pushStatic statement, only comma-separated [heap, staticTable, vocabularyFile, externalOntology, urlOntology, fmos] are allowed")
51
+
}
52
+
}
28
53
29
-
// add only staticTable
30
54
val ts =TripleSettings(
31
-
sources =hashMapOf("heap" to false, "staticTable" to true, "vocabularyFile" to false, "fmos" to false, "externalOntology" to false, "urlOntology" to false),
55
+
sources =sourcesMap,
32
56
guards = hashMapOf("heap" to true, "staticTable" to true),
33
57
virtualization = hashMapOf("heap" to true, "staticTable" to true, "fmos" to true),
34
58
jenaReasoner = interpreter.settings.reasoner,
35
59
cachedModel =null
36
60
)
37
-
val sTableModel = interpreter.tripleManager.getModel(ts)
0 commit comments