Cannot delete node after having created it with custom form

43 views
Skip to first unread message

charly....@univ-grenoble-alpes.fr

unread,
Jan 25, 2022, 10:17:08 AM1/25/22
to vocbench-user
Dear all,

I've created a custom form to be able to add "dct:source" property when a I set a new skos:Definition. Here is what is created by the custom form.

<rdf:Description rdf:about="https://w3id.org/myThes/def_0b383654">
        <rdf:value xml:lang="en">test</rdf:value>
        <dct:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2022-01-25T14:09:47</dct:created>
        <dct:source rdf:resource="https://en.wikipedia.org/wiki/Test_(assessment)"/>
</rdf:Description>


My problem is that, except from navigating through the skos:definition of the concept I just defined, I cannot find the definition node in the interface. 
So I cannot delete it and if I delete the skos:definition property of the concept, the definition node will stay in the vocabulary and I won't be able to update/delete it using the interface.

Any suggestions?

Best regards,

Charly C

Tiziano Lorenzetti

unread,
Jan 25, 2022, 12:20:11 PM1/25/22
to charly....@univ-grenoble-alpes.fr, vocbench-user
Dear Charly,
from the last sentence
"So I cannot delete it and if I delete the skos:definition property of the concept, the definition node will stay in the vocabulary and I won't be able to update/delete it using the interface"
I didn't understand if you actually tried to delete the skos:definition and the node it's still there, or if it is only an assumption based of what happens when deleting other properties.

When you delete an object created with a custom form, in your case the definition, the whole object is actually deleted. 
It's similar to the deletion of a skosxl Label, where both the description of the label and the triple which links it to the resource (e.g. :aConcept skosxl:prefLabel :aXLabel) are deleted.

I replicated your scenario, I created a CustomForm for skos:definition with rdf:value, dct:source and dct:created. I added the definition to a concept...

image.png
here it is the description of the definition ...
image.png
... and then, once I deleted the definition from the ResourceView of "test concept", refreshing the description of the definition, the view tells me that such resource doesn't exist anymore.

image.png

In case you actually deleted the definition, but the node still exists, then proabably there's an issue. In case, please send me the CustomForm code and I'll take a look.

Best regards,
Tiziano

--
You received this message because you are subscribed to the Google Groups "vocbench-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vocbench-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vocbench-user/11f89253-c89d-4d55-8abe-2ce6745d421an%40googlegroups.com.

Charly Coussot

unread,
Jan 26, 2022, 4:13:01 AM1/26/22
to Tiziano Lorenzetti, vocbench-user

Dear Tiziano,

This was not an assumption and the definition node actually stays after being deleted from the resource view of the concept. Here is my custom form:

rule it.uniroma2.art.semanticturkey.customform.form.reifiednote id:reifiednote {
    nodes = {
         reifNoteId uri(coda:randIdGen("def", {})) .
        noteLang literal userPrompt/lang .
        noteLit literal(coda:langString($noteLang)) userPrompt/note .
        noteSource uri userPrompt/source .
    }
    graph = {
        $reifNoteId rdf:value $noteLit .
        OPTIONAL{$reifNoteId dc:source $noteSource .}
    }
}

I think this is due to the resource metadata pattern "DublinCore metadata" that I apply on "Any resource". Then when I delete the definition node the triple :def_78b47a90 dct:created "2022-01-26T08:58:02"^^xsd:dateTime . stays in the triple store.

I probably should not apply this metadata resource pattern on any resource but only on skos:Concept for example and had the dct:created date with the custom form as you did. dct:modified won't generated though.

What do you think?

Best regards,

Charly

Tiziano Lorenzetti

unread,
Jan 26, 2022, 5:13:29 AM1/26/22
to Charly Coussot, vocbench-user
Dear Charly,
thanks for the clarifications. Anyway, this is strange, I cannot replicate your issue even by enabling the DublinCore metadata on Any resource. 
I'm using the CustomForm you provided and I see indeed that the dct:created is added by means the resource metadata mechanism. Then, when I delete the skos:definition from the concept, its node is deleted as well.
This is the expected behaviour, since when an object is deleted, every outgoing triple is deleted, even when the object is created through a CustomForm.

Which version of VB are you using? I see that this issue affected version 9.0 and it was fixed in may 2021 for version 10.0 (commit).
In case you're using an older version I suggest you to update VB, if you want to keep that version instead, I guess the solution you proposed (enabling DublinCore metadata only for concepts) should work.

Best regards,
Tiziano

Charly Coussot

unread,
Jan 26, 2022, 5:32:54 AM1/26/22
to Tiziano Lorenzetti, vocbench-user

Dear Tiziano,

I have V9.1.0 installed. I will upgrade to v10.1.1. I installed my vocbench installed in a Kubernetes cluster and /opt/vocbench3/data is mounted. Is there any upgrade task to perform or changing the version should work just fine with the data from v9.1.0?

Also what resources request/limit (cpu/ram) would you suggest ?

Best regards,

Charly

Tiziano Lorenzetti

unread,
Jan 26, 2022, 6:06:49 AM1/26/22
to Charly Coussot, vocbench-user
Dear Charly,
I quote here the instructions provided in VB new release announcement.

Migration from a previous version of the system

As usual, for people migrating from a previous version of VocBench 3, it suffices to:

  • keep the “SemanticTurkeyData” directory (you might want to make a backup just in case anything happens, even though the system has been extensively tested for migration)
    • consider that some migration routines will make the data directory not entirely compatible with prior versions of VocBench
  • remove the previous distribution (directory semanticturkey-x.y) and replace it with the new one inside the vocbench3-10.1.0-full.zip archive
  • if using an external triple store:
    • replace the old st-changetracking-sail-x.y.jar file located in the lib directory of the triple store with the new one: st-changetracking-sail-10.1.jar, that can be extracted from:
      /semanticturkey-10.1/system/it/uniroma2/art/semanticturkey/st-changetracking-sail/10.1
    • replace the old st-trivial-inference-sail-x.y.jar file located in the lib directory of the triple store with the new one: st-trivial-inference-sail-10.1.jar, that can be extracted from:
      /semanticturkey-10.1/system/it/uniroma2/art/semanticturkey/st-trivial-inference-sail/10.1

About the resources, it depends on the quantities of data you're working with. Here we provide an example of configuration for large quantities of data for a PC with 16GB of RAM.

Best regards,
Tiziano
Reply all
Reply to author
Forward
0 new messages