SPARQL Organizer
Getting started
Add component via NPM command:
npm install sparql-organizer
Then import it just like any other React component:
import Organizer from "sparql-organizer/lib/sources/Organizer";
Also you will need to import some .css files for styling:
import 'intelligent-tree-select/lib/styles.css'
import 'bootstrap/dist/css/bootstrap.css';
Now you can use it like this:
<Organizer pageSize={5} rest={{
readQueryDocuments: (categorization, categories, isRecursiveMode)=>{},
readCategories: (categorization)=>{},
readQueryDocumentLists: ()=>{},
readCategorizations: (queryDocumentList)=>{},
readSuggestedTerms: (lastValidQuery, currentQuery, contextType,
contextUri, currentQueryCursor, position, predicate)=>{},
createNewOption: (categorization, createdOption)=>{},
updateQuery: (queryDocument, queryCategories)=>{},
}}/>
The full description of the component's interface is at the pages of bachelor thesis.
If you want to have a look at this component, you can use my implementation of SPARQL catalog service. To do this you need to:
- Checkout this project.
- At sparql-suggestions/sparql-catalog-rest/src/main/resources/config.properties change property .
repositoryUrl
tofile:<path_to_checkouted_project>/sparql-suggestions/rdf4j-repo/repositories/holst-query-catalog
. - Run
SparqlCatalogRestApplication.java
. - Go to
<path_to_checkouted_project>/sparql-suggestions/sparqlgui/my-app
via cmd and typenpm install
,npm start
.
Component will be available at localhost:3000
.