[
https://issues.apache.org/jira/browse/UIMA-2011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144034#comment-13144034
]
Peter Klügl commented on UIMA-2011:
-----------------------------------
I doesn't work for me, I get still an exception respectively.
What do you think about adding this to line 250 in DocumentUimaImpl:
} else if (DocumentFormat.XMI.equals(format)) {
XmiCasDeserializer dezerializer = new XmiCasDeserializer(mTypeSystem);
try {
saxParser.parse(content, dezerializer.getXmiCasHandler(mCAS));
} catch (IOException e) {
String message = e.getMessage() != null ? e.getMessage() : "";
IStatus s = new Status(IStatus.ERROR, CasEditorPlugin.ID, IStatus.OK,
message, e);
throw new CoreException(s);
} catch (SAXException e) {
try {
XmiCasDeserializer.deserialize(content, mCAS, true);
} catch (SAXException e1) {
String message = e.getMessage() != null ? e.getMessage() : "";
IStatus s = new Status(IStatus.ERROR, CasEditorPlugin.ID, IStatus.OK,
message, e);
throw new CoreException(s);
} catch (IOException e1) {
String message = e.getMessage() != null ? e.getMessage() : "";
IStatus s = new Status(IStatus.ERROR, CasEditorPlugin.ID, IStatus.OK,
message, e);
throw new CoreException(s);
}
}
} else {
throw new CoreException(new Status(IStatus.ERROR, CasEditorPlugin.ID,
IStatus.OK,
"Unkown file format!", null));
}
We would then need a flag or something for readonly and the logic in the editor.
> Can't open XMI with data not specified by type system
> -----------------------------------------------------
>
> Key: UIMA-2011
> URL: https://issues.apache.org/jira/browse/UIMA-2011
> Project: UIMA
> Issue Type: Bug
> Components: CasEditor
> Reporter: Peter Klügl
> Assignee: Joern Kottmann
> Priority: Minor
> Fix For: 2.4.0SDK
>
>
> Given a XMI that contains annotations of types not present in the specified
> type system of the project, the CASe Editor can't open the file and displays
> an error.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira