/// <summary>
        /// Get a copy of this taxon id list.
        /// </summary>
        /// <returns>A copy of this taxon id list.</returns>
        public TaxonIdList Clone()
        {
            TaxonIdList taxa;

            taxa = new TaxonIdList();
            taxa.AddRange(this);
            return(taxa);
        }
Beispiel #2
0
        /// <summary>
        /// Get ids for taxa that matches search criteria.
        /// </summary>
        /// <param name="searchCriteria">Analysis search criteria.</param>
        /// <param name="taxonIds">
        /// Limit search to these taxon ids.
        /// This parameter is ignored if value is null.
        /// </param>
        /// <returns>Ids for taxa that matches search criteria.</returns>
        public TaxonIdList GetTaxonIds(AnalysisSearchCriteria searchCriteria, TaxonIdList taxonIds = null)
        {
            TaxonIdList tempTaxonIds;

            tempTaxonIds = null;
            if (taxonIds.IsNotNull())
            {
                tempTaxonIds = new TaxonIdList();
                tempTaxonIds.AddRange(taxonIds);
            }

            //if (searchCriteria.Biotopes.IsNotNull())
            //{
            //    tempTaxonIds = Biotope.GetTaxonIds(searchCriteria.Biotopes,
            //                                       tempTaxonIds);
            //}

            //if (searchCriteria.SwedishOccurrence.IsNotNull())
            //{
            //    tempTaxonIds = SwedishOccurrence.GetTaxonIds(searchCriteria.SwedishOccurrence,
            //                                                 tempTaxonIds);
            //}

            //if (searchCriteria.CountyOccurrence.IsNotNull())
            //{
            //    tempTaxonIds = CountyOccurrence.GetTaxonIds(searchCriteria.CountyOccurrence,
            //                                                tempTaxonIds);
            //}

            //if (searchCriteria.Host.IsNotNull())
            //{
            //    tempTaxonIds = Host.GetTaxonIds(searchCriteria.Host,
            //                                    tempTaxonIds);
            //}

            //if (searchCriteria.Impact.IsNotNull())
            //{
            //    tempTaxonIds = Impact.GetTaxonIds(searchCriteria.Impact,
            //                                      tempTaxonIds);
            //}

            //if (searchCriteria.LandscapeTypes.IsNotNull())
            //{
            //    tempTaxonIds = LandscapeType.GetTaxonIds(searchCriteria.LandscapeTypes,
            //                                             tempTaxonIds);
            //}

            //if (searchCriteria.LifeForms.IsNotNull())
            //{
            //    tempTaxonIds = LifeForm.GetTaxonIds(searchCriteria.LifeForms,
            //                                        tempTaxonIds);
            //}

            //if (searchCriteria.OrganismGroups.IsNotNull())
            //{
            //    tempTaxonIds = OrganismGroup.GetTaxonIds(searchCriteria.OrganismGroups,
            //                                             tempTaxonIds);
            //}

            if (searchCriteria.RedListCategories.IsNotNull())
            {
                tempTaxonIds = RedListCategory.GetTaxonIds(searchCriteria.RedListCategories, tempTaxonIds);
            }

            //if (searchCriteria.TaxonCategories.IsNotEmpty())
            //{
            //    tempTaxonIds = TaxonScope.GetTaxonIds(searchCriteria.TaxonCategories,
            //                                                    tempTaxonIds);
            //}
            //else if (searchCriteria.TaxonScope.IsNotNull())
            //{
            //    tempTaxonIds = TaxonScope.GetTaxonIds(searchCriteria.TaxonScope,
            //                                                    tempTaxonIds);
            //}

            //if (searchCriteria.Substrate.IsNotNull())
            //{
            //    tempTaxonIds = Substrate.GetTaxonIds(searchCriteria.Substrate,
            //                                         tempTaxonIds);
            //}

            //if (searchCriteria.ThematicLists.IsNotNull())
            //{
            //    tempTaxonIds = ThematicLists.GetTaxonIds(searchCriteria.ThematicLists,
            //                                             tempTaxonIds);
            //}

            return(tempTaxonIds);
        }