Dear all,

I am trying to use the API to define some constraints and figure out that 
for many I need to use SPARQL

I was given some reference to the SHACL Advanced Features 1.1 but I am not 
sure if this is already supported by TopBraid API that is now posted in 
Maven

In order to illustrate what I need to do I attached some sample data xml 
and ttl that are same (just different format ). I would like to give some 
hints on how I could do the following constraints. I guess the target will 
need to be carefully selected and the query might need to have subquery.

- constraint 1

Only one Class1 has attribute1 that is the highest value(non-zero) and all 
others shall be equal to 0

This should also check if the highest value is appearing once i.e. not ok 
if attribute1 is 2 in one instance and 2 in the other

 

- constraint 2

Class3.attribute1 shall be equal to one of the associated Class2.attribute1 
values.

Here I wanted to have a List of all Class2.attribute1 values and just 
filter if Class3.attribute1 is IN or NOT IN

The question is how to iterate to build the list. Or maybe the list idea is 
a wrong approach to this.

 

- constraint 3

Instances of Class4 are required (Violation) to be instantiated for Class3 
and Class5. If Class4 is instantiated for Class2 the severity is Info.

In addition looking at Class3 how I can count how many instances of Class2 
are associated via Class2.Class3. I guess GROUP BY can be used.

 

-Constraint 4

Class4 is instantiated only for instances that are referenced by Class6

 

-Constraint 5

If only one instance of Class7 is associated with Class2 instance then 
Class7.attribute1 shall equal Class2.attribute2

 
- Constraint 6
check if Class3 is referenced by at least 3 instances of Class2 and there 
should be one instance Class2 for which Class2.attribute1 is negative and 
another instance of Class2 for which Class2.attribute2 is positive 


Best regards
Chavdar 

-- 
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 topbraid-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/de8f635c-9777-44ae-98e1-fde322145f80o%40googlegroups.com.

Attachment: Example.ttl
Description: Binary data

Attachment: Example.xml
Description: XML document

Reply via email to