Skip to content
Snippets Groups Projects
Commit 152cdcfb authored by Esko Ikkala's avatar Esko Ikkala
Browse files

Manuscript owners

parent 1f2545fb
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ class FacetDialog extends React.Component {
render() {
const { classes, propertyLabel, facet } = this.props;
console.log(facet)
// console.log(facet)
return (
<div className={classes.root}>
<IconButton
......
......@@ -126,7 +126,7 @@ class ResultTable extends React.Component {
};
objectListRenderer = (cell, makeLink, customSort, ordered) => {
if (cell == null){
if (cell == null || cell === '-'){
return '-';
}
else if (Array.isArray(cell)) {
......
......@@ -137,17 +137,17 @@ module.exports = {
?authorId skos:prefLabel ?authorLabel
BIND(CONCAT(STR(?authorLabel), ";", STR(?authorId)) AS ?author_)
}
#OPTIONAL {
# ?id crm:P51_has_former_or_current_owner ?ownerId .
# ?ownerId skos:prefLabel ?ownerLabel .
#?rei a rdf:Statement ;
# rdf:subject ?id ;
# rdf:predicate crm:P51_has_former_or_current_owner ;
# rdf:object ?ownerId ;
# mmm-schema:entry ?owner__entry ;
# mmm-schema:order ?owner__order .
# BIND(CONCAT(STR(?ownerLabel), ";", STR(?ownerId)) AS ?owner_)
#}
OPTIONAL {
?id crm:P51_has_former_or_current_owner ?ownerId .
?ownerId skos:prefLabel ?ownerLabel .
?rei a rdf:Statement ;
rdf:subject ?id ;
rdf:predicate crm:P51_has_former_or_current_owner ;
rdf:object ?ownerId ;
mmm-schema:entry ?owner__entry ;
mmm-schema:order ?owner__order .
BIND(CONCAT(STR(?ownerLabel), ";", STR(?ownerId)) AS ?owner_)
}
OPTIONAL {
?expression_creation crm:P4_has_time_span ?timespanId .
?timespanId rdfs:label ?timespan_.
......
......@@ -46,7 +46,7 @@ export const groupBy = (sparqlBindings, group) => Object.values(_.reduce(sparqlB
// };
export const mapManuscripts = (sparqlBindings) => {
console.log(sparqlBindings);
// console.log(sparqlBindings);
const results = sparqlBindings.map(b => {
return {
id: b.id.value,
......@@ -54,7 +54,7 @@ export const mapManuscripts = (sparqlBindings) => {
//entry: createStringList(b.entry.value),
manuscriptRecord: _.has(b, 'manuscriptRecord') ? createStringList(b.manuscriptRecord.value) : '-',
author: _.has(b, 'author',) ? createObjectList(b.author.value, 'names') : '-',
// owner: _.has(b, 'owner',) ? createObjectList(b.owner.value, 'names') : '-',
owner: _.has(b, 'owner',) ? createObjectList(b.owner.value, 'names') : '-',
timespan: _.has(b, 'timespan',) ? createStringList(b.timespan.value) : '-',
creationPlace: _.has(b, 'creationPlace',) ? createObjectList(b.creationPlace.value, 'places') : '-',
material: _.has(b, 'material',) ? createStringList(b.material.value) : '-',
......
......@@ -7,7 +7,6 @@ class SparqlSearchEngine {
const sparqlApi = new SparqlApi({ endpoint });
return sparqlApi.selectQuery(sparqlQuery)
.then((data) => {
console.log(data.results.bindings.length)
if (data.results.bindings.length === 0) {
return [];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment