platform icon indicating copy to clipboard operation
platform copied to clipboard

Offer a form to generate the content of a system meta data file

Open MichaelRoeder opened this issue 7 years ago • 6 comments

Description

As a user that might not know RDF, I would like to enter the meta data of my system into a form that generates the content of the system.ttl file for me.

Following the description of a simple system meta data file the following information is needed.

  • The URI of a system (has to be a valid URI!) %URI%
  • The name of a system (String) %NAME%
  • A description of the system (String, optional) %DESC%
  • A docker image name (String) %IMAGE%
  • An API URI (URI) %API%

For the API, there are two ways to implement the input. One possibility is to have a field to enter the URI. Another option is to show all available benchmarks and the user has to choose the benchmark from the list. The system would automatically get all APIs the benchmark supports.

Based on this information, the following template can be filled by replacing the %...% keys with their values.

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix hobbit: <http://w3id.org/hobbit/vocab#> .

<%URI%> a  hobbit:SystemInstance; 
	rdfs:label	"%NAME%"@en;
	rdfs:comment	"%DESC%"@en;
	hobbit:imageName "%IMAGE%";
	hobbit:implementsAPI <%API%> .

If there is no description, the line rdfs:comment "%DESC%"@en; might be removed. (Although an empty description is valid as well.)

The generated system meta data file content should be shown in an area below the form. There might be a copy button, that automatically copies the content for the user.

The generation could be implemented based on JavaScript inside the front end client or as Java code in the GUI serverbackend.

MichaelRoeder avatar Sep 29 '17 13:09 MichaelRoeder

I, as a user without previous knowledge of RDF, am not sure whether the informationen you have provided are sufficient to fill-out all the gaps. System Name and description are quite self-explanatory, but what about the URI? What is the purpose of the URI? Is it possible to automatically create it or does it have to be "speaking"? Same goes for the docker image name: What image do I reference? The image of my system I want to upload? Wouldn't it be better if names are generated by Gitlab?

Ennosigaeon avatar Oct 09 '17 14:10 Ennosigaeon

That are very good questions :smiley:

  • The URI is a unique identifier and he is free to choose it. Typically, it follows the template of an HTTP URL. It does not have to be "speaking" but it might be better if it is the case.
    • Feature: We could offer a generator for it that uses the name and maybe the name of the user to create a URI. However, the user should still be able to edit it.
    • Feature: We could check whether a URI is already taken by another system to avoid the usage of an existing URI. The backend could offer a simple webservice that returns true or false depending on whether the user could use that URI or not.
  • The Docker image name depends a little bit on the use case but typically, it is the image that you have uploaded.
    • Generating the name of the image is a little bit tricky. Yes, it partly depends on the information that gitlab has about the user but after fixing #115 this dependency might be gone.

MichaelRoeder avatar Oct 10 '17 07:10 MichaelRoeder

I have created a basic form with some minimal validation:

  • System URI is checked to be valid URI
  • Benchmark API is selected from dropdown menu

I think that the form can be enhanced in many ways e.g. creation of system parameters and the validation can be improved by e.g.

  • Check if System URI is already used
  • Check if docker image is valid URL (not sure about this one...)

However, I am not sure if it is reasonable to add more functionality or if the current state is sufficient for most of the users.

Ennosigaeon avatar Oct 10 '17 13:10 Ennosigaeon

Check if System URI is already used

It should check if user-provided URI already exists, and also don't generate duplicates when requested. #136

denkv avatar Nov 06 '17 13:11 denkv

If you provide some kind of functionality for that check, I can add this logic to the frontend.

Ennosigaeon avatar Nov 06 '17 14:11 Ennosigaeon

Generation of a benchmark (or system) metadata file can also be a part of a project template for HOBBIT, maybe as a Maven Archetype.

denkv avatar Aug 03 '21 13:08 denkv