Members
appConfigPath :string
The path to your configuration file for MetacatUI. This can be any web-accessible location.
This variable must be defined in index.html.
Type:
- Since:
- Source:
taxonomicClassification :Object
Type:
Properties:
Name |
Type |
Description |
taxonRankName |
string
|
The name of the taxonomic rank, for
example, Domain, Kingdom, etc. |
taxonRankValue |
string
|
The value for the given taxonomic rank,
for example, Animalia, Chordata, etc. |
commonName |
Array.<string>
|
Common name(s) for the taxon, for example
["Animal"] |
taxonId |
Array.<Object>
|
A taxon identifier from a controlled
vocabulary, for example, ITIS, NCBI, etc.
Properties
Name |
Type |
Description |
provider |
string
|
The provider of the taxon identifier,
given as a URI, for example http://www.itis.gov |
value |
string
|
The identifier from the provider, for
example, 180092 |
|
taxonomicClassification |
Array.<Object>
|
A nested taxonomic
classification, since taxonomy is represented as a hierarchy in EML. |
- Source:
Methods
couldBeLatLong(value) → {boolean}
Determine whether the user could be typing a lat, long pair.
Parameters:
Name |
Type |
Description |
value |
string
|
is the currently entered query string. |
- Source:
Returns:
Whether the current value could be a lat,long pair
due to the string NOT containing characters (e.g. a-z) that could not
be in a lat,long pair.
-
Type
-
boolean
Type Definitions
AdditionalField
An additional field object contains the properties an additional query field to
add that are required to render it correctly. An additional query field is one
that does not actually exist in the query service index.
Type:
Properties:
Name |
Type |
Description |
name |
string
|
A unique ID to represent this field. It must not
match the name of any other query fields. |
fields |
Array.<string>
|
The list of real query fields that this
abstracted field will represent. It must exactly match the names of the query
fields that actually exist. |
label |
string
|
A user-facing label to display. |
description |
string
|
A description for this field. |
category |
string
|
The name of the category under which to place
this field. It must match one of the category names for an existing query
field. |
- Since:
- Source:
AdditionalField
An additional field object contains the properties for an additional query
field to add to the QueryFieldSelectView that are required to render it
correctly. An additional query field is one that does not actually exist in the
query service index.
Type:
Properties:
Name |
Type |
Description |
name |
string
|
A unique ID to represent this field. It must not
match the name of any other query fields. |
fields |
Array.<string>
|
The list of real query fields that this
abstracted field will represent. It must exactly match the names of the query
fields that actually exist. |
label |
string
|
A user-facing label to display. |
description |
string
|
A description for this field. |
category |
string
|
The name of the category under which to place
this field. It must match one of the category names for an existing query
field. |
- Source:
CategoryMap
An object that defines a single category for each field.
In addition to a label and icon property, each CategoryMap should have a queryTypes
property OR a a queryFields property, not both.
Type:
Properties:
Name |
Type |
Description |
label |
string
|
A human readable label to use as a general category for groups of query fields |
icon |
string
|
The name of a Font Awesome 3.2.1 icon to represent the field type |
queryTypes |
Array.<string>
|
An array of the possible query field types, as named in the type attribute, that belong in the given category. If a queryType array is provided, the queryFields array will be ignored. |
queryFields |
Array.<string>
|
As an alternative to grouping fields by type, they may also be grouped by field name. Use this property instead of queryTypes to list fields by their name attribute. |
default |
boolean
|
Set to true for one category. Any fields that don't match another category will be placed here. |
- Source:
ContentTemplate
A ContentTemplate object specifies a single template designed to render
information about the Feature.
Type:
Properties:
Name |
Type |
Attributes |
Description |
name |
string
|
<optional>
|
An identifier for this template. |
options |
Array.<string>
|
<optional>
|
The list of keys (option names) that are
allowed for the given template. Only options with these keys will be passed to
the underscore.js template, regardless of what is configured in the
MapConfig#FeatureTemplate. When no options are specified, then the
entire Feature model will be passed to the template as JSON. |
template |
string
|
|
The path to the HTML template. This will be used
with require() to load the template as needed. |
- Since:
- Source:
ContextDefinition
Defines how to render a citation style for only it's in-text or full
citation format.
Type:
Properties:
Name |
Type |
Description |
template |
Underscore.Template
|
The Underscore.js template
to use. HTML files are converted to Underscore.js templates. |
archivedTemplate |
Underscore.Template
|
The Underscore.js
template to use when the object is archived. |
render |
string
|
The name of the method in this view to use
to render the citation. This method will be passed the template (or
archived template if the object is archived), as well as the template
options. |
- Since:
- Source:
Example
{
inText: {
template: _.template(InTextAPATemplate),
archivedTemplate: _.template(InTextAPAArchivedTemplate),
render: "renderAPAInText",
}
CustomEMLMethod
In the editor, sometimes it is useful to have guided questions for the Methods section
in addition to the generic numbered method steps. These custom methods are defined here
as an array of literal objects that define each custom Methods question. Custom methods
are serialized to the EML as regular method steps, but with an unchangeable title, defined here,
in order to identify them.
Type:
Properties:
Name |
Type |
Description |
titleOptions |
Array.<string>
|
One or more titles that may exist in an EML Method Step that identify that Method Step as a custom method type. THe first title in the array is serialized to the EML XML. |
id |
string
|
A unique identifier for this custom method type. |
required |
boolean
|
If true, this custom method will be a required field for submission in the EML editor. |
- Since:
- Source:
Example
[{
"titleOptions": ["Ethical Research Procedures"],
"id": "ethical-research-procedures",
"required": false
}]
DetailSectionOption
Configuration for a Layer Detail section to show within this Layer Details
view.
Type:
Properties:
Name |
Type |
Description |
label |
string
|
The name to display for this section |
view |
Backbone.View
|
Any view that will render content for the Layer
Detail section. This view will be passed the MapAsset model. The view should
display information about the MapAsset and/or allow some aspect of the
MapAsset's appearance to be edited - e.g. a LayerInfoView or a
LayerOpacityView. |
collapsible |
boolean
|
Whether or not this section should be
expandable and collapsible. |
showTitle |
boolean
|
Whether or not to show the title/label for this
section. |
hideIfError |
boolean
|
Set to true to hide this section when there is
an error loading the layer. Example: we should hide the opacity slider for
layers that are not visible on the map |
- Source:
Type:
Properties:
Name |
Type |
Attributes |
Description |
name |
string
|
|
The name of the button. This should be the
same as the mode that the button will activate (if the button is
supposed to activate a mode). |
label |
string
|
|
The label to display on the button. |
icon |
string
|
|
The name of the icon to display on the
button. |
method |
string
|
<optional>
|
The name of the method to call when the
button is clicked. If this is not provided, the button will toggle the
mode of the draw tool. |
- Source:
ExpansionPanelViewOptions
Type:
Properties:
Name |
Type |
Attributes |
Description |
title |
string
|
|
The displayed label for this panel. |
icon |
string
|
|
The icon displayed in the panel's clickable
label. |
contentViewInstance |
Backbone.View
|
|
The Backbone.View that
will be displayed when the content of the panel is toggled to be
visible. |
panelsModel |
ExpansionPanelsModel
|
<optional>
|
Optional model for
coordinating the expanded/collapsed state among many panels. |
startOpen |
boolean
|
|
Whether the panel should be expanded by
default. |
- Source:
GeocodedLocationOptions
Type:
Properties:
Name |
Type |
Description |
box |
Object
|
An object representing a boundary around a
location on a map. |
displayName |
string
|
A display name for the location. |
- Source:
LayersPanelViewOptions
Type:
Properties:
Name |
Type |
Description |
The |
Map
|
Map model that contains layers information. |
- Source:
MapIconString
A string that represents an icon. Can be either the name of the Font Awesome
3.2 icon OR an SVG string for an icon with all the following properties: 1)
Uses viewBox attribute and not width/height; 2) Sets fill or stroke to
"currentColor" in the svg element, no styles included elsewhere, 3) Has the
required xmlns attribute
Type:
- Source:
- See:
-
Examples
'<svg viewBox="0 0 400 110" fill="currentColor"><path d="M0 0h300v100H0z"/></svg>'
'map-marker'
MetricOption
A metric option is an object with properties that define how to display
a metric in the modal.
Type:
Properties:
Name |
Type |
Description |
name |
string
|
The name of the metric, as it will be
displayed in the modal. |
icon |
string
|
The font awesome icon class for the metric |
metricValue |
string
|
The name of the property in the
metrics model that contains the value for this metric. This will be
displayed in the title of the modal. |
render |
string
|
The name of the method within this view
that will render the metric. This method will be called after the
basic modal template has been rendered. |
- Source:
OperatorOption
An operator option is an object that lists the properties of one of the
operators that will be displayed to the user in the Query Rule "operator"
dropdown list. The operator properties are used to pre-select the correct
operator based on attributes in the associated
Filter model, as well as to update the Filter model
when a user selects a new operator. Operators can set the exclude and
matchSubstring properties of the model, and sometimes the values as well.
Either the types property OR the fields property must be set, not both.
Type:
Properties:
Name |
Type |
Attributes |
Description |
label |
string
|
|
The label to display to the user |
icon |
string
|
|
An icon that represents the operator |
matchSubstring |
boolean
|
|
Whether the matchSubstring attribute is
true or false in the filter model that matches this operator |
exclude |
boolean
|
|
Whether the exclude attribute is true or false in
the filter model that matches this operator |
hasMax |
boolean
|
|
Whether the filter model that matches this
operator must have a max attribute |
hasMin |
boolean
|
|
Whether the filter model that matches this
operator must have a min attribute |
values |
Array.<string>
|
|
For this operator to work as desired, the values
that should be set in the filter (e.g. ["true"] for the operator "is true") |
types |
Array.<string>
|
<optional>
|
The node names of the filters that this operator
is used for (e.g. "filter", "booleanFilter") |
fields |
Array.<string>
|
<optional>
|
The query field names of the filters that this
operator is used for. If this is used for a
special field, then list the special field
name (id), and not the real query field names. If this fields property is set,
then the types property will be ignored. (i.e. fields is more specific than
types.) |
- Source:
PredictionOptions
Type:
Properties:
Name |
Type |
Description |
description |
string
|
A string describing the location
represented by the Prediction. |
googleMapsPlaceId |
string
|
The place ID that is used to
uniquely identify a place in Google Maps API. |
- Source:
PredictionViewOptions
Type:
Properties:
Name |
Type |
Description |
The |
Prediction
|
Prediction model associated with this
autocompletion prediction. |
The |
ViewfinderModel
|
model associated with the parent view. |
The |
number
|
position of this prediction within the parent's
full list of predictions. |
- Source:
Type:
Properties:
Name |
Type |
Description |
search |
function
|
A function that takes in a text input and returns
a boolean for whether there is a match. |
keydownCallback |
function
|
A function that receives a key event
on keydown. |
keyupCallback |
function
|
A function that receives a key event
on keyup stroke. |
blurCallback |
function
|
A function that receives an event on
blur of the input. |
focusCallback |
function
|
A function that receives an event on
focus of the input. |
noMatchCallback |
function
|
A callback function to handle a no match
situation. |
placeholder |
String
|
The placeholder text for the input box. |
- Source:
SearchSortOptions
A list of sort order options to display in this view.
Type:
Properties:
Name |
Type |
Description |
value |
string
|
The sort value that will be sent directly to
the search index in the query string. |
label |
string
|
The name of the sort option that will be shown
to the user. |
- Since:
- Source:
SearchViewOptions
Type:
Properties:
Name |
Type |
Description |
viewfinderModel |
ViewfinderModel
|
The model associated
with this view allowing control of panning to different locations on
the map, and displaying location related search features. |
- Source:
SectionContentReturnType
Type:
Properties:
Name |
Type |
Description |
contentContainer |
HTMLElement
|
The content container HTML
element. |
sectionContent |
Backbone.View
|
The Backbone.View instance |
- Source:
SectionElement
A reference to all of the elements required to make up a toolbar section: the
section content and the section link (i.e. tab); as well as the status of the
section: active or in active.
Type:
Properties:
Name |
Type |
Description |
contentEl |
HTMLElement
|
The element that contains the toolbar
section's content (the content rendered by the associated view) |
linkEl |
HTMLElement
|
The element that acts as a link to show the
section's content, and open/close the toolbar. |
isActive |
Boolean
|
True if this is the active section, false
otherwise. |
sectionView |
Backbone.View
|
The associated Backbone.View instance. |
- Source:
SectionOption
Options/settings that are used to create a toolbar section and its associated
link/tab.
Type:
Properties:
Name |
Type |
Attributes |
Description |
label |
string
|
|
The name of this section to show to the user. |
icon |
MapIconString
|
|
The icon to show in the link (tab) for this
section |
view |
Backbone.View
|
<optional>
|
The view that renders the content of the
toolbar section. |
viewOptions |
object
|
<optional>
|
Any additional options to pass to the content
view. By default, the label, icon, and Map model will be passed to the view as
'label', 'icon', and 'model', respectively. To pass a specific attribute from
the Map model, use a string with the syntax 'model.desiredAttribute'. For
example, 'model.layers' will be converted to view.model.get('layers') |
action |
function
|
<optional>
|
A function to call when the link/tab is clicked.
This can be provided instead of a view and viewOptions, in which case no
toolbar section will be created. The function will be passed the view and the
Map model as arguments. |
isVisible |
function
|
<optional>
|
A function that determines whether this
section should be visible in the toolbar. |
- Source:
ShareUrlViewOptions
Type:
Properties:
Name |
Type |
Description |
left |
number
|
position for absolute positioning this element. |
top |
number
|
position for absolute positioning this element. |
onRemove |
function
|
callback function to be executed before
this View removes itself. |
- Source:
SpecialField
A special field is one that does not exist in the query service index (i.e.
Solr). It can be a combination of fields that are presented to the user as a
single field, but which are added to the model as multiple fields. It can also be
a duplicate of a field that does exist, but presented with a different label (and
even with different operator options or
value input if needed).
Type:
Properties:
Name |
Type |
Attributes |
Description |
name |
string
|
|
A unique ID to represent this field. It must not match
the name of any other query fields. |
fields |
Array.<string>
|
|
The list of real query fields that this abstracted
field should represent. The query fields listed must exactly match the names of
the query fields that are retrieved from the query service. |
label |
string
|
|
A user-facing label to display. |
description |
string
|
|
A description for this field. |
category |
string
|
|
The name of the category under which to place this
field. It must match one of the category names for an existing query field set in
QueryField#categoriesMap. |
values |
Array.<string>
|
<optional>
|
An optional list of filter values. If set, this
is used to determine whether a pre-existing Query Rule should be displayed as one
of these special fields, or as a field from the query API. Setting values means
that the values set on the Query Rule model must exactly match the values set. |
- Since:
- Source:
StyleDefinition
Defines how to render a citation style for both it's in-text and full
contexts.
Type:
Properties:
Name |
Type |
Description |
full |
CitationView#ContextDefinition
|
The full citation
format. |
inText |
CitationView#ContextDefinition
|
The in-text
citation format. |
- Since:
- Source:
UIBuilderOption
A single type of custom search filter that a user can select. An option
represents a specific Filter model type and uses that associated Filter View.
Type:
Properties:
Name |
Type |
Description |
label |
string
|
The user-facing label to show for this option |
modelType |
string
|
The name of the filter model type that that this
UI builder should create. Only one is allowed. The model must be one of the six
filters that are allowed in a Portal "UIFilterGroupType". See
https://github.com/DataONEorg/collections-portals-schemas/blob/master/schemas/portals.xsd. |
iconFileName |
string
|
The file name, including extension, of the SVG
icon used to represent this option |
description |
string
|
A very brief, user-facing description of how
this filter works |
filterTypes |
Array.<string>
|
An array of one or more filter types that are
allowed for this interface. If none are provided then any filter type is
allowed. Filter types are one of the four keys defined in |
blockedFields |
Array.<string>
|
An array of one or more search
fields for which this interface should be blocked
QueryField#filterTypesMap, and correspond to one of the four filter
types that are allowed in a Collection definition. See
https://github.com/DataONEorg/collections-portals-schemas/blob/master/schemas/collections.xsd.
This property is used to help users match custom search filter UIs to
appropriate query fields. |
modelFunction |
function
|
A function that takes an optional object
with model properties and returns an instance of a model to use for this UI
builder |
uiFunction |
function
|
A function that takes the model as an argument
and returns the filter UI builder view for this option |
- Source:
The third input in each Query Rule is where the user enters a value, minimum,
or maximum for the filter model. Different types of values are appropriate for
different solr query fields, and so we display different interfaces depending
on the type and category of the selected query fields. A Value Input Option
object defines a of interface to show for a given type and category.
Type:
Properties:
Name |
Type |
Description |
filterTypes |
Array.<string>
|
An array of one or more filter types that
are allowed for this interface. If none are provided then any filter type is
allowed. Filter types are one of the four keys defined in
QueryField#filterTypesMap. |
categories |
Array.<string>
|
An array of one or more categories that are
allowed for this interface. These strings must exactly match the categories
provided in QueryField.categoriesMap(). If none are provided then any category
is allowed. |
queryFields |
Array.<string>
|
Specific names of fields that are allowed in
this interface. If none are provided, then any query fields are allowed that
match the other properties. If this value select should be used for a
special field, then use the name (id) of
the special field, not the actual query fields that it represents. |
label |
string
|
If the interface does not include a label (e.g.
number filter), include a string to display here. |
uiFunction |
function
|
A function that returns the UI view to use
with all appropriate options set. The function will be called with this view as
the context. |
- Source:
ViewfinderViewOptions
Type:
Properties:
Name |
Type |
Description |
model |
Map
|
The map model that contains the configs for this map view. |
isPortalMap |
boolean
|
Indicates whether the map view is a part of a
portal, which is styled differently. |
- Source:
ViewfinderViewOptions
Type:
Properties:
Name |
Type |
Description |
The |
ViewfinderModel
|
model associated with the parent view. |
- Source:
ViewfinderViewOptions
Type:
Properties:
Name |
Type |
Description |
The |
Map
|
Map model associated with this view allowing control
of panning to different locations on the map. |
- Source:
ZoomPresetModelOptions
Type:
Properties:
Name |
Type |
Description |
title |
string
|
The displayed title for the preset. |
geoPoint |
GeoPoint
|
The location representing this preset,
including height information. |
description |
string
|
A brief description of the layers and
location. |
enabledLayerIds |
Array.<string>
|
A list of layer IDs which are to
be enabled for this preset. |
enabledLayerLabels |
Array.<string>
|
A list of layer labels which
are enabled for this preset. |
- Source:
ZoomPresetViewOptions
Type:
Properties:
Name |
Type |
Description |
The |
ZoomPresetModel
|
metadata associated with this zoom
preset. |
selectCallback |
function
|
to be called when this preset is
selected. |
- Source:
ZoomPresetsListViewOptions
Type:
Properties:
Name |
Type |
Description |
zoomPresets |
Array.<ZoomPreset>
|
The zoom presets to render. |
selectZoomPreset |
function
|
The callback function for
selecting a zoom preset. |
- Source:
ZoomPresetsParseOptions
Type:
Properties:
Name |
Type |
Description |
zoomPresets |
object
|
The raw list of objects that represent
the zoom presets, to be converted into ZoomPresetModels. |
allLayers |
Array.<MapAsset>
|
All of the layers available for display
in the map. |
- Source: