1 19 package org.netbeans.modules.xslt.model.impl; 20 21 import java.util.List ; 22 23 import org.netbeans.modules.xslt.model.ForEach; 24 import org.netbeans.modules.xslt.model.Sort; 25 import org.netbeans.modules.xslt.model.XslComponent; 26 import org.netbeans.modules.xslt.model.XslVisitor; 27 import org.w3c.dom.Element ; 28 29 30 34 class ForEachImpl extends SequenceElementConstructorImpl implements ForEach { 35 36 ForEachImpl( XslModelImpl model, Element element ) { 37 super( model , element ); 38 } 39 40 ForEachImpl( XslModelImpl model ){ 41 super( model , XslElements.FOR_EACH ); 42 } 43 44 45 48 @Override 49 public void accept( XslVisitor visitor ) 50 { 51 visitor.visit( this ); 52 } 53 54 57 @Override 58 public Class <? extends XslComponent> getComponentType() 59 { 60 return ForEach.class; 61 } 62 63 66 public void addSort( Sort sort, int position ) { 67 insertAtIndex( SORT_PROPERTY , sort, position ); 68 } 69 70 73 public void appendSort( Sort sort ) { 74 addBefore( SORT_PROPERTY , sort , SEQUENCE_ELEMENTS ); 75 } 76 77 80 public List <Sort> getSorts() { 81 return getChildren( Sort.class ); 82 } 83 84 87 public void removeSort( Sort sort ) { 88 removeChild( SORT_PROPERTY, sort ); 89 } 90 91 } 92 | Popular Tags |