TreeNode.java 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. package com.xt.dsp.common;
  2. import java.util.HashMap;
  3. import java.util.Map;
  4. /**
  5. * 树类
  6. *
  7. */
  8. public class TreeNode {
  9. /**
  10. * 树id
  11. */
  12. protected String id;
  13. /**
  14. * 树tid可存放code代码
  15. */
  16. protected String tId;
  17. /**
  18. * 树名称
  19. */
  20. protected String name;
  21. /**
  22. * 父节点
  23. */
  24. protected String pId;
  25. /**
  26. * 是否父节点(父节点存在时,改字段可以不实用)
  27. */
  28. protected Long isParent;
  29. /**
  30. * icon图标
  31. */
  32. protected String iconSkin;
  33. /**
  34. * 节点是否可以展开
  35. */
  36. protected String open;
  37. protected String icon;
  38. /**
  39. * 自定义属性
  40. */
  41. private Map<String, String> attributes = new HashMap<String, String>();
  42. public String getIconSkin() {
  43. return this.iconSkin;
  44. }
  45. public String getId() {
  46. return this.id;
  47. }
  48. public Long getIsParent() {
  49. return this.isParent;
  50. }
  51. public String getName() {
  52. return this.name;
  53. }
  54. public String getOpen() {
  55. return this.open;
  56. }
  57. public String getpId() {
  58. return this.pId;
  59. }
  60. public String gettId() {
  61. return this.tId;
  62. }
  63. public void setIconSkin(String iconSkin) {
  64. this.iconSkin = iconSkin;
  65. }
  66. public void setId(String id) {
  67. this.id = id;
  68. }
  69. public void setIsParent(Long isParent) {
  70. this.isParent = isParent;
  71. }
  72. public void setName(String name) {
  73. this.name = name;
  74. }
  75. public void setOpen(String open) {
  76. this.open = open;
  77. }
  78. public void setpId(String pId) {
  79. this.pId = pId;
  80. }
  81. public void settId(String tId) {
  82. this.tId = tId;
  83. }
  84. public String getIcon() {
  85. return icon;
  86. }
  87. public void setIcon(String icon) {
  88. this.icon = icon;
  89. }
  90. public void addAttribute(String name, String value) {
  91. this.attributes.put(name, value);
  92. }
  93. public String getAttribute(String name) {
  94. return this.attributes.get(name);
  95. }
  96. public Map<String, String> getAttributes() {
  97. return this.attributes;
  98. }
  99. }