1 19 package org.netbeans.modules.xml.axi; 20 21 import org.netbeans.modules.xml.axi.datatype.Datatype; 22 import org.netbeans.modules.xml.axi.datatype.StringType; 23 import org.netbeans.modules.xml.axi.impl.DatatypeBuilder; 24 import org.netbeans.modules.xml.axi.visitor.AXIVisitor; 25 import org.netbeans.modules.xml.schema.model.Form; 26 import org.netbeans.modules.xml.schema.model.SchemaComponent; 27 import org.netbeans.modules.xml.schema.model.Attribute.Use; 28 29 34 public abstract class Attribute extends AbstractAttribute implements AXIType { 35 36 39 public Attribute(AXIModel model) { 40 super(model); 41 } 42 43 46 public Attribute(AXIModel model, SchemaComponent schemaComponent) { 47 super(model, schemaComponent); 48 } 49 50 53 public Attribute(AXIModel model, AXIComponent sharedComponent) { 54 super(model, sharedComponent); 55 } 56 57 60 public void accept(AXIVisitor visitor) { 61 visitor.visit(this); 62 } 63 64 67 public abstract boolean isReference(); 68 69 72 public abstract Attribute getReferent(); 73 74 77 public abstract void setName(String name); 78 79 83 public abstract AXIType getType(); 84 85 88 public abstract void setType(AXIType type); 89 90 93 public abstract Form getForm(); 94 95 98 public abstract void setForm(Form form); 99 100 103 public abstract String getFixed(); 104 105 108 public abstract void setFixed(String value); 109 110 113 public abstract String getDefault(); 114 115 118 public abstract void setDefault(String value); 119 120 123 public abstract Use getUse(); 124 125 128 public abstract void setUse(Use use); 129 130 133 public String toString() { 134 return getName(); } 136 137 protected String name; 141 protected Form form; 142 protected Use use; 143 protected String defaultValue; 144 protected String fixedValue; 145 protected AXIType datatype; 146 147 public static final String PROP_NAME = "name"; public static final String PROP_FORM = "form"; public static final String PROP_USE = "use"; public static final String PROP_DEFAULT = "default"; public static final String PROP_FIXED = "fixed"; public static final String PROP_TYPE = "type"; public static final String PROP_ATTRIBUTE_REF = "attributeRef"; } 158 | Popular Tags |