Beispiel #1
0
        public static PollutantReleasesTimeSeriesFilter ConvertToPollutantReleasesTimeSeriesFilter(IndustrialActivitySearchFilter filter)
        {
            PollutantReleasesTimeSeriesFilter converted = new PollutantReleasesTimeSeriesFilter();

            converted.AreaFilter     = clone(filter.AreaFilter) as AreaFilter;
            converted.ActivityFilter = clone(filter.ActivityFilter) as ActivityFilter;
            return(converted);
        }
Beispiel #2
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);
        }
Beispiel #3
0
        /// <summary>
        /// Creates a new object that is a deep copy of the current instance.
        /// </summary>
        public object Clone()
        {
            PollutantReleasesTimeSeriesFilter clone = this.MemberwiseClone() as PollutantReleasesTimeSeriesFilter;

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

            clone.PeriodFilter = this.PeriodFilter != null?this.PeriodFilter.Clone() as PeriodFilter : 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);
        }
Beispiel #4
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);
        }