If this UnresolvedContentLocation represents a range, it creates a new UnresolvedContentLocation by collapsing to its end position. If this UnresolvedContentLocation does not represent a range, the instance itself is returned.
If this UnresolvedContentLocation represents a range, it creates a new UnresolvedContentLocation by collapsing to its start position. If this UnresolvedContentLocation does not represent a range, the instance itself is returned.
Check if the passed location is contained inside this UnresolvedContentLocation.
Creates a new UnresolvedContentLocation representing the range from this location to otherLocation
Check if this UnresolvedContentLocation target exactly the same content as the passed location.
Fetch the content blocks that corresponds to the UnresolvedContentLocation.
Determines whether it should include the ContentBlock before or after the location if the UnresolvedContentLocation start or end, targets content in between two ContentBlocks.
Fetch a content resolver for the ResourceTarget.
Fetch all navigation item references inside this UnresolvedContentLocation.
Get the ResourceTarget used to create this instance
Get the reader documents this target points to.
The reader publication associated with this instance.
Check if this UnresolvedContentLocation intersects with another location.
Check if this UnresolvedContentLocation is strictly after the passed location. Returns false if the locations are intersecting.
Check if this UnresolvedContentLocation is strictly before the passed location. Returns false if the locations are intersecting.
Returns true if this location represents a range.
Further resolves the UnresolvedContentLocation into a ContentLocation allowing synchronous methods for several operations.
Return a serializable version of the Locator that was used to create this instance.
This is the same as calling getLocator().toJSON()
.
Generated using TypeDoc
Represents a location within a ReaderPublication and methods to extract information related to that location. An UnresolvedContentLocation can be a position in the publication content, or a range across publication content.
In contrast to ContentLocation, an UnresolvedContentLocation does only know the ReaderDocument of the location, but not its position within the ReaderDocument content. Therefore, the following methods are asynchronous in UnresolvedContentLocation:
If you only need to get the ReaderDocument for a Locator, ReaderPublication.fetchUnresolvedContentLocation() should be preferred as it is more performant than ReaderPublication.fetchContentLocation().
An UnresolvedContentLocation, can be converted into a ContentLocation by calling resolve().