Package nl.siegmann.epublib.epub
Class NCXDocument
java.lang.Object
nl.siegmann.epublib.epub.NCXDocument
Writes the ncx document as defined by namespace http://www.daisy.org/z3986/2005/ncx/
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interfaceprivate static interfaceprivate static interface -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourcecreateNCXResource(List<Identifier> identifiers, String title, List<Author> authors, TableOfContents tableOfContents) static ResourcecreateNCXResource(Book book) static Resourceread(Book book, EpubReader epubReader) private static StringreadNavLabel(Element navpointElement) private static StringreadNavReference(Element navpointElement) (package private) static TOCReferencereadTOCReference(Element navpointElement, Book book) private static List<TOCReference> readTOCReferences(NodeList navpoints, Book book) static voidwrite(EpubWriter epubWriter, Book book, ZipOutputStream resultStream) static voidwrite(org.xmlpull.v1.XmlSerializer serializer, List<Identifier> identifiers, String title, List<Author> authors, TableOfContents tableOfContents) static voidGenerates a resource containing an xml document containing the table of contents of the book in ncx format.private static voidwriteMetaElement(String dtbName, String content, org.xmlpull.v1.XmlSerializer serializer) private static voidwriteNavPointEnd(TOCReference tocReference, org.xmlpull.v1.XmlSerializer serializer) private static intwriteNavPoints(List<TOCReference> tocReferences, int playOrder, org.xmlpull.v1.XmlSerializer serializer) private static voidwriteNavPointStart(TOCReference tocReference, int playOrder, org.xmlpull.v1.XmlSerializer serializer)
-
Field Details
-
NAMESPACE_NCX
- See Also:
-
PREFIX_NCX
- See Also:
-
NCX_ITEM_ID
- See Also:
-
DEFAULT_NCX_HREF
- See Also:
-
PREFIX_DTB
- See Also:
-
log
private static final org.slf4j.Logger log
-
-
Constructor Details
-
NCXDocument
public NCXDocument()
-
-
Method Details
-
read
-
readTOCReferences
-
readTOCReference
-
write
public static void write(EpubWriter epubWriter, Book book, ZipOutputStream resultStream) throws IOException - Throws:
IOException
-
write
public static void write(org.xmlpull.v1.XmlSerializer xmlSerializer, Book book) throws IllegalArgumentException, IllegalStateException, IOException Generates a resource containing an xml document containing the table of contents of the book in ncx format.- Parameters:
xmlSerializer- the serializer usedbook- the book to serialize- Throws:
FactoryConfigurationErrorIOExceptionIllegalStateExceptionIllegalArgumentException
-
createNCXResource
public static Resource createNCXResource(Book book) throws IllegalArgumentException, IllegalStateException, IOException -
createNCXResource
public static Resource createNCXResource(List<Identifier> identifiers, String title, List<Author> authors, TableOfContents tableOfContents) throws IllegalArgumentException, IllegalStateException, IOException -
write
public static void write(org.xmlpull.v1.XmlSerializer serializer, List<Identifier> identifiers, String title, List<Author> authors, TableOfContents tableOfContents) throws IllegalArgumentException, IllegalStateException, IOException -
writeMetaElement
private static void writeMetaElement(String dtbName, String content, org.xmlpull.v1.XmlSerializer serializer) throws IllegalArgumentException, IllegalStateException, IOException
-