Class OPFItems

java.lang.Object
com.adobe.epubcheck.opf.OPFItems

public final class OPFItems extends Object
Represents the set of Publication Resources in a Package Document (OPF).
  • Field Details

  • Constructor Details

  • Method Details

    • getItemById

      public com.google.common.base.Optional<OPFItem> getItemById(String id)
      Search the item with the given ID.
      Parameters:
      id - the ID of the item to search, can be null.
      Returns:
      An Optional containing the item if found, or Optional.absent() if not found.
    • getItemByURL

      public com.google.common.base.Optional<OPFItem> getItemByURL(io.mola.galimatias.URL url)
      Search the item with the given path.
      Parameters:
      id - the URL of the item to search, can be null.
      Returns:
      An Optional containing the item if found, or Optional.absent() if not found.
    • getSpineItems

      public List<OPFItem> getSpineItems()
      Returns the list of items in the spine. A single OPFItem instance can appear multiple times in the list.
      Returns:
      the list of items in the spine.
    • getItems

      public List<OPFItem> getItems()
      Returns the list of items in this set, in document order.
      Returns:
      the list of items in this set.
    • build

      public static OPFItems build(Map<String, OPFItem.Builder> itemBuilders, Iterable<String> spineIDs, ValidationContext context)
      Creates a consolidated set of OPFItem from item builders and a list of spine item IDs.
      Parameters:
      itemBuilders - the builders of the OPFItem in the set.
      spineIDs - the IDs of the items in the spine.
      context -
      Returns:
      a consolidated set of OPFItems.