context.js

Summary
context.js
bbop.contextThis package contains an often used set of tools to tease apart a specially structured hash to get things like readable names and colors.
Functions
contextInitial take from go-mme/js/bbop-mme-context.js
readableReturns a human readable form of the inputted string.
colorReturn the string of a color of a rel.
relation_glyphReturn the string indicating the glyph to use for the edge marking.
priorityReturn a number representing the relative priority of the entity under consideration.
all_entitiesReturn a list of the currently known entities.
all_knownReturn a list of the currently known entities and their aliases.

bbop.context

This package contains an often used set of tools to tease apart a specially structured hash to get things like readable names and colors.

Summary
Functions
contextInitial take from go-mme/js/bbop-mme-context.js
readableReturns a human readable form of the inputted string.
colorReturn the string of a color of a rel.
relation_glyphReturn the string indicating the glyph to use for the edge marking.
priorityReturn a number representing the relative priority of the entity under consideration.
all_entitiesReturn a list of the currently known entities.
all_knownReturn a list of the currently known entities and their aliases.

Functions

context

bbop.context = function(entities,
default_color)

Initial take from go-mme/js/bbop-mme-context.js

Arguments

entitiesa hash defining all of the properties to unscramble
default_colorthe color to use when a color cannot be found (#800800)

Returns

aiding object

readable

this.readable = function(ind)

Returns a human readable form of the inputted string.

Parameters

indincoming data id

Returns

readable string or original string

color

this.color = function(ind)

Return the string of a color of a rel.

Parameters

indincoming data id

Returns

appropriate color string or ‘grey’

relation_glyph

Return the string indicating the glyph to use for the edge marking.

Parameters

indincoming data id

Returns

appropriate color string or null

priority

this.priority = function(ind)

Return a number representing the relative priority of the entity under consideration.

Parameters

indincoming data id

Returns

appropriate integer or 0

all_entities

this.all_entities = function()

Return a list of the currently known entities.

Parameters

n/a

Returns

list

all_known

this.all_known = function()

Return a list of the currently known entities and their aliases.

Parameters

n/a

Returns

list

bbop.context = function(entities,
default_color)
Initial take from go-mme/js/bbop-mme-context.js
this.readable = function(ind)
Returns a human readable form of the inputted string.
this.color = function(ind)
Return the string of a color of a rel.
this.priority = function(ind)
Return a number representing the relative priority of the entity under consideration.
this.all_entities = function()
Return a list of the currently known entities.
this.all_known = function()
Return a list of the currently known entities and their aliases.
Close