Package com.adobe.epubcheck.opf
Class OPFItems
- java.lang.Object
-
- com.adobe.epubcheck.opf.OPFItems
-
public final class OPFItems extends java.lang.ObjectRepresents the set of Publication Resources in a Package Document (OPF).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OPFItemsbuild(java.util.Map<java.lang.String,OPFItem.Builder> itemBuilders, java.lang.Iterable<java.lang.String> spineIDs, ValidationContext context)Creates a consolidated set ofOPFItemfrom item builders and a list of spine item IDs.com.google.common.base.Optional<OPFItem>getItemById(java.lang.String id)Search the item with the given ID.com.google.common.base.Optional<OPFItem>getItemByURL(io.mola.galimatias.URL url)Search the item with the given path.java.util.List<OPFItem>getItems()Returns the list of items in this set, in document order.java.util.List<OPFItem>getSpineItems()Returns the list of items in the spine.
-
-
-
Constructor Detail
-
OPFItems
private OPFItems(java.lang.Iterable<OPFItem> items, java.lang.Iterable<java.lang.String> spineIDs)
-
-
Method Detail
-
getItemById
public com.google.common.base.Optional<OPFItem> getItemById(java.lang.String id)
Search the item with the given ID.- Parameters:
id- the ID of the item to search, can benull.- Returns:
- An
Optionalcontaining the item if found, orOptional.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 benull.- Returns:
- An
Optionalcontaining the item if found, orOptional.absent()if not found.
-
getSpineItems
public java.util.List<OPFItem> getSpineItems()
Returns the list of items in the spine. A singleOPFIteminstance can appear multiple times in the list.- Returns:
- the list of items in the spine.
-
getItems
public java.util.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(java.util.Map<java.lang.String,OPFItem.Builder> itemBuilders, java.lang.Iterable<java.lang.String> spineIDs, ValidationContext context)
Creates a consolidated set ofOPFItemfrom item builders and a list of spine item IDs.
-
-