Giter Site home page Giter Site logo

coreon / coreon-sparql-client Goto Github PK

View Code? Open in Web Editor NEW
0.0 7.0 1.0 339 KB

A sample implementation of a TryOut UI to query Coreon repositories with SPARQL. Deployed to the European Language Grid hub (www.european-language-grid.eu)

Home Page: https://www.coreon.com

Dockerfile 0.03% JavaScript 77.83% CSS 18.91% HTML 3.23%
sparql-client knowledge-graph terminology-management taxonomy-management ontology-search

coreon-sparql-client's Introduction

coreon-sparql-client

coreon-sparql-client is a ui application for making sparql queries to the equivalent Coreon endpoint.

It can be loaded inside an iframe, or run as an independent ui app.

Installation

Prerequisites:

  • Docker (20.10.8)
  • nginx (nginx/1.18.0 (Ubuntu))

In order for the queries to access the endpoint and receive response, two factors are required:

  1. a repository URI that specifies the target from which the data will be parsed
  2. an API key for user authentication.

Both pieces of information are meant to be provided dynamically by a parent application (since the current app is configured to be rendered in an iframe inside a parent application).

In order for this app to be run independently, the necessary info will need to be set manually.

To install this application and deploy it as a docker image using nginx, please follow the instructions at https://www.docker.com/blog/how-to-use-the-official-nginx-docker-image/

sudo docker build -t webserver .

sudo docker run -it --rm -d -p 8080:80 --name web webserver

The application can then be accessed at localhost:8080

Usage

The UI consists of a form that contains a textarea input. Use this input to build custom queries and submit in order to receive a response from the Coreon sparql endpoint. The response will be rendered as an html table, below the query.

Parsing and rendering metadata

In the case where the client app is hosted within an iframe, the parent application may expose the url to one or multiple HTML files, containing metadata related to the source that is being queried. In the case of Coreon, this source is a repository. In the case of multiple repositories that can be accessed, there must be one HTML file for each corresponding repository. These HTML files must be placed under a directory with the name "samples", which, itself is placed within the "html" directory of the client application.

The client app can fetch and display the repository's name, description and sample queries.

It is required that within the provided HTML file, the relevant strings, be wrapped by elements with corresponding classes, as follows.

  • Repository name: "coreon-repo-name"
  • Repository description: "coreon-repo-description"
  • Repository query: "coreon-sample-query"

There can be multiple sample queries, for each repository.

License

MIT License

Copyright (c) 2021 the Coreon team

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

coreon-sparql-client's People

Contributors

frexos avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ianroberts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.