Class: GetQueryPayload

GetQueryPayload()

Payload object holding common request parameters applicable for the query endpoint.

Mandatory parameters are: query, queryType and responseType. Validation on parameters is executed when QueryPayload.getParams() is invoked.

Content type parameter which is used for setting the Content-Type http header is optional and by default application/x-www-form-urlencoded type is set.

Constructor

new GetQueryPayload()

Does basic initialization.

Author:
  • Mihail Radkov
  • Svilen Velikov
Source:

Methods

addBinding(bindingopt, valueopt) → {GetQueryPayload}

Populates an optional $key:value binding in the payload. Existing bindings will be overridden.

Parameters:
Name Type Attributes Description
binding string <optional>

A variable binding name which may appear in the query and can be bound to a specific value provided outside of the actual query.

value string <optional>

A variable's binding value. See the binding comment

Source:
Throws:

if the binding or the value is not a string

Type
Error
Returns:
Type
GetQueryPayload

getQuery() → {string}

Source:
Returns:

a query which was populated in the payload.

Type
string

getQueryType() → {string}

Source:
Returns:

query type which was populated in this payload. The value is one of the QueryType enum values.

Type
string

getResponseType() → {string}

Source:
Returns:

response type which was populated in this payload.

Type
string

getSupportedContentTypes()

Source:

setDistinct(distinctopt) → {GetQueryPayload}

Parameters:
Name Type Attributes Description
distinct boolean <optional>

Specifies if only distinct query solutions should be returned.

Source:
Throws:

if the parameter is not a boolean

Type
Error
Returns:
Type
GetQueryPayload

setLimit(limit) → {GetQueryPayload}

Parameters:
Name Type Description
limit number

specifies the maximum number of query solutions to return.

Source:
Throws:

if the limit is not a non negative number

Type
Error
Returns:
Type
GetQueryPayload

setOffset(offsetopt) → {GetQueryPayload}

Parameters:
Name Type Attributes Description
offset number <optional>

Specifies the number of query solutions to skip.

Source:
Throws:

if the offset is not a non negative number

Type
Error
Returns:
Type
GetQueryPayload

setQuery(query) → {UpdateQueryPayload}

Parameters:
Name Type Description
query string

The query as string to be evaluated.

Source:
Throws:

if the query is not a string

Type
Error
Returns:
Type
UpdateQueryPayload

setQueryLn(queryLnopt) → {GetQueryPayload}

Parameters:
Name Type Attributes Description
queryLn string <optional>

the query language that is used for the query.

Source:
Throws:

if the query language is not one of QueryLanguage

Type
Error
Returns:
Type
GetQueryPayload

setQueryType(queryType) → {GetQueryPayload}

A mandatory parameter used for resolving request headers and resolving the response parsers.

Parameters:
Name Type Description
queryType QueryType
Source:
Throws:

if the query type is not one of QueryType

Type
Error
Returns:
Type
GetQueryPayload

setResponseType(responseType) → {GetQueryPayload}

A mandatory parameter which is used for resolving the Accept http header required by the RDF store.

Parameters:
Name Type Description
responseType string
Source:
Throws:

if the response type is not one of RDFMimeType

Type
Error
Returns:
Type
GetQueryPayload

validateParams()

Source:
Throws:

if the validation does not pass

Type
Error