-
Notifications
You must be signed in to change notification settings - Fork 52
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
Get names of individuals #19
Comments
Getting the individuals in an ontology would be really great! It would help me to improve my ontology spec generator a lot. |
Ok I'll try to add that with the next release. |
Great! Looking forward to it. |
Added with v1.8.8. Sorry it's taken so long! You can now do this:
Note: instances are extracted on demand (once the method is called) so to avoid unnecessary calculations due to metaclasses and the same object being at the same time an instance and a class. |
That's wonderful, thanks so much! |
I would like to get the name of all of the instances of a given class, but without the URI prefix. I think this is more of an
RDFLib
specific issue dealing with URIRef objects, but maybe there's a solution insideontospy
that I haven't found yetOutput:
None of the functions listed with
dir
return what I want (I iterated through all them and ran them) What I'd like is simply a way to retrieve:And make it a bit more general than splitting on the
#
character, since not all ontologies have to use a#
to differentiate the base IRI and the members, correct? Thanks so much for the help!The text was updated successfully, but these errors were encountered: