1 19 package org.netbeans.modules.xslt.model.impl; 20 21 import java.util.List ; 22 23 import org.netbeans.modules.xslt.model.CallTemplate; 24 import org.netbeans.modules.xslt.model.Template; 25 import org.netbeans.modules.xslt.model.WithParam; 26 import org.netbeans.modules.xslt.model.XslComponent; 27 import org.netbeans.modules.xslt.model.XslReference; 28 import org.netbeans.modules.xslt.model.XslVisitor; 29 import org.w3c.dom.Element ; 30 31 32 36 class CallTemplateImpl extends XslComponentImpl implements CallTemplate { 37 38 CallTemplateImpl( XslModelImpl model, Element element ) { 39 super( model , element ); 40 } 41 42 CallTemplateImpl( XslModelImpl model ){ 43 super( model , XslElements.CALL_TEMPLATE ); 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 CallTemplate.class; 62 } 63 64 67 public void addWithParam( WithParam withParam, int position ) { 68 insertAtIndex( WITH_PARAM, withParam, position); 69 } 70 71 74 public void appendWithParam( WithParam withParam ) { 75 appendChild( WITH_PARAM, withParam); 76 } 77 78 81 public List <WithParam> getWithParams() { 82 return getChildren( WithParam.class ); 83 } 84 85 88 public void removeWithParam( WithParam withParam ) { 89 removeChild( WITH_PARAM, withParam); 90 } 91 92 95 public XslReference<Template> getName() { 96 return resolveGlobalReference( Template.class, 97 XslAttributes.NAME_OF_CALL_TMPL ); 98 } 99 100 103 public void setName( XslReference<Template> name ) { 104 setAttribute( XslAttributes.NAME_OF_CALL_TMPL, name ); 105 } 106 107 } 108 | Popular Tags |