1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
--------------------------------------------------------------------
-- |
-- Module : Text.Atom.Pub
-- Copyright : (c) Galois, Inc. 2008,
-- (c) Sigbjorn Finne 2009-
-- License : BSD3
--
-- Maintainer: Sigbjorn Finne <sof@forkIO.com>
-- Stability : provisional
-- Portability: portable
--
-- Types for the Atom Publishing Protocol (APP)
--
--------------------------------------------------------------------
module Text.Atom.Pub where
import Text.XML.Light.Types as XML
import Text.Atom.Feed ( TextContent, Category, URI )
data Service
= Service
{ serviceWorkspaces :: [Workspace]
, serviceOther :: [XML.Element]
}
data Workspace
= Workspace
{ workspaceTitle :: TextContent
, workspaceCols :: [Collection]
, workspaceOther :: [XML.Element]
}
data Collection
= Collection
{ collectionURI :: URI
, collectionTitle :: TextContent
, collectionAccept :: [Accept]
, collectionCats :: [Categories]
, collectionOther :: [XML.Element]
}
data Categories
= CategoriesExternal URI
| Categories (Maybe Bool) (Maybe URI) [Category]
deriving (Show)
newtype Accept = Accept { acceptType :: String }
|