private WebDataQuery GetDataQuery(WebSpeciesFactCondition speciesFactCondition)
        {
            WebDataCondition dataCondition;
            WebDataQuery     dataQuery;

            dataCondition = new WebDataCondition();
            dataCondition.SpeciesFactCondition = speciesFactCondition;
            dataQuery = new WebDataQuery();
            dataQuery.DataCondition = dataCondition;
            return(dataQuery);
        }
        private WebDataQuery GetDataQuery(WebDataLogicCondition dataLogicCondition)
        {
            WebDataCondition dataCondition;
            WebDataQuery     dataQuery;


            dataCondition = new WebDataCondition();
            dataCondition.DataLogicCondition = dataLogicCondition;
            dataQuery = new WebDataQuery();
            dataQuery.DataCondition = dataCondition;
            return(dataQuery);
        }
        /// <summary>
        /// Convert an IDataQuery to a WebDataQuery.
        /// </summary>
        /// <param name="dataQuery">The data query.</param>
        /// <returns>A WebDataQuery.</returns>
        protected static WebDataQuery GetDataQuery(IDataQuery dataQuery)
        {
            WebDataLogicCondition   webDataLogicCondition;
            WebDataCondition        webDataCondition;
            WebDataQuery            webDataQuery;
            WebSpeciesFactCondition webSpeciesFactCondition;

            switch (dataQuery.Type)
            {
            case DataQueryType.AndCondition:
                webDataLogicCondition = GetDataAndCondition((DataAndCondition)dataQuery);
                webDataCondition      = new WebDataCondition();
                webDataCondition.DataLogicCondition = webDataLogicCondition;
                webDataQuery = new WebDataQuery();
                webDataQuery.DataCondition = webDataCondition;
                break;

            case DataQueryType.OrCondition:
                webDataLogicCondition = GetDataOrCondition((DataOrCondition)dataQuery);
                webDataCondition      = new WebDataCondition();
                webDataCondition.DataLogicCondition = webDataLogicCondition;
                webDataQuery = new WebDataQuery();
                webDataQuery.DataCondition = webDataCondition;
                break;

            case DataQueryType.SpeciesFactCondition:
                webSpeciesFactCondition = GetSpeciesFactCondition((SpeciesFactCondition)dataQuery);
                webDataCondition        = new WebDataCondition();
                webDataCondition.SpeciesFactCondition = webSpeciesFactCondition;
                webDataQuery = new WebDataQuery();
                webDataQuery.DataCondition = webDataCondition;
                break;

            default:
                throw new ApplicationException("Handling of data query type '" + dataQuery.Type + "' is not implemeted!");
            }
            return(webDataQuery);
        }