Skip to content

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

License

Notifications You must be signed in to change notification settings

phoenixday/queries-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: <http://purl.org/dc/terms/> SELECT distinct ?material WHERE { ?subject dcterms:medium ?material } ORDER BY ?material

PREFIX dcterms: <http://purl.org/dc/terms/ SELECT distinct ?duration WHERE { ?subject dcterms:temporal ?duration} ORDER BY ?duration

PREFIX europeana: <http://www.europeana.eu/schemas/ese/> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX dcterms: <http://purl.org/dc/terms/> SELECT ?title ?material WHERE { ?subject europeana:dataProvider "Národní muzeum - Historické muzeum" . ?subject dc:title ?title . ?subject dcterms:medium ?material }

PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX dc: <http://purl.org/dc/elements/1.1/> SELECT ?title ?predicate ?object WHERE { ?subject ?predicate ?object . ?subject dcterms:coverage ?object . ?subject dc:title ?title }

AXMPR

PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX : <http://myloc.org/> SELECT ?title WHERE { ?continent dc:title "Evropa" . ?region dcterms:isPartOf* ?continent . ?region a :region . ?region dc:title ?title }

PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX : <http://myloc.org/> PREFIX example: <https://api.museion.cz/schema/axmpr/PublikacePredmetu> 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: <http://purl.org/dc/elements/1.1/> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX : <http://mymat.org/> PREFIX example: <https://api.museion.cz/schema/axmpr/PublikacePredmetu> 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 }

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published