You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jena.apache.org by "bkosuru (via GitHub)" <gi...@apache.org> on 2025/10/08 14:49:39 UTC
[I] SHACL validation service returns valid report if RDF-star triples are present in the data [jena]
bkosuru opened a new issue, #3503:
URL: https://github.com/apache/jena/issues/3503
### Version
5.5
### What happened?
Hello,
I have some RDF-star triples in the data. The shacl command line throws Exception where as SHACL validation service returns ValidationReport showing data is valid.
shacl validate --shapes SHAPES.ttl --data data.nt
09:51:02 ERROR riot :: [line: 144, col: 1 ] Expected BNode or IRI: Got: [LT2]
validation service:
[ rdf:type sh:ValidationReport;
sh:conforms true
] .
If I remove the RDF star triples from the data, then the service returns list of violations
Shapes.ttl used-
schema:GeneGeneOntologyAssociationShape
a sh:NodeShape ;
sh:targetClass genomics:Gene-GeneOntology-Association ;
sh:property [
sh:path genomicsb:goa-comprises-of-gd ;
sh:nodeKind sh:IRI ;
sh:minCount 1
] .
I was expecting list of violations as the property is not present in the data. The node I was testing is not even RDF-star triple.
1) shacl does not support RDF-star? Is there a plan to support in the future?
2) If shacl does not support RDF-star, then the service/cmd should ignore RDF star triples and process rest of the data. In the worst case the service should return a message saying that data has RDF-star triples.
### Relevant output and stacktrace
```shell
```
### Are you interested in making a pull request?
None
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] SHACL validation service returns valid report if RDF-star triples are present in the data [jena]
Posted by "bkosuru (via GitHub)" <gi...@apache.org>.
bkosuru commented on issue #3503:
URL: https://github.com/apache/jena/issues/3503#issuecomment-3383333792
Data is read from a file at server startup
tdb2.tdbloader --loc fuseki/ds ${DATA}/*.nt
cd fuseki
./fuseki start
We did not capture the logs. We will update the code to capture the logs.
tdb2 database we are using-
:dataset rdf:type tdb2:DatasetTDB2 ;
tdb2:location "ds" ;
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] SHACL validation service returns valid report if RDF-star triples are present in the data [jena]
Posted by "afs (via GitHub)" <gi...@apache.org>.
afs closed issue #3503: SHACL validation service returns valid report if RDF-star triples are present in the data
URL: https://github.com/apache/jena/issues/3503
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] SHACL validation service returns valid report if RDF-star triples are present in the data [jena]
Posted by "bkosuru (via GitHub)" <gi...@apache.org>.
bkosuru commented on issue #3503:
URL: https://github.com/apache/jena/issues/3503#issuecomment-3385553196
Thanks Andy!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] SHACL validation service returns valid report if RDF-star triples are present in the data [jena]
Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on issue #3503:
URL: https://github.com/apache/jena/issues/3503#issuecomment-3383207855
What is the configuration of this service?
How did the data get loaded? If the data is PUT or POSTed to load it, there will be a parse error and the operation will abort, HTTP response 400, and no data loaded. If it is read from a file atserver startup, the log file shoudl have an error in it. If it is a TDB database from an old version of Jena, the data is no longer valid.
> `<< <https://www.ncbi.nlm.nih.gov/gene/824554> <http://purl.tmp.com/hasGOAnnotation> "GO:0005794" >> <http://purl.obolibrary.org/obo/RO_0002558> "RCA" .`
I don't know the OBO modelling but (see the links above) it looks to me if it is a usage of the fact represented by the triple that has evidence.
The data will need conversion to RDF 1.2. That maybe as little as Using the `<< >>` syntax in Turtle that expands to other triples in the data. See the links above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] SHACL validation service returns valid report if RDF-star triples are present in the data [jena]
Posted by "bkosuru (via GitHub)" <gi...@apache.org>.
bkosuru commented on issue #3503:
URL: https://github.com/apache/jena/issues/3503#issuecomment-3383107194
Thanks for your response -
Here is some triples from the data. The last triple is the RDF-star triple.
```
<https://purl.tmp.com/gene2go/genegeneontologyassociation/xyz> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://purl.tmp.com/def/Genomics#Gene-GeneOntology-Association> .
<https://purl.tmp.com/gene2go/genegeneontologyassociation/xyz> <https://purl.tmp.com/def/genomics#goa-comprises-of-gene> <https://www.ncbi.nlm.nih.gov/gene/828167> .
<< <https://www.ncbi.nlm.nih.gov/gene/824554> <http://purl.tmp.com/hasGOAnnotation> "GO:0005794" >> <http://purl.obolibrary.org/obo/RO_0002558> "RCA" .
```
We have set up a fuseki server locally. This is the call.
curl -XPOST --data-binary @${SHAPE} --header 'Content-type: text/turtle' 'http://localhost:3030/ds/shacl?graph=default' > ${OUTPUT}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] SHACL validation service returns valid report if RDF-star triples are present in the data [jena]
Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on issue #3503:
URL: https://github.com/apache/jena/issues/3503#issuecomment-3382984265
Hi @bkosuru
Jena supports RDF 1.2, and there are differences between RDf 1.2 and RDF* (the community group work).
```
ERROR riot :: [line: 144, col: 1 ] Expected BNode or IRI: Got: [LT2]
```
The N-triples parser sees `<<` in the subject position. That is not legal in N-triples in RDF 1.2.
https://www.w3.org/TR/rdf12-primer/#section-triple-terms
and syntax forms in Turtle
https://www.w3.org/TR/rdf12-turtle/#reifying-triples
Could you show the data? It may be legal as RDF 1.2 Turtle - although the meaning is different.
jena-shacl does not support the validation of RDF 1.2 yet.
By "SHACL validation service", do you mean the Jena provided "/data/shacl" operation?
The `confirms true` on parse error is a bug.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org
Re: [I] SHACL validation service returns valid report if RDF-star triples are present in the data [jena]
Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on issue #3503:
URL: https://github.com/apache/jena/issues/3503#issuecomment-3384579786
`tdb2.tdbloader --loc fuseki/ds ${DATA}/*.nt`
When I load an N-Triples file with `<<` in the data, I get a parse error.
tdbloader is not transactional so you may have a partial load of the data.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org