Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <remarks></remarks>
        /// <seealso cref=""/>
        /// <param name="searchCriteria"></param>
        /// <param name="pageSize"></param>
        /// <param name="currentPage"></param>
        /// <returns></returns>
        public SearchModel Get(SearchCriteria searchCriteria, int pageSize = 10, int currentPage = 1)
        {
            MetadataReader.ListOfMetadata = MetadataReader.GetAllMetadataDatasets();
            MetadataReader.ListOfMetadata = MetadataReader.GetAllMetadataDatasetsWithListOfSearchCriteria(MetadataReader.ListOfMetadata, searchCriteria);

            this.WorkingSearchModel.ResultComponent = ResultObjectBuilder.ConvertListOfMetadataToSearchResultObject(MetadataReader.ListOfMetadata, pageSize, currentPage);


            return(this.WorkingSearchModel);
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        /// <remarks></remarks>
        /// <seealso cref=""/>
        /// <param name="value"></param>
        /// <param name="filter"></param>
        /// <param name="searchType"></param>
        /// <param name="numberOfResults"></param>
        /// <returns></returns>
        public SearchModel GetTextBoxSearchValues(string value, string filter, string searchType, int numberOfResults)
        {
            if (searchType == "new")
            {
                MetadataReader.ListOfMetadata = MetadataReader.GetAllMetadataDatasets();
            }

            if (filter != null && filter != "all")
            {
                this.WorkingSearchModel.SearchComponent.TextBoxSearchValues = MetadataReader.GetAllTextValuesByNodeDistinct(filter, MetadataReader.ListOfMetadata);
            }
            else
            {
                this.WorkingSearchModel.SearchComponent.TextBoxSearchValues = MetadataReader.GetAllValuesAsListDistinct(MetadataReader.ListOfMetadata);
            }

            return(this.WorkingSearchModel);
        }
Example #3
0
        /// <summary>
        ///
        /// </summary>
        /// <remarks></remarks>
        /// <seealso cref=""/>
        /// <param>NA</param>
        /// <returns></returns>
        public SearchModel initWorking()
        {
            SearchModel model = new SearchModel();

            MetadataReader.ListOfMetadata = MetadataReader.GetAllMetadataDatasets();

            //facets
            model.SearchComponent.Facets = FacetBuilder.GetAllNodesAsListFromData(FacetBuilder.CATEGORY_TYPE, MetadataReader.ListOfMetadata);

            //properties
            PropertyBuilder propertyBuilder = new PropertyBuilder(MetadataReader.ListOfMetadata);

            model.SearchComponent.Properties = propertyBuilder.AllProperties;

            //categories
            model.SearchComponent.Categories = CategoryBuilder.GetAllRootNodesAsList(CategoryBuilder.DROPDOWN_TYPE);

            //Textvalues
            model.SearchComponent.TextBoxSearchValues = new List <TextValue>();

            return(model);
        }