Constructor
new OpenSearchParameter(type, name, value, required, replaceable, ns, minimum, maximum, pattern, title, minExclusive, maxExclusive, minInclusive, maxInclusive, step, options)
Constructs an OpenSearchParameter.
Parameters:
Name | Type | Description |
---|---|---|
type |
String | Internal parameter, indicates from where this parameter was generated (template or parameter extension). |
name |
String | The name of this parameter. |
value |
String | The value indicated by the template or parameter extension. |
required |
Boolean | Indicated if this param is required for searches. |
replaceable |
Boolean | Indicates if this param value should be replaced when making a search query. |
ns |
String | The namespace of this param's name. |
minimum |
Number | The minimum number of times this param should appear in a query. |
maximum |
Number | String | The maximum number of times this param should appear in a query. A value of '*' indicates no limit. |
pattern |
RegExp | A regexp pattern for the param's value. |
title |
String | Advisory information for the format and valid values of the parameter, such as would be appropriate for a tooltip or label. |
minExclusive |
Number | Indicates the minimum value for the element that cannot be reached. |
maxExclusive |
Number | Indicates the maximum value for the element that cannot be reached. |
minInclusive |
Number | Indicates the minimum value for the element that can be reached. |
maxInclusive |
Number | Indicates the maximum value for the element that can be reached. |
step |
Number | Indicates the granularity of the allowed values between the minimal and maximal range. |
options |
Array.<Object> | A list of objects that describes a value/label pair suggested to the client for the parent element. |
Members
(static) types
Internal constants for OpenSearchParameter.
Indicates from where the parameter was generated.
Methods
(static) fromNode(node) → {OpenSearchParameter}
Internal. Applications should not call this method.
Creates an OpenSearchParameter from a Parameter node.
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | The Parameter node. |
Returns:
The resulting OpenSearchParameter.
- Type
- OpenSearchParameter
(static) fromQuery(query) → {OpenSearchParameter}
Internal. Applications should not call this method.
Creates an OpenSearchParameter from a template query string.
Parameters:
Name | Type | Description |
---|---|---|
query |
'name={value?}' | The query string part from the URL template. |
Returns:
The resulting OpenSearchParameter.
- Type
- OpenSearchParameter
merge(param) → {OpenSearchParameter}
Internal. Applications should not call this method.
Merges this parameter with the specified parameter and returns a new OpenSearchParameter object.
This is done for parameters that appear in the template and the Parameter node.
Parameters:
Name | Type | Description |
---|---|---|
param |
OpenSearchParameter | The parameter to merge from. |
Returns:
The merged parameter.
- Type
- OpenSearchParameter