Skip to content

Commit e7306cd

Browse files
committed
fix choice class
1 parent a810c6d commit e7306cd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/query/woqlSchema.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,9 @@ WOQLQuery.prototype.generateChoiceList = function(cls, clslabel, clsdesc, choice
202202
graph = this._sg(graph)
203203
var clist = []
204204
var listid = '_:' + (cls.indexOf(':') == -1 ? cls : cls.split(':')[1])
205+
const className=this.cleanClass(cls, true)
205206
var lastid = listid
206-
let wq = new WOQLQuery().add_class(cls, graph).label(clslabel)
207+
let wq = new WOQLQuery().add_class(className, graph).label(clslabel)
207208
if (clsdesc) wq.description(clsdesc)
208209
if (parent) wq.parent(parent)
209210
var confs = [wq]
@@ -218,7 +219,7 @@ WOQLQuery.prototype.generateChoiceList = function(cls, clslabel, clsdesc, choice
218219
var clab = UTILS.labelFromURL(chid)
219220
var desc = false
220221
}
221-
let cq = new WOQLQuery().insert(chid, cls, graph).label(clab)
222+
let cq = new WOQLQuery().insert(chid, className, graph).label(clab)
222223
if (desc) cq.description(desc)
223224
confs.push(cq)
224225
var nextid = i < choices.length - 1 ? listid + '_' + i : 'rdf:nil'
@@ -228,7 +229,7 @@ WOQLQuery.prototype.generateChoiceList = function(cls, clslabel, clsdesc, choice
228229
}
229230
//do the owl oneof
230231
let oneof = new WOQLQuery().and(
231-
new WOQLQuery().add_quad(cls, 'owl:oneOf', new WOQLQuery().iri(listid), graph),
232+
new WOQLQuery().add_quad(className, 'owl:oneOf', new WOQLQuery().iri(listid), graph),
232233
...clist,
233234
)
234235
return this.and(...confs, oneof)

0 commit comments

Comments
 (0)