PageRenderTime 46ms CodeModel.GetById 20ms RepoModel.GetById 0ms 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
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.IO;
  6. namespace CBR.Core.Models
  7. {
  8. public class Package
  9. {
  10. public Package(string packFile)
  11. {
  12. //somethings like OEBPS/content.opf
  13. RelativeFilePath = packFile.Replace("/", "\\" );
  14. //extract OEBPS
  15. PublicationFolder = Path.GetDirectoryName(RelativeFilePath);
  16. }
  17. /// <summary>
  18. /// OEBPS folder contains opf, ncx and all items
  19. /// </summary>
  20. public string PublicationFolder { get; set; }
  21. public string RelativeFilePath { get; set; }
  22. //required metadata
  23. public string Identifier { get; set; }
  24. public string Title { get; set; }
  25. public string Language { get; set; }
  26. /// <summary>
  27. /// additional metadata
  28. /// </summary>
  29. public List<Metadata> MetaDatas { get; set; }
  30. /// <summary>
  31. ///
  32. /// </summary>
  33. public Spine Spine { get; set; }
  34. /// <summary>
  35. ///
  36. /// </summary>
  37. public List<ManifestItem> ManifestItems { get; set; }
  38. /// <summary>
  39. ///
  40. /// </summary>
  41. public TableOfContent Toc { get; set; }
  42. public string CoverId { get; set; }
  43. }
  44. }