Esempio n. 1
0
        internal static RenderedNode getNodeFromTextContent(TextContent textContent)
        {
            RenderedNode node = RenderedNode.CreateDefault();

            node.TechnicalSource = NodeSourceTypeTextContent;
            node.Title           = textContent.Title;
            node.Excerpt         = textContent.Excerpt;
            if (textContent.ImageData != null)
            {
                node.ImageBaseUrl = textContent.ImageData.ContentUrlBase;
            }
            node.ActualContentUrl = "../" + textContent.SemanticDomainName + "/" + textContent.Name + "/" + textContent.ID;
            if (textContent.Categories != null)
            {
                node.Categories.CollectionContent.AddRange(getCategoryCollectionTexts(textContent.Categories, getTitleOrNameFromCategory));
                node.CategoryNames.CollectionContent.AddRange(getCategoryCollectionTexts(textContent.Categories, cat => cat.CategoryName));
            }
            if (textContent.Locations != null)
            {
                node.Locations.CollectionContent.AddRange(getLocationCollectionTexts(textContent.Locations));
            }
            node.Authors.CollectionContent.Add(getShortTextObject(textContent.Author));
            node.MainSortableText = textContent.SortOrderNumber.ToString();
            return(node);
        }
Esempio n. 2
0
        internal static RenderedNode getNodeFromCategory(Category category)
        {
            RenderedNode node = RenderedNode.CreateDefault();

            node.TechnicalSource = NodeSourceTypeCategory;
            node.Title           = category.Title;
            node.Excerpt         = category.Excerpt;
            if (category.ImageData != null)
            {
                node.ImageBaseUrl = category.ImageData.ContentUrlBase;
            }
            //node.ActualContentUrl = "../" + textContent.SemanticDomainName + "/" + textContent.Name + "/" + textContent.ID;
            if (category.ParentCategory != null)
            {
                node.Categories.CollectionContent.Add(getShortTextObject(category.ParentCategory.Title));
                node.CategoryNames.CollectionContent.Add(getShortTextObject(category.ParentCategory.CategoryName));
            }
            node.IsCategoryFilteringNode = true;
            node.CategoryFilters.CollectionContent.Add(getShortTextObject(category.CategoryName));
            //if (textContent.Locations != null)
            //    node.Locations.CollectionContent.AddRange(getLocationCollectionTexts(textContent.Locations));
            //node.Authors.CollectionContent.Add(getShortTextObject(textContent.Author));
            //node.MainSortableText = textContent.SortOrderNumber.ToString();
            return(node);
        }
Esempio n. 3
0
        internal static RenderedNode getNodeFromActivity(Activity activity)
        {
            RenderedNode node = RenderedNode.CreateDefault();

            node.TechnicalSource  = NodeSourceTypeActivity;
            node.Title            = activity.ActivityName;
            node.Excerpt          = activity.Excerpt;
            node.ImageBaseUrl     = activity.ProfileImage.ImageData.ContentUrlBase;
            node.ActualContentUrl = activity.ReferenceToInformation.URL;
            node.TimestampText    = getTimeStampText(activity.StartingTime);
            node.Categories.CollectionContent.AddRange(getCategoryCollectionTexts(activity.CategoryCollection, getTitleOrNameFromCategory));
            node.Locations.CollectionContent.AddRange(getLocationCollectionTexts(activity.LocationCollection));
            node.Authors.CollectionContent.Add(getShortTextObject(activity.ContactPerson));
            node.MainSortableText = activity.StartingTime.ToString("s");
            return(node);
        }
Esempio n. 4
0
        internal static RenderedNode getNodeFromBlog(Blog blog)
        {
            RenderedNode node = RenderedNode.CreateDefault();

            node.TechnicalSource  = NodeSourceTypeBlog;
            node.Title            = blog.Title;
            node.Excerpt          = blog.Excerpt;
            node.ImageBaseUrl     = blog.ProfileImage.ImageData.ContentUrlBase;
            node.ActualContentUrl = blog.ReferenceToInformation.URL;
            node.TimestampText    = getTimeStampText(blog.Published);
            node.Categories.CollectionContent.AddRange(getCategoryCollectionTexts(blog.CategoryCollection, getTitleOrNameFromCategory));
            node.CategoryNames.CollectionContent.AddRange(getCategoryCollectionTexts(blog.CategoryCollection, cat => cat.CategoryName));
            node.Locations.CollectionContent.AddRange(getLocationCollectionTexts(blog.LocationCollection));
            node.Authors.CollectionContent.Add(getShortTextObject(blog.Author));
            node.MainSortableText = blog.Published.ToString("s");
            return(node);
        }