Overview

Notes on how to register and delete RDF files in Virtuoso RDF store using curl and Python.

The following was used as a reference.

https://vos.openlinksw.com/owiki/wiki/VOS/VirtRDFInsert#HTTP PUT

curl

As described on the above page. First, create myfoaf.rdf as sample data for registration.

<r/drfd:<fRf/:DofRFaoDf<aFx:ff>mPo:leaPnrfess:r:onsfnaoomnare>fd>=f":hatb<to/puf:to/=a/"fxh:mtnltanpms:e./>cwmw/wf.oeaxfa/m0p.l1e/."c>om/people/">

Next, execute the following command.

curl-T${filename1}${endpoint}/DAV/home/${user}/rdf_sink/${filename2}-u${user}:${passwd}

A specific example is as follows.

curl-Tmyfoaf.rdfhttp://localhost:8890/DAV/home/dba/rdf_sink/myfoaf.rdf-udba:dba

Python

Here is an execution example. The following uses rdflib to create the RDF file from scratch. Also, by setting the action to delete, you can perform deletion.

ifffeupa###gsng#gdd#uiepmrrinsac#a..aarflrpooldesta#C==maSsttRliiommeprsic#redaeaaeafnrnowot#eGUdvrg=crrttrrai=dniarR=(ei==iteae(ddmnotaI(asfiscsrrffet"==nepRLstlodt"optpeelldhei,oipar{noiosqii==b""=R(ftzetaenonpubbadcD)(eFfenatn=snsoe."""br"F"rOi((.id=eensinmhaedhaAldfrop=stmayt"aedtlFeeieno"===espmfttlat(.slaic.oeopeetp"ntednrr"rsrsa:"ta:ain(teedettpfe/mna)}aqeqaa./"/eam./tulutGcrle",teeDeeeeuredox)i,nA"stssafcano'cV:tet_pi"amanro/s"schmhpm='dh.:.o,polef,eopddose)i(mueeUrt.)le)etl)Rt:oen/(eI8rnc{utRF8gaoureeO9/mdsl(fA0peie,u,F"e,nrrog}dlLpf=/a,ilo'rtterudaae/mtf=uraf_dtat-sahl=8it=""'na()x)k,um/sl{ae"fur)it,lhe=pn(aausmsseew}rd",))passwd))

Summary

There may be other methods, but I hope this serves as a useful reference.