1 19 package org.netbeans.modules.xslt.model.impl; 20 21 import org.netbeans.modules.xslt.model.Attribute; 22 import org.netbeans.modules.xslt.model.AttributeValueTemplate; 23 import org.netbeans.modules.xslt.model.XslComponent; 24 import org.netbeans.modules.xslt.model.XslVisitor; 25 import org.netbeans.modules.xslt.model.enums.Validation; 26 import org.w3c.dom.Element ; 27 28 29 33 class AttributeImpl extends TypeableNameableSeqElCtor implements Attribute 34 { 35 36 AttributeImpl( XslModelImpl model, Element element ) { 37 super( model , element ); 38 } 39 40 AttributeImpl( XslModelImpl model ) { 41 super( model , XslElements.ATTRIBUTE ); 42 } 43 44 47 @Override 48 public void accept( XslVisitor visitor ) 49 { 50 visitor.visit( this ); 51 } 52 53 56 @Override 57 public Class <? extends XslComponent> getComponentType() 58 { 59 return Attribute.class; 60 } 61 62 63 66 public Validation getValidation() { 67 return Validation.forString( getAttribute( XslAttributes.VALIDATION )); 68 } 69 70 73 public void setValidation( Validation validation ) { 74 setAttribute( XslAttributes.VALIDATION , validation ); 75 } 76 77 80 public AttributeValueTemplate getSeparator() { 81 return AttributeValueTemplateImpl.creatAttributeValueTemplate( 82 this , XslAttributes.SEPARATOR ); 83 } 84 85 88 public void setSeparator( AttributeValueTemplate avt ) { 89 setAttribute( XslAttributes.SEPARATOR, avt ); 90 } 91 92 } 93 | Popular Tags |