Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex: Case (in)sensitivity flag ignored #59

Open
Aklakan opened this issue Dec 11, 2014 · 3 comments
Open

Regex: Case (in)sensitivity flag ignored #59

Aklakan opened this issue Dec 11, 2014 · 3 comments

Comments

@Aklakan
Copy link
Member

Aklakan commented Dec 11, 2014

Select * {
?s a owl:Class . 
?s rdfs:label ?l
Filter(regex(str(?s), 'school', 'i'))
}
@amrapalijz
Copy link

(how) can I convert the literals into lower case during the conversion process? using fn:lower-case?

@patrickwestphal
Copy link
Member

Don't know if there is a fn:lower-case built in, but you could also use Postgres' lower(...) function in the From query. Like so:

Create View foo As
  Construct {
    ?foo a Bar .
  }
  With
   ?foo = uri(blah: ?lower_sth)
  From
    [[SELECT lower(sth) AS lower_sth FROM sometable]]

@amrapalijz
Copy link

Prefix geo: http://geo.bio2rdf.org/
Prefix dcterms:http://purl.org/dc/elements/1.1/
Prefix rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
Prefix rdfs: http://www.w3.org/2000/01/rdf-schema#
Prefix xsd: http://www.w3.org/2001/XMLSchema#
Prefix fn:http://aksw.org/sparqlify/

Create View Template geo As
Construct {
?s geo:gsmID ?l1.
?s geo:characteristic ?l2.
?s geo:characteristic ?l3.
}
With
?s = uri(concat("http://geo.bio2rdf.org/", ?1))
?l1 = plainLiteral(?1)
?l2 = plainLiteral(?2)
?l3 = plainLiteral(?3)


Above is my mapping file. I want to convert actually the literals (l2, l3) to lower case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants