I think this is similar to your previous question. If you delete a resource 
from an asset collection, statements referring to this resource from another 
collection still exist.

There are several approaches for addressing this issue:

1. Before you delete a resource, you can use Explore-> Find Usages in Other 
Asset Collections

This will find only incoming statements i.e., identify that it is used in a 
crosswalk mapping if a resource is in the “to” graph.

You can then remove the crosswalk reference before you delete a resource

2. Delete and rely on the validation to find dangling references

When you created a crosswalk you said that you are connecting resources of type 
class. As you know, part of crosswalk creation is to identify the type for the 
the “from” and “to” resources.

If you delete the underlying resource, the type statement is no longer there 
and you will get a validation result in the Problems and Suggestion panel. 

Run validation with just SHACL Validation on - something like this:



You should get a validation result that tells you that there is a mapping to 
the (deleted) resource that must be of type Class. 

I suggest switching for this to the Problems and Suggestions layout. You could 
then use the Form to delete the dangling connection and, if needed, replace it 
with something else. This will work whether the deleted resource is an object ( 
“to”) or or a subject ( “from”) in the crosswalk.

3. Delete and run a query in the Crosswalk to find issues, something like:

DELETE {?s edg:closeMath ?o}
WHERE {?s  edg:closeMath ?o.
        FILTER NOT EXISTS {?s a ?type}
}

And do the same in the other direction - for ?o

Of course, it is best to run the SELECT before the DELETE, especially if your 
goal is not just remove the dangling reference but also possibly find an 
alternative resource to map to.

You could put such queries in a query library and run them periodically to do 
the clean up.



> On Feb 25, 2021, at 1:59 PM, tay.me <tayeb.mera...@gmail.com> wrote:
> 
> Hello,
> 
>    I created an crosswalk manually  between two classes from two different 
> ontologies. neverthless, after deleting the target class from the original 
> ontology, the crosswlak relation still exists. How we can udpdate corsswlak 
> relations if one of the target or source resources are deleted ?
> 
> Thanks for help.
> 
> -- 
> 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 
> <mailto:topbraid-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/93b13642-7651-4c37-b55b-07dc4ded0ce0n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/93b13642-7651-4c37-b55b-07dc4ded0ce0n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/26A896A5-C0A4-499E-A87B-FA77482D1C85%40topquadrant.com.

Reply via email to