Module: queryForm
Children
Description
Extend the functionality of the pure html query panel.
Function: initFreeSearch
Initialize the free search to generate search queries which search only within one of several options of roles or entity names.
E.g. when options is “Person, Experiment, Sample” the user can select one of these options before submitting the query. When the user types in something that doesn’t looks like a CQL-query, a query is generated instead which goes like: FIND Persion WHICH HAS A PROPERTY LIKE “something”.
Note: This feature is disabled by default. Enable it by specifying the build variable BUILD_FREE_SEARCH_ROLE_NAME_FACET_OPTIONS as a comma-separated list of properly quoted expressions, e.g. “FILE ‘numpy array’, ‘Plant Experiemnt’, ‘quotes_not_necessary’”. Otherwise, the server will throw a syntax error.
- initFreeSearch(form, options)
- Arguments:
form (
HTMLElement()
) – the form which will be initialized for the free search.options (
string()
) – comma-separated list of options.
- Return boolean:
true if the initialization was successful, false
otherwise.
Function: restoreLastQuery
- restoreLastQuery()
Function: redirect
- redirect(query, paging)
- Arguments:
query (
string()
) – the query string.paging (
string()
) – the paging string, e.g. 0L10.
Function: getRoleNameFacet
Read out the selector for the role/name facet of the query. Return “RECORD” if the selector is disabled.
- getRoleNameFacet()
Function: splitSearchTerms
Split a query string into single terms.
Terms are separated by white spaces. Terms which contain white spaces which are to be preserved must be enclosed in ” or ‘ quotes. The enclosing quotation marks are being stripped. Currently no support for escape sequences for quotation marks.
- splitSearchTerms(query)
- Arguments:
query (
string()
) – complete query string.
- Return Array.<string>:
array of the search terms.
Function: isSelectQuery
Is the query a SELECT field,… FROM entity query?
- isSelectQuery(query)
- Arguments:
query, (
HTMLElement()
) – the query to be tested.
- Return Boolean:
Is the query a SELECT field,… FROM entity query?
Function: bindOnClick
- bindOnClick()
Function: getRoleNameFacetSelect
- getRoleNameFacetSelect()
Function: getRoleNameFacetSelect
- getRoleNameFacetSelect()
Member: queryForm
:
Member: query
:
Member: role_name_facet_select
:
Member: "border-top-left-radius"
:
Member: "border-bottom-left-radius"
:
Member: role_name_facet_select
:
Member: pagingparam
:
Member: init
:
Member: initFreeSearch
:
Member: isSelectQuery
:
Member: restoreLastQuery
:
Member: redirect
:
Member: bindOnClick
:
Member: splitSearchTerms
:
Member: getRoleNameFacet
:
Member: markdown
: