-
Notifications
You must be signed in to change notification settings - Fork 231
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
Process escape characters when searching for entities, fix #1217 #1218
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ject#1217 Previously this was done only when searching for OWLClasses
When adding OWLEquivalentClasses(:A :B) for which A and B already appear in the asserted class hierarchy, there was no change in the model of the tree component because no child or parent nodes were added or removed. Consequently, the tree component did not refresh, and the new labels A = B and B = A of the nodes A and B were truncated. This commit make sure that the model gets notified about the changes of the node. See protegeproject#910 (comment)
I added a few more commits to fix #910 |
so that the result is parsed by Manchester OWL syntax parser Specifically: - Escape double quotes - Escape backslashes - Enclose in single quotes if the original string contains backslash These changes are to mirror ManchesterOWLSyntaxTokenizer Examples of rdfs:label of classes, tested to parse in Class expression editor: - [Foo'Bar] becomes [Foo\'Bar] - [Foo"Bar] becomes [Foo\"Bar] - [Foo\Bar] becomes ['Foo\\Bar'] - [Foo\'Bar] becomes ['Foo\\\'Bar'] - [Foo\\Bar] becomes ['Foo\\\\Bar'] Improve test cases to include escaping roundtrip
because stripAndEscapeRendering() should already return a canonical (unique) rendering representation, e.g., ['foo\'bar'] => [foo\'bar]
Added a few more commits to improve escaping of strings and simplify the owl entity finder. |
Each element of equivalent entities, e.g., resulted from OWLEquivalentClasses(:A :B) is rendered in the asserted hierarchy as the list of rendering of all equivalent classes, e.g.: > A = B > B = A When rendering of one of the entities has changed, e.g., due to editing of rdfs:label, other equivalent entities did not get automatically updated in the model. In particular, their rendering in the hierarchy could get truncated if the label becomes longer. See: protegeproject#910 (comment) This commit notifies the tree model about the changes of every node for equivalent entities. Also, use nodeChanged() instead of nodeStructureChanged() because rendering does not change children or parents of nodes.
Added another fix related to #910 |
Merged, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously this was done only when searching for OWLClasses