SPARQL (SPARQL Protocol and RDF Query Language) is a powerful query language and protocol designed specifically for retrieving and manipulating data stored in the Resource Description Framework (RDF) format. RDF is a foundational standard for representing information in a structured, linked-data format, enabling the creation of semantic data models.
Semantic data models go beyond traditional relational database models by incorporating meaning and relationships directly into the data. They leverage ontologies, vocabularies, and schemas to define how data entities relate to each other, enabling more intelligent and context-aware data integration, search, and analysis.
SPARQL plays a crucial role in semantic data models by allowing users to:
- Query interconnected datasets using graph patterns.
- Navigate relationships and extract meaningful insights from complex datasets.
- Perform operations such as filtering, aggregation, and subqueries across distributed RDF datasets.
This combination of SPARQL and semantic data models is fundamental in domains like knowledge graphs, linked data, and AI-driven systems, providing a framework for working with highly interconnected and contextually rich information.
In this application, we aim to manage queries in rest-api-mode.
-
Clone the repository:
git clone https://github.com/j-imsa/SPARQL-Management.git cd SPARQL-Management-master -
Prerequisites:
- Java 21 (sdkman)
- Maven (sdkman)
- Postman
- curl
-
Build the project:
mvn clean install
-
Run the app:
cd target java -jar SPARQL-Management-0.0.1.jar
you can find the Postman exported collections and environment to import them!
-
Get All
curl --location 'http://localhost:8085/sparql-management/sparql' -
Get
curl --location 'http://localhost:8085/sparql-management/sparql/wzBJ1Dq9Qd8lTXhJrgImxl4XoB9rQkCzsZizS6ztdsmyncmJH7pz4DC7PDZ_KFhG' -
Post
curl --location 'http://localhost:8085/sparql-management/sparql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic YWRtaW46aWhhdmV0aGVwb3dlcg==' \ --data '{ "name": "Amin", "description": "test description", "query": "select Iman from candidiates :)", "creator": "Alireza" }'
-
Put
curl --location --request PUT 'http://localhost:8085/sparql-management/sparql/YWXuspA5kfpB8i5Wb74dy8G-82hyGfhwqBaXSH9NQ-PotukSGIr2F41hkWaz-eYY' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic YWxpcmV6YWVtYWQ6aWhhdmVub3NlY3JldHM=' \ --data '{ "name": "Amin", "description": "test description", "query": "select Iman from candidiates :)", "creator": "Alireza" }'
-
Delete
curl --location --request DELETE 'http://localhost:8085/sparql-management/sparql/YWXuspA5kfpB8i5Wb74dy8G-82hyGfhwqBaXSH9NQ-PotukSGIr2F41hkWaz-eYY' \ --header 'Authorization: Basic dGltYmVybmVyc2xlZTp3b3JsZHdpZGV3ZWI='
- Swagger:
- DB:
This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.

