Closed robyngit closed 3 years ago
Below is a summary of which elements are required, and which are limited to one in the proposed 1.1.0 Collection and Portal schemas. I think that the elements that we've decided to restrict or make required all make sense, except in the case of <choice>
elements that occur within the custom search <choiceFilter>
elements:
<choice>
elements:
<label>
from optional to required, and just keep the requirement for one <value>
. If there's no label provided, then we can label the choice using the value.<value>
elements, instead of just one. That way the user can create a search filter that allows a user to select an option label (e.g. "Salmon") that adds multiple values to the search (e.g. "Oncorhynchus nerka", "Oncorhynchus tshawytscha", etc.)The following elements are required within the element it occurs
Collections
<label>
<definition>
<filterGroup>
:
<filter>
, <dateFilter>
, <numericFilter>
, etc...)<filter>
:
<field>
<value>
<numericFilter>
requires at least one any of the following three options:
<min>
<max>
, or<value>
Portals
<section>
:
<label>
<filterGroup>
(for custom search filters):
<label>
<filter>
, <dateFilter>
, <numericFilter>
, etc...)<toggleFilter>
<trueValue>
<choiceFilter>
:
<choice>
<choice>
:
<label>
<value>
<option>
:
<optionName>
<optionValue>
<image>
:
<identifier>
Given these required elements, the most minimal portal needs only a label and a definition with one filter:
<portal>
<label>MyMinimalPortal</label>
<definition>
<filter>
<field>text</field>
<value>arctic</value>
</filter>
</definition>
</portal>
The following elements are limited to one of each within the element it occurs
Collections
<label>
<name>
<description>
<definition>
<filterGroup>
:
<operator>
<exclude>
<label>
<operator>
<exclude>
<fieldsOperator>
<matchSubstring>
<min>
<max>
<value>
in DateFilterType, NumericFilterType, and BooleanFilterType (unbounded in TextFilterType)Portals
<logo>
<acknowledgements>
<literatureCited>
<associatedParty>
:
<image>
<section>
:
<label>
<title>
<introduction>
<image>
<content>
<filterGroup>
:
<label>
<description>
<icon>
<chooseMultiple>
<trueValue>
<trueLabel>
<falseValue>
<falseLabel>
<rangeMin>
<rangeMax>
<value>
(this is the optional value pre-set on custom search filters)<matchSubstring>
<step>
<filterOptions>
)<choice>
:
<label>
<value>
<choiceOptions>
(UIOptionsType) <placeholder>
<icon>
<description>
<image>
<option>
:
<optionName>
<image>
:
<identifier>
<label>
<associatedURL>
By the same logic as in the proposed change above, I think it would also make sense to allow multiple <trueValue>
and <falseValue>
elements in UIToggleFilterType. Setting the toggle to true (or to false) could add multiple search values to the query.
Decide whether we are requiring elements that could be optional, or whether we are restricting elements to one instance where it could be useful to allow multiple.