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
, _hyperdataDocument_page :: Maybe Int
, _hyperdataDocument_title :: Maybe Text
, _hyperdataDocument_authors :: Maybe Text
, _hyperdataDocument_institutes :: Maybe Text
, _hyperdataDocument_source :: Maybe Text
, _hyperdataDocument_abstract :: Maybe Text
, _hyperdataDocument_publication_date :: Maybe Text
......@@ -137,7 +138,7 @@ instance ToField HyperdataDocument where
toHyperdataDocuments :: [(Text, Text)] -> [HyperdataDocument]
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
) ts
......@@ -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
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}"
......
......@@ -121,6 +121,7 @@ toDoc WOS d = do
Nothing
Nothing
(lookup "title" d)
Nothing
(lookup "authors" d)
(lookup "source" d)
(lookup "abstract" d)
......
......@@ -62,6 +62,7 @@ doc2hyperdataDocument (Doc did dt _ dpy dpm dpd dab dau) =
Nothing
Nothing
(Just dt)
Nothing
(Just dau)
(Just dab)
(Nothing)
......@@ -285,7 +286,7 @@ csvHal2doc (CsvHal title source
pub_year pub_month pub_day
abstract authors
url _ _ _ _
doi _ _ _ _
doi _ inst _ _
_ _ ) = HyperdataDocument (Just "CsvHal")
(Just doi)
(Just url)
......@@ -293,6 +294,7 @@ csvHal2doc (CsvHal title source
Nothing
Nothing
(Just title)
(Just inst)
(Just authors)
(Just source)
(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