1 19 20 package org.netbeans.modules.xml.schema.model.impl; 21 22 import org.netbeans.modules.xml.schema.model.Pattern; 23 import org.netbeans.modules.xml.schema.model.SchemaComponent; 24 import org.netbeans.modules.xml.schema.model.visitor.SchemaVisitor; 25 import org.w3c.dom.Element ; 26 27 33 public class PatternImpl extends SchemaComponentImpl implements Pattern { 34 35 public PatternImpl(SchemaModelImpl model) { 36 this(model,createNewComponent(SchemaElements.PATTERN, model)); 37 } 38 39 40 public PatternImpl(SchemaModelImpl model, Element e) { 41 super(model, e); 42 43 } 44 45 49 public Class <? extends SchemaComponent> getComponentType() { 50 return Pattern.class; 51 } 52 53 public void accept(SchemaVisitor visitor) { 54 visitor.visit(this); 55 } 56 57 58 public String getValue() { 59 return getAttribute(SchemaAttributes.VALUE); 60 } 61 62 public void setValue(String value) { 63 setAttribute(VALUE_PROPERTY, SchemaAttributes.VALUE, value); 64 } 65 } 66 67 | Popular Tags |