Re: Use rdf:ID in RDF/XML generated file
Hi Andy, Thank you for all these detailed and precise explanations. Problem solved. Regards! Le jeu. 7 sept. 2023 à 17:27, Andy Seaborne a écrit : > > On 07/09/2023 15:54, mbk wrote: > > > > Hi! > > > > We generate a RDF/XML file which has all its resources with the > > 'rdf:about' attribute. We would like to replace this attribute with 'rdf:id' > > > > Using apache-jena 3.17.0 We create ressource with > > model.createResource(uri,res) where uri is an UUID with prefix '_' > > (_04f2f0d3-10f4-4248-a7fc-fc8243ec7250) and res os a ressource from a > > vocabulary. The ressource node in generated file has rdf:about atribute. > > We like to have rdf:ID instead > > Hi, > > Is that a URI of <_:04f2f0d3-10f4-4248-a7fc-fc8243ec7250> or > <_04f2f0d3-10f4-4248-a7fc-fc8243ec7250 > > The first is not a legal URI - the scheme name "_" isn't legal. It's not > a blank node either because the argument string is interpreted as a URI. > > The second is a relative URI which when used in RDF/XML will be resolved > against the base URI. > > You should use a full URI in a call to model.createResource. > > rdf:ID (on nodes) will become an URI fragment and also be resolved. > > rdf:ID="abc" is much the same as rdf:about="#abc". > > > Do you have an minimal example of what you are trying to achieve and > what you currently get? > > Is this related to: > > https://github.com/apache/jena/issues/2007 > > > Using apache-jena 3.17.0 > > released 2020-11-25 > > For security reasons (including with RDF/XML), you should upgrade to > Jena 4.9.0 > > Andy > > > > > Thanks > > > >
Re: Use rdf:ID in RDF/XML generated file
On 07/09/2023 15:54, mbk wrote: Hi! We generate a RDF/XML file which has all its resources with the 'rdf:about' attribute. We would like to replace this attribute with 'rdf:id' Using apache-jena 3.17.0 We create ressource with model.createResource(uri,res) where uri is an UUID with prefix '_' (_04f2f0d3-10f4-4248-a7fc-fc8243ec7250) and res os a ressource from a vocabulary. The ressource node in generated file has rdf:about atribute. We like to have rdf:ID instead Hi, Is that a URI of <_:04f2f0d3-10f4-4248-a7fc-fc8243ec7250> or <_04f2f0d3-10f4-4248-a7fc-fc8243ec7250 The first is not a legal URI - the scheme name "_" isn't legal. It's not a blank node either because the argument string is interpreted as a URI. The second is a relative URI which when used in RDF/XML will be resolved against the base URI. You should use a full URI in a call to model.createResource. rdf:ID (on nodes) will become an URI fragment and also be resolved. rdf:ID="abc" is much the same as rdf:about="#abc". Do you have an minimal example of what you are trying to achieve and what you currently get? Is this related to: https://github.com/apache/jena/issues/2007 > Using apache-jena 3.17.0 released 2020-11-25 For security reasons (including with RDF/XML), you should upgrade to Jena 4.9.0 Andy Thanks
Use rdf:ID in RDF/XML generated file
Hi! We generate a RDF/XML file which has all its resources with the 'rdf:about' attribute. We would like to replace this attribute with 'rdf:id' Using apache-jena 3.17.0 We create ressource with model.createResource(uri,res) where uri is an UUID with prefix '_' (_04f2f0d3-10f4-4248-a7fc-fc8243ec7250) and res os a ressource from a vocabulary. The ressource node in generated file has rdf:about atribute. We like to have rdf:ID instead Thanks
Re: Jena hangs on deleted files
Are the database files on a MS Windows filesystem? There is a long-standing Java issue that memory mapped files on MS Windows do not get freed until the JVM exists. Various bugs in the OpenJDK bug database such as: https://bugs.openjdk.org/browse/JDK-4715154 Andy On 07/09/2023 13:06, Mikael Pesonen wrote: We used deleteOld param. The 50 gigs are ghost files that are deleted but not released, that's what I meant by hanging on deleted files. Restarting jena releases them and now for example freed 50 gigs of space. On 07/09/2023 15.02, Øyvind Gjesdal wrote: What does the content of the tdb2 folder look like? I think compact by default never deletes the old data, but you have parameters for making it delete the old content on completion. `--deleteOld` can be supplied to the tdb2.tdbcompact command line tool and `?deleteOld=true` can be supplied to the administration api when calling compact https://jena.apache.org/documentation/fuseki2/fuseki-server-protocol.html#compact You can also delete the Data- that isn't the latest one in the database folder. Best regards, Øyvind On Thu, Sep 7, 2023 at 1:33 PM Mikael Pesonen wrote: After a while 25 gigs of files on data folder becomes 80 gigs of disk usage because Jena (4.6.1) doen't release files. Same with compact. Is this fixed in newer versions?
Re: Jena hangs on deleted files
We used deleteOld param. The 50 gigs are ghost files that are deleted but not released, that's what I meant by hanging on deleted files. Restarting jena releases them and now for example freed 50 gigs of space. On 07/09/2023 15.02, Øyvind Gjesdal wrote: What does the content of the tdb2 folder look like? I think compact by default never deletes the old data, but you have parameters for making it delete the old content on completion. `--deleteOld` can be supplied to the tdb2.tdbcompact command line tool and `?deleteOld=true` can be supplied to the administration api when calling compact https://jena.apache.org/documentation/fuseki2/fuseki-server-protocol.html#compact You can also delete the Data- that isn't the latest one in the database folder. Best regards, Øyvind On Thu, Sep 7, 2023 at 1:33 PM Mikael Pesonen wrote: After a while 25 gigs of files on data folder becomes 80 gigs of disk usage because Jena (4.6.1) doen't release files. Same with compact. Is this fixed in newer versions? -- Lingsoft - 30 years of Leading Language Management www.lingsoft.fi Speech Applications - Language Management - Translation - Reader's and Writer's Tools - Text Tools - E-books and M-books Mikael Pesonen Semantic Technologies e-mail: mikael.peso...@lingsoft.fi Tel. +358 2 279 3300 Time zone: GMT+2 Helsinki Office Eteläranta 10 FI-00130 Helsinki FINLAND Turku Office Kauppiaskatu 5 A FI-20100 Turku FINLAND
Re: Jena hangs on deleted files
What does the content of the tdb2 folder look like? I think compact by default never deletes the old data, but you have parameters for making it delete the old content on completion. `--deleteOld` can be supplied to the tdb2.tdbcompact command line tool and `?deleteOld=true` can be supplied to the administration api when calling compact https://jena.apache.org/documentation/fuseki2/fuseki-server-protocol.html#compact You can also delete the Data- that isn't the latest one in the database folder. Best regards, Øyvind On Thu, Sep 7, 2023 at 1:33 PM Mikael Pesonen wrote: > > After a while 25 gigs of files on data folder becomes 80 gigs of disk > usage because Jena (4.6.1) doen't release files. Same with compact. Is > this fixed in newer versions? >
Jena hangs on deleted files
After a while 25 gigs of files on data folder becomes 80 gigs of disk usage because Jena (4.6.1) doen't release files. Same with compact. Is this fixed in newer versions?