Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports.matrixForQuery = function (dom, query, vx, vy, vvalue, options, w
var header = tr.appendChild(dom.createElement('td'))
header.setAttribute('style', 'padding: 0.3em;')
header.textContent = utilsModule.label(y1) // first approximation
if (y1.termType = 'symbol') {
if (y1.termType = 'NamedNode') {
kb.fetcher.nowOrWhenFetched(y1.uri.split('#')[0], undefined, function (uri, ok, body) {
header.textContent = utilsModule.label(y1)
})
Expand Down
34 changes: 17 additions & 17 deletions lib/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,11 @@ module.exports = function renderTableViewPane (doc, options) {

this.checkValue = function (term) {
var termType = term.termType
if (this.possiblyLiteral && termType != 'literal' && termType != 'symbol') {
if (this.possiblyLiteral && termType != 'Literal' && termType != 'NamedNode') {
this.possiblyNumber = false
this.possiblyLiteral = false
} else if (this.possiblyNumber) {
if (termType != 'literal') {
if (termType != 'Literal') {
this.possiblyNumber = false
} else {
var literalValue = term.value
Expand Down Expand Up @@ -475,7 +475,7 @@ module.exports = function renderTableViewPane (doc, options) {
this.inverse = predicate
this.constraints = this.constraints.concat(
kb.each(predicate, UI.ns.rdfs('domain')))
if (predicate.sameTerm(ns.rdfs('subClassOf')) && (other.termType == 'symbol')) {
if (predicate.sameTerm(ns.rdfs('subClassOf')) && (other.termType == 'NamedNode')) {
this.superClass = other
this.alternatives = kb.each(undefined, ns.rdfs('subClassOf'), other)
}
Expand Down Expand Up @@ -679,7 +679,7 @@ module.exports = function renderTableViewPane (doc, options) {
for (var i = 0; i < subjectList.length; ++i) {
var type = subjectList[i].object

if (type.termType != 'symbol') { // @@ no bnodes?
if (type.termType != 'NamedNode') { // @@ no bnodes?
continue
}

Expand Down Expand Up @@ -937,9 +937,9 @@ module.exports = function renderTableViewPane (doc, options) {
function literalSort (rows, column, reverse) {
function literalToString (colValue) {
if (colValue != null) {
if (colValue.termType == 'literal') {
if (colValue.termType == 'Literal') {
return colValue.value.toLowerCase()
} else if (colValue.termType == 'symbol') {
} else if (colValue.termType == 'NamedNode') {
return UI.utils.label(colValue).toLowerCase()
}
return colValue.value.toLowerCase()
Expand Down Expand Up @@ -1002,9 +1002,9 @@ module.exports = function renderTableViewPane (doc, options) {
} else {
var literalValue

if (colValue.termType == 'literal') {
if (colValue.termType == 'Literal') {
literalValue = colValue.value
} else if (colValue.termType == 'symbol') {
} else if (colValue.termType == 'NamedNode') {
literalValue = UI.utils.label(colValue)
} else {
literalValue = ''
Expand Down Expand Up @@ -1323,7 +1323,7 @@ module.exports = function renderTableViewPane (doc, options) {

}
} else {
if (obj.termType == 'literal') {
if (obj.termType == 'Literal') {
if (obj.datatype) {
if (XSD_DATE_TYPES[obj.datatype.uri]) {
return doc.createTextNode(UI.widgets.shortDate(obj.value))
Expand All @@ -1335,9 +1335,9 @@ module.exports = function renderTableViewPane (doc, options) {
}
}
return doc.createTextNode(obj.value)
} else if (obj.termType == 'symbol' && column.isImageColumn()) {
} else if (obj.termType == 'NamedNode' && column.isImageColumn()) {
return renderImage(obj)
} else if (obj.termType == 'symbol' || obj.termType == 'bnode') {
} else if (obj.termType == 'NamedNode' || obj.termType == 'BlankNode') {
return linkToObject(obj, hints)
} else if (obj.termType == 'collection') {
var span = doc.createElement('span')
Expand Down Expand Up @@ -1424,9 +1424,9 @@ module.exports = function renderTableViewPane (doc, options) {
function valueInList (value, list) {
var key = null

if (value.termType == 'literal') {
if (value.termType == 'Literal') {
key = 'value'
} else if (value.termType == 'symbol') {
} else if (value.termType == 'NamedNode') {
key = 'uri'
} else {
return list.indexOf(value) >= 0
Expand Down Expand Up @@ -1620,16 +1620,16 @@ module.exports = function renderTableViewPane (doc, options) {
// If so, we can use the predicate as the predicate for the
// column used for the specified variable.

if (statement.predicate.termType == 'symbol'
&& statement.object.termType == 'variable') {
if (statement.predicate.termType == 'NamedNode'
&& statement.object.termType == 'Variable') {
var variable = statement.object.toString()
if (variable in columns) {
var column = columns[variable]
column.setPredicate(statement.predicate, false, statement.subject)
}
}
if (statement.predicate.termType == 'symbol'
&& statement.subject.termType == 'variable') {
if (statement.predicate.termType == 'NamedNode'
&& statement.subject.termType == 'Variable') {
var variable = statement.subject.toString()
if (variable in columns) {
var column = columns[variable]
Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ UI.utils.label = function (x, initialCap) { // x is an object

// Default to label just generated from the URI

if (x.termType == 'bnode') {
if (x.termType == 'BlankNode') {
return '...'
}
if (x.termType == 'collection') {
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ widgetModule.propertyTriage = function () {
var pi = kb.predicateIndex // One entry for each pred
for (var p in pi) {
var object = pi[p][0].object
if (object.termType === 'literal') {
if (object.termType === 'Literal') {
dp[p] = true
nd++
} else {
Expand Down