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

Inheritance-final and feature-final not supported/checked #166

Open
reckart opened this issue Jul 1, 2021 · 2 comments
Open

Inheritance-final and feature-final not supported/checked #166

reckart opened this issue Jul 1, 2021 · 2 comments
Assignees
Labels
Milestone

Comments

@reckart
Copy link
Member

reckart commented Jul 1, 2021

Describe the bug
The cassis cas_with_collections test uses a type system in which a type is derived from uima.cas.StringArray. Loading this type system in the UIMA Java SDK produces an error.

To Reproduce

var tsd  = UIMAFramework.getXMLParser().parseTypeSystemDescription(new XMLInputSource("typesystem_with_collections_xml"));
CasCreationUtils.createCas(tsd, null, null, null);

Expected behavior
If a type is inheritance final in the UIMA Java SDK, alternative implementations should probably also not permit subclassing it because the resulting XMI/TS files would not be interoperable.

Error message

Caused by: org.apache.uima.cas.admin.CASAdminException: Can't derive from type "uima.cas.StringArray" since it is inheritance final.
	at org.apache.uima.cas.impl.TypeSystemImpl.newTypeChecks(TypeSystemImpl.java:915)
	at org.apache.uima.cas.impl.TypeSystemImpl.addType(TypeSystemImpl.java:960)
	at org.apache.uima.cas.impl.TypeSystemImpl.addType(TypeSystemImpl.java:1)
	at org.apache.uima.util.CasCreationUtils.setupTypeSystem(CasCreationUtils.java:793)
	at org.apache.uima.util.CasCreationUtils.doCreateCas(CasCreationUtils.java:632)
	at org.apache.uima.util.CasCreationUtils.createCas(CasCreationUtils.java:375)
	at org.apache.uima.util.CasCreationUtils.createCas(CasCreationUtils.java:350)

Please complete the following information:

  • Version: 0.5.3

Additional information

Inheritance-final types (no subtypes permitted):

    setTypeFinal(intType);
    setTypeFinal(floatType);
    setTypeFinal(stringType);
    setTypeFinal(arrayBaseType);
    setTypeFinal(fsArrayType);
    setTypeFinal(intArrayType);
    setTypeFinal(floatArrayType);
    setTypeFinal(stringArrayType);
    setTypeFinal(sofaType);

    setTypeFinal(byteType);
    setTypeFinal(booleanType);
    setTypeFinal(shortType);
    setTypeFinal(longType);
    setTypeFinal(doubleType);
    setTypeFinal(booleanArrayType);
    setTypeFinal(byteArrayType);
    setTypeFinal(shortArrayType);
    setTypeFinal(longArrayType);
    setTypeFinal(doubleArrayType);

    setTypeFinal(fsListType);
    setTypeFinal(floatListType);
    setTypeFinal(stringListType);
    setTypeFinal(intListType);
    setTypeFinal(fsEListType);
    setTypeFinal(floatEListType);
    setTypeFinal(stringEListType);
    setTypeFinal(intEListType);
    setTypeFinal(fsNeListType);
    setTypeFinal(floatNeListType);
    setTypeFinal(stringNeListType);
    setTypeFinal(intNeListType);

Feature-final types (sub-types cannot add new features):

    topType.setFeatureFinal();
    listBaseType.setFeatureFinal();
    fsListType.setFeatureFinal();
    fsEListType.setFeatureFinal();
    fsNeListType.setFeatureFinal();
    floatListType.setFeatureFinal();
    floatEListType.setFeatureFinal();
    floatNeListType.setFeatureFinal();
    intListType.setFeatureFinal();
    intEListType.setFeatureFinal();
    intNeListType.setFeatureFinal();
    stringListType.setFeatureFinal();
    stringEListType.setFeatureFinal();
    stringNeListType.setFeatureFinal();
    annotType.setFeatureFinal();
    annotBaseType.setFeatureFinal();
@reckart reckart changed the title uima.cas.StringArray is inheritance final Inheritance-final and feature-final not supported Jul 1, 2021
@reckart reckart changed the title Inheritance-final and feature-final not supported Inheritance-final and feature-final not supported/checked Jul 1, 2021
@jcklie jcklie added this to the 0.6.0 milestone Jul 1, 2021
@jcklie jcklie self-assigned this Jul 1, 2021
@jcklie jcklie added the 🐛Bug label Jul 1, 2021
@jcklie
Copy link
Collaborator

jcklie commented Aug 26, 2021

@reckart Is this done now?

@reckart
Copy link
Member Author

reckart commented Aug 27, 2021

I think we have the inhertiance-final now, but not the feature-final.

@reckart reckart modified the milestones: 0.6.0, 0.7.0 Sep 27, 2021
@reckart reckart modified the milestones: 0.7.0, Backlog Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants