Exemple #1
0
 /// <summary>
 /// Crea un objeto de DTS documento para base de datos en base  a su representación den DTO
 /// </summary>
 /// <param name="dtsOrigen"></param>
 /// <returns></returns>
 public static DtsDocumentoInstancia CrearDtsDocumentoInstanciaDb(DtsDocumentoInstanciaDto dtsOrigen)
 {
     return(new DtsDocumentoInstancia
     {
         TipoReferencia = dtsOrigen.Tipo,
         Href = dtsOrigen.HRef,
         Rol = dtsOrigen.Role,
         RolUri = dtsOrigen.RoleUri
     });
 }
Exemple #2
0
 /// <summary>
 /// Convierte los registros de DTS Documento instancia de la base de datos a su representación en DTO
 /// </summary>
 /// <param name="instanciaDb"></param>
 /// <param name="instanciaXbrlDto"></param>
 private static void CargarDts(DocumentoInstancia instanciaDb, DocumentoInstanciaXbrlDto instanciaXbrlDto)
 {
     foreach (var dtsDb in instanciaDb.DtsDocumentoInstancia)
     {
         var dtsDto = new DtsDocumentoInstanciaDto();
         dtsDto.Tipo    = dtsDb.TipoReferencia;
         dtsDto.HRef    = dtsDb.Href;
         dtsDto.Role    = dtsDb.Rol;
         dtsDto.RoleUri = dtsDb.RolUri;
         instanciaXbrlDto.DtsDocumentoInstancia.Add(dtsDto);
     }
 }
        public static String obtenerIdPrefijoDeTaxonomia(DocumentoInstanciaXbrlDto instancia)
        {
            if (instancia != null && instancia.DtsDocumentoInstancia != null &&
                instancia.DtsDocumentoInstancia.Count() > 0)
            {
                DtsDocumentoInstanciaDto dts = instancia.DtsDocumentoInstancia[0];

                if (dts.HRef != null)
                {
                    if (dts.HRef.Contains(ReportConstants.CCD_ENTRY_POINT))
                    {
                        return(ReportConstants.PREFIJO_ID_CCD);
                    }
                    else if (dts.HRef.Contains(ReportConstants.DEUDA_ENTRY_POINT))
                    {
                        return(ReportConstants.PREFIJO_ID_DEUDA);
                    }
                    else if (dts.HRef.Contains(ReportConstants.TRAC_ENTRY_POINT))
                    {
                        return(ReportConstants.PREFIJO_ID_TRAC);
                    }
                    else if (dts.HRef.Contains(ReportConstants.IIFC_ENTRY_POINT))
                    {
                        return(ReportConstants.PREFIJO_ID_IIFC);
                    }
                    else if (dts.HRef.Contains(ReportConstants.ANNEXT_ENTRY_POINT))
                    {
                        return(ReportConstants.PREFIJO_ANNEXT);
                    }
                    else if (dts.HRef.Contains(ReportConstants.N_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.NBIS_ENTRY_POINT) ||
                             dts.HRef.Contains(ReportConstants.NBIS1_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.NBIS2_ENTRY_POINT) ||
                             dts.HRef.Contains(ReportConstants.NBIS3_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.NBIS4_ENTRY_POINT) ||
                             dts.HRef.Contains(ReportConstants.NBIS5_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.O_ENTRY_POINT) ||
                             dts.HRef.Contains(ReportConstants.H_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.HBIS_ENTRY_POINT) ||
                             dts.HRef.Contains(ReportConstants.HBIS1_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.HBIS2_ENTRY_POINT) ||
                             dts.HRef.Contains(ReportConstants.HBIS3_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.HBIS4_ENTRY_POINT) ||
                             dts.HRef.Contains(ReportConstants.HBIS5_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.L_ENTRY_POINT) ||
                             dts.HRef.Contains(ReportConstants.I_ENTRY_POINT))
                    {
                        return(ReportConstants.PREFIJO_AR_PROS);
                    }
                    else if (dts.HRef.Contains(ReportConstants.IIFC_ENTRY_POINT))
                    {
                        return(ReportConstants.PREFIJO_ID_IIFC);
                    }
                    else if (dts.HRef.Contains(ReportConstants.REL_EV_EMISORAS))
                    {
                        return(ReportConstants.PREFIJO_REL_EV_EMISORAS);
                    }
                }
            }
            return(null);
        }
Exemple #4
0
        /// <summary>
        /// Transforma los archivos importados registrados en BD por objetos de tipo DTSDocumentoInstanciaDto
        /// </summary>
        /// <param name="archivosTaxonomia">Datos fuente a transformar</param>
        /// <returns>Lista de datos importados</returns>
        public static IList <DtsDocumentoInstanciaDto> ConvertirDTSDocumentoInstancia(ICollection <ArchivoTaxonomiaXbrl> archivosTaxonomia)
        {
            var listaResultado = new List <DtsDocumentoInstanciaDto>();

            if (archivosTaxonomia == null)
            {
                return(null);
            }

            foreach (var archivo in archivosTaxonomia)
            {
                var dtsDto = new DtsDocumentoInstanciaDto();
                dtsDto.Tipo    = archivo.TipoReferencia;
                dtsDto.HRef    = archivo.Href;
                dtsDto.Role    = archivo.Rol;
                dtsDto.RoleUri = archivo.RolUri;
                listaResultado.Add(dtsDto);
            }

            return(listaResultado);
        }
        public static String obtenerPrefijoDeRaProspecto(DocumentoInstanciaXbrlDto instancia)
        {
            if (instancia != null && instancia.DtsDocumentoInstancia != null &&
                instancia.DtsDocumentoInstancia.Count() > 0)
            {
                DtsDocumentoInstanciaDto dts = instancia.DtsDocumentoInstancia[0];

                if (dts.HRef != null)
                {
                    if (dts.HRef.Contains(ReportConstants.N_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.NBIS_ENTRY_POINT) ||
                        dts.HRef.Contains(ReportConstants.NBIS1_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.NBIS2_ENTRY_POINT) ||
                        dts.HRef.Contains(ReportConstants.NBIS3_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.NBIS4_ENTRY_POINT) ||
                        dts.HRef.Contains(ReportConstants.NBIS5_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.O_ENTRY_POINT))
                    {
                        return(ReportConstants.PREFIJO_AR);
                    }
                    else if (dts.HRef.Contains(ReportConstants.H_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.HBIS_ENTRY_POINT) ||
                             dts.HRef.Contains(ReportConstants.HBIS1_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.HBIS2_ENTRY_POINT) ||
                             dts.HRef.Contains(ReportConstants.HBIS3_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.HBIS4_ENTRY_POINT) ||
                             dts.HRef.Contains(ReportConstants.HBIS5_ENTRY_POINT) || dts.HRef.Contains(ReportConstants.L_ENTRY_POINT) ||
                             dts.HRef.Contains(ReportConstants.I_ENTRY_POINT))
                    {
                        return(ReportConstants.PREFIJO_PROS);
                    }
                    else if (dts.HRef.Contains(ReportConstants.REL_EV_EMISORAS))
                    {
                        return(ReportConstants.CLAVE_REL_EV_EMISORAS);
                    }
                    else if (dts.HRef.Contains(ReportConstants.REL_EV_FONDOS))
                    {
                        return(ReportConstants.CLAVE_REL_EV_FONDOS);
                    }
                }
            }
            return(null);
        }
        public static String obtenerNombreCortoTaxonomia(DocumentoInstanciaXbrlDto instancia)
        {
            if (instancia != null && instancia.DtsDocumentoInstancia != null &&
                instancia.DtsDocumentoInstancia.Count() > 0)
            {
                DtsDocumentoInstanciaDto dts = instancia.DtsDocumentoInstancia[0];

                if (dts.HRef != null)
                {
                    if (dts.HRef.Contains(ReportConstants.CP_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_CP);
                    }
                    else if (dts.HRef.Contains(ReportConstants.ICS_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_ICS);
                    }
                    else if (dts.HRef.Contains(ReportConstants.FIBRAS_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_FIBRAS);
                    }
                    else if (dts.HRef.Contains(ReportConstants.SAPIB_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_SAPIB);
                    }
                    else if (dts.HRef.Contains(ReportConstants.CCD_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_CCD);
                    }
                    else if (dts.HRef.Contains(ReportConstants.DEUDA_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_DEUDA);
                    }
                    else if (dts.HRef.Contains(ReportConstants.TRAC_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_TRAC);
                    }
                    else if (dts.HRef.Contains(ReportConstants.IIFC_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_IIFC);
                    }
                    else if (dts.HRef.Contains(ReportConstants.ANNEXT_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_ANNEXT);
                    }
                    else if (dts.HRef.Contains(ReportConstants.N_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_N);
                    }
                    else if (dts.HRef.Contains(ReportConstants.NBIS_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_NBIS);
                    }
                    else if (dts.HRef.Contains(ReportConstants.NBIS1_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_NBIS1);
                    }
                    else if (dts.HRef.Contains(ReportConstants.NBIS2_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_NBIS2);
                    }
                    else if (dts.HRef.Contains(ReportConstants.NBIS3_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_NBIS3);
                    }
                    else if (dts.HRef.Contains(ReportConstants.NBIS4_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_NBIS4);
                    }
                    else if (dts.HRef.Contains(ReportConstants.NBIS5_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_NBIS5);
                    }
                    else if (dts.HRef.Contains(ReportConstants.O_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_O);
                    }
                    else if (dts.HRef.Contains(ReportConstants.H_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_H);
                    }
                    else if (dts.HRef.Contains(ReportConstants.HBIS_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_HBIS);
                    }
                    else if (dts.HRef.Contains(ReportConstants.HBIS1_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_HBIS1);
                    }
                    else if (dts.HRef.Contains(ReportConstants.HBIS2_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_HBIS2);
                    }
                    else if (dts.HRef.Contains(ReportConstants.HBIS3_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_HBIS3);
                    }
                    else if (dts.HRef.Contains(ReportConstants.HBIS4_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_HBIS4);
                    }
                    else if (dts.HRef.Contains(ReportConstants.HBIS5_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_HBIS5);
                    }
                    else if (dts.HRef.Contains(ReportConstants.L_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_L);
                    }
                    else if (dts.HRef.Contains(ReportConstants.I_ENTRY_POINT))
                    {
                        return(ReportConstants.CLAVE_I);
                    }
                    else if (dts.HRef.Contains(ReportConstants.REL_EV_EMISORAS))
                    {
                        return(ReportConstants.CLAVE_REL_EV_EMISORAS);
                    }
                    else if (dts.HRef.Contains(ReportConstants.REL_EV_FONDOS))
                    {
                        return(ReportConstants.CLAVE_REL_EV_FONDOS);
                    }
                    else if (dts.HRef.Contains(ReportConstants.REL_EV_REP_COMMON))
                    {
                        return(ReportConstants.CLAVE_REL_EV_REP_COMMON);
                    }
                    else if (dts.HRef.Contains(ReportConstants.REL_EV_INV_FOUNDS))
                    {
                        return(ReportConstants.CLAVE_REL_EV_INV_FOUNDS);
                    }
                    else if (dts.HRef.Contains(ReportConstants.REL_EV_ISSUER))
                    {
                        return(ReportConstants.CLAVE_REL_EV_ISSUER);
                    }
                    else if (dts.HRef.Contains(ReportConstants.REL_EV_RATING_AG))
                    {
                        return(ReportConstants.CLAVE_REL_EV_RATING_AG);
                    }
                    else if (dts.HRef.Contains(ReportConstants.REL_EV_TRUST_ISSUER))
                    {
                        return(ReportConstants.CLAVE_REL_EV_TRUST_ISSUER);
                    }
                }
            }
            return(null);
        }