Constructor
new AnnotationView()
- Source:
Extends
Members
context
Context string is a human-readable bit of text that comes out of the
Metacat view service and describes the context of the annotation
i.e., what entity, or which attribute within which entity the
annotation is on
- Source:
Methods
createPopover(which)
Update the value popover with the current state
Parameters:
Name |
Type |
Description |
which |
Object
|
Which popover to create. Either this.property
or this.value. |
- Source:
findMore(e)
Send the user to a pre-canned search for a term.
Parameters:
Name |
Type |
Description |
e |
Event
|
Click event |
- Source:
getFriendlyOntologyName(uri) → {string}
Get a friendly name (ie ECSO) from a long BioPortal URI
Parameters:
Name |
Type |
Description |
uri |
string
|
A URI returned from the BioPortal API |
- Source:
Returns:
-
Type
-
string
handleClick(e)
Click handler for when the user clicks either the property or the
value portion of the pill.
If the popover hasn't yet been created for either, we create the
popover and query BioPortal for more information. Otherwise, we do
nothing and Bootstrap's default popover handling is triggered,
showing the popover.
Parameters:
Name |
Type |
Description |
e |
Event
|
Click event |
- Source:
queryAndUpdate(which)
Find a definition for the value URI either from cache or from
Bioportal. Updates the popover if necessary.
Parameters:
Name |
Type |
Description |
which |
Object
|
Which popover to create. Either this.property
or this.value. |
- Source:
updateCache(term, match)
Update the cache for a given term.
Parameters:
Name |
Type |
Description |
term |
string
|
The term URI |
match |
Object
|
The BioPortal match object for the term |
- Source:
updatePopover(which)
Update the popover data and raw HTML. This is necessary because
we want to create the popover before we fetch the data to populate
it from BioPortal and Bootstrap Popovers are designed to be static.
The main trick I had to figure out here was that I could access
the underlying content member of the popover with
popover_data.options.content which wasn't documented in the API.
Parameters:
Name |
Type |
Description |
which |
Object
|
Which popover to create. Either this.property
or this.value. |
- Source: