kit-data-manager / EVOKS

EVOKS (Editor for Vocabularies to Know Semantics)
Apache License 2.0
1 stars 0 forks source link

urispace wird bei import nicht erkannt, vokabular wird dann fehlerhaft in skosmos angezeigt #92

Open FelixFrizzy opened 1 month ago

FelixFrizzy commented 1 month ago

Der Fehler liegt daran, dass in dem skosmos config.ttl file dann sowas steht wie

    skosmos:mainConceptScheme <http> ;
    void:sparqlEndpoint <http://fuseki-dev:3030/tadirah_notworking/sparql> ;
    void:uriSpace "http" .

Es muss aber sowohl für skosmos:mainConceptScheme als auch für void:uriSpace was gesetzt werden. Urispace bleibt wahrscheinlich leer weil die urispace detection recht obskur sein könnte. Das wurde von den Studis last minute kurz vor finaler (!) Abgabe noch hinzugefügt und ich muss erstmal schauen was da getrieben wurde. Quick"fix" ist die manuelle bearbeitung des config.ttl files

comment 1 from FK

Problem liegt hier:

evoks/vocabularies/models.py

def find_urispace(subjects):

    prefix = subjects[0]
    for word in subjects:
        if len(prefix) > len(word):
            prefix, word = word, prefix

        while len(prefix) > 0:
            if word[:len(prefix)] == prefix:
                break
            else:
                prefix = prefix[:-1]
    return prefix

Wenn das keinen urispace findet gibt die funktion einfach einen leeren String zurück und das Vokabular kann nicht angezeigt werden. Das ist natürlich Unsinn

comment 2 from FK

fix in arbeit in branch urispace_detection. was jetzt funktioniert ist der import von tadirah.rdf. was noch nicht funktioniert ist, wenn ich bei tadirah ein prefix angebe (xmlns:tadirah="https://vocabs.dariah.eu/tadirah/"), dann wird es in Skosmos nicht richtig angezeigt

FelixFrizzy commented 1 month ago

Related with #93