Ok, will do. Sorry the example I gave was outdated, I realized that when
I checked out the latest sources (I was on 3.16.0). There are still some
accessors to add.
Best,
Florian
Am 2020-11-24 17:34, schrieb Andy Seaborne:
Yes, please put in a PR for anything missing.
There is compact syntax writer in 3.17.0 and it needs access to
constraints details so it can print so most should be here.
I do see in the current codebase: NodeKindConstraint.getKind()
Andy
https://github.com/apache/jena/blob/master/jena-shacl/src/main/java/org/apache/jena/shacl/engine/constraint/NodeKindConstraint.java#L58
On 24/11/2020 12:41, Florian Kleedorfer wrote:
Hi,
I am developing a program based on Jena/SHACL and I think I need a
small adaptation.
What I want to achieve:
- analyze shacl shapes and generate java class files
- read shapes and data and instantiate objects representing the data
While doing that, I realized that the properties of the
Constraint-implementations in
`org.apache.jena.shacl.engine.constraint` are not accessible. E.g. in
`NodeKindConstraint`, the field `kind` is private, and it has no
getter method. In the current SHACL use case of jena, the Constraints
don't need to be accessible (they just check their respective
conditions). In my use case, I'll need to access that information for
determining property types etc. (e.g by analyzing sh:nodeKind) and
therefore need to access the constraints.
Would it be possible to make the Constraints' properties accessible
with public getters?
I could prepare a PR if that's ok.
Best regards,
Florian