Michel,

First, all target declarations are cumulative. The target is a union of all 
targets https://www.w3.org/TR/shacl/#targets 
<https://www.w3.org/TR/shacl/#targets>

So, for the validation purposes, you could simply do:

alim:NodeShape_1 sh:targetClass  bs:InformationObject, bs:Activity, 
bs:PhysicalObject.

For the form view and edit purposes, you will see the rdfs:seeAlso  on the form 
for instances of these classes, but not in the same display with the fields 
that are defined directly for the class or for any class it is connected to via 
rdfs:subClassOf statement, transitively. 

Instead, you will get a dropdown on the form that will let you switch to the 
alim:NodeShape_1 view of a resource. This view will only show properties 
defined for alim:NodeShape_1. Each node shape targeting a resource results in 
its own view on a resource.

If this is not what you want, do not create a new node shape that will be an 
alternative view. Instead, add a property shape for rdfs:seeAlso directly for 
each of the classes or create a common super class and add the property shape 
to it.

In EDG, for modeling convenience, there is an option to add already existing 
property definitions (property shapes) to a class (node shape) as well as an 
option to copy property definitions from another node shape.

Second, SHACL is its own language. You can not use OWL axioms in SHACL 
definitions just as you can’t use SHACL statements in OWL axioms. SHACL has its 
own logical expressions using sh:or, sh:and, sh:not, etc.

SHACL engines do not perform OWL inferencing e.g., to resolve the set 
represented as a union. You can, in principle, run OWL inferencing on your 
ontology which could insert rdfs:subClassOf statements from these 3 classes to 
the union class which will be a blank node and you could attach a property 
shape for rdfs:seeAlso to that blank node, but I would not recommend this.


Third, if you want to see on a form a hyperlink to a document on a web, use 
xsd:anyURI or, if values are text that includes links, use ref:HTML. You can 
also specify multiple datatypes.

> On Feb 5, 2020, at 7:16 AM, 'Bohms, H.M. (Michel)' via TopBraid Suite Users 
> <[email protected]> wrote:
> 
> Dear Irene
>  
> Still bit struggling with TBCtoEDG.
>  
> Following your advice I made my ontology a shacl one in TBC.
>  
> I added:
> alim:NodeShape_1
>   rdf:type sh:NodeShape ;
>   sh:property [
>       sh:path rdfs:seeAlso ;
>       sh:datatype xsd:string ;
>     ] ;
>   sh:targetClass [
>       rdf:type owl:Class ;
>       owl:unionOf (
>           bs:InformationObject
>           bs:Activity
>           bs:PhysicalObject
>         ) ;
>     ] ;
> .
>  
> This way I hoped to get a rdfs:seeAlso property in my 
> bs:InformationObject/alim:Paper form. (I actually have data pointing to an 
> doc on the web).
>  
> However when I use EDG (including this update shacl file) and go to a 
> specific instance of InformationObject I get:
> <image001.jpg>
>  
> And also an error is thrown in TBC:
> <image007.jpg>
>  
> Thx for advice,
> Michel
>  
> Ps
> I attached the actual test ontology
>  
>  
> Dr. ir. H.M. (Michel) Böhms
> Senior Data Scientist
> 
> T +31888663107
> M +31630381220
> E [email protected]
> Location
> 
>  
> <image006.gif>
> This message may contain information that is not intended for you. If you are 
> not the addressee or if this message was sent to you by mistake, you are 
> requested to inform the sender and delete the message. TNO accepts no 
> liability for the content of this e-mail, for the manner in which you use it 
> and for damage of any kind resulting from the risks inherent to the 
> electronic transmission of messages.
>  
>  
>  
>  
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/ec66e6a6d0f840b093c55230981f3446%40tno.nl.
> <alim.shapes.ttl>

-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/5AA08E63-3872-4D1E-A25A-8CDE041B3844%40topquadrant.com.

Reply via email to