Commit 824d5aba authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[ihaskell] some development towards codebook integration

parent 1bad1c4e
Pipeline #2748 failed with stage
in 89 minutes and 59 seconds
cabal-version: 0.0.5.8.6
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.34.4.
--
-- see: https://github.com/sol/hpack
name: gargantext
version: 0.0.5.8.6
version: 0.0.5.8.6
synopsis: Search, map, share
description: Please see README.md
category: Data
......@@ -248,6 +248,7 @@ library
Gargantext.Database.Admin.Trigger.Contexts
Gargantext.Database.Admin.Trigger.NodesContexts
Gargantext.Database.Admin.Types.Hyperdata.Any
Gargantext.Database.Admin.Types.Hyperdata.Codebook
Gargantext.Database.Admin.Types.Hyperdata.Contact
Gargantext.Database.Admin.Types.Hyperdata.Corpus
Gargantext.Database.Admin.Types.Hyperdata.CorpusField
......@@ -398,6 +399,7 @@ library
, http-media
, http-types
, hxt
, ihaskell
, ini
, insert-ordered-containers
, jose
......
......@@ -9,6 +9,7 @@ rec {
];
nonhsBuildInputs = with pkgs; [
bzip2
czmq
docker-compose
git
gmp
......
......@@ -187,6 +187,7 @@ library:
- http-media
- http-types
- hxt
- ihaskell
- ini
- insert-ordered-containers
- jose
......
......@@ -66,6 +66,8 @@ nodeTypeId n =
NodeListCooc -> 50
NodeModel -> 52
NodeCodebook -> 6
---- Scores
-- NodeOccurrences -> 10
NodeGraph -> 9
......
......@@ -14,6 +14,7 @@ Portability : POSIX
module Gargantext.Database.Admin.Types.Hyperdata
( module Gargantext.Database.Admin.Types.Hyperdata.Any
, module Gargantext.Database.Admin.Types.Hyperdata.Contact
, module Gargantext.Database.Admin.Types.Hyperdata.Codebook
, module Gargantext.Database.Admin.Types.Hyperdata.Corpus
, module Gargantext.Database.Admin.Types.Hyperdata.Dashboard
, module Gargantext.Database.Admin.Types.Hyperdata.Document
......@@ -32,6 +33,7 @@ module Gargantext.Database.Admin.Types.Hyperdata
import Gargantext.Database.Admin.Types.Hyperdata.Any
import Gargantext.Database.Admin.Types.Hyperdata.Contact
import Gargantext.Database.Admin.Types.Hyperdata.Codebook
import Gargantext.Database.Admin.Types.Hyperdata.Corpus
import Gargantext.Database.Admin.Types.Hyperdata.Dashboard
import Gargantext.Database.Admin.Types.Hyperdata.Document
......
{-# LANGUAGE TemplateHaskell #-}
module Gargantext.Database.Admin.Types.Hyperdata.Codebook where
import Gargantext.Database.Admin.Types.Hyperdata.Prelude
data HyperdataCodebook =
HyperdataCodebook { _hco_name :: !Text }
defaultHyperdataCodebook :: HyperdataCodebook
defaultHyperdataCodebook = HyperdataCodebook ""
$(deriveJSON (unPrefix "_hco_") ''HyperdataCodebook)
......@@ -57,6 +57,8 @@ data DefaultHyperdata =
| DefaultFile HyperdataFile
| DefaultCodebook HyperdataCodebook
instance Hyperdata DefaultHyperdata
instance ToJSON DefaultHyperdata where
......@@ -90,6 +92,8 @@ instance ToJSON DefaultHyperdata where
toJSON (DefaultFile x) = toJSON x
toJSON (DefaultCodebook x) = toJSON x
defaultHyperdata :: NodeType -> DefaultHyperdata
defaultHyperdata NodeUser = DefaultUser defaultHyperdataUser
......@@ -121,3 +125,5 @@ defaultHyperdata NodeFrameVisio = DefaultFrameVisio defaultHyperdataFrame
defaultHyperdata NodeFrameNotebook = DefaultFrameCalc defaultHyperdataFrame
defaultHyperdata NodeFile = DefaultFile defaultHyperdataFile
defaultHyperdata NodeCodebook = DefaultCodebook defaultHyperdataCodebook
......@@ -9,13 +9,6 @@ Portability : POSIX
-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
module Gargantext.Database.Admin.Types.Hyperdata.Frame
......
......@@ -353,6 +353,7 @@ data NodeType = NodeUser
-- Optional Nodes
| NodeFrameWrite | NodeFrameCalc | NodeFrameVisio | NodeFrameNotebook
| NodeFile
| NodeCodebook
deriving (Show, Read, Eq, Generic, Bounded, Enum)
......@@ -393,6 +394,8 @@ defaultName NodeFrameNotebook = "Code"
defaultName NodeFile = "File"
defaultName NodeCodebook = "Codebook"
instance FromJSON NodeType
instance ToJSON NodeType
......
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