An open API service indexing awesome lists of open source software.

https://github.com/phoenixday/queries-app

An app for creating an ontology over museum objects and asking SPARQL queries upon it.
https://github.com/phoenixday/queries-app

apache-jena codemirror java react sigmajs sparql typescript xslt

Last synced: about 2 months ago
JSON representation

An app for creating an ontology over museum objects and asking SPARQL queries upon it.

Awesome Lists containing this project

README

        

# Museum ontology

An application for creating a simple ontology over museum objects. One can upload an XML with objects data. The app will generate a triplestore, transform data to RDF format and display the graph with objects, properties, and relations between them. The user then can ask the SPARQL queries over the triplestore.

This is a proof-of-concept for my bachelor thesis for the Museion company. Its functionality and algorithm could be enhanced in many ways.

The app is written on Java, using Apache Jena for triplestore. The frontend is written in React; graphs are visualized with Sigma.js; SPARQL queries are highlighted with CodeMirror.

## Local deployment

### Run the backend REST API

Open terminal in the folder queriesapp and run
`mvn clean install -DskipTests && mvn spring-boot:run`

### Run the frontend react server

Open another terminal and run:
`cd src/main/webapp/ && npm install && npm start`

### Data for importing

... is in the folder data-for-importing, for AXMPR and ESE accordingly

### Example queries

#### ESE

`PREFIX dcterms:` <>`
SELECT distinct ?material WHERE {
?subject dcterms:medium ?material
}
ORDER BY ?material`

`PREFIX dcterms:` <`
SELECT distinct ?duration WHERE {
?subject dcterms:temporal ?duration}
ORDER BY ?duration`

`PREFIX europeana:` <>`
PREFIX dc:` <>`
PREFIX dcterms:` <>`
SELECT ?title ?material WHERE {
?subject europeana:dataProvider "Národní muzeum - Historické muzeum" .
?subject dc:title ?title .
?subject dcterms:medium ?material
}`

`PREFIX dcterms:` <>`
PREFIX dc:` <>`
SELECT ?title ?predicate ?object WHERE {
?subject ?predicate ?object .
?subject dcterms:coverage ?object .
?subject dc:title ?title
}`

#### AXMPR

`PREFIX dc:` <>`
PREFIX dcterms:` <>`
PREFIX :` <>`
SELECT ?title WHERE {
?continent dc:title "Evropa" .
?region dcterms:isPartOf* ?continent .
?region a :region .
?region dc:title ?title
}`

`PREFIX dc:` <>`
PREFIX dcterms:` <>`
PREFIX :` <>`
PREFIX example:` <>`
SELECT ?nazev ?regiontitle WHERE {
?country dc:title "Česká republika" .
?region dcterms:isPartOf* ?country .
?predmet example:lokalitaPublic ?region .
?predmet example:nazev ?nazev .
?region dc:title ?regiontitle
}`

`PREFIX dc:` <>`
PREFIX dcterms:` <>`
PREFIX :` <>`
PREFIX example:` <>`
SELECT ?nazev ?materialtitle WHERE {
?group dc:title "Živočišný původ" .
?material dcterms:isPartOf* ?group .
?predmet example:materialPublic ?material .
?predmet example:nazev ?nazev .
?material dc:title ?materialtitle
}`