Esempio n. 1
0
        public List <Chronozoom.Entities.SearchResult> Search(string s)
        {
            s = s.ToLower();

            var searchResults = new List <Chronozoom.Entities.SearchResult>();
            var timelines     = DataEnvironmentAccess.AnInstance.GetITimelineInfo(s);

            foreach (var timeline in timelines)
            {
                Chronozoom.Entities.SearchResult sr = new Chronozoom.Entities.SearchResult(timeline.ID,
                                                                                           timeline.Title,
                                                                                           ObjectTypeEnum.Timeline,
                                                                                           timeline.UniqueID
                                                                                           );
                searchResults.Add(sr);
            }

            var exhibits = DataEnvironmentAccess.AnInstance.GetIExhibitView(s);

            foreach (var exhibit in exhibits)
            {
                Chronozoom.Entities.SearchResult sr = new Chronozoom.Entities.SearchResult(exhibit.ID,
                                                                                           exhibit.Title,
                                                                                           ObjectTypeEnum.Exhibit,
                                                                                           exhibit.UniqueID
                                                                                           );
                searchResults.Add(sr);
            }


            var contentItems = DataEnvironmentAccess.AnInstance.GetIExhibitContentItemInfo(s);

            foreach (var contentItem in contentItems)
            {
                Chronozoom.Entities.SearchResult sr = new Chronozoom.Entities.SearchResult(contentItem.ID,
                                                                                           contentItem.Title,
                                                                                           ObjectTypeEnum.ContentItem,
                                                                                           contentItem.UniqueID
                                                                                           );
                searchResults.Add(sr);
            }

            return(searchResults);
        }
Esempio n. 2
0
        public List<Chronozoom.Entities.SearchResult> Search(string s)
        {
            s = s.ToLower();

            var searchResults = new List<Chronozoom.Entities.SearchResult>();
            var timelines = DataEnvironmentAccess.AnInstance.GetITimelineInfo(s);

            foreach (var timeline in timelines)
            {
                Chronozoom.Entities.SearchResult sr = new Chronozoom.Entities.SearchResult(timeline.ID,
                    timeline.Title,
                    ObjectTypeEnum.Timeline,
                    timeline.UniqueID
                    );
                searchResults.Add(sr);
            }

            var exhibits = DataEnvironmentAccess.AnInstance.GetIExhibitView(s);
            foreach (var exhibit in exhibits)
            {
                Chronozoom.Entities.SearchResult sr = new Chronozoom.Entities.SearchResult(exhibit.ID,
                    exhibit.Title,
                    ObjectTypeEnum.Exhibit,
                    exhibit.UniqueID
                    );
                searchResults.Add(sr);
            }

            var contentItems = DataEnvironmentAccess.AnInstance.GetIExhibitContentItemInfo(s);
            foreach (var contentItem in contentItems)
            {
                Chronozoom.Entities.SearchResult sr = new Chronozoom.Entities.SearchResult(contentItem.ID,
                    contentItem.Title,
                    ObjectTypeEnum.ContentItem,
                    contentItem.UniqueID
                    );
                searchResults.Add(sr);
            }

            return searchResults;
        }