Constructor
new SparqlQueryWindow(sparqlProvider, configSparqlWidget, handleZoom)
Creates a SPARQL query window.
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sparqlProvider | SparqlEndpointResponseProvider | The SPARQL Endpoint Response Provider | ||||||||||||||||||
configSparqlWidget | object | The sparqlModule view configuration. Properties
| ||||||||||||||||||
handleZoom | function | Function to handle the zoom. |
- Source
Classes
Members
configSparqlWidget :object
The sparqlModule view configuration.
- object
- Source
d3Graph :D3GraphCanvas
Contains the D3 graph view to display RDF data.
- Source
dataView :HTMLElement
- HTMLElement
- Source
domElement :HTMLElement
- HTMLElement
- Source
eventListeners :object
The event listeners for the graphs.
- object
- Source
explorationQuery :string
The Sparql exploration query
- string
form :HTMLElement
- HTMLElement
- Source
menu :HTMLElement
- HTMLElement
- Source
menuList :HTMLElement
- HTMLElement
- Source
queries :object
Store the queries of the SparqlQueryWindow from the config.
- object
querySelect :HTMLElement
- HTMLElement
- Source
queryTextArea :HTMLElement
- HTMLElement
- Source
resetButton :HTMLElement
- HTMLElement
- Source
resultSelect :HTMLElement
- HTMLElement
- Source
sparqlProvider :SparqlEndpointResponseProvider
The SPARQL Endpoint Response Provider
- Source
table :Table
Contains the D3 table to display RDF data.
- Source
toggleQueryTextAreaButton :HTMLElement
- HTMLElement
- Source
Methods
addEventListeners(eventListeners)
Add event listeners to the graphs
Name | Type | Description |
---|---|---|
eventListeners | object | An object containing event listeners to be added to the graph |
clearDataView()
Clear the DataView of content
initHtml()
Initialize the html of the view
initQueryTextAreaForm()
Initialize the query text area of the view
initResultDisplay()
Initialize the displaying of the result
updateDataView(response, view_type)
Update the DataView
Name | Type | Description |
---|---|---|
response | object | a JSON object returned by a SparqlEndpointResponseProvider.EVENT_ENDPOINT_RESPONSE_UPDATED event |
view_type | string | the selected semantic data view type |
updateExplorationQuery(node_id)
Update query to add node's children
Name | Type | Description |
---|---|---|
node_id | string | a node ID |
updateQueryDropdown(queries)
Update this.querySelect options using an array of queries. For each element in the array, create an option element, set the innerText of the option to the query's title, set the value of the option to the index of the query in the array, then append the option to this.querySelect
Name | Type | Description |
---|---|---|
queries | Array.<object> | An array of objects that contain a query title and the query text itself |
updateQueryTextArea(index)
Update the this.queryTextArea with the text of the query that was selected in the dropdown, or the exploration query
Name | Type | Description |
---|---|---|
index | number | the index of the query in the this.queries array |
updateResultDropdown(index)
Remove all the children of this.resultSelect, then adds new children options based on the formats declared in each query configuration from from this.queries
Name | Type | Description |
---|---|---|
index | number | the index of the query in the queries array |