new $k.CollectionView()
A view built with/by view configuration for a collection of elements, such as a Query or a Table
Extends
Methods
static$k.CollectionView.fromTableConfig(tableConfiguration) : $k.TableConfiguration
Name | Type | Description |
---|---|---|
tableConfiguration |
$k.TableConfiguration |
A table configuration |
- Version:
- Experimental feature, might be removed at any time
- Since:
- 5.2.1
Returns:
Type | Description |
---|---|
$k.TableConfiguration |
elements() : Array.<Element>
Get an array of semantic elements. Use this e.g. for a table result.
- Since:
- 5.2.1
Returns:
Type | Description |
---|---|
Array.<Element> |
hit(element) : $k.SemanticElement
Get the corrresponding hit for the given element if this view holds a collection of hits.
Name | Type | Description |
---|---|---|
element |
$k.SemanticElement |
The element for which a hit shall be found. |
- Since:
- 5.3.0
Returns:
Type | Description |
---|---|
$k.SemanticElement |
hits() : Array.<Element>
Get an array hits. Use this e.g. for a table result.
- Since:
- 5.2.1
Returns:
Type | Description |
---|---|
Array.<Element> |
parameters() : Array.<$k.QueryParameterValue>
Returns the parameters in use
- Since:
- 5.4.0
Returns:
Type | Description |
---|---|
Array.<$k.QueryParameterValue> |
query() : query
Returns the query in use
- Since:
- 5.4.0
Returns:
Type | Description |
---|---|
query |
resultSize() : number
The number of elements (semantic elements or hits) in this query
- Since:
- 5.2.1
Returns:
Type | Description |
---|---|
number |
selectedElements() : Array.<Element>
Get an array of semantic elements that are currently marked as selected.
- Version:
- Experimental feature, might be removed at any time
- Since:
- 5.4.0
Returns:
Type | Description |
---|---|
Array.<Element> |
setElements(elements)
Set an array of semantic elements. Use this e.g. for a table result.
Name | Type | Description |
---|---|---|
elements |
Array.<Element> |
semantic elements |
- Version:
- Experimental feature, might be removed at any time
- Since:
- 5.3.0
toggleSelectedElement(element) : $k.SemanticElement
Include the element in the collection of selected elements if it was not yet in there. Remove it otherwise.
Name | Type | Description |
---|---|---|
element |
$k.SemanticElement |
The element to be toggled. |
- Version:
- Experimental feature, might be removed at any time
- Since:
- 5.4.0
Returns:
Type | Description |
---|---|
$k.SemanticElement |
toggleSingleSelectedElement(element) : $k.SemanticElement
Include the element in the collection of selected elements if it was not yet in there. Remove it otherwise. Make sure that no other element is selected.
Name | Type | Description |
---|---|---|
element |
$k.SemanticElement |
The element to be toggled. |
- Version:
- Experimental feature, might be removed at any time
- Since:
- 5.4.0
Returns:
Type | Description |
---|---|
$k.SemanticElement |