sgvizler.parser Class
Parses a SPARQL result set, assumed to be in either W3C's
XML or
JSON format, into
Google
JSON
which is the JSON format that the
google.visualization.DataTable
class accepts.
Variable notation: xtable, xcol(s), xrow(s) -- x is 's'(parql) or 'g'(oogle).
Dependencies:
- sgvizler.namespace
- jQuery - for xml "browsing".
Item Index
Properties
Methods
convertJSON
-
stable
Converts a SPARQL JSON result set into "Google JSON", see https://developers.google.com/chart/interactive/docs/reference#DataTable.
Parameters:
-
stable
ObjectThe SPARQL JSON result set.
Returns:
Object literal ready for
google.visualization.DataTable
consumption.
convertXML
-
sxml
Converts a SPARQL XML result set into "Google JSON", see https://developers.google.com/chart/interactive/docs/reference#DataTable.
Parameters:
-
sxml
ObjectThe SPARQL XML result set.
Returns:
Object literal ready for
google.visualization.DataTable
consumption.
countJSON
-
stable
Returns number of results, SPARQL JSON.
Parameters:
-
stable
ObjectThe SPARQL JSON result set.
Returns:
The number of result set rows.
countXML
-
sxml
Returns number of results, SPARQL XML.
Parameters:
-
sxml
ObjectThe SPARQL XML result set.
Returns:
The number of result set rows.
getGoogleJsonDatatype
-
sdatatype
Converts XSD datatypes into Google JSON datatypes.
See also property datatypeXSD2JS
.
Parameters:
-
sdatatype
StringAn XSD datatype, full URL.
Returns:
gdatatype, defaults to string
Properties
datatypeXSD2JS
Object
private
Convertion table for turning XSD datatypes into the
"javascript" datatypes which the
google.visualization.DataTable
accepts, which is: string
,
number
, boolean
, date
, datetime
, timeofday
.