Class EpubPackage
Parsed content of the OPF package of the EPUB book.
See https://www.w3.org/publishing/epub32/epub-packages.html#sec-package-doc and https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm for more information.
Inherited Members
Namespace: VersOne.Epub.Schema
Assembly: VersOne.Epub.dll
Syntax
public class EpubPackage
Constructors
View SourceEpubPackage(string?, EpubVersion, EpubMetadata, EpubManifest, EpubSpine, EpubGuide?, List<EpubCollection>?, string?, EpubTextDirection?, string?, string?)
Initializes a new instance of the EpubPackage class.
Declaration
public EpubPackage(string? uniqueIdentifier, EpubVersion epubVersion, EpubMetadata metadata, EpubManifest manifest, EpubSpine spine, EpubGuide? guide, List<EpubCollection>? collections = null, string? id = null, EpubTextDirection? textDirection = null, string? prefix = null, string? language = null)
Parameters
Type | Name | Description |
---|---|---|
string | uniqueIdentifier | The ID of the EpubMetadataIdentifier element that provides the preferred, or primary, identifier of the EPUB book
or |
EpubVersion | epubVersion | The version of EPUB specification to which this EPUB package conforms. |
EpubMetadata | metadata | The meta information for the EPUB book. |
EpubManifest | manifest | The EPUB manifest which provides an exhaustive list of content items that constitute the EPUB book. |
EpubSpine | spine | The EPUB spine which defines an ordered list of EpubSpineItemRef items that represent the default reading order of the EPUB book. |
EpubGuide | guide | The EPUB 2 guide which provides machine-processable navigation to the key structural components of the EPUB book or |
List<EpubCollection> | collections | A list of EpubCollection elements which define related groups of resources within the EPUB book. |
string | id | The ID of the OPF package or |
EpubTextDirection? | textDirection | The default text direction of the content of the EPUB book or |
string | prefix | The additional prefix mappings or |
string | language | The language of the content of the EPUB book or |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | The |
ArgumentNullException | The |
ArgumentNullException | The |
Properties
View SourceCollections
Gets a list of EpubCollection elements which define related groups of resources within the EPUB book.
See https://www.w3.org/publishing/epub32/epub-packages.html#elemdef-collection for more information.
Declaration
public List<EpubCollection> Collections { get; }
Property type: List<EpubCollection>
View SourceEpubVersion
Gets the version of EPUB specification to which this EPUB package conforms.
See https://www.w3.org/publishing/epub32/epub-packages.html#attrdef-package-version and https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section1.3.2 for more information.
Declaration
public EpubVersion EpubVersion { get; }
Property type: EpubVersion
View SourceGuide
Gets the EPUB 2 guide which provides machine-processable navigation to the key structural components of the EPUB book
or null
if the book doesn't have a EPUB 2 guide.
See https://www.w3.org/publishing/epub32/epub-packages.html#sec-opf2-guide and https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.6 for more information.
Declaration
public EpubGuide? Guide { get; }
Property type: EpubGuide
View SourceId
Gets the ID of the OPF package or null
if the package doesn't specify an ID.
See https://www.w3.org/publishing/epub32/epub-packages.html#attrdef-id for more information.
Declaration
public string? Id { get; }
Property type: string
View SourceLanguage
Gets the language of the content of the EPUB book or null
if the package doesn't specify the language.
See https://www.w3.org/publishing/epub32/epub-packages.html#attrdef-xml-lang for more information.
Declaration
public string? Language { get; }
Property type: string
View SourceManifest
Gets the EPUB manifest which provides an exhaustive list of content items that constitute the EPUB book.
See https://www.w3.org/publishing/epub32/epub-packages.html#sec-manifest-elem and https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.3 for more information.
Declaration
public EpubManifest Manifest { get; }
Property type: EpubManifest
View SourceMetadata
Gets the meta information for the EPUB book.
See https://www.w3.org/publishing/epub32/epub-packages.html#sec-pkg-metadata and https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.2 for more information.
Declaration
public EpubMetadata Metadata { get; }
Property type: EpubMetadata
View SourcePrefix
Gets the additional prefix mappings or null
if the package doesn't specify additional prefix mappings.
See https://www.w3.org/publishing/epub32/epub-packages.html#attrdef-package-prefix for more information.
Declaration
public string? Prefix { get; }
Property type: string
View SourceSpine
Gets the EPUB spine which defines an ordered list of EpubSpineItemRef items that represent the default reading order of the EPUB book.
See https://www.w3.org/publishing/epub32/epub-packages.html#sec-pkg-spine and https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.4 for more information.
Declaration
public EpubSpine Spine { get; }
Property type: EpubSpine
View SourceTextDirection
Gets the default text direction of the content of the EPUB book or null
if the package doesn't specify a text direction.
See https://www.w3.org/publishing/epub32/epub-packages.html#attrdef-dir for more information.
Declaration
public EpubTextDirection? TextDirection { get; }
Property type: EpubTextDirection?
View SourceUniqueIdentifier
Gets the ID of the EpubMetadataIdentifier element that provides the preferred, or primary, identifier of the EPUB book
or null
if the package doesn't specify the identifier of the book. This value is required for EPUB 3 books.
See https://www.w3.org/publishing/epub32/epub-packages.html#attrdef-package-unique-identifier for more information.
Declaration
public string? UniqueIdentifier { get; }
Property type: string
Methods
View SourceGetVersionString()
Gets the string representation of the EpubVersion property.
Declaration
public string GetVersionString()
Returns
Type | Description |
---|---|
string | String representation of the EpubVersion property. |