1 19 package org.netbeans.modules.xml.axi; 20 21 import java.util.List ; 22 import org.netbeans.modules.xml.axi.datatype.Datatype; 23 import org.netbeans.modules.xml.axi.visitor.AXIVisitor; 24 import org.netbeans.modules.xml.schema.model.Form; 25 import org.netbeans.modules.xml.schema.model.SchemaComponent; 26 27 32 public abstract class Element extends AbstractElement implements AXIType { 33 34 37 public Element(AXIModel model) { 38 super(model); 39 } 40 41 44 public Element(AXIModel model, SchemaComponent schemaComponent) { 45 super(model, schemaComponent); 46 } 47 48 51 public Element(AXIModel model, AXIComponent sharedComponent) { 52 super(model, sharedComponent); 53 } 54 55 58 public void accept(AXIVisitor visitor) { 59 visitor.visit(this); 60 } 61 62 65 public abstract boolean isReference(); 66 67 70 public abstract Element getReferent(); 71 72 75 public abstract boolean getAbstract(); 76 77 80 public abstract void setAbstract(boolean value); 81 82 85 public abstract String getBlock(); 86 87 90 public abstract void setBlock(String value); 91 92 95 public abstract String getFinal(); 96 97 100 public abstract void setFinal(String value); 101 102 105 public abstract String getFixed(); 106 107 110 public abstract void setFixed(String value); 111 112 115 public abstract String getDefault(); 116 117 120 public abstract void setDefault(String value); 121 122 125 public abstract Form getForm(); 126 127 130 public abstract void setForm(Form value); 131 132 135 public abstract boolean getNillable(); 136 137 140 public abstract void setNillable(boolean value); 141 142 145 public Boolean isNillable() { 146 return Boolean.valueOf(getNillable()); 147 } 148 149 152 public void setNillable(Boolean nillable) { 153 if(nillable != null) 154 setNillable(nillable.booleanValue()); 155 } 156 157 161 public abstract AXIType getType(); 162 163 166 public abstract void setType(AXIType type); 167 168 171 public String toString() { 172 return getName(); 173 } 174 175 protected String finalValue; 179 protected String fixedValue; 180 protected String defaultValue; 181 protected Form form; 182 protected String block; 183 protected boolean isAbstract; 184 protected boolean isNillable; 185 186 public static final String PROP_FINAL = "final"; public static final String PROP_FIXED = "fixed"; public static final String PROP_DEFAULT = "default"; public static final String PROP_FORM = "form"; public static final String PROP_BLOCK = "block"; public static final String PROP_ABSTRACT = "abstract"; public static final String PROP_NILLABLE = "nillable"; public static final String PROP_TYPE = "type"; public static final String PROP_ELEMENT_REF = "elementRef"; } 199 | Popular Tags |