1 19 package org.netbeans.modules.xslt.model.impl; 20 21 import java.util.List ; 22 23 import org.netbeans.modules.xslt.model.AttributeSet; 24 import org.netbeans.modules.xslt.model.Copy; 25 import org.netbeans.modules.xslt.model.SequenceElement; 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.netbeans.modules.xslt.model.enums.TBoolean; 30 import org.w3c.dom.Element ; 31 32 33 37 class CopyImpl extends ValidationCopyNsSpecImpl implements Copy { 38 39 CopyImpl( XslModelImpl model, Element element ) { 40 super( model , element ); 41 } 42 43 CopyImpl( XslModelImpl model ){ 44 super( model , XslElements.COPY ); 45 } 46 47 50 @Override 51 public void accept( XslVisitor visitor ) 52 { 53 visitor.visit( this ); 54 } 55 56 59 @Override 60 public Class <? extends XslComponent> getComponentType() 61 { 62 return Copy.class; 63 } 64 65 68 public List <XslReference<AttributeSet>> getUseAttributeSets() { 69 return resolveGlobalReferenceList( AttributeSet.class, 70 XslAttributes.USE_ATTRIBUTE_SETS ); 71 } 72 73 76 public void setUseAttributeSets( List <XslReference<AttributeSet>> collection ) { 77 setAttributeList( XslAttributes.USE_ATTRIBUTE_SETS , collection ); 78 } 79 80 83 public void addSequenceChild( SequenceElement element, int position ) { 84 insertAtIndex( SEQUENCE_ELEMENT, element , position ); 85 } 86 87 90 public void appendSequenceChild( SequenceElement element ) { 91 appendChild( SEQUENCE_ELEMENT, element ); 92 } 93 94 97 public List <SequenceElement> getSequenceChildren() { 98 return getChildren( SequenceElement.class ); 99 } 100 101 104 public void removeSequenceChild( SequenceElement element ) { 105 removeChild( SEQUENCE_ELEMENT, element ); 106 } 107 108 111 public TBoolean getInheritNamespaces() { 112 return TBoolean.forString( getAttribute( 113 XslAttributes.INHERIT_NAMESPACES )); 114 } 115 116 119 public void setInheritNamespaces( TBoolean value ) { 120 setAttribute( XslAttributes.INHERIT_NAMESPACES, value ); 121 } 122 123 } 124 | Popular Tags |