-
- All Implemented Interfaces:
-
android.os.Parcelable,org.readium.r2.shared.JSONable
public final class Manifest implements JSONable, Parcelable
Holds the metadata of a Readium publication, as described in the Readium Web Publication Manifest.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classManifest.Companion
-
Field Summary
Fields Modifier and Type Field Description private final List<String>contextprivate final Metadatametadataprivate List<Link>linksprivate final List<Link>readingOrderprivate final List<Link>resourcesprivate final List<Link>tableOfContentsprivate final Map<String, List<PublicationCollection>>subcollections
-
Method Summary
Modifier and Type Method Description final List<String>getContext()final MetadatagetMetadata()final List<Link>getLinks()final UnitsetLinks(List<Link> links)final List<Link>getReadingOrder()final List<Link>getResources()final List<Link>getTableOfContents()final Map<String, List<PublicationCollection>>getSubcollections()final BooleanconformsTo(Publication.Profile profile)Returns whether this manifest conforms to the given Readium Web Publication Profile. final LinklinkWithHref(String href)Finds the first Link with the given HREF in the manifest's links. final LinklinkWithRel(String rel)Finds the first Link with the given relation in the manifest's links. final List<Link>linksWithRel(String rel)Finds all Links having the given rel in the manifest's links. final LocatorlocatorFromLink(Link link)Creates a new Locator object from a Link to a resource of this manifest. JSONObjecttoJSON()Serializes a Publication to its RWPM JSON representation. StringtoString()Returns the RWPM JSON representation for this manifest, as a string. -
-
Method Detail
-
getContext
final List<String> getContext()
-
getMetadata
final Metadata getMetadata()
-
getReadingOrder
final List<Link> getReadingOrder()
-
getResources
final List<Link> getResources()
-
getTableOfContents
final List<Link> getTableOfContents()
-
getSubcollections
final Map<String, List<PublicationCollection>> getSubcollections()
-
conformsTo
final Boolean conformsTo(Publication.Profile profile)
Returns whether this manifest conforms to the given Readium Web Publication Profile.
-
linkWithHref
final Link linkWithHref(String href)
Finds the first Link with the given HREF in the manifest's links.
Searches through (in order) readingOrder, resources and links recursively following alternate and children links.
If there's no match, tries again after removing any query parameter and anchor from the given href.
-
linkWithRel
final Link linkWithRel(String rel)
Finds the first Link with the given relation in the manifest's links.
-
linksWithRel
final List<Link> linksWithRel(String rel)
-
locatorFromLink
final Locator locatorFromLink(Link link)
-
toJSON
JSONObject toJSON()
Serializes a Publication to its RWPM JSON representation.
-
-
-
-