Exemplo n.º 1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Return the transcription and/or translation roles if all the segments are not
        /// empty.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        public override IEnumerable <ComponentRole> GetAssignedRoles()
        {
            var transcriptionTier = Tiers.GetTranscriptionTier();

            if (transcriptionTier != null && transcriptionTier.GetIsComplete())
            {
                yield return(_componentRoles.Single(r => r.Id == ComponentRole.kTranscriptionComponentRoleId));
            }

            // Stage status (complete-incomplete) is not displaying the status for Written Translations correctly, if one or more segments are ignored.
            var translationTier = Tiers.GetFreeTranslationTier();

            if (translationTier != null && translationTier.GetIsComplete(transcriptionTier))
            {
                yield return(_componentRoles.Single(r => r.Id == ComponentRole.kFreeTranslationComponentRoleId));
            }

            if (Tiers.GetIsAdequatelyAnnotated(OralAnnotationType.CarefulSpeech))
            {
                yield return(_componentRoles.Single(r => r.Id == ComponentRole.kCarefulSpeechComponentRoleId));
            }

            if (Tiers.GetIsAdequatelyAnnotated(OralAnnotationType.Translation))
            {
                yield return(_componentRoles.Single(r => r.Id == ComponentRole.kOralTranslationComponentRoleId));
            }
        }