Skip to content

Repository files navigation

SPARQL Management

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.

Restful Api Application

In this application, we aim to manage queries in rest-api-mode.

Setup

  1. Clone the repository:

    git clone https://github.com/j-imsa/SPARQL-Management.git
    cd SPARQL-Management-master
  2. Prerequisites:

    • Java 21 (sdkman)
    • Maven (sdkman)
    • Postman
    • curl
  3. Build the project:

    mvn clean install
  4. Run the app:

    cd target
    java -jar SPARQL-Management-0.0.1.jar 

Request / Response

you can find the Postman exported collections and environment to import them!

SPARQL Management.postman_collection.json

SPARQL Management Env.postman_environment.json

  1. Get All

    curl --location 'http://localhost:8085/sparql-management/sparql'
  2. Get

    curl --location 'http://localhost:8085/sparql-management/sparql/wzBJ1Dq9Qd8lTXhJrgImxl4XoB9rQkCzsZizS6ztdsmyncmJH7pz4DC7PDZ_KFhG' 
  3. 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"
    }'
  4. 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"
    }'
  5. Delete

    curl --location --request DELETE 'http://localhost:8085/sparql-management/sparql/YWXuspA5kfpB8i5Wb74dy8G-82hyGfhwqBaXSH9NQ-PotukSGIr2F41hkWaz-eYY' \
    --header 'Authorization: Basic dGltYmVybmVyc2xlZTp3b3JsZHdpZGV3ZWI=' 

UI

License

This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages