Example #1
0
    def _extract_resolved_attributes(self, proj_ctx: 'ProjectionContext') -> 'ResolvedAttributeSet':
        """Create resolved attribute set based on the CurrentResolvedAttribute array"""
        resolved_attribute_set = ResolvedAttributeSet()
        resolved_attribute_set.attribute_context = proj_ctx._current_attribute_context

        for pas in proj_ctx._current_attribute_state_set._states:
            resolved_attribute_set.merge(pas._current_resolved_attribute, pas._current_resolved_attribute.att_ctx)

        return resolved_attribute_set
Example #2
0
    def _extract_resolved_attributes(
            self, proj_ctx: 'ProjectionContext',
            att_ctx_under: CdmAttributeContext) -> 'ResolvedAttributeSet':
        """Create resolved attribute set based on the CurrentResolvedAttribute array"""
        resolved_attribute_set = ResolvedAttributeSet()
        resolved_attribute_set.attribute_context = att_ctx_under

        if not proj_ctx:
            logger.error(self.ctx, self._TAG, '_extract_resolved_attributes',
                         self.at_corpus_path,
                         CdmLogCode.ERR_PROJ_FAILED_TO_RESOLVE)
            return resolved_attribute_set

        for pas in proj_ctx._current_attribute_state_set._states:
            resolved_attribute_set.merge(pas._current_resolved_attribute)

        return resolved_attribute_set