Hi Holger, 

Thanks for getting back to me so quickly. 

I only want to return Concept B since it has exactly the same blank nodes 
as Concept A. I don't want to return Concept C and Concept D since they 
either have 1 less or 1 more than Concept A.

On Thursday, February 22, 2024 at 2:55:09 AM UTC-7 Holger Knublauch wrote:

> The results look correct )with ex:ConceptA the selected resource):
>
> [image: PastedGraphic-1.png]
>
> because all of the concepts match with at least one blank node. SPARQL 
> operates with "EXISTS" semantics and will here return any concept where the 
> same linked values exist, even if they also have other values.
>
> Are you saying you want C and D not to match because they also have other 
> values?
>
> Holger
>
>
> On 21 Feb 2024, at 10:14 pm, Marie Valadez <meval...@gmail.com> wrote:
>
> I am in EDG trying to find instances where another Concept has the exact 
> same values for the property (no more or less). The values can be inherited 
> through skos:broader or directly stated on the concept itself. The property 
> connects to a blank node which contains 2 additional properties and values. 
> Example:
> ConceptA ex:category [ex:map ex:default ;
>                                           ex:attribute ex:S03.01] ;
>                                          [ex:map ex:alternate ;
>                                            ex:attribute ex:S03.02] .
> ConceptB ex:category [ex:map ex:default ;
>                                           ex:attribute ex:S03.01] ;
>                                          [ex:map ex:alternate ;
>                                            ex:attribute ex:S03.02] .
> ConceptC ex:category [ex:map ex:default ;
>                                           ex:attribute ex:S03.01] .
> ConceptD ex:category [ex:map ex:default ;
>                                           ex:attribute ex:S03.01] ;
>                                          [ex:map ex:alternate ;
>                                            ex:attribute ex:S03.02] ;
>                                          [ex:map ex:alternate ;
>                                            ex:attribute ex:S03.03] .
>
> I want to return both ConceptA and ConceptB but not ConceptC or ConceptD 
> since it doesn't match ConceptA exactly. 
>
> I have tried different variations of a sparql query shown below (removed 
> FILTER clause) but haven't been able to return the results I am expecting.
>
> SELECT DISTINCT $this ?concept ?map ?attr
> WHERE { $this skos:broader*/ex:category ?blank .
> ?blank ex:map ?map ;
>           ex:attribute ?attr .
> ?concept skos:broader*/ex:category ?blank1 .
> ?blank1 ex:map ?map ;
>                       ex:attribute ?attr .
>   FILTER(?concept != $this)
>    
> }
>
> #find concept with the same modeling
> SELECT DISTINCT $this ?map ?attr
> WHERE { $this skos:broader*/ex:category ?blank .
> ?blank ex:map ?map ;
>            ex:attribute ?attr .
>  FILTER EXISTS{?concept skos:broader*/ex:category ?blank1 .
> ?blank1 ex:map ?map ;
>              ex:attribute ?attr .
>       FILTER(?concept != $this)}
> }
>
>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/310db76e-c5bc-4448-9c14-1afba788bd8en%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/310db76e-c5bc-4448-9c14-1afba788bd8en%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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/5eb85678-fbef-4974-9d5c-ce4019b81f4fn%40googlegroups.com.

Reply via email to