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

Process escape characters when searching for entities, fix #1217 #1218

Merged
merged 6 commits into from
Jun 18, 2024

Commits on Jun 11, 2024

  1. Process escape characters when searching for entities, fix protegepro…

    …ject#1217
    
    Previously this was done only when searching for OWLClasses
    ykazakov committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    bb94311 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8bc0667 View commit details
    Browse the repository at this point in the history
  3. Update object tree if only equivalences were added or removed

    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)
    ykazakov committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    1743a00 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2024

  1. Improve render string escaping for backslash and double quotes

    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
    ykazakov committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    36ff6f3 View commit details
    Browse the repository at this point in the history
  2. Simplify owl entity finder

    because stripAndEscapeRendering() should already return a canonical
    (unique) rendering representation, e.g., ['foo\'bar'] => [foo\'bar]
    ykazakov committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    a25f9be View commit details
    Browse the repository at this point in the history
  3. Update owl tree nodes if rendering of equivalent entities has changed

    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.
    ykazakov committed Jun 12, 2024
    Configuration menu
    Copy the full SHA
    1ea8ed0 View commit details
    Browse the repository at this point in the history