API Docs for: 0.6.0
Show:

sgvizler.form Class

Defined in: src/form.js:2

Handles all UI business for the HTML form for writing, issuing and drawing sgvizler queries.

Dependencies:

  • sgvizler.util
  • sgvizler.namespace
  • sgvizler.registry
  • sgvizler.Query

Methods

createPage

(
  • [elementID=body]
  • UItype
)
private

Defined in src/form.js:424

Available since 0.6.0

Draws an intitially empty form on page. If elementID is provided only the form and container for chart is drawn; otherwise, a complete page, with header, logo and footer, is draw directly in the body element.

Parameters:

  • [elementID=body] String optional
  • UItype String

    values: 'result', 'form' or 'page'.

displayChartTypesMenu

() private

Defined in src/form.js:378

Available since 0.2

Populates the drop-down menu of available chart types with the registered chart types found in the sgvizler.registry, grouped by modules.

displayPrefixes

() private

Defined in src/form.js:349

Available since 0.1

Displays the prefixes set in sgvizler.namespace as SPARQL prefix declarations in the designated container.

displayUI

() private

Defined in src/form.js:473

Available since 0.1

Displays prefix information, query information and selections in the form, using other displayX methods.

displayUserInput

(
  • query
)
private

Defined in src/form.js:360

Available since 0.1

Displays query information in the form input fields, e.g., the query string, query format, chart dimensions, set in the input parameter.

Parameters:

getUrlParams

(
  • [urlparams]
)
Object private

Defined in src/form.js:486

Available since 0.1

Parses the current URL for parameters. Permissible parameters are, if present, those listed in the input of this method, or in the array permissible_urlparams.

Parameters:

  • [urlparams] Array optional

Returns:

Object:

A list of parameter--value pairs.

isElement

(
  • elementID
)
Boolean private

Defined in src/form.js:292

Available since 0.5

Tests if there really is an element with the give element id.

Parameters:

  • elementID String

    The element Id

Returns:

Boolean:

Returns true iff the element with this element id exists.

setElementText

(
  • elementID
  • text
)
private

Defined in src/form.js:321

Available since 0.5

Set the text for a given element. Is used to set the text contents of containers. Uses jQuery.text.

Parameters:

  • elementID String

    The element id of the element to set value for.

  • text String

    The value to set.

setElementValue

(
  • elementID
  • value
)
private

Defined in src/form.js:306

Available since 0.5

Set a value for a given element. Is used to set the value of form input fields. Uses jQuery.val.

Parameters:

  • elementID String

    The element id of the element to set value for.

  • value Primitive

    The value to set.

Properties

html

Object private

Defined in src/form.js:56

Available since 0.6.0

Contains groups of elements which make out the form. Described using the array syntax edible by sgvizler.util.createHTMLElement.

html.chart

Array private

Defined in src/form.js:236

Available since 0.6.0

Container for holding the chart.

html.footer

Array private

Defined in src/form.js:251

Available since 0.6.0

The footer

html.heading

Array private

Defined in src/form.js:70

Available since 0.6.0

The heading for the form: "Sgvizler".

html.main

Array private

Defined in src/form.js:102

Available since 0.6.0

The form.

idXs

String private

Defined in src/form.js:26

Available since 0.2

Approx. 15 properties giving name to HTML elements which appear in the form.

permissible_urlparams

Array private

Defined in src/form.js:276

Available since 0.3.1

A list of permissible URL parameters. The parameter name must be in this list to be read by the form.