File size: 6,298 Bytes
fab29d7 |
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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
using System;
namespace VersOne.Epub.Schema
{
/// <summary>
/// <para>A generic metadata item of the EPUB book.</para>
/// <para>
/// See <see href="https://www.w3.org/TR/epub-33/#sec-meta-elem" />,
/// <see href="https://www.w3.org/TR/epub-33/#sec-opf2-meta" />,
/// and <see href="https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.2" /> for more information.
/// </para>
/// </summary>
public class EpubMetadataMeta
{
/// <summary>
/// Initializes a new instance of the <see cref="EpubMetadataMeta" /> class.
/// </summary>
/// <param name="name">The name of the EPUB 2 generic metadata item or <c>null</c> for EPUB 3 generic metadata item.</param>
/// <param name="content">The content (i.e. value) of the EPUB 2 generic metadata item or the metadata expression of the EPUB 3 generic metadata item.</param>
/// <param name="id">The unique ID of this EPUB 3 generic metadata item or <c>null</c> if the generic metadata item doesn't have an ID.</param>
/// <param name="refines">
/// A relative IRI that identifies the resource augmented by the EPUB 3 generic metadata item
/// or <c>null</c> if the generic metadata item doesn't specify any augmentation.
/// </param>
/// <param name="property">
/// The property data type value that defines the statement being made in the expression (see <see cref="Content" />) of the EPUB 3 generic metadata item
/// or <c>null</c> for EPUB 2 generic metadata item.
/// </param>
/// <param name="scheme">
/// The system or scheme that the expression (see <see cref="Content" />) of the EPUB 3 generic metadata item is drawn from
/// or <c>null</c> if the generic metadata item doesn't specify a scheme for the expression.
/// </param>
/// <param name="textDirection">The text direction of this EPUB 3 generic metadata item or <c>null</c> if the generic metadata item doesn't specify a text direction.</param>
/// <param name="language">The language of this EPUB 3 generic metadata item or <c>null</c> if the generic metadata item doesn't specify the language.</param>
/// <exception cref="ArgumentNullException">The <paramref name="content" /> parameter is <c>null</c>.</exception>
public EpubMetadataMeta(string? name, string content, string? id = null, string? refines = null, string? property = null, string? scheme = null,
EpubTextDirection? textDirection = null, string? language = null)
{
Name = name;
Content = content ?? throw new ArgumentNullException(nameof(content));
Id = id;
Refines = refines;
Property = property;
Scheme = scheme;
TextDirection = textDirection;
Language = language;
}
/// <summary>
/// <para>Gets the name of the EPUB 2 generic metadata item or <c>null</c> for EPUB 3 generic metadata item.</para>
/// <para>See <see href="https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.2" /> for more information.</para>
/// </summary>
public string? Name { get; }
/// <summary>
/// <para>Gets the content (i.e. value) of the EPUB 2 generic metadata item or the metadata expression of the EPUB 3 generic metadata item.</para>
/// <para>
/// See <see href="https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.2" />
/// and <see href="https://www.w3.org/TR/epub-33/#sec-meta-elem" /> for more information.
/// </para>
/// </summary>
public string Content { get; }
/// <summary>
/// <para>Gets the unique ID of this EPUB 3 generic metadata item or <c>null</c> if the generic metadata item doesn't have an ID.</para>
/// <para>See <see href="https://www.w3.org/TR/epub-33/#attrdef-id" /> for more information.</para>
/// </summary>
public string? Id { get; }
/// <summary>
/// <para>
/// Gets a relative IRI that identifies the resource augmented by the EPUB 3 generic metadata item
/// or <c>null</c> if the generic metadata item doesn't specify any augmentation.</para>
/// <para>
/// See <see href="https://www.w3.org/TR/epub-33/#attrdef-refines" /> for more information.
/// </para>
/// </summary>
public string? Refines { get; }
/// <summary>
/// <para>
/// Gets the property data type value that defines the statement being made in the expression (see <see cref="Content" />) of the EPUB 3 generic metadata item
/// or <c>null</c> for EPUB 2 generic metadata item.
/// </para>
/// <para>
/// See <see href="https://idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.2" />
/// and <see href="https://www.w3.org/TR/epub-33/#sec-meta-elem" /> for more information.
/// </para>
/// </summary>
public string? Property { get; }
/// <summary>
/// <para>
/// Gets the system or scheme that the expression (see <see cref="Content" />) of the EPUB 3 generic metadata item is drawn from
/// or <c>null</c> if the generic metadata item doesn't specify a scheme for the expression.
/// </para>
/// <para>
/// See <see href="https://www.w3.org/TR/epub-33/#attrdef-scheme" /> for more information.
/// </para>
/// </summary>
public string? Scheme { get; }
/// <summary>
/// <para>Gets the text direction of this EPUB 3 generic metadata item or <c>null</c> if the generic metadata item doesn't specify a text direction.</para>
/// <para>See <see href="https://www.w3.org/TR/epub-33/#attrdef-dir" /> for more information.</para>
/// </summary>
public EpubTextDirection? TextDirection { get; }
/// <summary>
/// <para>Gets the language of this EPUB 3 generic metadata item or <c>null</c> if the generic metadata item doesn't specify the language.</para>
/// <para>See <see href="https://www.w3.org/TR/epub-33/#attrdef-xml-lang" /> for more information.</para>
/// </summary>
public string? Language { get; }
}
}
|