public DOTSTAT_Widget(GetCodemapObject codemapObj, SessionImplObject sessionObj)
        {
            Org.Sdmxsource.Sdmx.Api.Exception.SdmxException.SetMessageResolver(new Org.Sdmxsource.Util.ResourceBundle.MessageDecoder());

            CodemapObj    = codemapObj;
            SessionObj    = sessionObj;
            GetSDMXObject = ISTAT.WebClient.WidgetEngine.Model.WebServiceSelector.GetSdmxImplementation(this.CodemapObj.Configuration);
        }
        public DOTSTAT_Widget(GetCodemapObject codemapObj, SessionImplObject sessionObj)
        {
            Org.Sdmxsource.Sdmx.Api.Exception.SdmxException.SetMessageResolver(new Org.Sdmxsource.Util.ResourceBundle.MessageDecoder());

            CodemapObj = codemapObj;
            SessionObj = sessionObj;
            GetSDMXObject = ISTAT.WebClient.WidgetEngine.Model.WebServiceSelector.GetSdmxImplementation(this.CodemapObj.Configuration);
        }
        public DataWidget(GetDataObject dataObj, SessionImplObject sessionObj, bool useAttr)
        {
            DataObj       = dataObj;
            SessionObj    = sessionObj;
            GetSDMXObject = WebServiceSelector.GetSdmxImplementation(this.DataObj.Configuration);
            BDO           = new BaseDataObject(dataObj.Configuration, System.IO.Path.GetTempFileName());

            this._useAttr = useAttr;
        }
        public DataWidget(GetDataObject dataObj, SessionImplObject sessionObj, bool useAttr)
        {
            DataObj = dataObj;
            SessionObj = sessionObj;
            GetSDMXObject = WebServiceSelector.GetSdmxImplementation(this.DataObj.Configuration);
            BDO = new BaseDataObject(dataObj.Configuration, System.IO.Path.GetTempFileName());

            this._useAttr = useAttr;
        }
        public CodemapWidget(GetCodemapObject codemapObj, SessionImplObject sessionObj)
        {
            CodemapObj = codemapObj;
            SessionObj = sessionObj;
            GetSDMXObject = WebServiceSelector.GetSdmxImplementation(this.CodemapObj.Configuration);

            if (this.SessionObj == null)
            {
                this.SessionObj = new SessionImplObject();
                this.SessionObj.SdmxObject = new SdmxObjectsImpl();
            }
        }
Beispiel #6
0
        public LayoutWidget(GetCodemapObject layoutObj, SessionImplObject sessionObj, SessionQuery sessionQuery)
        {
            LayObj     = layoutObj;
            SessionObj = sessionObj;

            if (sessionQuery._IGetSDMX == null || (sessionQuery._endpointSettings != null && this.LayObj.Configuration.EndPoint != sessionQuery._endpointSettings.EndPoint))
            {
                GetSDMXObject          = WebServiceSelector.GetSdmxImplementation(this.LayObj.Configuration);
                sessionQuery._IGetSDMX = GetSDMXObject;
            }
            else
            {
                GetSDMXObject = sessionQuery._IGetSDMX;
            }
        }
        public Dictionary <string, ICodelistObject> GetCodeMap(ISdmxObjects sdmxObjects, IDataStructureObject kf, bool withAttribute)
        {
            Dictionary <string, ICodelistObject> Conceptcodelist = new Dictionary <string, ICodelistObject>();

            if (kf != null)
            {
                foreach (IDimension component
                         in kf.DimensionList.Dimensions.Where(c => c.HasCodedRepresentation() &&
                                                              !string.IsNullOrEmpty(c.Representation.Representation.MaintainableReference.MaintainableId)))
                {
                    var codelist = (from c in sdmxObjects.Codelists where c.Id == component.Representation.CrossReferences.First().MaintainableId select c).FirstOrDefault();
                    if (codelist != null)
                    {
                        Conceptcodelist.Add(component.Id, codelist);
                    }
                }

                var time_period          = (from c in kf.DimensionList.Dimensions where c.TimeDimension == true select c).FirstOrDefault();
                var time_period_codelist = (from c in sdmxObjects.Codelists where c.CrossReferences.FirstOrDefault().MaintainableId == time_period.CrossReferences.FirstOrDefault().MaintainableId select c).FirstOrDefault();



                if (withAttribute && kf.AttributeList != null)
                {
                    foreach (IComponent component in kf.AttributeList.Attributes.Where(c => c.HasCodedRepresentation() && !string.IsNullOrEmpty(c.Representation.Representation.MaintainableReference.MaintainableId)))
                    {
                        var codelist = (from c in sdmxObjects.Codelists where c.Id == component.Representation.CrossReferences.First().MaintainableId select c).FirstOrDefault();
                        if (codelist != null)
                        {
                            Conceptcodelist.Add(component.Id, codelist);
                        }
                    }
                }

                if (this.SessionObj == null)
                {
                    this.SessionObj = new SessionImplObject();
                }
                if (this.SessionObj.CodelistConstrained == null)
                {
                    this.SessionObj.CodelistConstrained = new Dictionary <string, Dictionary <string, ICodelistObject> >();
                }
                this.SessionObj.CodelistConstrained[Utils.MakeKey(kf)] = Conceptcodelist;
            }
            return(Conceptcodelist);
        }
        public DataWidget(GetDataObject dataObj, SessionImplObject sessionObj, bool useAttr, SessionQuery sessionQuery)
        {
            DataObj    = dataObj;
            SessionObj = sessionObj;

            if (sessionQuery._IGetSDMX == null || (sessionQuery._endpointSettings != null && this.DataObj.Configuration.EndPoint != sessionQuery._endpointSettings.EndPoint))
            {
                GetSDMXObject          = WebServiceSelector.GetSdmxImplementation(this.DataObj.Configuration);
                sessionQuery._IGetSDMX = GetSDMXObject;
            }
            else
            {
                GetSDMXObject = sessionQuery._IGetSDMX;
            }

            BDO = new BaseDataObject(dataObj.Configuration, System.IO.Path.GetTempFileName());

            this._useAttr = useAttr;
        }
Beispiel #9
0
        private ISdmxObjects GetKeyFamily()
        {
            if (this.SessionObj == null)
            {
                this.SessionObj            = new SessionImplObject();
                this.SessionObj.SdmxObject = new SdmxObjectsImpl();
            }
            //
            IDataflowObject dataflow = this.SessionObj.SdmxObject.Dataflows.FirstOrDefault(d =>
                                                                                           d.AgencyId == this.LayObj.Dataflow.agency && d.Id == this.LayObj.Dataflow.id && d.Version == this.LayObj.Dataflow.version);

            ISdmxObjects Structure = null;

/*
 *          if (dataflow != null)
 *          {
 *              Structure = GetSDMXObject.GetStructure(dataflow, this.SessionObj.SdmxObject.DataStructures);
 *              Structure.AddDataflow(dataflow);
 *          }
 */
            if (dataflow != null && this.SessionObj.SdmxObject.HasConceptSchemes)
            {
                Structure = this.SessionObj.SdmxObject;
            }
            else if (dataflow != null && !this.SessionObj.SdmxObject.HasConceptSchemes)
            {
                Structure = GetSDMXObject.GetStructure(dataflow, this.SessionObj.SdmxObject.DataStructures);
                Structure.AddDataflow(dataflow);
            }
            else
            {
                Structure = GetSDMXObject.GetStructure(this.LayObj.Dataflow.id, this.LayObj.Dataflow.agency, this.LayObj.Dataflow.version);
            }
            this.SessionObj.SdmxObject.Merge(Structure);



            return(Structure);
        }
        public ChartWidget(GetChartObject chartObj, SessionImplObject sessionObj, CultureInfo cFrom, CultureInfo cTo, SessionQuery sessionQuery)
        {
            ChartObj   = chartObj;
            SessionObj = sessionObj;
            //GetSDMXObject = WebServiceSelector.GetSdmxImplementation(this.ChartObj.Configuration);

            if (sessionQuery._IGetSDMX == null || (sessionQuery._endpointSettings != null && this.ChartObj.Configuration.EndPoint != sessionQuery._endpointSettings.EndPoint))
            {
                GetSDMXObject          = WebServiceSelector.GetSdmxImplementation(this.ChartObj.Configuration);
                sessionQuery._IGetSDMX = GetSDMXObject;
            }
            else
            {
                GetSDMXObject = sessionQuery._IGetSDMX;
            }


            BDO = new BaseDataObject(chartObj.Configuration, System.IO.Path.GetTempFileName());

            this.cFrom = cFrom;
            this.cTo   = cTo;
        }
Beispiel #11
0
 public LayoutWidget(GetCodemapObject layoutObj, SessionImplObject sessionObj)
 {
     LayObj        = layoutObj;
     SessionObj    = sessionObj;
     GetSDMXObject = WebServiceSelector.GetSdmxImplementation(this.LayObj.Configuration);
 }
 public LayoutWidget(GetCodemapObject layoutObj, SessionImplObject sessionObj)
 {
     LayObj = layoutObj;
     SessionObj = sessionObj;
     GetSDMXObject = WebServiceSelector.GetSdmxImplementation(this.LayObj.Configuration);
 }
        private ISdmxObjects GetKeyFamily()
        {
            if (this.SessionObj == null)
            {
                this.SessionObj = new SessionImplObject();
                this.SessionObj.SdmxObject = new SdmxObjectsImpl();
            }
            //
            IDataflowObject dataflow = this.SessionObj.SdmxObject.Dataflows.FirstOrDefault(d =>
                d.AgencyId == this.LayObj.Dataflow.agency && d.Id == this.LayObj.Dataflow.id && d.Version == this.LayObj.Dataflow.version);

            ISdmxObjects Structure = null;
            /*
            if (dataflow != null)
            {
                Structure = GetSDMXObject.GetStructure(dataflow, this.SessionObj.SdmxObject.DataStructures);
                Structure.AddDataflow(dataflow);
            }
            */
            if (dataflow != null && this.SessionObj.SdmxObject.HasConceptSchemes)
            {
                Structure = this.SessionObj.SdmxObject;
            }
            else if (dataflow != null && !this.SessionObj.SdmxObject.HasConceptSchemes)
            {
                Structure = GetSDMXObject.GetStructure(dataflow, this.SessionObj.SdmxObject.DataStructures);
                Structure.AddDataflow(dataflow);
            }
            else
            {
                Structure = GetSDMXObject.GetStructure(this.LayObj.Dataflow.id, this.LayObj.Dataflow.agency, this.LayObj.Dataflow.version);
            }
            this.SessionObj.SdmxObject.Merge(Structure);

            return Structure;
        }