Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Grégoire Locqueville
purescript-gargantext
Commits
a672c636
Commit
a672c636
authored
Jun 29, 2023
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-openalex' into dev-merge
parents
263a585b
f66fc3b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
Types.purs
...text/Components/Forest/Tree/Node/Action/Search/Types.purs
+6
-0
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Search/Types.purs
View file @
a672c636
...
@@ -102,6 +102,7 @@ datafield2database _ = Empty
...
@@ -102,6 +102,7 @@ datafield2database _ = Empty
data Database = All_Databases
data Database = All_Databases
| Empty
| Empty
| OpenAlex
| PubMed
| PubMed
| Arxiv
| Arxiv
| HAL (Maybe Org)
| HAL (Maybe Org)
...
@@ -116,6 +117,7 @@ derive instance Generic Database _
...
@@ -116,6 +117,7 @@ derive instance Generic Database _
-- derive instance BoundedEnum Database
-- derive instance BoundedEnum Database
instance Show Database where
instance Show Database where
show All_Databases = "All Databases"
show All_Databases = "All Databases"
show OpenAlex = "OpenAlex"
show PubMed = "PubMed"
show PubMed = "PubMed"
show Arxiv = "Arxiv"
show Arxiv = "Arxiv"
show (HAL _) = "HAL"
show (HAL _) = "HAL"
...
@@ -128,6 +130,7 @@ instance Show Database where
...
@@ -128,6 +130,7 @@ instance Show Database where
instance Doc Database where
instance Doc Database where
doc All_Databases = "All databases"
doc All_Databases = "All databases"
doc OpenAlex = "OpenAlex db"
doc PubMed = "All Medical publications"
doc PubMed = "All Medical publications"
doc Arxiv = "Arxiv"
doc Arxiv = "Arxiv"
doc (HAL _) = "All open science (archives ouvertes)"
doc (HAL _) = "All open science (archives ouvertes)"
...
@@ -158,6 +161,7 @@ instance JSON.WriteForeign Database where
...
@@ -158,6 +161,7 @@ instance JSON.WriteForeign Database where
allDatabases :: Array Database
allDatabases :: Array Database
allDatabases = [ Empty
allDatabases = [ Empty
, OpenAlex
, PubMed
, PubMed
-- , Arxiv
-- , Arxiv
, HAL Nothing
, HAL Nothing
...
@@ -171,6 +175,7 @@ allDatabases = [ Empty
...
@@ -171,6 +175,7 @@ allDatabases = [ Empty
dbToInputValue :: Database -> String
dbToInputValue :: Database -> String
dbToInputValue All_Databases = "all_databases"
dbToInputValue All_Databases = "all_databases"
dbToInputValue OpenAlex = "openalex"
dbToInputValue PubMed = "pubmed"
dbToInputValue PubMed = "pubmed"
dbToInputValue Arxiv = "arxiv"
dbToInputValue Arxiv = "arxiv"
dbToInputValue (HAL _) = "hal"
dbToInputValue (HAL _) = "hal"
...
@@ -181,6 +186,7 @@ dbToInputValue Empty = "empty"
...
@@ -181,6 +186,7 @@ dbToInputValue Empty = "empty"
dbFromInputValue :: String -> Maybe Database
dbFromInputValue :: String -> Maybe Database
dbFromInputValue "all_databases" = Just All_Databases
dbFromInputValue "all_databases" = Just All_Databases
dbFromInputValue "openalex" = Just OpenAlex
dbFromInputValue "pubmed" = Just PubMed
dbFromInputValue "pubmed" = Just PubMed
dbFromInputValue "arxiv" = Just Arxiv
dbFromInputValue "arxiv" = Just Arxiv
dbFromInputValue "hal" = Just (HAL Nothing)
dbFromInputValue "hal" = Just (HAL Nothing)
...
...
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