com.groupdocs.metadata.core

Interfaces

Classes

Exceptions

com.groupdocs.metadata.core

Class EpubRootPackage

  • All Implemented Interfaces:
    IDublinCore, Iterable<MetadataProperty>


    public class EpubRootPackage
    extends RootMetadataPackage
    implements IDublinCore

    Represents the root package allowing working with metadata in an EPUB e-book.

    This code sample shows how to read EPUB format-specific metadata properties.

    try (Metadata metadata = new Metadata(Constants.InputEpub)) {
         EpubRootPackage root = metadata.getRootPackageGeneric();
         System.out.println(root.getEpubPackage().getVersion());
         System.out.println(root.getEpubPackage().getUniqueIdentifier());
         System.out.println(root.getEpubPackage().getImageCover() != null ? root.getEpubPackage().getImageCover().length : 0);
     }
     
    • Method Detail

      • getEpubPackage

        public final EpubPackage getEpubPackage()

        Gets the EPUB metadata package.

        Returns:
        The EPUB metadata package.
      • getDublinCorePackage

        public final DublinCorePackage getDublinCorePackage()

        Gets the Dublin Core metadata package extracted from the e-book.

        Specified by:
        getDublinCorePackage in interface IDublinCore
        Returns:
        The Dublin Core metadata package extracted from the e-book.