module Codec.Epub.Opf.Metadata
( OPFPackage (..)
, EMTitle (..)
, EMCreator (..)
, EMDate (..)
, EMId (..)
, EpubMeta (..)
, emptyEpubMeta
)
where
data OPFPackage = OPFPackage
{ opVersion :: String
, opUniqueId :: String
, opMeta :: EpubMeta
}
deriving (Eq, Show)
data EMTitle = EMTitle (Maybe String) String
deriving (Eq, Show)
data EMCreator = EMCreator (Maybe String) (Maybe String) String
deriving (Eq, Show)
data EMDate = EMDate (Maybe String) String
deriving (Eq, Show)
data EMId = EMId String (Maybe String) String
deriving (Eq, Show)
data EpubMeta = EpubMeta
{ emTitles :: [EMTitle]
, emCreators :: [EMCreator]
, emContributors :: [EMCreator]
, emSubjects :: [String]
, emDescription :: Maybe String
, emPublisher :: Maybe String
, emDates :: [EMDate]
, emType :: Maybe String
, emFormat :: Maybe String
, emIds :: [EMId]
, emSource :: Maybe String
, emLangs :: [String]
, emRelation :: Maybe String
, emCoverage :: Maybe String
, emRights :: Maybe String
}
deriving (Eq, Show)
emptyEpubMeta :: EpubMeta
emptyEpubMeta = EpubMeta
{ emTitles = []
, emCreators = []
, emContributors = []
, emSubjects = []
, emDescription = Nothing
, emPublisher = Nothing
, emDates = []
, emType = Nothing
, emFormat = Nothing
, emIds = []
, emSource = Nothing
, emLangs = []
, emRelation = Nothing
, emCoverage = Nothing
, emRights = Nothing
}