Hello I would like to declare data structure with an Interface that extends Jena Resource and its implementation that extends Jena ResourceImpl in the same way as https://github.com/TopQuadrant/shacl/blob/a3f54abeffc691ff0b15bee7f049741eb6e00878/src/main/java/org/topbraid/shacl/model/SHShape.java (interface) and https://github.com/TopQuadrant/shacl/blob/a3f54abeffc691ff0b15bee7f049741eb6e00878/src/main/java/org/topbraid/shacl/model/impl/SHShapeImpl.java (implementation, which indirectly extends ResourceImpl). Is it a common and good practice ?
The constructor of the implementation takes as an input (Node node, EnhGraph graph). I don't know how to obtain or build these Node and EnhGraph from plain Resource / Model I am used to. I will be working with memory or TDB-backed Models, if that matters. How can I obtain or build these so that I can call the constructor of my data structure extending ResourceImpl, with a Node and EnhGraph instance ? I feel this could be related to "Personality<RDFNode>", as can be seen at https://github.com/TopQuadrant/shacl/blob/76257beb501381542361b52363329999363753ff/src/main/java/org/topbraid/shacl/model/SHFactory.java, where RDF classes URI are associated to the corresponding Java classes. I am lost here, could someone shed some light on this design pattern ? Thanks Thomas -- *Thomas Francart* -* SPARNA* Web de *données* | Architecture de l'*information* | Accès aux *connaissances* blog : blog.sparna.fr, site : sparna.fr, linkedin : fr.linkedin.com/in/thomasfrancart tel : +33 (0)6.71.11.25.97, skype : francartthomas
