epub-metadata-5.4: Library for parsing epub document metadata
Safe HaskellSafe-Inferred
LanguageHaskell2010

Codec.Epub.Data.Metadata

Description

Data types for working with the metadata of epub documents

This module defines the Metadata structure which contains most of the taxonomic information about the literary work. Metadata is probably the most important data structure in this library.

Both commonly-used versions of epub (2.x and 3.x) are supported by these types.

Synopsis

Documentation

data Creator Source #

package/metadata/dc:creator or package/metadata/dc:contributor tags

This structure is used for both contributor and creator as they are exactly the same.

Constructors

Creator 

Fields

Instances

Instances details
Show Creator Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

Eq Creator Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

Methods

(==) :: Creator -> Creator -> Bool #

(/=) :: Creator -> Creator -> Bool #

newtype DateValue Source #

EPUB 2.x: package/metadata/dc:date tag, opf:event attribute, text | EPUB 3.x: package/metadata/dc:date tag | package/metadata/meta property="dcterms:issued" | package/metadata/meta property="dcterms:modified" | package/metadata/meta property="dcterms:..."

Constructors

DateValue String 

Instances

Instances details
Show DateValue Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

Eq DateValue Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

data Description Source #

package/metadata/dc:description tag, xml:lang attribute, text

Constructors

Description (Maybe String) String 

Instances

Instances details
Show Description Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

Eq Description Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

data Identifier Source #

package/metadata/dc:identifier tag

Constructors

Identifier 

Fields

Instances

Instances details
Show Identifier Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

Eq Identifier Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

data Metadata Source #

package/metadata tag

This is perhaps the most useful data structure in this library. It contains most of the information tools will want to use to organize epub documents.

Constructors

Metadata 

Fields

Instances

Instances details
Show Metadata Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

Formattable Metadata Source # 
Instance details

Defined in Codec.Epub.Format

Eq Metadata Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

data Refinement Source #

Refinements represent meta tags within the metadata section that refine other tags. These are used during the parsing phase and are discarded as their information is slotted into the data they refine (CreatorS, TitleS, IdentifierS, etc..)

This is specific to epub3

Constructors

Refinement 

Fields

Instances

Instances details
Show Refinement Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

data Source Source #

package/metadata/dc:source tags

Instances

Instances details
Show Source Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

Eq Source Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

Methods

(==) :: Source -> Source -> Bool #

(/=) :: Source -> Source -> Bool #

data Title Source #

package/metadata/dc:title tag

Constructors

Title 

Fields

Instances

Instances details
Show Title Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

Methods

showsPrec :: Int -> Title -> ShowS #

show :: Title -> String #

showList :: [Title] -> ShowS #

Eq Title Source # 
Instance details

Defined in Codec.Epub.Data.Metadata

Methods

(==) :: Title -> Title -> Bool #

(/=) :: Title -> Title -> Bool #

emptyMetadata :: Metadata Source #

Note: This isn't valid as-is, some required values are empty lists!

refineCreator :: [Refinement] -> (String, Creator) -> Creator Source #

Used internally by Codec.Epub.Parse.Metadata to merge epub3 meta tag info into the data gathered from contributor and creator tags

refineIdentifier :: [Refinement] -> Identifier -> Identifier Source #

Used internally by Codec.Epub.Parse.Metadata to merge epub3 meta tag info into the data gathered from an identifier tag

refineSource :: [Refinement] -> (String, Source) -> Source Source #

Used internally by Codec.Epub.Parse.Metadata to merge epub3 meta tag info into the data gathered from contributor and creator tags

refineTitle :: [Refinement] -> (String, Title) -> Title Source #

Used internally by Codec.Epub.Parse.Metadata to merge epub3 meta tag info into the data gathered from a title tag