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

Tools -> Convert Entity URIs to Labels is broken #117

Closed
matthewhorridge opened this issue Feb 2, 2015 · 1 comment
Closed

Tools -> Convert Entity URIs to Labels is broken #117

matthewhorridge opened this issue Feb 2, 2015 · 1 comment
Labels
Type: Bug Indicates that Protege is not working as expected

Comments

@matthewhorridge
Copy link
Contributor

Tools -> Convert Entity URIs to Labels only works if the entity IRI contains a # symbol. Other naming schemes throw an exception. See trace below.

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1954)
    at org.protege.editor.owl.model.refactor.ontology.OWLEntityIRIRegenerator.getBaseIRI(OWLEntityIRIRegenerator.java:93)
    at org.protege.editor.owl.model.refactor.ontology.OWLEntityIRIRegenerator.generateNewIRI(OWLEntityIRIRegenerator.java:68)
    at org.protege.editor.owl.model.refactor.ontology.ConvertEntityURIsToIdentifierPattern.buildNewIRIMap(ConvertEntityURIsToIdentifierPattern.java:124)
    at org.protege.editor.owl.model.refactor.ontology.ConvertEntityURIsToIdentifierPattern.performConversion(ConvertEntityURIsToIdentifierPattern.java:56)
    at org.protege.editor.owl.ui.action.ConvertEntityURIsToLabels.performConversion(ConvertEntityURIsToLabels.java:87)
    at org.protege.editor.owl.ui.action.ConvertEntityURIsToLabels.actionPerformed(ConvertEntityURIsToLabels.java:46)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
    at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125)
    at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
    at java.awt.MenuItem.processEvent(MenuItem.java:628)
    at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:351)
    at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:339)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:749)
    at java.awt.EventQueue.access$400(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.awt.EventQueue$3.run(EventQueue.java:691)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:719)
    at java.awt.EventQueue$4.run(EventQueue.java:717)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
@matthewhorridge matthewhorridge added the Type: Bug Indicates that Protege is not working as expected label Feb 2, 2015
@matthewhorridge
Copy link
Contributor Author

Updated. This happens with built in entities. The method used to generate the fragment returns prefixed names for built in entities. These names cannot be found in the original IRI and the method fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Indicates that Protege is not working as expected
Projects
None yet
Development

No branches or pull requests

1 participant