Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
147
Issues
147
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
c2dbcba7
Commit
c2dbcba7
authored
Jan 02, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TEXT][Parsers][Isidore] working query.
parent
c1292008
Pipeline
#78
canceled with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
16 deletions
+38
-16
Isidore.hs
src/Gargantext/Text/Parsers/Isidore.hs
+38
-16
No files found.
src/Gargantext/Text/Parsers/Isidore.hs
View file @
c2dbcba7
...
...
@@ -38,25 +38,47 @@ isidoreGet q = do
simpleSelect
::
Text
->
Query
SelectQuery
simpleSelect
q
=
do
isidore
<-
prefix
"isidore"
(
iriRef
"http://www.rechercheisidore.fr/class"
)
-- See Predefined Namespace Prefixes:
-- https://isidore.science/sparql?nsdecl
isidore
<-
prefix
"isidore"
(
iriRef
"http://www.rechercheisidore.fr/class/"
)
rdf
<-
prefix
"rdf"
(
iriRef
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
)
dcterms
<-
prefix
"dcterms"
(
iriRef
"http://purl.org/dc/terms"
)
dc
<-
prefix
"dc"
(
iriRef
"http://purl.org/dc"
)
dcterms
<-
prefix
"dcterms"
(
iriRef
"http://purl.org/dc/terms/"
)
dc
<-
prefix
"dc"
(
iriRef
"http://purl.org/dc/elements/1.1/"
)
ore
<-
prefix
"ore"
(
iriRef
"http://www.openarchives.org/ore/terms/"
)
bif
<-
prefix
"bif"
(
iriRef
"bif:"
)
doc
<-
var
link
<-
var
title
<-
var
--
date <- var
date
<-
var
abstract
<-
var
--source <- var
authors
<-
var
source
<-
var
lang
<-
var
publisher
<-
var
agg
<-
var
triple_
doc
(
rdf
.:.
"type"
)
(
isidore
.:.
"BibliographicalResource"
)
triple_
doc
(
dcterms
.:.
"title"
)
title
--triple doc (dcterms .:. "date") date
--triple doc (dcterms .:. "source") source
triple
doc
(
dc
.:.
"description"
)
abstract
indexT
<-
var
triple_
link
(
rdf
.:.
"type"
)
(
isidore
.:.
"BibliographicalResource"
)
triple_
link
(
dcterms
.:.
"title"
)
title
triple_
link
(
dcterms
.:.
"date"
)
date
triple_
link
(
dcterms
.:.
"creator"
)
authors
triple_
link
(
dcterms
.:.
"language"
)
lang
triple_
link
(
dcterms
.:.
"source"
)
source
triple_
link
(
ore
.:.
"isAggregatedBy"
)
agg
--triple_ agg (dcterms .:. "title") title
optional
$
triple_
link
(
dcterms
.:.
"publisher"
)
publisher
optional
$
triple_
link
(
dc
.:.
"description"
)
abstract
--filterExpr $ (.||.) (contains title q) (contains abstract q)
filterExpr_
(
contains
title
q
)
-- (contains abstract q)
limit_
3
selectVars
[
title
]
--triple_ indexT (bif .:. "contains") title
--filterExpr_ (contains indexT q) -- (contains abstract q)
orderNextDesc
date
limit_
10
distinct_
selectVars
[
link
,
date
,
authors
,
source
,
title
,
lang
,
publisher
,
abstract
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment