1 58 package org.apache.ecs.wml; 59 60 import org.apache.ecs.Element; 61 import org.apache.ecs.MultiPartElement; 62 63 69 public class Do extends org.apache.ecs.MultiPartElement 70 { 71 75 public Do() 76 { 77 setElementType("do"); 78 } 79 80 86 public Do(DoType type, String label) 87 { 88 this(); 89 setType(type); 90 setLabel(label); 91 } 92 93 98 public Do(DoType type) 99 { 100 this(); 101 setType(type); 102 } 103 104 108 public Do setType(DoType type) 109 { 110 addAttribute("type", type.toString()); 111 return this; 112 } 113 114 118 public Do setLabel(String label) 119 { 120 addAttribute("label", label); 121 return this; 122 } 123 124 128 public Do setName(String name) 129 { 130 addAttribute("name", name); 131 return this; 132 } 133 134 138 public Do addElement(Element element) 139 { 140 addElementToRegistry(element, getFilterState()); 141 return(this); 142 } 143 144 148 public Do addElement(String element) 149 { 150 addElementToRegistry(element, getFilterState()); 151 return(this); 152 } 153 } 154 | Popular Tags |