1 19 package org.netbeans.modules.xml.schema.model.impl; 20 21 import org.netbeans.modules.xml.schema.model.Enumeration; 22 import org.netbeans.modules.xml.schema.model.SchemaComponent; 23 import org.netbeans.modules.xml.schema.model.visitor.SchemaVisitor; 24 import org.w3c.dom.Element ; 25 26 public class EnumerationImpl extends SchemaComponentImpl implements Enumeration { 27 28 public EnumerationImpl(SchemaModelImpl model) { 29 this(model, createNewComponent(SchemaElements.ENUMERATION, model)); 30 } 31 32 33 public EnumerationImpl(SchemaModelImpl model, Element e) { 34 super(model, e); 35 } 36 37 41 public Class <? extends SchemaComponent> getComponentType() { 42 return Enumeration.class; 43 } 44 45 public void setValue(String value) { 46 setAttribute(VALUE_PROPERTY, SchemaAttributes.VALUE, value); 47 } 48 49 public String getValue() { 50 return getAttribute(SchemaAttributes.VALUE); 51 } 52 53 56 public void accept(SchemaVisitor visitor) { 57 visitor.visit(this); 58 } 59 } 60 | Popular Tags |