promoted ann.id and enabled id as a class property of ann #306
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update
This commit aims to fix issue #296 which expects following:
ann.id
, ratherview.id:ann.id
across the whole MMIF worldAnnotationProperties
class to theAnnotation
class and make it as a class property asView
class did to its id.Discussion
One issue was found while implementing, that is, the location of annotation's id in raw MMIF JSON file (the input/output source file for MMIF SDK) mismatches our expected location to it. The cause of such mismatch is that the annotation's id would naturally be put under
AnnotationProperties
class by default and uses the short-form id as is during deserialization. Therefore, it's not possible to achieve the first goal stated above.Then, one feasible approach to target it is that we need to implement a "converter" utility as an interface between raw JSON MMIF and the SDK so that the raw JSON file can be converted to a desired format for the SDK. One advantage of the approach is that it requires minimal change for the SDK and it is isolated to the SDK.