Description of changes:
This PR adds class Annotations to process the constraint annotations. After parsing the constraint value to Annotations, we are able to get a list of annotations or null based on the annotation required | optional | orderedof the constraint.
DataConstructor.java:
In the method constructIonData, instead of returning the value directly for each type case, overwriting the result variable which stores the constructed Ion data. And then check whether the constraint annotations is provided in the same level of data structure. If the constraint annotations provided, the annotations value will be added to the constructed data and be returned.
ReparsedType.java
Adds the case ANNOTATIONS to the method of parsing constraint value to ReparsedConstraint.
Annotations:
This class is used for parsing the value of constraint annotations. This class provides an attribute that allows users to get the processed annotations value in an IonList format.
Test:
Adds a test case that cover the constraint annotations .
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available:
Description of changes: This PR adds class
Annotations
to process the constraintannotations
. After parsing the constraint value toAnnotations
, we are able to get a list of annotations ornull
based on the annotationrequired | optional | ordered
of the constraint.DataConstructor.java:
constructIonData
, instead of returning the value directly for each type case, overwriting the result variable which stores the constructed Ion data. And then check whether the constraintannotations
is provided in the same level of data structure. If the constraintannotations
provided, theannotations
value will be added to the constructed data and be returned.ReparsedType.java
ANNOTATIONS
to the method of parsing constraint value toReparsedConstraint
.Annotations:
annotations
. This class provides an attribute that allows users to get the processedannotations
value in an IonList format.Test: Adds a test case that cover the constraint
annotations
.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.