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

Treat raw IRI as an OWLClass in logical template cells #1211

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamesaoverton
Copy link
Member

@jamesaoverton jamesaoverton commented Jul 31, 2024

When ROBOT expects to see a class label or CURIE in a template cell, and it sees a raw IRI instead, interpret it as an OWLClass.

  • tests have been added/updated
  • mvn verify says all tests pass
  • CHANGELOG.md has been updated

This is in response to a report on Slack.

@jamesaoverton jamesaoverton changed the title Treat raw IRI as an OWLClass in template cells Treat raw IRI as an OWLClass in logical template cells Jul 31, 2024
Copy link
Contributor

@balhoff balhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good but I had one question.

@@ -991,6 +991,14 @@ protected static OWLClassExpression tryParse(
// If we have a checker, try to get the class by label
// This allows class labels with single quotes
expr = checker.getOWLClass(content, false);
if (expr == null) {
// If not found by label, is it just an IRI?
IRI iri = IRI.create(content);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jamesaoverton if someone enters a CURIE using an unknown prefix, is there a danger of turning it into an IRI here? In my experience OWL API will turn those into fake IRIs where the prefix becomes a scheme, e.g., "UNKNOWN:1234" -> <UNKNOWN:1234>. I find those mistakes really maddening (just speaking in general, not about robot template). Should you make some assumptions about IRIs here, such as only doing this if it starts with http:, https:, urn:, etc.?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I agree.

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

Successfully merging this pull request may close these issues.

2 participants