[VIVO-1641] Replace afn:localname / afn:namespace with cross-platform equivalent (#96)
* Update listViewConfig-default.xml * 1641 repalce localname * [VIVO-1641] REPLACE jena afn with cross-platform regex Resolves https://jira.duraspace.org/browse/VIVO-1641
This commit is contained in:
parent
5dfa919ec7
commit
8511073240
25 changed files with 48 additions and 58 deletions
|
@ -6,7 +6,7 @@
|
|||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
PREFIX bibo: <http://purl.org/ontology/bibo/>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
||||
|
@ -31,7 +31,7 @@
|
|||
?adviseeRole a core:AdviseeRole .
|
||||
?adviseeRole core:relatedBy ?advisingRel .
|
||||
?advisingRel a core:AdvisingRelationship .
|
||||
LET ( ?localName := afn:localname(?advisingRel) )
|
||||
LET ( ?localName := REPLACE(STR(?advisingRel),"^.*(#)(.*)$", "$2") )
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?adviseeRole .
|
||||
?adviseeRole a core:AdviseeRole .
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
PREFIX bibo: <http://purl.org/ontology/bibo/>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
||||
|
@ -31,7 +30,7 @@
|
|||
?advisorRole a core:AdvisorRole .
|
||||
?advisorRole core:relatedBy ?advisingRel .
|
||||
?advisingRel a core:AdvisingRelationship .
|
||||
LET ( ?localName := afn:localname(?advisingRel) )
|
||||
LET ( ?localName := REPLACE(STR(?advisingRel),"^.*(#)(.*)$", "$2") )
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?advisorRole .
|
||||
?advisorRole a core:AdvisorRole .
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<query-select>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
|
||||
SELECT DISTINCT ?dateTimeInterval ?label
|
||||
?valueStart ?valueStartName
|
||||
|
@ -24,7 +24,7 @@
|
|||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?dateTimeInterval .</precise-subquery>
|
||||
?dateTimeInterval core:start ?valueStart .
|
||||
LET (?valueStartName := afn:localname(?valueStart))
|
||||
LET (?valueStartName := REPLACE(STR(?valueStart),"^.*(#)(.*)$", "$2"))
|
||||
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?dateTimeInterval .
|
||||
|
@ -35,13 +35,13 @@
|
|||
<precise-subquery>?subject ?property ?dateTimeInterval .
|
||||
?dateTimeInterval core:start ?valueStart .</precise-subquery>
|
||||
?valueStart core:dateTimePrecision ?dateTimePrecisionStart .
|
||||
LET (?precisionStart := afn:localname(?dateTimePrecisionStart))
|
||||
LET (?precisionStart := REPLACE(STR(?dateTimePrecisionStart),"^.*(#)(.*)$", "$2"))
|
||||
}
|
||||
}
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?dateTimeInterval .</precise-subquery>
|
||||
?dateTimeInterval core:end ?valueEnd .
|
||||
LET (?valueEndName := afn:localname(?valueEnd))
|
||||
LET (?valueEndName := REPLACE(STR(?valueEnd),"^.*(#)(.*)$", "$2"))
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?valueEnd .</precise-subquery>
|
||||
|
@ -51,7 +51,7 @@
|
|||
<precise-subquery>?subject ?property ?dateTimeInterval .
|
||||
?dateTimeInterval core:end ?valueEnd .</precise-subquery>
|
||||
?valueEnd core:dateTimePrecision ?dateTimePrecisionEnd .
|
||||
LET (?precisionEnd := afn:localname(?dateTimePrecisionEnd))
|
||||
LET (?precisionEnd := REPLACE(STR(?dateTimePrecisionEnd),"^.*(#)(.*)$", "$2"))
|
||||
}
|
||||
}
|
||||
OPTIONAL {
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
<query-select>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
|
||||
SELECT DISTINCT ?dateTimeValue
|
||||
(afn:localname(?dateTimePrecision) AS ?precision)
|
||||
(REPLACE(STR(?dateTimePrecision),"^.*(#)(.*)$", "$2") AS ?precision)
|
||||
?dateTime
|
||||
WHERE {
|
||||
?subject ?property ?dateTimeValue .
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
|
@ -25,7 +25,7 @@
|
|||
WHERE
|
||||
{
|
||||
?subject ?property ?object .
|
||||
LET (?localName := afn:localname(?object))
|
||||
LET (?localName := REPLACE(STR(?object), "^.*(#)(.*)$", "$2"))
|
||||
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?object .</precise-subquery>
|
||||
|
@ -57,7 +57,7 @@
|
|||
}
|
||||
|
||||
<collated>
|
||||
FILTER ( afn:namespace(?subclass) != "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" )
|
||||
FILTER ( REPLACE(STR(?subclass),"^(.*)(#)(.*)$", "$1$2") != "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" )
|
||||
</collated>
|
||||
|
||||
# Order by ?type is important, because if the object has more than one mostSpecificType,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
|
@ -26,7 +26,7 @@
|
|||
{
|
||||
?subject ?property ?object .
|
||||
?object a ?objectType .
|
||||
LET (?localName := afn:localname(?object))
|
||||
LET (?localName := REPLACE(STR(?object),"^.*(#)(.*)$", "$2"))
|
||||
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?object .
|
||||
|
@ -63,7 +63,7 @@
|
|||
?object a ?objectType .</precise-subquery>
|
||||
?object a ?subclass .
|
||||
}
|
||||
FILTER ( afn:namespace(?subclass) != "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" )
|
||||
FILTER ( REPLACE(STR(?subclass),"^(.*)(#)(.*)$", "$1$2") != "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" )
|
||||
</collated>
|
||||
|
||||
# Order by ?type is important, because if the object has more than one mostSpecificType,
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vivo: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
|
||||
SELECT ?concept ?conceptLabel ?conceptName ?vocabularySource ?vocabularySourceName
|
||||
WHERE {
|
||||
?subject ?property ?concept .
|
||||
LET (?conceptName := afn:localname(?concept))
|
||||
LET (?conceptName := REPLACE(STR(?concept),"^.*(#)(.*)$", "$2"))
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?concept .</precise-subquery>
|
||||
?concept rdfs:label ?conceptLabel .
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
PREFIX bibo: <http://purl.org/ontology/bibo/>
|
||||
PREFIX vivo: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
||||
|
@ -55,7 +55,7 @@
|
|||
}
|
||||
</collated>
|
||||
|
||||
LET (?event1Name := afn:localname(?event1))
|
||||
LET (?event1Name := REPLACE(STR(?event1),"^.*(#)(.*)$", "$2"))
|
||||
|
||||
OPTIONAL {
|
||||
<precise-subquery>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
|
@ -32,7 +32,7 @@
|
|||
?role core:relatedBy ?activity .
|
||||
?activity a core:Contract .
|
||||
?activity rdfs:label ?activityLabel .
|
||||
LET (?activityName := afn:localname(?activity)) .
|
||||
LET (?activityName := REPLACE(STR(?activity),"^.*(#)(.*)$", "$2")) .
|
||||
}
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?role .
|
||||
|
@ -40,7 +40,7 @@
|
|||
?role core:relatedBy ?activity .
|
||||
?activity a core:Grant .
|
||||
?activity rdfs:label ?activityLabel .
|
||||
LET (?activityName := afn:localname(?activity)) .
|
||||
LET (?activityName := REPLACE(STR(?activity),"^.*(#)(.*)$", "$2")) .
|
||||
}
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?role .
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
|
@ -14,7 +14,7 @@
|
|||
?role
|
||||
?subclassLabel
|
||||
?activity
|
||||
(afn:localname(?activity) AS ?activityLocal)
|
||||
(REPLACE(STR(?activity),"^.*(#)(.*)$", "$2") AS ?activityLocal)
|
||||
?activityName
|
||||
?dateTimeStart
|
||||
?dateTimeEnd
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
|
@ -32,7 +32,7 @@
|
|||
?role <http://vivoweb.org/ontology/core#relatedBy> ?activity .
|
||||
?activity a core:Contract .
|
||||
?activity rdfs:label ?activityLabel .
|
||||
LET (?activityName := afn:localname(?activity))
|
||||
LET (?activityName := REPLACE(STR(?activity),"^.*(#)(.*)$", "$2"))
|
||||
}
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?role .
|
||||
|
@ -57,7 +57,7 @@
|
|||
?role <http://vivoweb.org/ontology/core#relatedBy> ?activity .
|
||||
?activity a core:Grant .
|
||||
?activity rdfs:label ?activityLabel .
|
||||
LET (?activityName := afn:localname(?activity))
|
||||
LET (?activityName := REPLACE(STR(?activity),"^.*(#)(.*)$", "$2"))
|
||||
}
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?role .
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
PREFIX bibo: <http://purl.org/ontology/bibo/>
|
||||
PREFIX vivo: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
||||
|
@ -38,7 +38,7 @@
|
|||
?role <http://purl.obolibrary.org/obo/BFO_0000054> ?presentation .
|
||||
?presentation a vivo:Presentation .
|
||||
?presentation rdfs:label ?presentationLabel .
|
||||
LET (?presentationName := afn:localname(?presentation))
|
||||
LET (?presentationName := REPLACE(STR(?presentation),"^.*(#)(.*)$", "$2"))
|
||||
}
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?role .
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
|
@ -34,7 +34,7 @@
|
|||
?role core:relatedBy ?activity .
|
||||
?activity a core:Contract .
|
||||
?activity rdfs:label ?activityLabel .
|
||||
LET (?activityName := afn:localname(?activity)) .
|
||||
LET (?activityName := REPLACE(STR(?activity),"^.*(#)(.*)$", "$2")) .
|
||||
}
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?role .
|
||||
|
@ -59,7 +59,7 @@
|
|||
?role core:relatedBy ?activity .
|
||||
?activity a core:Grant .
|
||||
?activity rdfs:label ?activityLabel .
|
||||
LET (?activityName := afn:localname(?activity)) .
|
||||
LET (?activityName := REPLACE(STR(?activity),"^.*(#)(.*)$", "$2")) .
|
||||
}
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?role .
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
|
@ -14,7 +14,7 @@
|
|||
?role
|
||||
?subclassLabel
|
||||
?activity
|
||||
(afn:localname(?activity) AS ?activityLocal)
|
||||
(REPLACE(STR(?activity),"^.*(#)(.*)$", "$2") AS ?activityLocal)
|
||||
?activityName
|
||||
?dateTimeStart
|
||||
?dateTimeEnd
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
PREFIX bibo: <http://purl.org/ontology/bibo/>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
||||
|
@ -26,7 +26,7 @@
|
|||
WHERE {
|
||||
?subject ?property ?issuedCredential .
|
||||
?issuedCredential a core:IssuedCredential .
|
||||
LET (?issuedCredentialLocal := afn:localname(?issuedCredential))
|
||||
LET (?issuedCredentialLocal := REPLACE(STR(?issuedCredential),"^.*(#)(.*)$", "$2"))
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?issuedCredential .
|
||||
?issuedCredential a core:IssuedCredential .</precise-subquery>
|
||||
|
@ -39,7 +39,7 @@
|
|||
?credential a core:Credential .
|
||||
?credential core:relatedBy ?issuedCredential .
|
||||
?credential rdfs:label ?credentialLabel .
|
||||
LET (?credentialLocal := afn:localname(?credential))
|
||||
LET (?credentialLocal := REPLACE(STR(?credential),"^.*(#)(.*)$", "$2"))
|
||||
}
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?issuedCredential .
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
|
@ -24,7 +24,7 @@
|
|||
WHERE
|
||||
{
|
||||
?subject ?property ?object .
|
||||
LET (?localName := afn:localname(?object))
|
||||
LET (?localName := REPLACE(STR(?object),"^.*(#)(.*)$", "$2"))
|
||||
|
||||
OPTIONAL {
|
||||
<precise-subquery>?subject ?property ?object .</precise-subquery>
|
||||
|
@ -50,7 +50,7 @@
|
|||
}
|
||||
|
||||
<collated>
|
||||
FILTER ( afn:namespace(?subclass) != "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" )
|
||||
FILTER ( REPLACE(STR(?subclass),"^(.*)(#)(.*)$", "$1$2") != "http://vitro.mannlib.cornell.edu/ns/vitro/0.7#" )
|
||||
</collated>
|
||||
|
||||
# Order by ?type is important, because if the object has more than one mostSpecificType,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<query-select>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
?property
|
||||
?role
|
||||
?roleLabel ?roleTypeLabel
|
||||
?indivInRole (afn:localname(?indivInRole) AS ?indivName)
|
||||
?indivInRole (REPLACE(STR(?indivInRole),"^.*(#)(.*)$", "$2") AS ?indivName)
|
||||
?indivLabel
|
||||
?dateTimeInterval ?dateTimeStart ?dateTimeEnd ?objectType
|
||||
WHERE {
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
<list-view-config>
|
||||
<query-select>
|
||||
PREFIX afn: <http://jena.apache.org/ARQ/function#>
|
||||
|
||||
PREFIX core: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
||||
PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
|
||||
|
||||
SELECT ?vcard ?link
|
||||
(afn:localname(?link) AS ?linkName)
|
||||
(REPLACE(STR(?link),"^.*(#)(.*)$", "$2") AS ?linkName)
|
||||
(group_concat(distinct ?linkLabel;separator="/") as ?label)
|
||||
?url
|
||||
?rank
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue