1 19 package org.netbeans.modules.xslt.model.impl; 20 21 import java.util.List ; 22 23 import org.netbeans.modules.xslt.model.Attribute; 24 import org.netbeans.modules.xslt.model.AttributeSet; 25 import org.netbeans.modules.xslt.model.XslComponent; 26 import org.netbeans.modules.xslt.model.XslReference; 27 import org.netbeans.modules.xslt.model.XslVisitor; 28 import org.w3c.dom.Element ; 29 30 31 35 class AttributeSetImpl extends QNameableImpl implements AttributeSet { 36 37 38 AttributeSetImpl( XslModelImpl model, Element element ) { 39 super( model , element ); 40 } 41 42 AttributeSetImpl( XslModelImpl model ){ 43 super( model , XslElements.ATTRIBUTE_SET ); 44 } 45 46 49 @Override 50 public void accept( XslVisitor visitor ) 51 { 52 visitor.visit( this ); 53 } 54 55 58 @Override 59 public Class <? extends XslComponent> getComponentType() 60 { 61 return AttributeSet.class; 62 } 63 64 67 public void addAttribute( Attribute attr, int position ) { 68 insertAtIndex( ATTRIBUTE_PROPERTY, attr, position, 69 Attribute.class); 70 } 71 72 75 public void appendAttribute( Attribute attr ) { 76 appendChild( ATTRIBUTE_PROPERTY , attr ); 77 } 78 79 82 public List <Attribute> getAttributes() { 83 return getChildren( Attribute.class ); 84 } 85 86 89 public void removeAttribute( Attribute attr ) { 90 removeChild( ATTRIBUTE_PROPERTY, attr); 91 } 92 93 96 public List <XslReference<AttributeSet>> getUseAttributeSets() { 97 return resolveGlobalReferenceList( AttributeSet.class , 98 XslAttributes.USE_ATTRIBUTE_SETS); 99 } 100 101 104 public void setUseAttributeSets( List <XslReference<AttributeSet>> collection ) { 105 setAttributeList( XslAttributes.USE_ATTRIBUTE_SETS, collection); 106 } 107 108 } 109 | Popular Tags |