PageRenderTime 13ms CodeModel.GetById 9ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/CBR/CBR.Core/Models/ePUB/Package.cs

#
C# | 55 lines | 53 code | 1 blank | 1 comment | 0 complexity | 1b0ccfdd33ebeb0d85620ad6ac1ef4f0 MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Text;
 5using System.IO;
 6
 7namespace CBR.Core.Models
 8{
 9    public class Package
10    {
11        public Package(string packFile)
12        {
13            //somethings like OEBPS/content.opf
14            RelativeFilePath = packFile.Replace("/", "\\" );
15
16            //extract OEBPS
17            PublicationFolder = Path.GetDirectoryName(RelativeFilePath);
18        }
19
20        /// <summary>
21        /// OEBPS folder contains opf, ncx and all items
22        /// </summary>
23        public string PublicationFolder { get; set; }
24
25        public string RelativeFilePath { get; set; }
26
27        //required metadata
28        public string Identifier { get; set; }
29        public string Title { get; set; }
30        public string Language { get; set; }
31
32        /// <summary>
33        /// additional metadata
34        /// </summary>
35        public List<Metadata> MetaDatas { get; set; }
36
37        /// <summary>
38        /// 
39        /// </summary>
40        public Spine Spine { get; set; }
41
42        /// <summary>
43        /// 
44        /// </summary>
45        public List<ManifestItem> ManifestItems { get; set; }
46
47        /// <summary>
48        /// 
49        /// </summary>
50        public TableOfContent Toc { get; set; }
51
52        public string CoverId { get; set; }
53
54    }
55}