| Copyright | (c) CNRS 2017-Present |
|---|---|
| License | AGPL + CECILL v3 |
| Maintainer | team@gargantext.org |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Gargantext.Database.Admin.Types.Node
Contents
Description
Synopsis
- class ResourceId a where
- isPositive :: a -> Bool
- newtype UserId = UnsafeMkUserId {}
- type MasterUserId = UserId
- type NodeTypeId = Int
- type NodeName = Text
- type ContextName = Text
- type TSVector = Text
- type ContextTitle = Text
- type Node json = NodePoly NodeId (Maybe Hash) NodeTypeId UserId (Maybe ParentId) NodeName UTCTime json
- type Context json = ContextPoly NodeId (Maybe Hash) NodeTypeId UserId (Maybe ParentId) ContextTitle UTCTime json
- pgNodeId :: NodeId -> Column SqlInt4
- pgResourceId :: (a -> Int) -> a -> Column SqlInt4
- pgContextId :: ContextId -> Column SqlInt4
- newtype NodeId = UnsafeMkNodeId {}
- newtype ContextId = UnsafeMkContextId {
- _ContextId :: Int
- newtype NodeContextId = UnsafeMkNodeContextId {}
- unNodeId :: NodeId -> Int
- nodeId2ContextId :: NodeId -> ContextId
- contextId2NodeId :: ContextId -> NodeId
- type ParentId = NodeId
- type CorpusId = NodeId
- type CommunityId = NodeId
- type ListId = NodeId
- type DocumentId = NodeId
- type DocId = NodeId
- type RootId = NodeId
- type MasterCorpusId = CorpusId
- type UserCorpusId = CorpusId
- type GraphId = NodeId
- type PhyloId = NodeId
- type AnnuaireId = NodeId
- type ContactId = NodeId
- data Status = Status {
- status_failed :: !Int
- status_succeeded :: !Int
- status_remaining :: !Int
- data LanguageNodes = LanguageNodes {}
- data EventLevel
- data Event = Event {
- event_level :: !EventLevel
- event_message :: !Text
- event_date :: !UTCTime
- data Resource = Resource {
- resource_path :: !(Maybe Text)
- resource_scraper :: !(Maybe Text)
- resource_query :: !(Maybe Text)
- resource_events :: ![Event]
- resource_status :: !Status
- resource_date :: !UTCTime
- data NodeType
- allNodeTypes :: [NodeType]
- defaultName :: NodeType -> Text
- context2node :: Context a -> Node a
Documentation
class ResourceId a where #
A class generalising over resource identifiers in gargantext
Methods
isPositive :: a -> Bool #
Instances
| ResourceId NodeId # | |
Defined in Gargantext.Database.Admin.Types.Node Methods isPositive :: NodeId -> Bool # | |
| ResourceId UserId # | |
Defined in Gargantext.Database.Admin.Types.Node Methods isPositive :: UserId -> Bool # | |
A unique identifier for users within gargantext. Note that the UserId for users is
typically different from their NodeId, as the latter tracks the resources being created,
whereas this one tracks only users.
Constructors
| UnsafeMkUserId | |
Instances
type MasterUserId = UserId #
type NodeTypeId = Int #
type ContextName = Text #
type ContextTitle = Text #
type Node json = NodePoly NodeId (Maybe Hash) NodeTypeId UserId (Maybe ParentId) NodeName UTCTime json #
NodePoly indicates that Node has a Polymorphism Type
type Context json = ContextPoly NodeId (Maybe Hash) NodeTypeId UserId (Maybe ParentId) ContextTitle UTCTime json #
pgResourceId :: (a -> Int) -> a -> Column SqlInt4 #
pgContextId :: ContextId -> Column SqlInt4 #
A unique identifier for a node in the gargantext tree. Every time we create something in Gargantext (a user, a corpus, etc) we add a node to a tree, and each node has its unique identifier. Note how nodes might have also other identifiers, to better qualify them.
Constructors
| UnsafeMkNodeId | |
Instances
An identifier for a Context in gargantext.
Constructors
| UnsafeMkContextId | |
Fields
| |
Instances
newtype NodeContextId #
Constructors
| UnsafeMkNodeContextId | |
Fields | |
Instances
nodeId2ContextId :: NodeId -> ContextId #
contextId2NodeId :: ContextId -> NodeId #
type CommunityId = NodeId #
type DocumentId = NodeId #
type MasterCorpusId = CorpusId #
type UserCorpusId = CorpusId #
type AnnuaireId = NodeId #
Constructors
| Status | |
Fields
| |
Instances
| Arbitrary Status # | |
| FromJSON Status # | |
| ToJSON Status # | |
Defined in Gargantext.Database.Admin.Types.Node | |
| Generic Status # | |
| Show Status # | |
| ToSchema Status # | |
Defined in Gargantext.Database.Admin.Types.Node Methods declareNamedSchema :: Proxy Status -> Declare (Definitions Schema) NamedSchema # | |
| type Rep Status # | |
Defined in Gargantext.Database.Admin.Types.Node type Rep Status = D1 ('MetaData "Status" "Gargantext.Database.Admin.Types.Node" "gargantext-0.0.7.1.5.3-inplace" 'False) (C1 ('MetaCons "Status" 'PrefixI 'True) (S1 ('MetaSel ('Just "status_failed") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "status_succeeded") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "status_remaining") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)))) | |
data LanguageNodes #
Constructors
| LanguageNodes | |
Fields | |
Instances
data EventLevel #
Instances
Constructors
| Event | |
Fields
| |
Instances
| Arbitrary Event # | |
| FromJSON Event # | |
| ToJSON Event # | |
Defined in Gargantext.Database.Admin.Types.Node | |
| Generic Event # | |
| Show Event # | |
| ToSchema Event # | |
Defined in Gargantext.Database.Admin.Types.Node Methods declareNamedSchema :: Proxy Event -> Declare (Definitions Schema) NamedSchema # | |
| type Rep Event # | |
Defined in Gargantext.Database.Admin.Types.Node type Rep Event = D1 ('MetaData "Event" "Gargantext.Database.Admin.Types.Node" "gargantext-0.0.7.1.5.3-inplace" 'False) (C1 ('MetaCons "Event" 'PrefixI 'True) (S1 ('MetaSel ('Just "event_level") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EventLevel) :*: (S1 ('MetaSel ('Just "event_message") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "event_date") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UTCTime)))) | |
Constructors
| Resource | |
Fields
| |
Instances
Then a Node can be either a Folder or a Corpus or a Document
Constructors
Instances
allNodeTypes :: [NodeType] #
defaultName :: NodeType -> Text #
context2node :: Context a -> Node a #