Exemplo n.º 1
0
 public NodeInfo(int nodeId, string nodeName, ENodeType nodeType, int publishmentSystemId, string contentModelId, int parentId, string parentsPath, int parentsCount, int childrenCount, bool isLastNode, string nodeIndexName, string nodeGroupNameCollection, int taxis, DateTime addDate, string imageUrl, string content, int contentNum, string filePath, string channelFilePathRule, string contentFilePathRule, string linkUrl, ELinkType linkType, int channelTemplateId, int contentTemplateId, string keywords, string description, string extendValues)
 {
     NodeId                  = nodeId;
     NodeName                = nodeName;
     NodeType                = nodeType;
     PublishmentSystemId     = publishmentSystemId;
     _contentModelId         = contentModelId;
     ParentId                = parentId;
     ParentsPath             = parentsPath;
     ParentsCount            = parentsCount;
     ChildrenCount           = childrenCount;
     IsLastNode              = isLastNode;
     NodeIndexName           = nodeIndexName;
     NodeGroupNameCollection = nodeGroupNameCollection;
     Taxis               = taxis;
     AddDate             = addDate;
     ImageUrl            = imageUrl;
     Content             = content;
     ContentNum          = contentNum;
     FilePath            = filePath;
     ChannelFilePathRule = channelFilePathRule;
     ContentFilePathRule = contentFilePathRule;
     LinkUrl             = linkUrl;
     LinkType            = linkType;
     ChannelTemplateId   = channelTemplateId;
     ContentTemplateId   = contentTemplateId;
     Keywords            = keywords;
     Description         = description;
     _extendValues       = extendValues;
 }
Exemplo n.º 2
0
 public ImportExportAttribute(ELinkType Type, params Type[] KeyFor)
 {
     this.Type       = Type;
     this.KeyFor     = KeyFor;
     exportCount     = 0;
     exportOrderDesc = true;
     skipItem        = false;
     skipPair        = new string[] { };
 }
