Commit d6d14824 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[TYPE] HyperdataDocument : adding institutes as new field.

parent 90eec1e7
...@@ -116,6 +116,7 @@ data HyperdataDocument = HyperdataDocument { _hyperdataDocument_bdd ...@@ -116,6 +116,7 @@ data HyperdataDocument = HyperdataDocument { _hyperdataDocument_bdd
, _hyperdataDocument_page :: Maybe Int , _hyperdataDocument_page :: Maybe Int
, _hyperdataDocument_title :: Maybe Text , _hyperdataDocument_title :: Maybe Text
, _hyperdataDocument_authors :: Maybe Text , _hyperdataDocument_authors :: Maybe Text
, _hyperdataDocument_institutes :: Maybe Text
, _hyperdataDocument_source :: Maybe Text , _hyperdataDocument_source :: Maybe Text
, _hyperdataDocument_abstract :: Maybe Text , _hyperdataDocument_abstract :: Maybe Text
, _hyperdataDocument_publication_date :: Maybe Text , _hyperdataDocument_publication_date :: Maybe Text
...@@ -137,7 +138,7 @@ instance ToField HyperdataDocument where ...@@ -137,7 +138,7 @@ instance ToField HyperdataDocument where
toHyperdataDocuments :: [(Text, Text)] -> [HyperdataDocument] toHyperdataDocuments :: [(Text, Text)] -> [HyperdataDocument]
toHyperdataDocuments ts = map (\(t1,t2) -> HyperdataDocument Nothing Nothing Nothing Nothing Nothing Nothing (Just t1) toHyperdataDocuments ts = map (\(t1,t2) -> HyperdataDocument Nothing Nothing Nothing Nothing Nothing Nothing (Just t1)
Nothing (Just t2) Nothing Nothing Nothing Nothing Nothing Nothing Nothing (Just t2) Nothing Nothing Nothing Nothing Nothing
Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
) ts ) ts
...@@ -406,7 +407,7 @@ hyperdataDocument = case decode docExample of ...@@ -406,7 +407,7 @@ hyperdataDocument = case decode docExample of
Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing
Nothing Nothing Nothing Nothing Nothing
docExample :: ByteString docExample :: ByteString
docExample = "{\"doi\":\"sdfds\",\"publication_day\":6,\"language_iso2\":\"en\",\"publication_minute\":0,\"publication_month\":7,\"language_iso3\":\"eng\",\"publication_second\":0,\"authors\":\"Nils Hovdenak, Kjell Haram\",\"publication_year\":2012,\"publication_date\":\"2012-07-06 00:00:00+00:00\",\"language_name\":\"English\",\"realdate_full_\":\"2012 01 12\",\"source\":\"European journal of obstetrics, gynecology, and reproductive biology\",\"abstract\":\"The literature was searched for publications on minerals and vitamins during pregnancy and the possible influence of supplements on pregnancy outcome.\",\"title\":\"Influence of mineral and vitamin supplements on pregnancy outcome.\",\"publication_hour\":0}" docExample = "{\"doi\":\"sdfds\",\"publication_day\":6,\"language_iso2\":\"en\",\"publication_minute\":0,\"publication_month\":7,\"language_iso3\":\"eng\",\"publication_second\":0,\"authors\":\"Nils Hovdenak, Kjell Haram\",\"publication_year\":2012,\"publication_date\":\"2012-07-06 00:00:00+00:00\",\"language_name\":\"English\",\"realdate_full_\":\"2012 01 12\",\"source\":\"European journal of obstetrics, gynecology, and reproductive biology\",\"abstract\":\"The literature was searched for publications on minerals and vitamins during pregnancy and the possible influence of supplements on pregnancy outcome.\",\"title\":\"Influence of mineral and vitamin supplements on pregnancy outcome.\",\"publication_hour\":0}"
......
...@@ -121,6 +121,7 @@ toDoc WOS d = do ...@@ -121,6 +121,7 @@ toDoc WOS d = do
Nothing Nothing
Nothing Nothing
(lookup "title" d) (lookup "title" d)
Nothing
(lookup "authors" d) (lookup "authors" d)
(lookup "source" d) (lookup "source" d)
(lookup "abstract" d) (lookup "abstract" d)
......
...@@ -62,6 +62,7 @@ doc2hyperdataDocument (Doc did dt _ dpy dpm dpd dab dau) = ...@@ -62,6 +62,7 @@ doc2hyperdataDocument (Doc did dt _ dpy dpm dpd dab dau) =
Nothing Nothing
Nothing Nothing
(Just dt) (Just dt)
Nothing
(Just dau) (Just dau)
(Just dab) (Just dab)
(Nothing) (Nothing)
...@@ -285,7 +286,7 @@ csvHal2doc (CsvHal title source ...@@ -285,7 +286,7 @@ csvHal2doc (CsvHal title source
pub_year pub_month pub_day pub_year pub_month pub_day
abstract authors abstract authors
url _ _ _ _ url _ _ _ _
doi _ _ _ _ doi _ inst _ _
_ _ ) = HyperdataDocument (Just "CsvHal") _ _ ) = HyperdataDocument (Just "CsvHal")
(Just doi) (Just doi)
(Just url) (Just url)
...@@ -293,6 +294,7 @@ csvHal2doc (CsvHal title source ...@@ -293,6 +294,7 @@ csvHal2doc (CsvHal title source
Nothing Nothing
Nothing Nothing
(Just title) (Just title)
(Just inst)
(Just authors) (Just authors)
(Just source) (Just source)
(Just abstract) (Just abstract)
......
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