Copyright | (c) CNRS 2017-Present |
---|---|
License | AGPL + CECILL v3 |
Maintainer | team@gargantext.org |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
isPositive :: a -> Bool #
Instances
ResourceId NodeId # | |
Defined in Gargantext.Database.Admin.Types.Node isPositive :: NodeId -> Bool # | |
ResourceId UserId # | |
Defined in Gargantext.Database.Admin.Types.Node 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.
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.
Instances
An identifier for a Context
in gargantext.
Instances
newtype NodeContextId #
Instances
nodeId2ContextId :: NodeId -> ContextId #
contextId2NodeId :: ContextId -> NodeId #
type CommunityId = NodeId #
type DocumentId = NodeId #
type MasterCorpusId = CorpusId #
type UserCorpusId = CorpusId #
type AnnuaireId = NodeId #
Status | |
|
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 | |
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 #
Instances
data EventLevel #
Instances
Event | |
|
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 | |
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)))) |
Resource | |
|
Instances
Then a Node can be either a Folder or a Corpus or a Document
Instances
allNodeTypes :: [NodeType] #
defaultName :: NodeType -> Text #
context2node :: Context a -> Node a #
Orphan instances
DefaultFromField SqlText (Maybe Hash) # | |
DefaultFromField SqlTSVector (Maybe TSVector) # | |
DefaultFromField (Nullable SqlTimestamptz) UTCTime # | |
(Arbitrary nodeId, Arbitrary hashId, Arbitrary toDBid, Arbitrary userId, Arbitrary nodeParentId, Arbitrary hyperdata) => Arbitrary (NodePoly nodeId hashId toDBid userId nodeParentId NodeName UTCTime hyperdata) # | |
(Arbitrary hyperdata, Arbitrary nodeId, Arbitrary toDBid, Arbitrary userId, Arbitrary nodeParentId) => Arbitrary (NodePolySearch nodeId toDBid userId nodeParentId NodeName UTCTime hyperdata (Maybe TSVector)) # | |
arbitrary :: Gen (NodePolySearch nodeId toDBid userId nodeParentId NodeName UTCTime hyperdata (Maybe TSVector)) # shrink :: NodePolySearch nodeId toDBid userId nodeParentId NodeName UTCTime hyperdata (Maybe TSVector) -> [NodePolySearch nodeId toDBid userId nodeParentId NodeName UTCTime hyperdata (Maybe TSVector)] # |