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

Create class hierarchy for AnnotationSet #151

Open
johann-petrak opened this issue Nov 26, 2021 · 0 comments
Open

Create class hierarchy for AnnotationSet #151

johann-petrak opened this issue Nov 26, 2021 · 0 comments

Comments

@johann-petrak
Copy link
Collaborator

Consider:

  • AnnotationSet is an abstract base class
  • DetachedAnnotationSet is the class used for detached sets
  • AttachedAnnotationSet is the class used for in-document sets

We could just use the API we have now for AnnotationSet for both, but ideally refactor:

  • anything related to logging is only in AttachedSet
  • constructor only possible for DetachedSet

Advantages:

  • easier to see with print etc. what set we are dealing with
  • clearer what each type of set can do
  • can be used with type hinting to document which methods return which sets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant