-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to extract shape objects from a graph by their URI #295
base: develop
Are you sure you want to change the base?
Conversation
@gtfierro I put together this implementation of a way to extract relevant triples from a graph by the shape's URI. Let me know what you think. One thing which is currently missing is adding any non-shape objects to the graph. Another possibility is including relevant owl:import where an ontology or pre-existing import exists in the graph. |
Looks like a good start! We should be specific about what kind of information we want to include inside this graph, and what we hope to do with the resulting graph. Is our intent just to summarize what the shape does, or are we trying to just save the triples necessary to properly conduct validation against the shape? The latter is potentially fairly complicated. I imagine this includes:
It doesn't look like the notebook ran properly. Would you be able to commit a run of the notebook so I can see what the output looks like? |
Hey Gabe, This is a good question. On one hand I think we just want to be able to reason about a shape past its Here is my possibly unifying proposal: If you wanted to get the full shape and everything needed to run it you can pull all of those into one graph before extracting the shape. In general I believe the extracted shape should be as portable and executable as the graph it came from, no more no less. This should help reduce unwanted behavior. Additionally I'm not sure if I agree that the extracted shape should include all shapes which reference if they are not required to execute the target shape. Extracted shapes should be:
Thoughts? |
I think this is a great principle. If you want to include the definitions from terms defined in other ontologies, then you need to make sure they are imported. I could see myself implementing this in https://github.com/gtfierro/ontoenv-rs
The question of "what is required" to execute the target shape will be tricky to determine. It will require following shapes and their triggers through subclass hierarchies, inferred properties, etc. If this is a design goal (which I think it should be, eventually) then we should carefully document the algorithm/traversals we use to find the components necessary for executing a given shape. |
TODO:
If this is green lighted I will add requisite tests for this feature.