-
Notifications
You must be signed in to change notification settings - Fork 547
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
Provide means to expand a CURIE #626
Comments
There is The thing with CURIEs is that you always need a manager which knows the namespace mapping... it's tempting (and i've done it a couple of times to just use one pre-filled from http://prefix.cc), but you get into a lot of trouble if you start serializing without the prefix definitions and then want to parse later on. Namespaces change over time (dbpedia vs dbp vs dbr vs dbpr)! It might be that you have a legit use-case for this, but it's as likely that you're getting yourself into trouble in the long run by not using a proper serializer and parser. I'll close this for now, feel free to re-open. |
He already has a namespace managed no? He wants the method that does the opposite of |
OK - from_n3 looks that looks good - its just a little weird to be buried in utils - and curies are not scoped to n3 format - so this is too easy to miss. I would suggest at least putting a ref into the documentation for normalizeURI that the inverse exists, but is in a different place. Or put a convenience method into the NamespaceManager, which is where perhaps it really ought to live. |
nice to have, but not a blocker for a bug-fixing-4.2 release. Moved to 5.0 |
Looks like this is a duplicate of #1868, which was closed last year - so this should be closed too? |
@jclerman yes it should be closed, especially after this was merged: |
NamespaceManager has a normalizeUri method to create a CURIE (short form like foaf:Person) but no obvious way to do the inverse create a valid URIref.
currently the only way seems to be to iterate through the namespaces() to find the binding and expand it manually before passing to URIRef
The text was updated successfully, but these errors were encountered: