Constructor
(abstract) new QueryPayload()
Does basic initialization.
- Source:
Methods
getContentType() → {string}
- Source:
Returns:
content type which was populated in this payload.
- Type
- string
getParams() → {string}
Serializes all query parameters populated in the payload. Only parameters which are present will be returned.
Mandatory and dependent parameters are validated and errors are thrown if necessary.
- Source:
Returns:
a serialized payload which holds all available query parameters in this payload object.
- Type
- string
(abstract, protected) getSupportedContentTypes() → {Array.<string>}
Must be implemented in successors and should return a list with supported content types.
- Source:
Returns:
- Type
- Array.<string>
(protected) serialize(data) → {string}
Utility method which serializes a single level json object to properly encoded string that can be used in a request.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | object which holds request parameter key:value pairs. |
- Source:
Returns:
provided object serialized and encoded to string.
- Type
- string
setContentType(contentTypeopt) → {QueryPayload}
An optional parameter which is used for defining the request Content-Type.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
contentType |
string |
<optional> |
One of the supported content types for given operation. |
- Source:
Returns:
- Type
- QueryPayload
setInference(inferenceopt) → {QueryPayload}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
inference |
boolean |
<optional> |
Specifies whether inferred statements should be included in the query evaluation. |
- Source:
Returns:
- Type
- QueryPayload
setTimeout(timeoutopt) → {QueryPayload}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
timeout |
number |
<optional> |
Specifies a maximum query execution time, in whole seconds. |
- Source:
Returns:
- Type
- QueryPayload
(abstract, protected) validateParams() → {boolean}
Must be implemented in successors.
Validates payload for mandatory and invalid parameters.
- Source:
Returns:
true
if parameters are valid and
false
otherwise.
- Type
- boolean