internal Aim4AnnotationInstance(Aim4DocumentInstance aim4Document, aim4_dotnet.iso_21090.II annotationUid)
        {
            Platform.CheckForNullReference(aim4Document, "aim4Document");
            Platform.CheckForNullReference(annotationUid, "annotationUid");

            if (aim4Document.IsImageAnnotation)
            {
                var imageAnnotationCollection = (aim4_dotnet.ImageAnnotationCollection)aim4Document.AnnotationCollection;
                if (imageAnnotationCollection.ImageAnnotations != null)
                {
                    AimAnnotationEntity =
                        imageAnnotationCollection.ImageAnnotations.Find(imageAnnotation => imageAnnotation != null && Equals(imageAnnotation.UniqueIdentifier, annotationUid));
                }
            }
            else if (aim4Document.IsAnnotationOfAnnotation)
            {
                var annotationOfAnnotationCollection = (aim4_dotnet.AnnotationOfAnnotationCollection)aim4Document.AnnotationCollection;
                if (annotationOfAnnotationCollection.AnnotationOfAnnotations != null)
                {
                    AimAnnotationEntity =
                        annotationOfAnnotationCollection.AnnotationOfAnnotations.Find(
                            annOfAnnotation => annOfAnnotation != null && Equals(annOfAnnotation.UniqueIdentifier, annotationUid));
                }
            }
            else
            {
                Debug.Assert(false, "Unexpected Annotation Collection type: " + aim4Document.GetType().Name);
            }

            if (AimAnnotationEntity == null)
            {
                throw new ArgumentException("AIM4: failed to initialize Annotation Instance from the collection");
            }

            //_parentAimDocument = new WeakReference(aim4Document); // TODO
            _parentAimDocument = aim4Document;
        }
 internal Aim4ImageAnnotationInstance(Aim4DocumentInstance aim4Document, aim4_dotnet.iso_21090.II annotationUid)
     : base(aim4Document, annotationUid)
 {
     Platform.CheckTrue(IsImageAnnotation, "IsImageAnnotation");
 }