linker.js

Summary
linker.js
amigo.linkerGeneric AmiGO linking function.
Functions
linkerCreate an object that can make URLs and/or anchors.
urlReturn a url string.
anchorReturn a link as a chunk of HTML, all ready to consume in a display.

amigo.linker

Generic AmiGO linking function.  A real function mind you--not an object generator.

TODO: maybe this should actually be under bbop.html so we could make use of the anchor tag stuff?

NOTE: A lot of this is lifted from the (defunct) amigo.js package.  However, the future should be here.

NOTE: This should pull data from something like amigo.data.xrefs instead.

Summary
Functions
linkerCreate an object that can make URLs and/or anchors.
urlReturn a url string.
anchorReturn a link as a chunk of HTML, all ready to consume in a display.

Functions

linker

amigo.linker = function ()

Create an object that can make URLs and/or anchors.

These functions have a well defined interface so that other packages can use it.

Arguments

n/a

Returns

self

url

amigo.linker.prototype.url = function (id,
xid)

Return a url string.

Arguments

argsid
xid[optional] an internal transformation id

Returns

string (url); null if it couldn’t create anything

anchor

amigo.linker.prototype.anchor = function(args,
xid)

Return a link as a chunk of HTML, all ready to consume in a display.

Arguments

argshash--’id’ required; ‘label’ and ‘hilite’ are inferred if not extant
xid[optional] an internal transformation id

Returns

string (link); null if it couldn’t create anything

amigo.linker = function ()
Create an object that can make URLs and/or anchors.
amigo.linker.prototype.url = function (id,
xid)
Return a url string.
amigo.linker.prototype.anchor = function(args,
xid)
Return a link as a chunk of HTML, all ready to consume in a display.
Close