The GEOSS Discovery And Access Broker APIs
Authors: Fabrizio Papeschi, Mattia Santoro, Stefano Nativi
API version: 1.4.3-beta

Paginator

Module: Retrieval
Parent Module: ResultSet

Objects of this class can be used to retrieve the nodes of the related result set

Item Index

Methods

first

(
  • onResponse
  • [execute]
)
Boolean async

Tests if the current page is not the first of the Paginator/resultSet:method. If execute is true and the test is positive, retrieves the first page from the Paginator/resultSet:method. An Exception is thrown if the last call to one of the methods next, prev,skip or last is still running

Parameters:

  • onResponse Function

    Callback function for receiving asynchronous query response

  • [execute] Boolean optional

    If omitted or false, the method only executes the test. If true and the test is positive, retrieves the first page from the Paginator/resultSet:method

Returns:

Boolean:

true if the current page is not the first of the Paginator/resultSet:method, false otherwise

last

(
  • onResponse
  • [execute]
)
Boolean async

Tests if the current page is not the last of the Paginator/resultSet:method. If execute is true and the test is positive, retrieves the last page from the Paginator/resultSet:method. An Exception is thrown if the last call to one of the methods next, prev,skip or first is still running

Parameters:

  • onResponse Function

    Callback function for receiving asynchronous query response

  • [execute] Boolean optional

    If omitted or false, the method only executes the test. If true and the test is positive, retrieves the last page from the Paginator/resultSet:method

Returns:

Boolean:

true if the current page is not the last of the Paginator/resultSet:method, false otherwise

next

(
  • onResponse
  • [execute]
)
Boolean async

Tests if subsequent pages in the Paginator/resultSet:method are available. If execute is true and the test is positive, retrieves the next page from the Paginator/resultSet:method. An Exception is thrown if the last call to one of the methods prev, first, skip or last is still running

Parameters:

  • onResponse Function

    Callback function for receiving asynchronous query response

  • [execute] Boolean optional

    If omitted or false, the method only executes the test. If true and the test is positive, retrieves the next page from the Paginator/resultSet:method

Returns:

Boolean:

true if subsequent pages are available, false otherwise

page

() Page

Retrieves the current Paginator/resultSet:method page

Returns:

Page:

The current Paginator/resultSet:method page

prev

(
  • onResponse
  • [execute]
)
Boolean async

Tests if previous pages in the Paginator/resultSet:method are available. If execute is true and the test is positive, retrieves the previous page from the Paginator/resultSet:method. An Exception is thrown if the last call to one of the methods next,skip first,skip or last is still running

Parameters:

  • onResponse Function

    Callback function for receiving asynchronous query response

  • [execute] Boolean optional

    If omitted or false, the method only executes the test. If true and the test is positive, retrieves the previous page from the Paginator/resultSet:method

Returns:

Boolean:

true if previous pages are available, false otherwise

skip

(
  • onResponse
  • newPageIndex
  • [execute]
)
Boolean async

Tests if newPageIndex satisfies the following statement:
newPageIndex != currentPageIndex && newPageIndex >= 1 && newPageIndex <= pageCount. If execute is true and the test is positive, retrieves the newPageIndex-th page from the Paginator/resultSet:method. An Exception is thrown if the last call to one of the methods next, prev, last or first is still running

Parameters:

  • onResponse Function

    Callback function for receiving asynchronous query response

  • newPageIndex Integer

    The index in the Paginator/resultSet:method of the page to retrieve

  • [execute] Boolean optional

    If omitted or false, the method only executes the test. If true and the test is positive, retrieves the newPageIndex-th page from the Paginator/resultSet:method

Returns:

Boolean:

true if newPageIndex satisfies the following statement:
newPageIndex != currentPageIndex && newPageIndex >= 1 && newPageIndex <= pageCount, false otherwise