1 19 20 package org.netbeans.modules.xml.schema.model.impl; 21 22 import org.netbeans.modules.xml.schema.model.GlobalSimpleType; 23 import org.netbeans.modules.xml.schema.model.SchemaComponent; 24 import org.netbeans.modules.xml.schema.model.SimpleTypeRestriction; 25 import org.netbeans.modules.xml.schema.model.visitor.SchemaVisitor; 26 import org.netbeans.modules.xml.xam.dom.NamedComponentReference; 27 import org.w3c.dom.Element ; 28 29 33 public class SimpleTypeRestrictionImpl extends CommonSimpleRestrictionImpl implements SimpleTypeRestriction{ 34 35 36 protected SimpleTypeRestrictionImpl(SchemaModelImpl model) { 37 this(model, createNewComponent(SchemaElements.RESTRICTION, model)); 38 } 39 40 public SimpleTypeRestrictionImpl(SchemaModelImpl model, Element el){ 41 super(model,el); 42 } 43 44 48 public Class <? extends SchemaComponent> getComponentType() { 49 return SimpleTypeRestriction.class; 50 } 51 52 public void accept(SchemaVisitor visitor) { 53 visitor.visit(this); 54 } 55 56 public void setBase(NamedComponentReference<GlobalSimpleType> type) { 57 setAttribute(BASE_PROPERTY, SchemaAttributes.BASE, type); 58 } 59 60 public NamedComponentReference<GlobalSimpleType> getBase() { 61 return resolveGlobalReference(GlobalSimpleType.class, SchemaAttributes.BASE); 62 } 63 64 } 65 | Popular Tags |