Exemplo n.º 3
0
        public static ListItem GetListItem(ELinkType type, bool selected)
        {
            var item = new ListItem(GetText(type), GetValue(type));

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
Exemplo n.º 4
0
 public static string GetText(ELinkType type)
 {
     if (type == ELinkType.NoLinkIfContentNotExists)
     {
         return("无内容时不可链接");
     }
     else if (type == ELinkType.LinkToOnlyOneContent)
     {
         return("仅一条内容时链接到此内容");
     }
     else if (type == ELinkType.NoLinkIfContentNotExistsAndLinkToOnlyOneContent)
     {
         return("无内容时不可链接,仅一条内容时链接到此内容");
     }
     else if (type == ELinkType.LinkToFirstContent)
     {
         return("链接到第一条内容");
     }
     else if (type == ELinkType.NoLinkIfContentNotExistsAndLinkToFirstContent)
     {
         return("无内容时不可链接,有内容时链接到第一条内容");
     }
     else if (type == ELinkType.NoLinkIfChannelNotExists)
     {
         return("无栏目时不可链接");
     }
     else if (type == ELinkType.LinkToLastAddChannel)
     {
         return("链接到最近增加的子栏目");
     }
     else if (type == ELinkType.LinkToFirstChannel)
     {
         return("链接到第一个子栏目");
     }
     else if (type == ELinkType.NoLinkIfChannelNotExistsAndLinkToLastAddChannel)
     {
         return("无栏目时不可链接,有栏目时链接到最近增加的子栏目");
     }
     else if (type == ELinkType.NoLinkIfChannelNotExistsAndLinkToFirstChannel)
     {
         return("无栏目时不可链接,有栏目时链接到第一个子栏目");
     }
     else if (type == ELinkType.NoLink)
     {
         return("不可链接");
     }
     else if (type == ELinkType.LinkNoRelatedToChannelAndContent)
     {
         return("默认");
     }
     else
     {
         throw new Exception();
     }
 }
Exemplo n.º 5
0
 public static string GetValue(ELinkType type)
 {
     if (type == ELinkType.LinkNoRelatedToChannelAndContent)
     {
         return("LinkNoRelatedToChannelAndContent");
     }
     else if (type == ELinkType.NoLinkIfContentNotExists)
     {
         return("NoLinkIfContentNotExists");
     }
     else if (type == ELinkType.LinkToOnlyOneContent)
     {
         return("LinkToOnlyOneContent");
     }
     else if (type == ELinkType.NoLinkIfContentNotExistsAndLinkToOnlyOneContent)
     {
         return("NoLinkIfContentNotExistsAndLinkToOnlyOneContent");
     }
     else if (type == ELinkType.LinkToFirstContent)
     {
         return("LinkToFirstContent");
     }
     else if (type == ELinkType.NoLinkIfContentNotExistsAndLinkToFirstContent)
     {
         return("NoLinkIfContentNotExistsAndLinkToFirstContent");
     }
     else if (type == ELinkType.NoLinkIfChannelNotExists)
     {
         return("NoLinkIfChannelNotExists");
     }
     else if (type == ELinkType.LinkToLastAddChannel)
     {
         return("LinkToLastAddChannel");
     }
     else if (type == ELinkType.LinkToFirstChannel)
     {
         return("LinkToFirstChannel");
     }
     else if (type == ELinkType.NoLinkIfChannelNotExistsAndLinkToLastAddChannel)
     {
         return("NoLinkIfChannelNotExistsAndLinkToLastAddChannel");
     }
     else if (type == ELinkType.NoLinkIfChannelNotExistsAndLinkToFirstChannel)
     {
         return("NoLinkIfChannelNotExistsAndLinkToFirstChannel");
     }
     else if (type == ELinkType.NoLink)
     {
         return("NoLink");
     }
     else
     {
         throw new Exception();
     }
 }
Exemplo n.º 6
0
        /// <summary>
        ///  根据字符串获取枚举类型
        /// </summary>
        /// <param name="typeStr"></param>
        /// <returns></returns>
        public static ELinkType GetEnum(string typeStr)
        {
            ELinkType retval = ELinkType.LinkNoRelatedToChannelAndContent;

            if (Equals(ELinkType.NoLinkIfContentNotExists, typeStr))
            {
                retval = ELinkType.NoLinkIfContentNotExists;
            }
            else if (Equals(ELinkType.LinkToOnlyOneContent, typeStr))
            {
                retval = ELinkType.LinkToOnlyOneContent;
            }
            else if (Equals(ELinkType.NoLinkIfContentNotExistsAndLinkToOnlyOneContent, typeStr))
            {
                retval = ELinkType.NoLinkIfContentNotExistsAndLinkToOnlyOneContent;
            }
            else if (Equals(ELinkType.LinkToFirstContent, typeStr))
            {
                retval = ELinkType.LinkToFirstContent;
            }
            else if (Equals(ELinkType.NoLinkIfContentNotExistsAndLinkToFirstContent, typeStr))
            {
                retval = ELinkType.NoLinkIfContentNotExistsAndLinkToFirstContent;
            }
            else if (Equals(ELinkType.NoLinkIfChannelNotExists, typeStr))
            {
                retval = ELinkType.NoLinkIfChannelNotExists;
            }
            else if (Equals(ELinkType.LinkToLastAddChannel, typeStr))
            {
                retval = ELinkType.LinkToLastAddChannel;
            }
            else if (Equals(ELinkType.LinkToFirstChannel, typeStr))
            {
                retval = ELinkType.LinkToFirstChannel;
            }
            else if (Equals(ELinkType.NoLinkIfChannelNotExistsAndLinkToLastAddChannel, typeStr))
            {
                retval = ELinkType.NoLinkIfChannelNotExistsAndLinkToLastAddChannel;
            }
            else if (Equals(ELinkType.NoLinkIfChannelNotExistsAndLinkToFirstChannel, typeStr))
            {
                retval = ELinkType.NoLinkIfChannelNotExistsAndLinkToFirstChannel;
            }
            else if (Equals(ELinkType.NoLink, typeStr))
            {
                retval = ELinkType.NoLink;
            }
            else if (Equals(ELinkType.LinkNoRelatedToChannelAndContent, typeStr))
            {
                retval = ELinkType.LinkNoRelatedToChannelAndContent;
            }

            return(retval);
        }
Exemplo n.º 7
0
 public static bool Equals(ELinkType type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 8
0
 /// <summary>
 /// 是否相同
 /// </summary>
 /// <param name="type"></param>
 /// <param name="typeStr"></param>
 /// <returns></returns>
 public static bool Equals(ELinkType type, string typeStr)
 {
     if (String.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (GetEnum(typeStr) == type)
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 9
0
        public static string GetText(ELinkType type)
        {
            if (type == ELinkType.NoLinkIfContentNotExists)
            {
                return("无内容时不可链接");
            }
            if (type == ELinkType.LinkToOnlyOneContent)
            {
                return("仅一条内容时链接到此内容");
            }
            if (type == ELinkType.NoLinkIfContentNotExistsAndLinkToOnlyOneContent)
            {
                return("无内容时不可链接,仅一条内容时链接到此内容");
            }
            if (type == ELinkType.LinkToFirstContent)
            {
                return("链接到第一条内容");
            }
            if (type == ELinkType.NoLinkIfContentNotExistsAndLinkToFirstContent)
            {
                return("无内容时不可链接,有内容时链接到第一条内容");
            }
            if (type == ELinkType.NoLinkIfChannelNotExists)
            {
                return("无栏目时不可链接");
            }
            if (type == ELinkType.LinkToLastAddChannel)
            {
                return("链接到最近增加的子栏目");
            }
            if (type == ELinkType.LinkToFirstChannel)
            {
                return("链接到第一个子栏目");
            }
            if (type == ELinkType.NoLinkIfChannelNotExistsAndLinkToLastAddChannel)
            {
                return("无栏目时不可链接,有栏目时链接到最近增加的子栏目");
            }
            if (type == ELinkType.NoLinkIfChannelNotExistsAndLinkToFirstChannel)
            {
                return("无栏目时不可链接,有栏目时链接到第一个子栏目");
            }
            if (type == ELinkType.NoLink)
            {
                return("不可链接");
            }

            return("默认");
        }
Exemplo n.º 10
0
        public static string GetValue(ELinkType type)
        {
            if (type == ELinkType.NoLinkIfContentNotExists)
            {
                return("NoLinkIfContentNotExists");
            }
            if (type == ELinkType.LinkToOnlyOneContent)
            {
                return("LinkToOnlyOneContent");
            }
            if (type == ELinkType.NoLinkIfContentNotExistsAndLinkToOnlyOneContent)
            {
                return("NoLinkIfContentNotExistsAndLinkToOnlyOneContent");
            }
            if (type == ELinkType.LinkToFirstContent)
            {
                return("LinkToFirstContent");
            }
            if (type == ELinkType.NoLinkIfContentNotExistsAndLinkToFirstContent)
            {
                return("NoLinkIfContentNotExistsAndLinkToFirstContent");
            }
            if (type == ELinkType.NoLinkIfChannelNotExists)
            {
                return("NoLinkIfChannelNotExists");
            }
            if (type == ELinkType.LinkToLastAddChannel)
            {
                return("LinkToLastAddChannel");
            }
            if (type == ELinkType.LinkToFirstChannel)
            {
                return("LinkToFirstChannel");
            }
            if (type == ELinkType.NoLinkIfChannelNotExistsAndLinkToLastAddChannel)
            {
                return("NoLinkIfChannelNotExistsAndLinkToLastAddChannel");
            }
            if (type == ELinkType.NoLinkIfChannelNotExistsAndLinkToFirstChannel)
            {
                return("NoLinkIfChannelNotExistsAndLinkToFirstChannel");
            }
            if (type == ELinkType.NoLink)
            {
                return("NoLink");
            }

            return("None");
        }
Exemplo n.º 11
0
 /// <summary>
 /// Sets the method used to measure the distance between two clusters.
 /// SINGLE: find single link distance aka minimum link, which is the closest distance
 /// between any item in cluster1 and any item in cluster2 COMPLETE: find
 /// complete link distance aka maximum link, which is the largest distance between
 /// any item in cluster1 and any item in cluster2 ADJCOMLPETE: as COMPLETE, but
 /// with adjustment, which is the largest within cluster distance AVERAGE:
 /// finds average distance between the elements of the two clusters MEAN:
 /// calculates the mean distance of a merged cluster (akak Group-average agglomerative
 /// clustering) CENTROID: finds the distance of the centroids of the clusters
 /// WARD: finds the distance of the change in caused by merging the cluster. The
 /// information of a cluster is calculated as the error sum of squares of the
 /// centroids of the cluster and its members. NEIGHBOR_JOINING use neighbor
 /// joining algorithm.
 /// </summary>
 public Hierarchical LinkType(ELinkType newLinkType)
 {
     Impl.setLinkType(new weka.core.SelectedTag((int)newLinkType, weka.clusterers.HierarchicalClusterer.TAGS_LINK_TYPE));
     return(this);
 }
Exemplo n.º 12
0
 public ChannelInfo(int id, string channelName, int siteId, string contentModelPluginId, string contentRelatedPluginIds, int parentId, string parentsPath, int parentsCount, int childrenCount, bool isLastNode, string indexName, string groupNameCollection, int taxis, DateTime addDate, string imageUrl, string content, int contentNum, string filePath, string channelFilePathRule, string contentFilePathRule, string linkUrl, ELinkType linkType, int channelTemplateId, int contentTemplateId, string keywords, string description, string extendValues)
 {
     Id                      = id;
     ChannelName             = channelName;
     SiteId                  = siteId;
     ContentModelPluginId    = contentModelPluginId;
     ContentRelatedPluginIds = contentRelatedPluginIds;
     ParentId                = parentId;
     ParentsPath             = parentsPath;
     ParentsCount            = parentsCount;
     ChildrenCount           = childrenCount;
     IsLastNode              = isLastNode;
     IndexName               = indexName;
     GroupNameCollection     = groupNameCollection;
     Taxis                   = taxis;
     AddDate                 = addDate;
     ImageUrl                = imageUrl;
     Content                 = content;
     ContentNum              = contentNum;
     FilePath                = filePath;
     ChannelFilePathRule     = channelFilePathRule;
     ContentFilePathRule     = contentFilePathRule;
     LinkUrl                 = linkUrl;
     LinkType                = ELinkTypeUtils.GetValue(linkType);
     ChannelTemplateId       = channelTemplateId;
     ContentTemplateId       = contentTemplateId;
     Keywords                = keywords;
     Description             = description;
     _extendValues           = extendValues;
 }
Exemplo n.º 13
0
 public static bool Equals(string typeStr, ELinkType type)
 {
     return(Equals(type, typeStr));
 }
Exemplo n.º 14
0
 /// <summary>
 /// 根据枚举类型获取展示信息
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public static string GetText(ELinkType type)
 {
     return(L(GetValue(type)));
 }
Exemplo n.º 15
0
 public LinkModel(ELinkType type, string url, string label = null)
 {
     Label = label ?? type.ToString();
     Url   = url;
     Type  = type;
 }
Exemplo n.º 16
0
 public LinkModel(ELinkType type, string url) : this(type, url, null)
 {
 }