Commit 2a29dcc9 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[arxiv] simple arxiv db selector

parent 44329133
Pipeline #2672 failed with stage
in 0 seconds
...@@ -151,6 +151,15 @@ isExternal :: Maybe DataField -> Boolean ...@@ -151,6 +151,15 @@ isExternal :: Maybe DataField -> Boolean
isExternal (Just (External _)) = true isExternal (Just (External _)) = true
isExternal _ = false isExternal _ = false
isArxiv :: Maybe DataField -> Boolean
isArxiv (Just
( External
( Just Arxiv
)
)
) = true
isArxiv _ = false
isHAL :: Maybe DataField -> Boolean isHAL :: Maybe DataField -> Boolean
isHAL (Just isHAL (Just
( External ( External
......
...@@ -104,6 +104,7 @@ datafield2database _ = Empty ...@@ -104,6 +104,7 @@ datafield2database _ = Empty
allDatabases :: Array Database allDatabases :: Array Database
allDatabases = [ Empty allDatabases = [ Empty
, PubMed , PubMed
, Arxiv
, HAL Nothing , HAL Nothing
, IsTex , IsTex
, IsTex_Advanced , IsTex_Advanced
...@@ -116,6 +117,7 @@ allDatabases = [ Empty ...@@ -116,6 +117,7 @@ allDatabases = [ Empty
data Database = All_Databases data Database = All_Databases
| Empty | Empty
| PubMed | PubMed
| Arxiv
| HAL (Maybe Org) | HAL (Maybe Org)
| IsTex | IsTex
| IsTex_Advanced | IsTex_Advanced
...@@ -124,34 +126,37 @@ data Database = All_Databases ...@@ -124,34 +126,37 @@ data Database = All_Databases
-- | SocialNetworks -- | SocialNetworks
derive instance Generic Database _ derive instance Generic Database _
instance Show Database where instance Show Database where
show All_Databases= "All Databases" show All_Databases = "All Databases"
show PubMed = "PubMed" show PubMed = "PubMed"
show (HAL _)= "HAL" show Arxiv = "Arxiv"
show IsTex = "IsTex" show (HAL _) = "HAL"
show IsTex_Advanced = "IsTex_Advanced" show IsTex = "IsTex"
show Isidore= "Isidore" show IsTex_Advanced = "IsTex_Advanced"
show Empty = "Empty" show Isidore = "Isidore"
show Empty = "Empty"
-- show News = "News" -- show News = "News"
-- show SocialNetworks = "Social Networks" -- show SocialNetworks = "Social Networks"
instance Doc Database where instance Doc Database where
doc All_Databases = "All databases" doc All_Databases = "All databases"
doc PubMed = "All Medical publications" doc PubMed = "All Medical publications"
doc (HAL _) = "All open science (archives ouvertes)" doc Arxiv = "Arxiv"
doc IsTex = "All Elsevier enriched by CNRS/INIST" doc (HAL _) = "All open science (archives ouvertes)"
doc IsTex = "All Elsevier enriched by CNRS/INIST"
doc IsTex_Advanced = "IsTex advanced search" doc IsTex_Advanced = "IsTex advanced search"
doc Isidore = "All (French) Social Sciences" doc Isidore = "All (French) Social Sciences"
doc Empty = "Empty" doc Empty = "Empty"
-- doc News = "Web filtered by News" -- doc News = "Web filtered by News"
-- doc SocialNetworks = "Web filtered by MicroBlogs" -- doc SocialNetworks = "Web filtered by MicroBlogs"
instance Read Database where instance Read Database where
read :: String -> Maybe Database read :: String -> Maybe Database
read "All Databases" = Just All_Databases read "All Databases" = Just All_Databases
read "PubMed" = Just PubMed read "PubMed" = Just PubMed
read "HAL" = Just $ HAL Nothing read "Arxiv" = Just Arxiv
read "Isidore"= Just Isidore read "HAL" = Just $ HAL Nothing
read "IsTex" = Just IsTex read "Isidore" = Just Isidore
read "IsTex" = Just IsTex
read "IsTex_Advanced" = Just IsTex_Advanced read "IsTex_Advanced" = Just IsTex_Advanced
-- read "Web" = Just Web -- read "Web" = Just Web
-- read "News" = Just News -- read "News" = Just News
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment