Exemple #1
0
        public static PollutantReleaseSearchFilter ConvertToPollutantReleaseSearchFilter(AreaOverviewSearchFilter filter)
        {
            PollutantReleaseSearchFilter converted = new PollutantReleaseSearchFilter();

            converted.AreaFilter = clone(filter.AreaFilter) as AreaFilter;
            converted.YearFilter = clone(filter.YearFilter) as YearFilter;
            return(converted);
        }
Exemple #2
0
        public static PollutantReleaseSearchFilter ConvertToPollutantReleaseSearchFilter(IndustrialActivitySearchFilter filter)
        {
            PollutantReleaseSearchFilter converted = new PollutantReleaseSearchFilter();

            converted.AreaFilter     = clone(filter.AreaFilter) as AreaFilter;
            converted.YearFilter     = clone(filter.YearFilter) as YearFilter;
            converted.ActivityFilter = clone(filter.ActivityFilter) as ActivityFilter;
            return(converted);
        }
Exemple #3
0
        public static FacilitySearchFilter ConvertToFacilitySearchFilter(PollutantReleaseSearchFilter filter)
        {
            FacilitySearchFilter converted = new FacilitySearchFilter();

            converted.AreaFilter      = clone(filter.AreaFilter) as AreaFilter;
            converted.YearFilter      = clone(filter.YearFilter) as YearFilter;
            converted.ActivityFilter  = clone(filter.ActivityFilter) as ActivityFilter;
            converted.PollutantFilter = clone(filter.PollutantFilter) as PollutantFilter;
            converted.MediumFilter    = clone(filter.MediumFilter) as MediumFilter;
            return(converted);
        }
Exemple #4
0
        public static PollutantReleaseSearchFilter ConvertToPollutantReleaseSearchFilter(DiffuseSourcesFilter filter)
        {
            PollutantReleaseSearchFilter converted = new PollutantReleaseSearchFilter();

            converted.YearFilter      = clone(filter.YearFilter) as YearFilter;
            converted.ActivityFilter  = clone(filter.ActivityFilter) as ActivityFilter;
            converted.PollutantFilter = clone(filter.PollutantFilter) as PollutantFilter;
            converted.MediumFilter    = clone(filter.MediumFilter) as MediumFilter;

            return(converted);
        }
Exemple #5
0
        /// <summary>
        /// Pollutant Release filter has no match for Year, so this attribute is set to null
        /// </summary>
        /// <param name="filter">Source filter</param>
        /// <returns>Targer filter</returns>
        public static PollutantReleaseSearchFilter ConvertToPollutantReleaseSearchFilter(PollutantReleasesTimeSeriesFilter filter)
        {
            var converted = new PollutantReleaseSearchFilter();

            converted.AreaFilter      = filter.AreaFilter;
            converted.ActivityFilter  = filter.ActivityFilter;
            converted.MediumFilter    = filter.MediumFilter;
            converted.PollutantFilter = filter.PollutantFilter;

            // search for any year
            converted.YearFilter = null;

            return(converted);
        }
        /// <summary>
        /// Creates a new object that is a deep copy of the current instance.
        /// </summary>
        public object Clone()
        {
            PollutantReleaseSearchFilter clone = this.MemberwiseClone() as PollutantReleaseSearchFilter;

            clone.AreaFilter = this.AreaFilter != null?this.AreaFilter.Clone() as AreaFilter : null;

            clone.YearFilter = this.YearFilter != null?this.YearFilter.Clone() as YearFilter : null;

            clone.PollutantFilter = this.PollutantFilter != null?this.PollutantFilter.Clone() as PollutantFilter : null;

            clone.MediumFilter = this.MediumFilter != null?this.MediumFilter.Clone() as MediumFilter : null;

            clone.ActivityFilter = this.ActivityFilter != null?this.ActivityFilter.Clone() as ActivityFilter : null;

            return(clone);
        }
Exemple #7
0
        public static PollutantReleasesTimeSeriesFilter ConvertToPollutantReleasesTimeSeriesFilter(PollutantReleaseSearchFilter filter)
        {
            PollutantReleasesTimeSeriesFilter converted = new PollutantReleasesTimeSeriesFilter();

            converted.AreaFilter      = clone(filter.AreaFilter) as AreaFilter;
            converted.ActivityFilter  = clone(filter.ActivityFilter) as ActivityFilter;
            converted.PollutantFilter = clone(filter.PollutantFilter) as PollutantFilter;
            converted.MediumFilter    = clone(filter.MediumFilter) as MediumFilter;
            return(converted);
        }