Commit aa507d68 authored by Petter Goksøyr Åsen's avatar Petter Goksøyr Åsen
Browse files

cast explicitly true as xsd:boolean

parent a4cc2d0b
......@@ -678,6 +678,7 @@ public final class SPARQLQueryBuilder {
+ "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n"
+ "PREFIX deich: <%1$s>\n"
+ "PREFIX role: <%2$s>\n"
+ "PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n"
+ "SELECT DISTINCT ?relation ?targetUri ?mainTitle ?subtitle ?partTitle ?partNumber ?publicationYear ?type ?isMainEntry ?isRole\n"
+ "WHERE {\n"
+ " {\n"
......@@ -703,10 +704,10 @@ public final class SPARQLQueryBuilder {
+ " OPTIONAL { ?withContributor deich:publicationYear ?publicationYear } \n"
+ " OPTIONAL {"
+ " ?contribution a deich:MainEntry . \n"
+ " BIND(true as ?isMainEntry) . \n"
+ " BIND(xsd:boolean(true) AS ?isMainEntry) . \n"
+ " } \n"
+ " BIND(?withContributor as ?targetUri) . \n"
+ " BIND(true as ?isRole) . \n"
+ " BIND(?withContributor AS ?targetUri) . \n"
+ " BIND(xsd:boolean(true) AS ?isRole) . \n"
+ " } UNION {\n"
+ " ?workRelation deich:work <%3$s> ;\n"
+ " deich:hasRelationType ?relation .\n"
......@@ -727,8 +728,8 @@ public final class SPARQLQueryBuilder {
+ " OPTIONAL { ?pubInSeries deich:partTitle ?partTitle } \n"
+ " OPTIONAL { ?pubInSeries deich:partNumber ?partNumber } \n"
+ " OPTIONAL { ?pubInSeries deich:publicationYear ?publicationYear } \n"
+ " BIND(iri(deich:inSerial) as ?relation) .\n"
+ " BIND(?pubInSeries as ?targetUri) . \n"
+ " BIND(iri(deich:inSerial) AS ?relation) .\n"
+ " BIND(?pubInSeries AS ?targetUri) . \n"
+ " } UNION {\n"
+ " ?workSeriesParticipation deich:workSeries <%3$s> .\n"
+ " ?workInSeries deich:isPartOfWorkSeries ?workSeriesParticipation ;\n"
......@@ -738,8 +739,8 @@ public final class SPARQLQueryBuilder {
+ " OPTIONAL { ?workInSeries deich:partTitle ?partTitle } \n"
+ " OPTIONAL { ?workInSeries deich:partNumber ?partNumber } \n"
+ " OPTIONAL { ?workInSeries deich:publicationYear ?publicationYear } \n"
+ " BIND(iri(deich:isPartOfWorkSeries) as ?relation) .\n"
+ " BIND(?workInSeries as ?targetUri) . \n"
+ " BIND(iri(deich:isPartOfWorkSeries) AS ?relation) .\n"
+ " BIND(?workInSeries AS ?targetUri) . \n"
+ " } UNION {\n"
+ " ?instrumentation deich:hasInstrument <%3$s> .\n"
+ " ?workWithInstruments deich:hasInstrumentation ?instrumentation ;\n"
......@@ -757,8 +758,8 @@ public final class SPARQLQueryBuilder {
+ " ?withPubPart deich:hasPublicationPart ?pubPart .\n"
+ " ?pubPart a ?type ;\n"
+ " deich:mainTitle ?mainTitle . \n"
+ " BIND(?withPubPart as ?targetUri) . \n"
+ " BIND(true as ?isRole) . \n"
+ " BIND(?withPubPart AS ?targetUri) . \n"
+ " BIND(xsd:boolean(true) AS ?isRole) . \n"
+ " } UNION {\n"
+ " ?pubPart deich:publicationOf <%3$s> .\n"
+ " ?withPubPart deich:hasPublicationPart ?pubPart ;\n"
......@@ -775,8 +776,8 @@ public final class SPARQLQueryBuilder {
+ " OPTIONAL { ?workWithSubj deich:partTitle ?partTitle } \n"
+ " OPTIONAL { ?workWithSubj deich:partNumber ?partNumber } \n"
+ " OPTIONAL { ?workWithSubj deich:publicationYear ?publicationYear } \n"
+ " BIND(iri(deich:subject) as ?relation) .\n"
+ " BIND(?workWithSubj as ?targetUri) . \n"
+ " BIND(iri(deich:subject) AS ?relation) .\n"
+ " BIND(?workWithSubj AS ?targetUri) . \n"
+ " } UNION {\n"
+ " ?workWithCompType deich:hasCompositionType <%3$s> ;\n"
+ " a ?type ;\n"
......@@ -786,7 +787,7 @@ public final class SPARQLQueryBuilder {
+ " OPTIONAL { ?workWithCompType deich:partNumber ?partNumber } \n"
+ " OPTIONAL { ?workWithCompType deich:publicationYear ?publicationYear } \n"
+ " BIND(iri(deich:hasCompositionType) as ?relation) .\n"
+ " BIND(?workWithCompType as ?targetUri) . \n"
+ " BIND(?workWithCompType AS?targetUri) . \n"
+ " } UNION {\n"
+ " ?workWithGenre deich:genre <%3$s> ;\n"
+ " a ?type ;\n"
......@@ -795,8 +796,8 @@ public final class SPARQLQueryBuilder {
+ " OPTIONAL { ?workWithGenre deich:partTitle ?partTitle } \n"
+ " OPTIONAL { ?workWithGenre deich:partNumber ?partNumber } \n"
+ " OPTIONAL { ?workWithGenre deich:publicationYear ?publicationYear } \n"
+ " BIND(iri(deich:genre) as ?relation) .\n"
+ " BIND(?workWithGenre as ?targetUri) . \n"
+ " BIND(iri(deich:genre) AS ?relation) .\n"
+ " BIND(?workWithGenre AS ?targetUri) . \n"
+ " } UNION {\n"
+ " ?publWithPlace deich:hasPlaceOfPublication <%3$s> ;\n"
+ " a ?type ;\n"
......@@ -804,11 +805,11 @@ public final class SPARQLQueryBuilder {
+ " OPTIONAL { ?publWithPlace deich:subtitle ?subtitle } \n"
+ " OPTIONAL { ?publWithPlace deich:partTitle ?partTitle } \n"
+ " OPTIONAL { ?publWithPlace deich:partNumber ?partNumber } \n"
+ " BIND(iri(deich:hasPlaceOfPublication) as ?relation) .\n"
+ " BIND(?publWithPlace as ?targetUri) . \n"
+ " BIND(iri(deich:hasPlaceOfPublication) AS ?relation) .\n"
+ " BIND(?publWithPlace AS ?targetUri) . \n"
+ " }\n"
+ " FILTER(STRSTARTS(STR(?type), \"http://data.deichman.no/ontology#\"))"
+ "} order by ?relation", BaseURI.ontology(), BaseURI.role(), uri.getUri());
+ "} ORDER BY?relation", BaseURI.ontology(), BaseURI.role(), uri.getUri());
return QueryFactory.create(queryString);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment