You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The prefix mapper current has an inbuilt Comparator attached to a TreeMap that at least one user would like to override to change to return the prefixes in a different order.
Is there any code that depends on the iterator for the TreeMap returning the prefixes in string-length order rather than plain lexical ordering? For example, does anything iterate through to find the longest match and relies on the current Comparator implementation.
If there isn't it shouldn't be too difficult to expose the ability to set the prefix manager.
The text was updated successfully, but these errors were encountered:
There might be code which relies on the best match, but I reckon that code is fragile and broken: fragile because a change in the namespaces available would cause changes in the output, and broken because the namespace match should be exact.
By that I mean, take this example: http://test.com/ontology/onto.owl#testNamespace
I don't think this is correct, because it is arbitrary in picking the split point and cannot be roundtripped easily - so there should be no dependency on this behaviour.
In this case what's necessary is the ability to set the comparator for the DefaultPrefixManager, which cannot currently be injected. Optionally, a few more dependencies could be made less set in stone.
I have changed the classes to enable choosing the prefix manager and to choose the sorting; however I don't think this enables an arbitrary sorting of the prefixes, as many storers and renderers are creating DefaultPrefixManagers themselves. At a guess, that code needs redesign, as most of what's going on appears redundant.
The prefix mapper current has an inbuilt Comparator attached to a TreeMap that at least one user would like to override to change to return the prefixes in a different order.
Is there any code that depends on the iterator for the TreeMap returning the prefixes in string-length order rather than plain lexical ordering? For example, does anything iterate through to find the longest match and relies on the current Comparator implementation.
If there isn't it shouldn't be too difficult to expose the ability to set the prefix manager.
The text was updated successfully, but these errors were encountered: