Skip to content

Missing sofa references are not checked and produce invalid XMIs #262

@Babyflum

Description

@Babyflum

Is your feature request related to a problem? Please describe.
When executing code similar to the following:

annotation = SomeOtherType(feature=sub_annotation, ...)  
cas.add(annotation=annotation)  
cas.to_xmi("example.xmi")

the sub_annotation needs to be manually added to the cas (cas.add(annotation=sub_annotation)). If this isn't done, the resulting xmi is invalid because cassis won't set the sofa feature in the sub_annotation. However, there is no error message.

Describe the solution you'd like
cas.to_xmi() should be able to catch errors like this and determine if an xmi is invalid.

Describe alternatives you've considered
cas.typecheck() could also be used for this. Currently it only checks uima.cas.FSArray.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions