private static void getClassifChildren(PackageDetailAggregate pd, SaumonClassification parent, TreeNode node)
        {
            IEnumerable<SaumonClassification> children = pd.saumons.Where<SaumonClassification>(l => ((l.parentLink != null ? l.parentLink.ToString() : null) == parent.id));

            foreach (SaumonClassification child in children)
            {
                TreeNode childNode = new TreeNode();

                childNode.Name = child.id;
                childNode.Text = child.name;
                node.Nodes.Add(childNode);
                getClassifChildren(pd, child, childNode);
            }
        }
    public static List<SaumonClassification> getSaumonBySyndicationFeed(IEnumerable<SyndicationItem> saumons)
    {
        List<SaumonClassification> saumonList = new List<SaumonClassification>();
        foreach (SyndicationItem item in saumons)
        {
            string ractName = item.Title.Text;
            int id = item.ElementExtensions.ReadElementExtensions<int>("id", vidalNameSpace).FirstOrDefault();
            string feedid = item.Id;
            Uri altLink = null;
            SyndicationLink altSyndicationLink = item.Links.FirstOrDefault(l => (l.RelationshipType == "inline"));
            if (altSyndicationLink != null)
            {
                altLink = altSyndicationLink.Uri;
            }
            SyndicationLink packagesLinkFeed = (item.Links.FirstOrDefault(l => (l.Title == "PACKAGES")));
            Uri packagesLink = null;
            if (packagesLinkFeed != null)
            {
                packagesLink = packagesLinkFeed.Uri;
            }

            SaumonClassification saumon = new SaumonClassification(feedid, ractName, altLink, packagesLink);
            saumonList.Add(saumon);
        }
        return saumonList;
    }
    public static PackageDetailAggregate getDetailAggregatePackageByUri(Uri uri)
    {
        SyndicationFeed packageFeed =  getFeedByUri(new Uri(getAbsoluteUri(uri)+"?aggregate=LPPR&&aggregate=SAUMON_CLASSIFICATION"));
        List<Package> packList = getPackagesBySyndicationFeed(packageFeed.Items);
        PackageDetailAggregate packDetail = new PackageDetailAggregate();
        packDetail.package = packList[0];

        //aggregate Saumon_classification information
        IEnumerable<SyndicationItem> saumonClassifs = packageFeed.Items.Where(l => (l.Categories[0].Name == "SAUMON_CLASSIFICATION"));
        List<SaumonClassification> saumonList = new List<SaumonClassification>();
        foreach (SyndicationItem item in saumonClassifs)
        {
            String classifName = item.Title.Text;
            String id = item.Id;
            SyndicationLink parentLink = (item.Links.FirstOrDefault(l => (l.RelationshipType == "inline")));
            Uri parentLinkUri = null;
            if (parentLink != null)
            {
                parentLinkUri = parentLink.Uri;
            }

            SaumonClassification saumonClass = new SaumonClassification(id, classifName, parentLinkUri,null);
            saumonList.Add(saumonClass);
        }
        packDetail.saumons = saumonList;

        //aggregate the Lppr informations
        IEnumerable<SyndicationItem> lpprItems = packageFeed.Items.Where(l => (l.Categories[0].Name == "LPPR"));
        List<Lppr> lpprList = new List<Lppr>();
        foreach (SyndicationItem item in lpprItems)
        {
            int id = item.ElementExtensions.ReadElementExtensions<int>("id", vidalNameSpace).FirstOrDefault();
            String name = item.Title.Text;
            String actCode = item.ElementExtensions.ReadElementExtensions<String>("act", vidalNameSpace).FirstOrDefault(); ;
            String code =  item.ElementExtensions.ReadElementExtensions<String>("code", vidalNameSpace).FirstOrDefault(); ;;
            int coef =  item.ElementExtensions.ReadElementExtensions<int>("coef", vidalNameSpace).FirstOrDefault(); ;;
            float refundBase = item.ElementExtensions.ReadElementExtensions<float>("refundingBase", vidalNameSpace).FirstOrDefault(); ; ;
            String service = item.ElementExtensions.ReadElementExtensions<String>("service", vidalNameSpace).FirstOrDefault(); ; ; ;
            Lppr lppr = new Lppr(id,name,actCode,code,coef,refundBase,service);
            lpprList.Add(lppr);
        }
        packDetail.lpprs = lpprList;
        return packDetail;
    }