Class ResourceRegistry
java.lang.Object
org.w3c.epubcheck.core.references.ResourceRegistry
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetIDPosition(String id, Resource resource) Returns the position of the given ID in the document represented by this resource.getMimeType(io.mola.galimatias.URL resource) getOPFItem(io.mola.galimatias.URL url) Returns anOptionalcontaining the Package Document item for the given Publication Resource path, orif no resource has been registered for the given path.invalid reference
Optional#absent()getResource(io.mola.galimatias.URL url) Returns anOptionalcontaining the Package Document item for the given Publication Resource path, orif no resource has been registered for the given path.invalid reference
Optional#absent()voidregisterID(String id, Reference.Type type, io.mola.galimatias.URL resourceURL) voidregisterResource(OPFItem item) voidregisterResource(io.mola.galimatias.URL url, String mimetype)
-
Field Details
-
resources
-
ids
-
idTypes
-
-
Constructor Details
-
ResourceRegistry
public ResourceRegistry()
-
-
Method Details
-
registerID
-
getIDPosition
Returns the position of the given ID in the document represented by this resource.- Parameters:
resource-- Returns:
-1if the ID wasn't found in the document, or0if the given ID isnullor an empty string, or the 1-based position of the ID otherwise.
-
getIDType
-
registerResource
-
registerResource
-
getMimeType
-
getOPFItem
-
getResource
-