-
Notifications
You must be signed in to change notification settings - Fork 75
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 check for malformed IRI in IOHelper.createIRI #882
Conversation
This is what I suggest as well - just consider the rare cases where this will fail:
|
This won’t impact ROBOT loading ontologies that have the Protege URN, since
it’s only for creating new IRIs. I don’t think that would ever be used as a
new IRI in a template, but perhaps this is too strict?
…On Mon, Jun 21, 2021 at 1:33 AM Nico Matentzoglu ***@***.***> wrote:
This is what I suggest as well - just consider the rare cases where this
will fail:
1. ontology IRIs which are by default when saved with Protege urns
2. Its strictly speaking allowed to use URNs instead of URLs for IRIs
as IRIs are extensions of URIs, but I think this is sane for 99.95% of all
cases.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#882 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD7ZMRXB2VXD7WYFW3BXC7DTT32MPANCNFSM466KMJFQ>
.
|
We could also add to the method - if the IRI starts with |
I would kinda tend towards adding URN checking support, but defer to your better judgement. A question that I never quite answered to myself: what is the advantage of using |
Here's another option: we could use the URLValidator from I have concerns about just using regex to match a URL because there are so many variations on what a "good" regex pattern for a URL is. I just prefer to use existing and tested tools. |
ok totally fine with new URL(...)! |
Resolves #880
docs/
have been added/updatedmvn verify
says all tests passmvn site
says all JavaDocs correctCHANGELOG.md
has been updatedThis is a bit more sane than trying to do a regex match for a valid URL. If the output IRI is just a CURIE, this will fail (e.g., undefined prefix when running
template
). If the output IRI has a space it it, this will also fail (which we were just checking for a space before).