[VIVO-1641] REPLACE jena afn with cross-platform regex (#105)

Resolves https://jira.duraspace.org/browse/VIVO-1641
This commit is contained in:
alessandroGalasso 2019-03-20 18:22:14 +01:00 committed by Andrew Woods
parent 12d703b4c8
commit 74b8f16aa2
6 changed files with 7 additions and 19 deletions

View file

@ -7,7 +7,7 @@
<list-view-config>
<query-select>
PREFIX afn: &lt;http://jena.apache.org/ARQ/function#&gt;
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
PREFIX vitro: &lt;http://vitro.mannlib.cornell.edu/ns/vitro/0.7#&gt;
@ -17,7 +17,7 @@
?localName
WHERE {
?subject ?property ?object .
LET (?localName := afn:localname(?object))
LET (?localName := REPLACE(STR(?object),"^.*(#)(.*)$", "$2"))
OPTIONAL {
<precise-subquery>?subject ?property ?object .</precise-subquery>
@ -33,7 +33,7 @@
# Aug 9-10, 2011.
# ?subclass vitro:inClassGroup ?classgroup
}
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 <collated> ?subclass </collated> ASC( ?label ) ASC( ?label ) ASC( ?localName )

View file

@ -8,10 +8,10 @@
<list-view-config>
<query-select>
PREFIX display: &lt;http://vitro.mannlib.cornell.edu/ontologies/display/1.1#&gt;
PREFIX afn: &lt;http://jena.apache.org/ARQ/function#&gt;
SELECT ?menuItem
(afn:localname(?menuItem) AS ?menuItemName)
(REPLACE(STR(?menuItem),"^.*(#)(.*)$", "$2") AS ?menuItemName)
?linkText
?menuPosition
WHERE {