Skip to content

Instantly share code, notes, and snippets.

@kinow
Last active March 30, 2017 21:51
Show Gist options
  • Save kinow/847fabc42ad4ca20461fa33b3f71cccd to your computer and use it in GitHub Desktop.
Save kinow/847fabc42ad4ca20461fa33b3f71cccd to your computer and use it in GitHub Desktop.
data
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix : <http://example.org/data/> .
:en1
dc:title "tsahurin kieli"@fi ;
dc:title "açafrão"@pt ;
.
:en2
dc:title "tulun kieli"@fi ;
dc:title "acabamento"@pt ;
.
:en3
dc:title "töyhtöhyyppä"@fi ;
dc:title "caca"@pt ;
.
:en4
dc:title "tšekin kieli"@fi ;
dc:title "caça"@pt ;
.
# Uses NodeUtils#compareLiteralsBySyntax and atlas' StrUtils#strCompare
SELECT * WHERE
{
?a ?b ?title
}
ORDER BY ASC(?a)
# Uses atlas' StrUtils#strCompare
SELECT * WHERE
{
?a ?b ?title
}
ORDER BY ASC(?title)
# option 1
PREFIX collate: <http://jena.hpl.hp.com/ARQ/collate#>
SELECT * WHERE
{
?a ?b ?title
FILTER (LANG(?title) = "fi")
}
ORDER BY ASC(?title) collate:collate(?title)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment