-
- All Implemented Interfaces:
public class Publication.Companion
-
-
Field Summary
Fields Modifier and Type Field Description public final static Publication.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final StringlocalBaseUrlOf(String filename, Integer port)Creates the base URL for a Publication locally served through HTTP, from the publication's filename and the HTTP server port. final StringlocalUrlOf(String filename, Integer port, String href)Gets the absolute URL of a resource locally served through HTTP. final PublicationfromJSON(JSONObject json, Function1<String, String> normalizeHref)-
-
Method Detail
-
localBaseUrlOf
final String localBaseUrlOf(String filename, Integer port)
Creates the base URL for a Publication locally served through HTTP, from the publication's filename and the HTTP server port.
Note: This is used for backward-compatibility, but ideally this should be handled by the Server, and set in the self Link. Unfortunately, the self Link is not available in the navigator at the moment without changing the code in reading apps.
-
localUrlOf
final String localUrlOf(String filename, Integer port, String href)
Gets the absolute URL of a resource locally served through HTTP.
-
fromJSON
final Publication fromJSON(JSONObject json, Function1<String, String> normalizeHref)
-
-
-
-