Class PackageDocumentWriter
java.lang.Object
nl.siegmann.epublib.epub.PackageDocumentBase
nl.siegmann.epublib.epub.PackageDocumentWriter
Writes the opf package document as defined by namespace http://www.idpf.org/2007/opf
-
Nested Class Summary
Nested classes/interfaces inherited from class PackageDocumentBase
PackageDocumentBase.DCAttributes, PackageDocumentBase.DCTags, PackageDocumentBase.OPFAttributes, PackageDocumentBase.OPFTags, PackageDocumentBase.OPFValues -
Field Summary
FieldsFields inherited from class PackageDocumentBase
BOOK_ID_ID, dateFormat, NAMESPACE_DUBLIN_CORE, NAMESPACE_OPF, PREFIX_DUBLIN_CORE, PREFIX_OPF -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidensureCoverPageGuideReferenceWritten(Guide guide, EpubWriter epubWriter, org.xmlpull.v1.XmlSerializer serializer) getAllResourcesSortById(Book book) static voidwrite(EpubWriter epubWriter, org.xmlpull.v1.XmlSerializer serializer, Book book) private static voidwriteGuide(Book book, EpubWriter epubWriter, org.xmlpull.v1.XmlSerializer serializer) private static voidwriteGuideReference(GuideReference reference, org.xmlpull.v1.XmlSerializer serializer) private static voidWrites a resources as an item elementprivate static voidwriteManifest(Book book, EpubWriter epubWriter, org.xmlpull.v1.XmlSerializer serializer) private static voidwriteSpine(Book book, EpubWriter epubWriter, org.xmlpull.v1.XmlSerializer serializer) Writes the package's spine.private static voidwriteSpineItems(Spine spine, org.xmlpull.v1.XmlSerializer serializer) List all spine references
-
Field Details
-
log
private static final org.slf4j.Logger log
-
-
Constructor Details
-
PackageDocumentWriter
public PackageDocumentWriter()
-
-
Method Details
-
write
public static void write(EpubWriter epubWriter, org.xmlpull.v1.XmlSerializer serializer, Book book) throws IOException - Throws:
IOException
-
writeSpine
private static void writeSpine(Book book, EpubWriter epubWriter, org.xmlpull.v1.XmlSerializer serializer) throws IllegalArgumentException, IllegalStateException, IOException Writes the package's spine.- Parameters:
book-epubWriter-serializer-- Throws:
IOExceptionIllegalStateExceptionIllegalArgumentExceptionXMLStreamException
-
writeManifest
private static void writeManifest(Book book, EpubWriter epubWriter, org.xmlpull.v1.XmlSerializer serializer) throws IllegalArgumentException, IllegalStateException, IOException -
getAllResourcesSortById
-
writeItem
private static void writeItem(Book book, Resource resource, org.xmlpull.v1.XmlSerializer serializer) throws IllegalArgumentException, IllegalStateException, IOException Writes a resources as an item element- Parameters:
resource-serializer-- Throws:
IOExceptionIllegalStateExceptionIllegalArgumentExceptionXMLStreamException
-
writeSpineItems
private static void writeSpineItems(Spine spine, org.xmlpull.v1.XmlSerializer serializer) throws IllegalArgumentException, IllegalStateException, IOException List all spine references -
writeGuide
private static void writeGuide(Book book, EpubWriter epubWriter, org.xmlpull.v1.XmlSerializer serializer) throws IllegalArgumentException, IllegalStateException, IOException -
ensureCoverPageGuideReferenceWritten
private static void ensureCoverPageGuideReferenceWritten(Guide guide, EpubWriter epubWriter, org.xmlpull.v1.XmlSerializer serializer) throws IllegalArgumentException, IllegalStateException, IOException -
writeGuideReference
private static void writeGuideReference(GuideReference reference, org.xmlpull.v1.XmlSerializer serializer) throws IllegalArgumentException, IllegalStateException, IOException
-