uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Eckart de Castilho (JIRA)" <...@uima.apache.org>
Subject [jira] [Created] (UIMA-5601) uv3: CasCopier problems with custom subclasses of DocumentAnnotation
Date Mon, 02 Oct 2017 19:27:00 GMT
Richard Eckart de Castilho created UIMA-5601:
------------------------------------------------

             Summary: uv3: CasCopier problems with custom subclasses of DocumentAnnotation
                 Key: UIMA-5601
                 URL: https://issues.apache.org/jira/browse/UIMA-5601
             Project: UIMA
          Issue Type: Bug
          Components: Core Java Framework
    Affects Versions: 3.0.0SDK-beta
            Reporter: Richard Eckart de Castilho


It seems as if there may be a bug in the way that CasCopier handles the documen annotation.


E.g. it seems that `isDocumentAnnotation` isn't able to handle it if a CAS uses a custom subclass
of DocumentAnnotation:

{noformat}
  private <T extends FeatureStructure> boolean isDocumentAnnotation(T aFS) {
    if (((TOP)aFS)._getTypeCode() != TypeSystemConstants.docTypeCode) {
      return false;
    }
    if (srcCasDocumentAnnotation == null) {
      srcCasDocumentAnnotation = srcCasViewImpl.getDocumentAnnotationNoCreate(); 
    }
    return aFS == srcCasDocumentAnnotation;
  }
{noformat}

I still need to investigate more. Right now, I only know that some DKPro Core tests that make
use of the CasCopier end up with two DocumentMetaData annotations (a subtype of DocumentAnnotation)
in the CAS instead of 1 (which would be expected).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message