Skip to content
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

Criteria option for links #18

Open
fonji opened this issue Sep 27, 2013 · 0 comments
Open

Criteria option for links #18

fonji opened this issue Sep 27, 2013 · 0 comments

Comments

@fonji
Copy link

fonji commented Sep 27, 2013

Hello, me again!

I'd like to have a criteria option for the links.
To understand why:
I have disorders in classifications. Disorders are in a multi-tree and in multiple classifications. So every disorder has a SKOS:inScheme for each corresponding classification and a SKOS:broader for each of its parents.

I need to get the top-level disorders of a classification. For the moment, I have no other way to define this in the repository than "it's the disorders in this classification without a broader element". (ultimately it might even be worse than that as the disorder might have broader elements only in other classifications... but let's keep it kinda simple for now.)
This results with this criteria:

Disorder.where("?uri <#{RDF::SKOS.inScheme}> <#{uri}>").where("FILTER(NOT EXISTS { ?uri <#{RDF::SKOS.broader}> ?node })").resources

I'd like to do this within a linked_from...
I'm not sure that it's such a good idea as it would be (almost) impossible to check / ensure the condition when items are added to the collection.
It might still be nice for read-only purposes. And I'm allowed to dream.
But I'll understand if you refuse this issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant